diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 0cfbc743..bccda827 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,26 +1,26 @@ lockVersion: 2.0.0 id: 3e3290ca-0ee8-4981-b1bc-14536048fa63 management: - docChecksum: 168d09185da75c45f6edca32cb2bc2dd + docChecksum: 2edf37b95d0d9d163411e4d6e0d8e06d docVersion: 0.9.0 - speakeasyVersion: 1.722.7 - generationVersion: 2.832.9 - releaseVersion: 0.12.8 - configChecksum: 50bf621427a8287d9ca62293e512f86a + speakeasyVersion: 1.730.0 + generationVersion: 2.844.2 + releaseVersion: 0.12.9 + configChecksum: 7fcb9aea80caa0123a1d1b4b07dfed9b repoURL: https://github.com/gleanwork/api-client-python.git installationURL: https://github.com/gleanwork/api-client-python.git published: true persistentEdits: - generation_id: bcf8dca0-d5eb-40ce-a204-2aa32fe24c88 - pristine_commit_hash: 41297bcf79da7abf5156c3d09490fd4236aff892 - pristine_tree_hash: 639a9981217f2ac59f39e86a5e053a64e33f9fbe + generation_id: be79cfad-8e31-4a9a-a8ac-853b47a98eae + pristine_commit_hash: e64ebc7e15b871e82fcb88c85a7123f93dff694a + pristine_tree_hash: d140d00797e6b6b1ade0b54e232ffa1140187ae7 features: python: additionalDependencies: 1.0.0 additionalProperties: 1.0.1 configurableModuleName: 0.2.0 - constsAndDefaults: 1.0.6 - core: 6.0.11 + constsAndDefaults: 1.0.7 + core: 6.0.12 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 devContainers: 3.0.0 @@ -37,7 +37,7 @@ features: methodArguments: 1.0.2 mockServer: 0.1.1 multipartFileContentType: 1.0.0 - nameOverrides: 3.0.1 + nameOverrides: 3.0.3 responseFormat: 1.1.0 retries: 3.0.4 sdkHooks: 1.2.1 @@ -73,14 +73,18 @@ trackedFiles: id: 3d0bc04308fd last_write_checksum: sha1:b0c6864817dbdc3bde8fee4a1e142d51e89f781c pristine_git_object: a6800fed5ba94f25934cdd5b8fe3fa6832f51239 + docs/errors/errorresponse.md: + id: 910ef333346b + last_write_checksum: sha1:1f4ebb1db37a510e68d02e7f1f5b7b2fd63c0311 + pristine_git_object: 7ac30077e52db91693472ff9b82ee421d24014d5 docs/errors/gleandataerror.md: id: d8679ae13234 - last_write_checksum: sha1:3183d01d67f7287140f55de2737e649e7ce32ec9 - pristine_git_object: 4ea69fbe9f4add8572cfe6c755aca8fe1d2ba11e + last_write_checksum: sha1:a6567c83c6c0bf8eaed55f50af08001869d6a5de + pristine_git_object: 7c4c0d90fd0a2de3e48b99ce691c1e9a6ab03041 docs/models/actionsummary.md: id: 1ff225176066 - last_write_checksum: sha1:278bb81fcc7b886e7f2c7d04112cdd1adaf6492f - pristine_git_object: 3bf02ee017770a749252e2af6370bdd8b7904323 + last_write_checksum: sha1:e5eb353efca3b865fe1a67809c9c3c2a7c2531c1 + pristine_git_object: 853df19f07848e7ac7f235ab47d82406a011e1fe docs/models/activity.md: id: 78c9fe854b65 last_write_checksum: sha1:2bb3d1005124784d416910cff9777277facaebb2 @@ -427,8 +431,8 @@ trackedFiles: pristine_git_object: 743e1fd15ef2e5a212c755a793811ccbf19d46a5 docs/models/chatresponse.md: id: f59beb8f6c98 - last_write_checksum: sha1:fc09d73117b02239395524f00faf9661dc6b9c34 - pristine_git_object: 0ea540ed8c772f8f0e6b446ed5e0e4c7782ac99e + last_write_checksum: sha1:fb69e7b641548c4a72d60bb607b87443fb9abc06 + pristine_git_object: c1e42aeb62c37b61a4bf6ee0dcbdd44c8cb3feba docs/models/chatrestrictionfilters.md: id: cae12da2c86d last_write_checksum: sha1:0cbed53f5ff5fe8fe9f44909300ad9ab82ace936 @@ -545,6 +549,10 @@ trackedFiles: id: 0ef7e380c9bc last_write_checksum: sha1:c597b1a30b09f87991a13bb59c53400410134f35 pristine_git_object: b9e1060aed3df9dcc4a396b895e26bd7529f6d61 + docs/models/configurationvalue.md: + id: 4dd9104463d1 + last_write_checksum: sha1:97fd02f694962abf4799b31a586b688966cac4ea + pristine_git_object: aea215fe87d00675a3b97d150d81470b16fe2a84 docs/models/connectortype.md: id: e6f4d8f19cd5 last_write_checksum: sha1:9efd332a75fba3f2023b761f238f274680a46d81 @@ -705,10 +713,18 @@ trackedFiles: id: 0480a1f35070 last_write_checksum: sha1:9dad3acf74b5977a6476f86ba6c45781c352aa81 pristine_git_object: 44d81a93960839704e0ee5f0d19ec4884aab0c4e + docs/models/datasourceconfigurationresponse.md: + id: 7c6f38290f96 + last_write_checksum: sha1:10c0068be581150ab5915785029e610bdf472ab5 + pristine_git_object: ba3be1321e92d6af0bfdad972ec394d96dec7baf docs/models/datasourcegroupdefinition.md: id: 2b5e3862da5c last_write_checksum: sha1:594f0d360c5a2466e6492ca11e05a7c46c070208 pristine_git_object: e716c04f9ea29e7b8acca40f62f429b35c795614 + docs/models/datasourceinstanceconfiguration.md: + id: 968e0a9feb17 + last_write_checksum: sha1:7674d089b7dc06b3fdde2a7fe1a44e50b871ca83 + pristine_git_object: 4aa3cb988fe844a3994344f543171622bf11e227 docs/models/datasourcemembershipdefinition.md: id: 8e527b6d054c last_write_checksum: sha1:e381cf7d015eaa27815876df0388f2d92e96fa96 @@ -1357,6 +1373,10 @@ trackedFiles: id: 4cf100b4fe49 last_write_checksum: sha1:2209ee35f4f21791035a6785f464befc568e9afd pristine_git_object: 6bd845ab38a08ac7ec5473920c9d1f6567716ced + docs/models/getdatasourceinstanceconfigurationrequest.md: + id: bb085196abd9 + last_write_checksum: sha1:d2971d5d295c276de0cdcee2ba9d4b761b10f7b2 + pristine_git_object: 949f49d131967a1bf1906f604908c5d09c8b40de docs/models/getdlpreportresponse.md: id: 3e011132423a last_write_checksum: sha1:b9907518fd1ceb0348ba69ca31459073dd5e2160 @@ -1479,8 +1499,8 @@ trackedFiles: pristine_git_object: 51f7027a16bc10bb4effbdd438eab18581703421 docs/models/gleandataerror.md: id: feb7c60631e4 - last_write_checksum: sha1:3183d01d67f7287140f55de2737e649e7ce32ec9 - pristine_git_object: 4ea69fbe9f4add8572cfe6c755aca8fe1d2ba11e + last_write_checksum: sha1:a6567c83c6c0bf8eaed55f50af08001869d6a5de + pristine_git_object: 7c4c0d90fd0a2de3e48b99ce691c1e9a6ab03041 docs/models/grantpermission.md: id: 740a53de1e0a last_write_checksum: sha1:6f0d12e70708144b4978da20cccda528785c9e0d @@ -1619,8 +1639,8 @@ trackedFiles: pristine_git_object: e6acc93ce0eae76434a8ef9f94ba080e954f022e docs/models/inviteinfo.md: id: 3d5da9535438 - last_write_checksum: sha1:653cc53628464696143b2ffb85cadb0d3dcad5d5 - pristine_git_object: e929b03338151b780598fbe5b96ffa19bc3eb583 + last_write_checksum: sha1:5f65df8961f7c86a847f4808a3e1fffe97ae0082 + pristine_git_object: 627329922765aae3e91345adcf21351b2877ebc1 docs/models/issue.md: id: 44d611a73cb7 last_write_checksum: sha1:f6909f3a5070d87eeb198d7f7c3d04a75ca718c3 @@ -2429,6 +2449,14 @@ trackedFiles: id: 1f63a3763a40 last_write_checksum: sha1:a31407e081b2b90412c3b07162ccddbda181547a pristine_git_object: e08d3f9c8a6cec4f310eaeddfd9cc981101e9fa8 + docs/models/updatedatasourceconfigurationrequest.md: + id: 63517c4319b5 + last_write_checksum: sha1:06e2a875f4305e6afa50168d4c91f9b68c281b37 + pristine_git_object: 938e8f1b385c9831916cc3d151aaeab65d43f933 + docs/models/updatedatasourceinstanceconfigurationrequest.md: + id: 5230dc3a739c + last_write_checksum: sha1:5a41bbe2580b258489b341371634e3e5a979b98e + pristine_git_object: 50e0f667546eb80337155afc9d9a503b9f522a41 docs/models/updatedlpconfigrequest.md: id: 3bcc0c7398d0 last_write_checksum: sha1:1a0b62f51d306beeb83f6f8ef7d68c6a85eab65d @@ -2611,8 +2639,8 @@ trackedFiles: pristine_git_object: 61dd41f0319201cc105e29174ab1cc0018cecbce docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:ac437d9707a34794688d275ba9b9daad024f0410 - pristine_git_object: bf4a2db8f086430f20eb25bf3cc7652b3a4bcef6 + last_write_checksum: sha1:f4fd02ccef64c791d216a40e1c9fcd4dfa43bd2e + pristine_git_object: 2856eeeb88599fe960b4060271977966c0650d39 docs/sdks/announcements/README.md: id: 3d2e130a217c last_write_checksum: sha1:ecfa655bb27dee6890656542cfafda0aa6ed1ab9 @@ -2655,8 +2683,8 @@ trackedFiles: pristine_git_object: f311071e89056a0df703b15f5ebdd17de75e9488 docs/sdks/datasources/README.md: id: 024d3ed36945 - last_write_checksum: sha1:9e06819a20a8e78cc82c7b4ea7c84e69206a4d29 - pristine_git_object: c9f66bdb622b4684f9f8d14a8ba8720b2809f463 + last_write_checksum: sha1:717afc78a8ff1b75fc467f73d7804507a7dbb848 + pristine_git_object: 03c2257dc739cd6b6bfc5b5201c2e962a04a4b32 docs/sdks/entities/README.md: id: a140ac5181b9 last_write_checksum: sha1:c5955573d5570bc98bb911311860abf4c85d19ac @@ -2673,6 +2701,10 @@ trackedFiles: id: 12c7fa0c818a last_write_checksum: sha1:6ef7ed841d5ee04864791ef63a43f728d931b713 pristine_git_object: 9e293dca8d87e21416cedc1dcc033cf091f9baac + docs/sdks/indexingdatasources/README.md: + id: aa113bda8cbc + last_write_checksum: sha1:9e06819a20a8e78cc82c7b4ea7c84e69206a4d29 + pristine_git_object: c9f66bdb622b4684f9f8d14a8ba8720b2809f463 docs/sdks/indexingdocuments/README.md: id: 7ca38da53414 last_write_checksum: sha1:4d55ef9f7d2e8d0c4457753721f5044943a46db4 @@ -2695,8 +2727,8 @@ trackedFiles: pristine_git_object: 0aa193b38d7d95cd3301469f9a6ad1260a1b1b51 docs/sdks/people/README.md: id: ff7b3ee21c2b - last_write_checksum: sha1:4bb2592f2d27226672308fa1f3cb5c7ebb7691fb - pristine_git_object: 8b35d44df3afdcf9a3e3bc320a315da2651d095b + last_write_checksum: sha1:a7b323db5d75d1adbfa36aed65bc8575e002e44a + pristine_git_object: 363dfc325f462a4b4340777a8c9164da8f619e97 docs/sdks/pins/README.md: id: e887aca9ba0f last_write_checksum: sha1:c11aea840d911395a606a528575fe224c8a6b86a @@ -2735,8 +2767,8 @@ trackedFiles: pristine_git_object: e2fda7fe263c2a111e53872e3ad5bc324b4dccfe pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:cd9618a071dc65e548c604011f7922a19bd4e112 - pristine_git_object: 358810d2a9d3bd25e6fbe61eaab9cc0c6b9e374c + last_write_checksum: sha1:4303358b763c488897a3ec7f2f11e666cbed14ab + pristine_git_object: 3dce96bfa6c29e5d5d8367a56a3296bea2766f72 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:c2c83f71dea61eb50c9e05da83b16d18b4da8794 @@ -2763,12 +2795,12 @@ trackedFiles: pristine_git_object: 58c4d70ac1797b86ff5c4237cafbc344c42d8f64 src/glean/api_client/_version.py: id: 0ce22b26136b - last_write_checksum: sha1:1e660e8b70d98a8dc857edd2b64e505881b58095 - pristine_git_object: ff2fde5492a4ff878e3ea49923b2f26af789a187 + last_write_checksum: sha1:440501258d5d33e849bb8f85d951e9d01d67b0db + pristine_git_object: df68600a147481a47af333d9dda86d426ca2b249 src/glean/api_client/agents.py: id: b925701a9217 - last_write_checksum: sha1:c1688c3d141db7707458f3ac7ff29c4a71e6812b - pristine_git_object: e83595d0b12f20855f2e75dae207c28168c0f25c + last_write_checksum: sha1:ee99ae3d58f7f77ac2eba99c104d04d53c16c09c + pristine_git_object: 134cc9bac9504c13c06a316f74fcce7dfc6eb054 src/glean/api_client/announcements.py: id: 452f3d593912 last_write_checksum: sha1:f46bdf97d06f038b579907fdb879a65bc995d326 @@ -2827,28 +2859,32 @@ trackedFiles: pristine_git_object: 756e122c3e258805290344aa6d978b351bcbfbf5 src/glean/api_client/datasources.py: id: 22aad0060f38 - last_write_checksum: sha1:07f1693c31b5372fb55f178e5b9bd02b7c40c3bf - pristine_git_object: d7340a086976fc1e2d3f10acaac30895defbc504 + last_write_checksum: sha1:4bae18a40be4792dc8c78b4f0b79e2c2cfbe6ec6 + pristine_git_object: 60e6da53662c711d224bd5731140220c9152cb18 src/glean/api_client/entities.py: id: 38ebbab2f8a0 last_write_checksum: sha1:2cda7b3a04563e5e452eb65a71e357e34707e144 pristine_git_object: 2564ac766b63e3373d8db9350570edcf319d211d src/glean/api_client/errors/__init__.py: id: 88bbd5450191 - last_write_checksum: sha1:a070425d6b343a94b14e395754898f1169c899f3 - pristine_git_object: 185efb348fb668e36af44ca0d59cf401ca40c003 + last_write_checksum: sha1:c690818d01852a6dfe4049feb3f7e0069ed09a58 + pristine_git_object: b8998ad3d52363edb5c468d4da1f0d11dd2e5c7e src/glean/api_client/errors/collectionerror.py: id: c0932ce3ae9f last_write_checksum: sha1:0b5f08e5372726fe70cd721719c386d0e21d0dcc pristine_git_object: aa03a80dd8295663dfa6b12558de485cd17f3c1d + src/glean/api_client/errors/errorresponse.py: + id: 908371c9ccd7 + last_write_checksum: sha1:8aebd1486c552bb87f95f8bd1f2d4cb7a8323f96 + pristine_git_object: 70cab4aacef1e755b93552a80c88cc9998f134ea src/glean/api_client/errors/gleanbaseerror.py: id: 1d7d890ee3e5 last_write_checksum: sha1:75b3f2e5195423e6a5f5be3b3268d3eaa0b83e74 pristine_git_object: b2f7acde3c293f63d1af370cf1bd4266048c3834 src/glean/api_client/errors/gleandataerror.py: id: 8bae5389c0bf - last_write_checksum: sha1:87460de08c511bb260863496050be12c17831c23 - pristine_git_object: 7b0dfa056f506e6b3c33c3a648b43d41287163b8 + last_write_checksum: sha1:d9db844614059154744d99927a7468306de298c2 + pristine_git_object: 754c85de70a38e982ea6368b9c4f922883a9a040 src/glean/api_client/errors/gleanerror.py: id: 9f1d85652f59 last_write_checksum: sha1:a7a2bc1335123c6bd8c9f945a9c653f061e14167 @@ -2875,8 +2911,8 @@ trackedFiles: pristine_git_object: 89560b566073785535643e694c112bedbd3db13d src/glean/api_client/indexing.py: id: 46c62151847b - last_write_checksum: sha1:25a4b21167ee3b2148c858a17dd377fcf032d697 - pristine_git_object: 27b07e8e6b7df92743407034732d27968a16e86b + last_write_checksum: sha1:ca2f3df9dc68bbf4d1d666ffe4a197e40dd89e7d + pristine_git_object: 3a668c8ce7805ea922a292ce35ff9c4f1f4d6afc src/glean/api_client/indexing_authentication.py: id: ab6b40ef5aa5 last_write_checksum: sha1:0df45ff755a309dbad2287463b541b1a7fc4d8ac @@ -2885,6 +2921,10 @@ trackedFiles: id: 97727f0727c1 last_write_checksum: sha1:1e39324e38f2abbaf1bb65dd2a5525308f9a92e1 pristine_git_object: 7e118cd30a61f7e8eab81c9e2b5efd83c4c5a594 + src/glean/api_client/indexing_datasources.py: + id: 9520e2db8686 + last_write_checksum: sha1:664c01e7d5f697ebbaa91ab37f662d605d58a10c + pristine_git_object: f5f5506766b76212d51986d2ec10dfeaf9b1eae7 src/glean/api_client/indexing_documents.py: id: b5c2b64ee1fa last_write_checksum: sha1:d480232a8f694d6596e45943ea59e03448c636d6 @@ -2907,12 +2947,12 @@ trackedFiles: pristine_git_object: 1c182cb0150642014463e1ceec8bc8b785e5b9f3 src/glean/api_client/models/__init__.py: id: d5f6ea5efcbe - last_write_checksum: sha1:063f018262ae580319a4e731ecb96e5f42def78d - pristine_git_object: 87205efe337c29272a0f98670502f8ba401e231d + last_write_checksum: sha1:6239f4bb2a3b69fe65135925bcc3e04983c6af4d + pristine_git_object: 980bdd63db8f58a09de5485817a4cafadb1b3367 src/glean/api_client/models/actionsummary.py: id: 34ccdf9f1526 - last_write_checksum: sha1:feac9468c6b2885ce11bf306ca94d3de53aac70f - pristine_git_object: ed3d1250613625c71ef8e73ae4b26b4ba6522b79 + last_write_checksum: sha1:9d447ec50aa8f0746f2792393d5b39a94bd3169a + pristine_git_object: a547e75ea4edba4596ced072108c53605510c00a src/glean/api_client/models/activity.py: id: 6ea27628a0fd last_write_checksum: sha1:27f676cc8276973c98176252bf06e2b4b965935e @@ -2959,16 +2999,16 @@ trackedFiles: pristine_git_object: 51443a2df3edb4ca3574a495d45757b7d93d8789 src/glean/api_client/models/agentconfig.py: id: 6bc960f78847 - last_write_checksum: sha1:196005383cfea5363c720347a6e24df58c16f4fa - pristine_git_object: a4b95362d9e5803519846a73b4b41d0481d94239 + last_write_checksum: sha1:20c94c99eadde4ec9d92f9c652668173d5eb613c + pristine_git_object: 8ec290edc9adc4d9443edc18c9c8ab5fcef91eab src/glean/api_client/models/agentexecutionstatus.py: id: ab4f2c2f8eed - last_write_checksum: sha1:b7333d24342b551d95d36dd4ce1021db65fbfdc6 - pristine_git_object: fa71fb35d11dede8cb81dbfc83f7ec2fa2ea52d0 + last_write_checksum: sha1:d3bb768f118d7474a4fae0a7685922c6405d0f90 + pristine_git_object: b93cae26675bab7b692af5f97f005040faff7958 src/glean/api_client/models/agentrun.py: id: b808ffdaa4d9 - last_write_checksum: sha1:69120d4a77c7f4670973a7e41af55b4ea2af1f8b - pristine_git_object: 4c519b560d3fffcab870f148df81060487beb16f + last_write_checksum: sha1:21eb4e6590484355e32709b7ff1377f3209676a7 + pristine_git_object: 259808ebc83a54a3bb41223a9e298a68d8430ea5 src/glean/api_client/models/agentruncreate.py: id: e987c7a76285 last_write_checksum: sha1:d02fda45ed106de951c65f67dbc23110223e66ee @@ -3003,16 +3043,16 @@ trackedFiles: pristine_git_object: f49943d26a8e71d4c0795c3d4ac8c8b811634ab9 src/glean/api_client/models/announcement.py: id: acb78a04f33a - last_write_checksum: sha1:c253f5ae1abc67f3f7a68b21ccd2cbac00d086d5 - pristine_git_object: 10be615e0dcea2003e3d71e4ddb44e9d231ff11d + last_write_checksum: sha1:f04153352a6b1640d758720c49bd07b7449f7aff + pristine_git_object: 3f5ec7e1458ad7edbd46588f3ccd1cf54c45eb91 src/glean/api_client/models/anonymousevent.py: id: 6b288f5ca26b - last_write_checksum: sha1:57b389f5fbe18625fb2a3caf16841e342ff4f6bb - pristine_git_object: 03b8cf1d6d9c7357703cbb20d80b533434274f38 + last_write_checksum: sha1:fc035c37f08598221c7334da116e2835966156ad + pristine_git_object: 4b4ef1d95fb1f9e1b4b4a67d71c6953bf9f374c1 src/glean/api_client/models/answer.py: id: f7b69d1846ba - last_write_checksum: sha1:b28d496872409cbd73da3250e62ebe866775d622 - pristine_git_object: b6791d1e8e0488a77be5c6aa073787582fdf0e93 + last_write_checksum: sha1:e37deec10b9cd26927b4f8469d6d598267e37901 + pristine_git_object: 31b7944a3cfe52d03e2848e3d183f8371c757371 src/glean/api_client/models/answercreationdata.py: id: 85c82aca1720 last_write_checksum: sha1:dfc6c75e412895a40394a7fb2486d7ee2f95b120 @@ -3039,12 +3079,12 @@ trackedFiles: pristine_git_object: 700d8807b56085904c763bcc748f4956ad2f0aaf src/glean/api_client/models/authconfig.py: id: 9e88a246ee36 - last_write_checksum: sha1:cb4761c20c3260335f8e9155ce002e5b271c681d - pristine_git_object: 4179e9d2c4884514cbc0d6b67a21fe4744db982b + last_write_checksum: sha1:53fae942560d22f8d2ff2829b087613d10fbe156 + pristine_git_object: 86f978f579e0670402385ea08c5e692d5e040226 src/glean/api_client/models/authstatus.py: id: 75167e3b3ad0 - last_write_checksum: sha1:d89b931424ebacb324e54f53df822ca788bc6dc8 - pristine_git_object: 0916a8319eca076dea3eef19c17d4f0e3bc673a6 + last_write_checksum: sha1:4cdc7988894d6c50dbc42d0613bc22dbe6a29666 + pristine_git_object: ea66e4544c221d502b224d8c6479cc5e3adb9872 src/glean/api_client/models/authtoken.py: id: 32cff6c3af95 last_write_checksum: sha1:05d6a1988895ae285d96f101785640ebf82a247b @@ -3063,8 +3103,8 @@ trackedFiles: pristine_git_object: 3dbd74976fbe39ac070a1a469741d6643cabc438 src/glean/api_client/models/autocompleteresult.py: id: e88abde43844 - last_write_checksum: sha1:5bfb07e61d7871fac3b045b39eab0a1ec18cc8cd - pristine_git_object: 2a7b178947d872fcab6a5cba60c3766b20a6481a + last_write_checksum: sha1:5dda5b4e62b3839de7964e63c86cb8f7d3e08402 + pristine_git_object: cd95aafb12e811d44912ed8f4faf43eaf84285e4 src/glean/api_client/models/autocompleteresultgroup.py: id: 10a91a57b6a0 last_write_checksum: sha1:0095e9e0dc59aa0a847a3933265e6291d222720e @@ -3103,28 +3143,28 @@ trackedFiles: pristine_git_object: fc487a53466ce443dfc4b1aa20b7bbe3df5a2f80 src/glean/api_client/models/bulkuploadhistoryevent.py: id: e0fc56b32d01 - last_write_checksum: sha1:ac3c2549c067a1ad53b9a5fd366be1fa4d7f4380 - pristine_git_object: a5e3d43dcc61dabdfa80f12c7c416ff5d15a570b + last_write_checksum: sha1:af293f8d0a7bcedc03b245bf2e134429692fe649 + pristine_git_object: 19b02462bd483d094f81ae9fc0686fcfe9062c6f src/glean/api_client/models/calendarattendee.py: id: f061e829600d - last_write_checksum: sha1:11c42afe51b5feb76f88ee90f13f5babf8819b19 - pristine_git_object: 3f79c72a47a0bc9ad9ead44d06aa9a1ba1e94d62 + last_write_checksum: sha1:dd490fda26a9f2b0bd8da5c8454ed87edf901e88 + pristine_git_object: a9376eb5be7881243a7e369ccdef5f43af8a6fd7 src/glean/api_client/models/calendarattendees.py: id: dd3d8d18619f last_write_checksum: sha1:2170a33a351c0a2b6787f74d55342e5709c76ac2 pristine_git_object: 71bc24186e52e5b79b65af58b30e292297064a27 src/glean/api_client/models/calendarevent.py: id: 1b4d4993373e - last_write_checksum: sha1:e1df6445a4e182aef2c4a4ff92f3f22f95620457 - pristine_git_object: bf08702d47e3320372bab2d237b1810daaf9d21a + last_write_checksum: sha1:73a05f3ceeecde429f70fc2a92fd4d3a86af0c98 + pristine_git_object: 9fe344300b06e37924e56fdc847a71ed60a09c01 src/glean/api_client/models/canonicalizingregextype.py: id: b2cd5b9de633 last_write_checksum: sha1:fbe47d3fcba8de2ba377f1b6e50b271ed6e134ae pristine_git_object: db7e8b6cd3d8a6f6c9141ae5c33f0de4fe2b8551 src/glean/api_client/models/channelinviteinfo.py: id: 71173b2b0492 - last_write_checksum: sha1:2a658f2b9d0a7228df5c33f4ab24d630965bd922 - pristine_git_object: d7d38ee42fc4cf30b50eec6de95d6af42ff6bb0b + last_write_checksum: sha1:aabe263c137160e1ebd82e24d6a933299c51f540 + pristine_git_object: f8743a889c5681e6b6bfb1eb5c60f92bd0664368 src/glean/api_client/models/chat.py: id: 5566eef6a9a3 last_write_checksum: sha1:30c75bb6a1252723da71fe02731cae355149eec4 @@ -3135,20 +3175,20 @@ trackedFiles: pristine_git_object: c852218652c34be66fb9f6bfdef6ed3547655264 src/glean/api_client/models/chatfilefailurereason.py: id: c60997a33e36 - last_write_checksum: sha1:025e7cc000253326a9efd004cc5c7225f775927f - pristine_git_object: fdae31905651d8b10cbe8d645e41584a3dae769c + last_write_checksum: sha1:5f85f87d571be1ed3f67e3563720fa1e02e2ef1e + pristine_git_object: cb81e15e55a5889f6503eefe8103c320df460e0a src/glean/api_client/models/chatfilemetadata.py: id: b8648f87910e - last_write_checksum: sha1:609a346f41bff5cab804a30640f0c26377c1c033 - pristine_git_object: 2c657df73e5a66ec0add1a4063fef791021a8e61 + last_write_checksum: sha1:c3e2ae2c987074cea24aadba3cbce4e0bc720861 + pristine_git_object: 73d55cac1010bfd9d692382e5e4263ca9525fbb7 src/glean/api_client/models/chatfilestatus.py: id: 0e6c1c7a372c - last_write_checksum: sha1:0c3e5390a70a53dd6e3ef035fd7de1f2c1567e1b - pristine_git_object: c9a17724686676e11d3633dfb11ad4ab9c1cce45 + last_write_checksum: sha1:4af0557f8574e729bbd16805c2d02172bbef9eb6 + pristine_git_object: 0628b167f1b538ab6b9c0ed6021708456aa98c31 src/glean/api_client/models/chatmessage.py: id: d1d93cc94501 - last_write_checksum: sha1:4196e6ca580fb6027d7a460c43b038003f2be72f - pristine_git_object: 1755a240907fe7b65f7e3f5b933541fb3ca0e27d + last_write_checksum: sha1:6eb7a6856a33aa4bd782ebdd44f014d5420d3cca + pristine_git_object: 16aa62ea473c33a025cb7ac8baf7805846022576 src/glean/api_client/models/chatmessagecitation.py: id: dae0d568e81c last_write_checksum: sha1:b778c145ec6fa153cf06eddaba2de7fc74994959 @@ -3175,8 +3215,8 @@ trackedFiles: pristine_git_object: 3e72aea468f1c9c83d45155388fa88f18544f3f4 src/glean/api_client/models/chatresponse.py: id: 9ae42b3bd99f - last_write_checksum: sha1:59bf0345b51d68f21811d34ce203a26ce4c6f113 - pristine_git_object: 1ca6171214235ca5b1c1594e7bceab314bc7645a + last_write_checksum: sha1:7576ec371a0c177ffbf4333e083cfbb82518bbaf + pristine_git_object: 1d9c491f21c403621cb58e02b7e67ca832c4fc5e src/glean/api_client/models/chatrestrictionfilters.py: id: 634c14f688c1 last_write_checksum: sha1:ad469e59884fe6280376b1952943067000eaedb8 @@ -3211,12 +3251,12 @@ trackedFiles: pristine_git_object: fb2cdec6985876d88878e912a94ee09a414f08e8 src/glean/api_client/models/clustergroup.py: id: f84bec5b82fe - last_write_checksum: sha1:e2e9b9504731b3aad69770171ff8717deee7eec5 - pristine_git_object: e8a93332bee413de9069b238947d3f238b119230 + last_write_checksum: sha1:40ba9155e7eaae77e38aa0ad5b0790dca98b721b + pristine_git_object: 64317cf2e7729ef0b2cfbc849d5961b5a66c63f2 src/glean/api_client/models/clustertypeenum.py: id: 0ddd45a5d0d9 - last_write_checksum: sha1:b25da71fd0a80257766af1096929f9cdf0eb52c7 - pristine_git_object: 3e83e2efa461dd1d1e8ed06277bb1dbab8e35fcd + last_write_checksum: sha1:1f63c4b39dde561b3339908f8a9a35a6bf0f7257 + pristine_git_object: d599d8ac677a258ec0041ffc08142138b410fc2b src/glean/api_client/models/code.py: id: 11b08e43c314 last_write_checksum: sha1:6575c61b2a91631596ff71a3eaee73c1433db2ec @@ -3231,12 +3271,12 @@ trackedFiles: pristine_git_object: cdf2108fb6fd51bb4476a250a48e0aab9075971f src/glean/api_client/models/collectionerror.py: id: 12c5118f6fba - last_write_checksum: sha1:b68a0905674ac00856c42ae33e8be68efbed3945 - pristine_git_object: ed055edac1066978af979f2b1cf8fcfee9292002 + last_write_checksum: sha1:f8671540bade2e1c8d978ffacae8c69e4ad94a06 + pristine_git_object: ef1aa0da4454c57c0c8d635bbe89d3961043c027 src/glean/api_client/models/collectionitem.py: id: 42e837b333ec - last_write_checksum: sha1:ad4186636755dfcecaeb00165c14ec40f955709a - pristine_git_object: 5a4f41f2a672a05632df078f8108a1ec04799f4b + last_write_checksum: sha1:f40ae4fa054db28709ce5e805041418b10084858 + pristine_git_object: 0f05f119179be8704c779a16d694eb74a920e492 src/glean/api_client/models/collectionitemdescriptor.py: id: 8211e595e120 last_write_checksum: sha1:ddc64bf36a957e2228786341a55860362e751733 @@ -3247,40 +3287,44 @@ trackedFiles: pristine_git_object: fcd3edbe1c44ef3b7be0ceb77f1b3c1c137359e4 src/glean/api_client/models/collectionpinnablecategories.py: id: 319efd508d76 - last_write_checksum: sha1:79f857139cca1e295e78c3edfe755568b27f9946 - pristine_git_object: d28cd94ab7648cca4fd758055ba8ac44afe407ca + last_write_checksum: sha1:db649f26c3107b6497a9ba6cfda8a495cd35d00c + pristine_git_object: 55c467b9b6e46f86e9d82f9f86273f6215eaaece src/glean/api_client/models/collectionpinnabletargets.py: id: e4d5f87c0adc - last_write_checksum: sha1:ecde48b3ce184d46bac79212fce769a26fa89c78 - pristine_git_object: eac2d5e73e21405b25198d7925132b197482ea73 + last_write_checksum: sha1:65c20e406a0bbc95cc4d69702e71bbd8cb8c8faa + pristine_git_object: c440d47330824d6e174617b25ee22c54055f6a7e src/glean/api_client/models/collectionpinnedmetadata.py: id: 20fcaec70c41 last_write_checksum: sha1:22df092fd625128d399186c5723906e1e0eebab2 pristine_git_object: 44100bf476178fd48adf58263ce6caa6ea41416a src/glean/api_client/models/collectionpintarget.py: id: 74c6f50fcb8b - last_write_checksum: sha1:4b1f196c2b73f27ff5222eca93b37aacb69ce252 - pristine_git_object: 173bcf4fb46b0164a9dbf4071304f3ffb52824a7 + last_write_checksum: sha1:dbe5e971afaa38b85e68cd298469b6238dd2ae0b + pristine_git_object: 54c8ec92a697fef6f71a990d3e8787c69ea79547 src/glean/api_client/models/commentdefinition.py: id: 7a510d4ae16a last_write_checksum: sha1:5f8869dfea479ac71bab09d2eaba853484541c94 pristine_git_object: 46409ef9cce130bae42cb98eb84bfb2eacfa727b src/glean/api_client/models/communicationchannel.py: id: 097ef2bc37d8 - last_write_checksum: sha1:8c36e783ae2c093098418e7a70029849cfd1021c - pristine_git_object: e315cc1daee3f0fc6a900da424f69ccbdf4707be + last_write_checksum: sha1:9240b0a6b43557df8f3d2c0db453b484162271c8 + pristine_git_object: 36d9d830a9c46f6addc6a92f828ccdab8d18885f src/glean/api_client/models/company.py: id: 3fac904660c4 last_write_checksum: sha1:d5fee828207745c6edfb4cbb5554a96d84200fdb pristine_git_object: 6f272141fa715f456b56e02c27c26f236e67460a src/glean/api_client/models/conferencedata.py: id: ca82aa4c03bd - last_write_checksum: sha1:658befbb40482aed3799f2b163762b09c0909e19 - pristine_git_object: a890a8d1221fdde21ec1d2986ab59992c9b764da + last_write_checksum: sha1:8bd6f3e20f9c7bec8cc6480de5c1bfa77d6dfa85 + pristine_git_object: 805276d0333fbd0c92b70a747234b6a193336e0c + src/glean/api_client/models/configurationvalue.py: + id: 78d9bb1ab4a6 + last_write_checksum: sha1:cf9da13bfc5d3e35860cb12ced8ba5a760934917 + pristine_git_object: 2055a0a3395ab2b6c5dcf33a05203a128ab3f13a src/glean/api_client/models/connectortype.py: id: 12d50eaaf8ba - last_write_checksum: sha1:5c160e04787ed30652694e8a7ec41fb8420e1250 - pristine_git_object: 8d612d979830aba61a136b5f2992176df4490dbd + last_write_checksum: sha1:adbdd18a3d0dcab7c1a8fe9abdf49ce8a60eb8d6 + pristine_git_object: 8e99dab8e7283ea64e5dc2e7f770999ddcceaef8 src/glean/api_client/models/contentdefinition.py: id: be5d817e66bb last_write_checksum: sha1:8c4923b2e58d965aa4f33fbbd2021c84a62a27df @@ -3323,8 +3367,8 @@ trackedFiles: pristine_git_object: 46d5874e2c589df4cc66e96bcb87990414482cb3 src/glean/api_client/models/createdlpreportrequest.py: id: ead547f06612 - last_write_checksum: sha1:ffee07077069fd462be197d74ffe153ae6d93dbe - pristine_git_object: aa1c7eff113e3ebcff12448f7d01971d8c675dd0 + last_write_checksum: sha1:8d735bd7519d1663676885c9f36fe0041e51441d + pristine_git_object: 1af31f17ac8dba7049c725b67e53543017d01a74 src/glean/api_client/models/createdlpreportresponse.py: id: 12ae9b936795 last_write_checksum: sha1:d8bb2f7615e9c998fb1228f6512d23ec23cb669e @@ -3347,8 +3391,8 @@ trackedFiles: pristine_git_object: e225e27361ffa3b42f947127b60abbb58d684583 src/glean/api_client/models/customdatasourceconfig.py: id: fb9b6a1441c1 - last_write_checksum: sha1:98fecd72850fc62bd936783384093df7dac3cf02 - pristine_git_object: 1e4a488d8db678307fae6617de0ac6cfe49c78f7 + last_write_checksum: sha1:c87f8c8e2c13d9239d1bada3fd9ea25208552195 + pristine_git_object: 919ca09d29b218ed2550ab330a20775e8b9bd618 src/glean/api_client/models/customdatavalue.py: id: 956eba94ae1a last_write_checksum: sha1:74edb94c3b8e0e1f1d3f92352f13af31f36245fb @@ -3399,20 +3443,28 @@ trackedFiles: pristine_git_object: 1842e19bd26836c19f9ec035aa879412dad83079 src/glean/api_client/models/customsensitiverule.py: id: 80d2ba78e110 - last_write_checksum: sha1:558af30f6668b745cb2a86f2d25f65db30d4f180 - pristine_git_object: b1c06a84d33a647a1d30feafca72605a737f4d34 + last_write_checksum: sha1:e062ccfb6e8c7a73ac1e61e0aeb3c003f7c094ed + pristine_git_object: 15b459734ef3edb906d3ed2b8a3b7d1bc411c4ae src/glean/api_client/models/customsensitiveruletype.py: id: fbea8b8f6a75 - last_write_checksum: sha1:1e04a196aa25a5d4ce012e17912a7f2ae38da2ed - pristine_git_object: be887e842d3374374ba8cc71504d09fc4b72b67a + last_write_checksum: sha1:ddbdf0eb4821466cfe7d82ae3116a42da0b8f8af + pristine_git_object: b273ac9824d6a273765462dfd73483c75c4c46c8 src/glean/api_client/models/datasourcebulkmembershipdefinition.py: id: 8e48908cf200 last_write_checksum: sha1:2dbe0097ea064113d445953b02e8e18bd4d8ac92 pristine_git_object: 3113d5021832616ed3e5b4e273c2346f6611d996 + src/glean/api_client/models/datasourceconfigurationresponse.py: + id: e9a385b637e9 + last_write_checksum: sha1:69a5dd2f67380cfe0fa0bc5c37eddb5796560ffc + pristine_git_object: 15b227d993619ed946b21ec7e94a9d31b968b195 src/glean/api_client/models/datasourcegroupdefinition.py: id: f7c84882fbcf last_write_checksum: sha1:324acffd92e4e0753b7c3238f17d41f6ea66d5d3 pristine_git_object: 745d20c30b71f9c6c0a9bfa5807373bc29b79e76 + src/glean/api_client/models/datasourceinstanceconfiguration.py: + id: 706b80a1fa59 + last_write_checksum: sha1:ea2e402287097244228eff8122c2337dc1658bee + pristine_git_object: de6cd8aaa59ff7ae08ba5535508b72229ddaba56 src/glean/api_client/models/datasourcemembershipdefinition.py: id: f881717d8c97 last_write_checksum: sha1:1b9e18dedcdbcb47ec1a2f021c6bfd7bd7f008e8 @@ -3435,8 +3487,8 @@ trackedFiles: pristine_git_object: 291568948befef5444d5d6a84f9e1aba7a3f33a6 src/glean/api_client/models/debugdatasourcestatusresponse.py: id: 706c4bfc6802 - last_write_checksum: sha1:06be5c202c9d509ce33968f71b647e6fd87aff43 - pristine_git_object: 46212470a9f431cabfbd3230a118819f8fbc9f0b + last_write_checksum: sha1:05f40dcbaf4c6d29637cb8a235a9bc3754bd3979 + pristine_git_object: 9ebfaf15d0d2f503adeae818bb95490e38e56ec0 src/glean/api_client/models/debugdocumentrequest.py: id: c27a3d5acb34 last_write_checksum: sha1:994d4388bf08f2a89c7891aeb7d98c7bf67c7215 @@ -3563,16 +3615,16 @@ trackedFiles: pristine_git_object: aae5e37dc43c46c6513467e0ea67695fb114209f src/glean/api_client/models/digestsection.py: id: 35356f6b6146 - last_write_checksum: sha1:bd03677e68a7368327032f25ea5099b922a7112d - pristine_git_object: 3916bd17da42242d033349f39f486a17d5522d59 + last_write_checksum: sha1:b78802aa2e7f6ecfee27e704424f47dce00cfd85 + pristine_git_object: 0aafd8aa3bf1816601d1c7c26cf21352696cae53 src/glean/api_client/models/digestupdate.py: id: 604c4e51476b - last_write_checksum: sha1:0581e0ba93f155f0e49918809c4fa6134cfea95a - pristine_git_object: caba0d3bfb7a521bea50accfb5dd67211398effe + last_write_checksum: sha1:4512dba5d379c9d8a753438a1ae36d52daf13dc7 + pristine_git_object: dc68cb9a1a446cadf964e4be602e600bc25dcb26 src/glean/api_client/models/disambiguation.py: id: 7223d97bb07c - last_write_checksum: sha1:b7490ede0956558797ea9ee2d0f92a4fc373c49d - pristine_git_object: e4bf574ed973a568359539edc476ea085b3bcc28 + last_write_checksum: sha1:44cff67ecb9979ce65eb901edca938b8420e6f41 + pristine_git_object: 4c2f6f063ecbc5ec0a458f7ef48cb5c9ec1eba00 src/glean/api_client/models/displayablelistitemuiconfig.py: id: 93c058182294 last_write_checksum: sha1:2f026c937d0dc4d493b66683b7bdfc170f1ec8f0 @@ -3587,12 +3639,12 @@ trackedFiles: pristine_git_object: e38155cf4182e0c28744477fa9746921b33df2d9 src/glean/api_client/models/dlpfindingfilter.py: id: 6ef2e5304df7 - last_write_checksum: sha1:4ee397d4930547c52cc24afc73285c7ae93f40dd - pristine_git_object: 4b8b53771328627ddff1db948f18c675ad305b19 + last_write_checksum: sha1:c87a5fc3c9d57530ed1184d2cca6818d7cf36202 + pristine_git_object: 5ff0c89d90d719227d77395596dd60c1033f9ead src/glean/api_client/models/dlpfrequency.py: id: f6f484c2d7a4 - last_write_checksum: sha1:7c48fc297e95a40d143de6e4b81b76f7db4dbfdd - pristine_git_object: a7da3a83ac16c0fd906e64fd02f84a17b03d1396 + last_write_checksum: sha1:487ce5e7651214ea7906d0d4e74371544cc436f8 + pristine_git_object: 334f894fe2a36391f40ff6831cfdc5aeecddbf21 src/glean/api_client/models/dlpperson.py: id: 15e2ffa25e1a last_write_checksum: sha1:5bf5af63c77909290460f8f241a930d14b783476 @@ -3603,24 +3655,24 @@ trackedFiles: pristine_git_object: 9f5e147e42bbc1ec1e83dc63b74a83438aac0415 src/glean/api_client/models/dlpreport.py: id: 6a534cac7e31 - last_write_checksum: sha1:a7c2ea0698e34b2757b7fc52846847d81b9674e4 - pristine_git_object: 706524ef5ec4900b94009f7790cf56b06041aa63 + last_write_checksum: sha1:08f3f73856a36b4def8bbd04c9f2081e68504d2c + pristine_git_object: 457ebe8aa1a0fc5d075d97ec558fd936f0a2d969 src/glean/api_client/models/dlpreportstatus.py: id: 4b288f23576f - last_write_checksum: sha1:82107288d2c55c02aa96efe668fc1be326b380b7 - pristine_git_object: 89f5b52fc7c0778a18fbf466d58872733ce85743 + last_write_checksum: sha1:9e9bbab7ec6b06d3034ea61f19208cf15be3a98b + pristine_git_object: c7768ce7bd50c02cbd7a212ab45e721e81002e54 src/glean/api_client/models/dlpseverity.py: id: 3c14229136ab - last_write_checksum: sha1:bf9f62b4c6e594bf9ea24964a1d777fad8a98ece - pristine_git_object: 625f32b87d94aaaf420f5521f3961fec9df6fdf9 + last_write_checksum: sha1:f61afbc43794f1cd3fe453fdd7bbc2a6386c9343 + pristine_git_object: bd785981c594353dada51425cefe60b44d806ea5 src/glean/api_client/models/dlpsimpleresult.py: id: b50c9a50553f - last_write_checksum: sha1:8424527d5f2924602749fc42883b7fd2789e2d5e - pristine_git_object: 83e953255d0df7f94b267511f117d10bc06957c7 + last_write_checksum: sha1:fdf7ae261c37a65ec7354426e7003934325f9efb + pristine_git_object: 212efae1a21283c3d96458029e9b64886d2100ae src/glean/api_client/models/document.py: id: f62889df4380 - last_write_checksum: sha1:d250fb540bb21129e2a3c8c5923a5fab04c0bb20 - pristine_git_object: 43f4b20ec132f8a771fde70e5221952684916225 + last_write_checksum: sha1:c0cfd5b57211ad30a39e8342270d9f5479932766 + pristine_git_object: 8817169144fc3f9781dc00282d394bad056c8a86 src/glean/api_client/models/documentcontent.py: id: 5002c1dea323 last_write_checksum: sha1:83485a0ac91d8fb2e276e01007e3727c7ab1d0b2 @@ -3639,8 +3691,8 @@ trackedFiles: pristine_git_object: a0f8c83d0df22df8877603b209d08fb44e472b83 src/glean/api_client/models/documentmetadata.py: id: 203606bfdd41 - last_write_checksum: sha1:80b7d35dbd045f3042224b0d4feb99cc10d351df - pristine_git_object: 19cb2dc2f1aec134489beb7e77ce1d8eefa6e121 + last_write_checksum: sha1:0c6582094aa1cbda94a1bac096872e610d06bb15 + pristine_git_object: 6fd3ba739ef3a0309797f000df46cfe7f8110956 src/glean/api_client/models/documentorerror_union.py: id: 1851ad2d77e1 last_write_checksum: sha1:edd4bee869906b3874fd1640bd3657e9aef66292 @@ -3655,24 +3707,24 @@ trackedFiles: pristine_git_object: 2a00129600c74f79a112dcb48c21b699c0cbc696 src/glean/api_client/models/documentspec_union.py: id: 9b7e01401389 - last_write_checksum: sha1:522461b2b802ae0a3042e655e3aa2d10a450c1d6 - pristine_git_object: f0509023b7a24899c6936e9f23bef10bb94886c5 + last_write_checksum: sha1:194ddee78f5030edb711e9250532c6cf14d90873 + pristine_git_object: 368263cd76c3f63f3356dd3a040f3b55d262f5ae src/glean/api_client/models/documentstatusresponse.py: id: 03c5597a3ee0 last_write_checksum: sha1:535d9ba8ae657b97394e8d8e5beb149f77dfd5c8 pristine_git_object: 9ab97c4243b15ba896a3d721fb2eced875864f19 src/glean/api_client/models/documentvisibility.py: id: de44fa8f48da - last_write_checksum: sha1:6f4e5a80c9e554fc9e19e881f5bca1e096db10f3 - pristine_git_object: fb5813a945e04d9c777afb2a874a7b4310772905 + last_write_checksum: sha1:985c869e95a61595826842cb225d63dc3d8c4d29 + pristine_git_object: 59bfc0522f5c880450dca0184b601a0c4c6617f2 src/glean/api_client/models/documentvisibilityoverride.py: id: d5c36989b68a - last_write_checksum: sha1:527b2a6ab55361ac5814720f780d4026663426ea - pristine_git_object: 27fb5add33e2d14cf590821a741c6d5b50d26c24 + last_write_checksum: sha1:dddbceb0c50df213f2ed943052c130970e9cadde + pristine_git_object: 694f8cd4fa3341c1579627ac2218105f3af0c2d5 src/glean/api_client/models/documentvisibilityupdateresult.py: id: 499e53f55b75 - last_write_checksum: sha1:5d3242a167c224fa8b6a9bf2c4942583138d4986 - pristine_git_object: 2781be2ad675b42f33071a999baef52bb108c071 + last_write_checksum: sha1:9301ef4daf0632c60d1eb3aea79e1fb9d1c95b3b + pristine_git_object: 7d8784b97e213ec476863501b10662c30c50d5d6 src/glean/api_client/models/downloadfindingsexportop.py: id: 2694d3597292 last_write_checksum: sha1:272810d856c01cc1fe68b55286be0092fd5ddc06 @@ -3715,8 +3767,8 @@ trackedFiles: pristine_git_object: 09a38ab2c438c189cc6c473cc9f5f96a528f2d4f src/glean/api_client/models/editcollectionresponse.py: id: d5021e1e02ea - last_write_checksum: sha1:d3b7fa65db3e8b8e02746fb7be1c338aa0c9161b - pristine_git_object: 43e051a9568e591c786b1956041d73e3fa96ae96 + last_write_checksum: sha1:2e60908c3cbb0d22e2f0fcf0809b3c347b03d911 + pristine_git_object: 5030396bcf39e617f91c34eb3f607bc756f9f051 src/glean/api_client/models/editpinop.py: id: ccf2c7c31a0e last_write_checksum: sha1:362557599334d8df280cd62d5dd818ed519f0221 @@ -3735,16 +3787,16 @@ trackedFiles: pristine_git_object: 1505b40dc6cc6318fa0bb146a79c5608c7d05607 src/glean/api_client/models/entitiessortorder.py: id: cd626c042435 - last_write_checksum: sha1:3748f760b70c5a78b1b001073c1d0b8e862d1a6e - pristine_git_object: 76d80c681674fbf494dd0205499e21275377b13f + last_write_checksum: sha1:606f29ffe3a88b92c0c916b49c5bc1a290b9637f + pristine_git_object: f3e5ae63a7927d043a525616b22e8e9a5540df69 src/glean/api_client/models/entityrelationship.py: id: 0494cdf060ff last_write_checksum: sha1:ca39e9ad5a91d34509e8d55401df9d0e77f7ce84 pristine_git_object: 0c2c8e5c3c921f30cf17ca89339d192d9d102323 src/glean/api_client/models/entitytype.py: id: 22a4370b1380 - last_write_checksum: sha1:10dd0f78d620747d60368e5d2f874dfa200647ef - pristine_git_object: 43e538599309d65615c83de006b63d6ba9131b9a + last_write_checksum: sha1:b091bec335fef2262c725afa624f188a92ba4b10 + pristine_git_object: af479617f97e668b22634dd88373471ceea7c7a6 src/glean/api_client/models/errormessage.py: id: b2d0a949c567 last_write_checksum: sha1:da8fa8ad368d85903af1bcde7961d3f42a664852 @@ -3759,12 +3811,12 @@ trackedFiles: pristine_git_object: 01bf73544b870d294c46010643e8bbb21c98765d src/glean/api_client/models/eventstrategyname.py: id: 72f93cc36b77 - last_write_checksum: sha1:5de70362e2a1252dd712ed013460c7ba4e5a3887 - pristine_git_object: 5ede7c8c9cad35bbf68587ce4247ee51cf74b55e + last_write_checksum: sha1:f359da6c05742c564e50b84faba2ea0652cd59a1 + pristine_git_object: 2fc0a34fb83cf361d4167e22685f67eaa1cd269c src/glean/api_client/models/exportinfo.py: id: 7039fdf82b53 - last_write_checksum: sha1:3a531fbdc7b6b503d12a9e3c4b556557988b7e59 - pristine_git_object: 9a2325f909e24ce4912114488c49249318276152 + last_write_checksum: sha1:84ae515ccbd441e7d4e603e08d597fe0652cd00e + pristine_git_object: 44eea991445d2d5c77b62e1ce1b33c1fc18a5024 src/glean/api_client/models/externalsharingoptions.py: id: 0df611382e60 last_write_checksum: sha1:a97d071c79734c837c1728c2973bbaa7eac7cf9d @@ -3795,8 +3847,8 @@ trackedFiles: pristine_git_object: 660a4cfd2bd0c88bcd0b9fbebf1817ad380d3524 src/glean/api_client/models/facetfiltervalue.py: id: 2538d6322ce2 - last_write_checksum: sha1:09a30da1d2e454c9fd2f31b2f3a66967d29e2ceb - pristine_git_object: ee889ffbe521d236d0970d9a991487491eb46d26 + last_write_checksum: sha1:1081241c66b814def983fa020b001aead9543b12 + pristine_git_object: c7c45af9635dd2f119b3faa0c41a1745ce45cf23 src/glean/api_client/models/facetresult.py: id: 0b08040192a1 last_write_checksum: sha1:0c21c0dffedd210c1524c4ac03485d3d8b692188 @@ -3807,8 +3859,8 @@ trackedFiles: pristine_git_object: 6a461b85515e30157f9881510c99fd9fea76ada9 src/glean/api_client/models/favoriteinfo.py: id: c8966a607f00 - last_write_checksum: sha1:bf44d5b80309b4bf4af82e5efb354cfc1772099b - pristine_git_object: 3c88b9647ed7148ea20fca6971c09d893db9e22d + last_write_checksum: sha1:95cee1e6b22e0e4bec19beba5e570601e803217b + pristine_git_object: ea11d36b2e8ea8d25498b4aaed1425888d433360 src/glean/api_client/models/feedback.py: id: 511140b14aff last_write_checksum: sha1:b9a4dc761128549b63ecc6d14ab1785fada489e7 @@ -3823,8 +3875,8 @@ trackedFiles: pristine_git_object: 43338d24117a2b2f4dd568237be9403bf09dfcac src/glean/api_client/models/feedentry.py: id: 023eb6c10ae1 - last_write_checksum: sha1:5c665b772cdfb2f4cbd01c6f0642811d95068fdd - pristine_git_object: ae5a612b54653ac242a8ae6479c83b37ec01657d + last_write_checksum: sha1:2af356fdfa8ab0063da12a3c9f029cb916b84949 + pristine_git_object: aaa2eee3f925ce5c1e6157797c1bfbc857c09136 src/glean/api_client/models/feedop.py: id: b8067ac0a127 last_write_checksum: sha1:5785aaa7871eae155d76917b70f37e1015c0fe93 @@ -3843,24 +3895,24 @@ trackedFiles: pristine_git_object: bf833fd23bd31bf8a71ff755477d54e9d1fa653e src/glean/api_client/models/feedresult.py: id: ae187332b37a - last_write_checksum: sha1:0aee65004edf1c3064f7cc76892783bac5d4ee70 - pristine_git_object: f6bec358821bfb5585e416d7fa77d2c73f0f696b + last_write_checksum: sha1:a3fb2996e41ef7e726ad5914bd1f74674d291bb3 + pristine_git_object: 062146c7a5429034692a75d1a70a0a95f7a652f7 src/glean/api_client/models/followupaction.py: id: e2de5c4c8524 last_write_checksum: sha1:0eaa912005684ae12060f0a4014a4f79bd7785e3 pristine_git_object: 45106ff320229c7bf9e06be23502b2612f748ce8 src/glean/api_client/models/generatedattachment.py: id: 257c5ef9996e - last_write_checksum: sha1:ad22a66e98ccf6d5417bd68a727f63efd5982dfc - pristine_git_object: a5a3a950bc930df6514f3e2d5d76ef1c3c4fb486 + last_write_checksum: sha1:ae538bcc82dca6aee9e591914e45a312ef893aea + pristine_git_object: 6041ec086037b6e1ccf81d3d3e8555cb5b1ca509 src/glean/api_client/models/generatedattachmentcontent.py: id: cd6ddc3356e2 last_write_checksum: sha1:6737d5071dc3ce32dfffbff89cc1b5df574f3bc3 pristine_git_object: 01bc041b16d38b41b259e29ed6a641ccf6527176 src/glean/api_client/models/generatedqna.py: id: c505fd0d1ece - last_write_checksum: sha1:8726cbf98d7304152dac6d1beae35e165b2b13e7 - pristine_git_object: 04c0536e6d62983d4706d8e7c13bdfb4b9e59fc4 + last_write_checksum: sha1:de29b41956bbc72082b7af05459eb9bf3a580b3e + pristine_git_object: c1d59b7a6a901941ea4ad64a1867f9c4fb3a4c88 src/glean/api_client/models/get_rest_api_v1_tools_listop.py: id: 34cf81e82af3 last_write_checksum: sha1:9e5027f9774624385e72bb6bac456369860b6fa4 @@ -3875,8 +3927,8 @@ trackedFiles: pristine_git_object: 49e8e1d462f73fcc10f88477696567cf3270539f src/glean/api_client/models/getanswererror.py: id: 7d4df3bf2bfc - last_write_checksum: sha1:506183d20b0e4546648d81907e914be5d89b0c82 - pristine_git_object: dc1a13d880eab799f4b4482ed9f9aa0bb6f3d809 + last_write_checksum: sha1:18d467ae758755118ba2e50a1a0c5edcf06a3d29 + pristine_git_object: 827524e42187b0440a690f6c856e62e880d2b17f src/glean/api_client/models/getanswerop.py: id: d02c69702982 last_write_checksum: sha1:c39e1d250ec79b89621d461ca696cc5e88fabcac @@ -3941,6 +3993,10 @@ trackedFiles: id: 42b2eeea0fdc last_write_checksum: sha1:72e44bdd713ea77abbd991bd01e7f433cd2443ea pristine_git_object: 0fa42a25ca61cb0ca2430b59780801adc55c754b + src/glean/api_client/models/getdatasourceinstanceconfigurationop.py: + id: 2d3c120f1d97 + last_write_checksum: sha1:18081db02ec047f57c1ca29fb90201fa33d69cd2 + pristine_git_object: 25a21bd1a03a9e6966f1e979e2be8830d4f93243 src/glean/api_client/models/getdlpreportresponse.py: id: 0e0111b5d484 last_write_checksum: sha1:ac2b5a4bd5bb5a72c9b33abbb37295193e8e3927 @@ -4051,24 +4107,24 @@ trackedFiles: pristine_git_object: 5a8b8c4ca76c23ac31550210d033fda8b47c4bc3 src/glean/api_client/models/gleandataerror.py: id: 86e8dc6c1eb5 - last_write_checksum: sha1:61e26eaa8e58f81b916f333f4c011eddd4acd876 - pristine_git_object: 707fe60fb4a9055bc6f3372df5929af5a67383bb + last_write_checksum: sha1:1cf177fb553b65bffd57484ac211c96ca8418cfc + pristine_git_object: 5bacca94972fe1a4759dd89dbe63f5a0d4df46bd src/glean/api_client/models/grantpermission.py: id: 0cfd67112b08 - last_write_checksum: sha1:9235ebc4130201f32acec912451caa4689ed17ef - pristine_git_object: 92df0762cf0f6dd5cd75b4a3857a573a7660b726 + last_write_checksum: sha1:15ea53ededf32a1b491e1d6f2956cef844110f3f + pristine_git_object: 70cf7aedec54b0b648fc72969937204ae0b282dc src/glean/api_client/models/greenlistusersrequest.py: id: cc54677a6916 last_write_checksum: sha1:a96583391fcfa804c899066bac902344bc5b22bc pristine_git_object: 85f19cbf2b8e66d45efdd067db1a9d98227edb4d src/glean/api_client/models/group.py: id: 5387fa5912b5 - last_write_checksum: sha1:12568033a44a5f14e6b4f947fcc69b57fc9b901f - pristine_git_object: 8b846642c55305e7a320f742b24dd46d1f7645d4 + last_write_checksum: sha1:9babd6ecb832b20fff877837f76a265b125504f1 + pristine_git_object: 1996f0079034f5b12f5f4160663348fb556e0f80 src/glean/api_client/models/grouptype.py: id: 64925e34480c - last_write_checksum: sha1:6c8d73f709e074154923b8eb682544df19b0398f - pristine_git_object: 30e949feec9063c0aae4e55a98a9a664ce4254bf + last_write_checksum: sha1:c8119cbb1f44d407b78c99228be80c65cdcdbcf9 + pristine_git_object: c94336ed992ffa187193a41ac0a1b2e072d25338 src/glean/api_client/models/hotword.py: id: 0a4b0a179e14 last_write_checksum: sha1:366562e7db6998836b47b70df9ec0c4c3b12191a @@ -4079,8 +4135,8 @@ trackedFiles: pristine_git_object: 358c86568bc6f919f2c9f10e54278029956909fa src/glean/api_client/models/iconconfig.py: id: fec761319e41 - last_write_checksum: sha1:71ae3fefd42fad2c3f3bb826466f47848eaa7740 - pristine_git_object: 97ca9a256ec13c0e1da5ce9a91d18b39bbe95192 + last_write_checksum: sha1:1866e9f45ca1cf6459237f7744892e393548a728 + pristine_git_object: abe3f54eb285bfbb8dd6fca35824197ea353aab1 src/glean/api_client/models/indexdocumentrequest.py: id: 39de79505ed8 last_write_checksum: sha1:1948967b77f2d0d0f23a2da8484d3c25c69faa7a @@ -4119,8 +4175,8 @@ trackedFiles: pristine_git_object: 21e0654e94d799c3f1841da75c14ba31501a6cd0 src/glean/api_client/models/inputoptions.py: id: 29608097f74b - last_write_checksum: sha1:992b3142ce575d302a4b2bbed6af966e4c06e0fb - pristine_git_object: 07eba7dd96b4e5d8db4988f69e5c95c21675f796 + last_write_checksum: sha1:3008abda080af92047d21cb8d05dfd202bb040c7 + pristine_git_object: f85b73270ea3e66af3dc9c5b42cd717d28735128 src/glean/api_client/models/insightsassistantrequest.py: id: ff69cec68e31 last_write_checksum: sha1:61b5756d08f5013309a14d4a9a538522c6e6a0d3 @@ -4159,8 +4215,8 @@ trackedFiles: pristine_git_object: 4ed84420941dca5ebf2f05246fff5047d4265a3a src/glean/api_client/models/inviteinfo.py: id: ba829cd6990e - last_write_checksum: sha1:308837a393d9fceb21d423c5c5cf0762548dfa25 - pristine_git_object: 3b68e8a5b16606e5e7807ba293526316d1f26535 + last_write_checksum: sha1:e132f7d3caf33ca512784458aa2f17726f142261 + pristine_git_object: 98c8577e6b9c127e0b2ecca727ccb75483164079 src/glean/api_client/models/labeledcountinfo.py: id: 35eebfd45449 last_write_checksum: sha1:40cb55c9487a4a10c8734c648eac64f68fd34964 @@ -4275,16 +4331,16 @@ trackedFiles: pristine_git_object: 28584294b900a5925054380d37b2623f766c15f0 src/glean/api_client/models/objectdefinition.py: id: 96d425234754 - last_write_checksum: sha1:f0b4493a08fcfa00141c346b2227a6ba56ab45cd - pristine_git_object: 148c3eeee5f3574d5c469ffbbe35c05429541fe9 + last_write_checksum: sha1:fe8c6e1c6c2839181fcd1926d3f674adf68629b8 + pristine_git_object: 6f8001cad625de291f0b2cce14556c98e7eb3553 src/glean/api_client/models/objectpermissions.py: id: 6a2561118579 last_write_checksum: sha1:a8e544a6845dba4a08654a0bc42e4a2582b332f8 pristine_git_object: 5515fd875a11a126043bca0e95cc7097b9448fa8 src/glean/api_client/models/operatormetadata.py: id: 820aa2772189 - last_write_checksum: sha1:590e474f963d00e0606e3a2814148b24393c4618 - pristine_git_object: d03e9506e19ffba46d23c19ebc785735c1265c16 + last_write_checksum: sha1:de775143c1ea509ff87f50b6dea165df4acd0350 + pristine_git_object: 55fffe7707d9dd43a3467dbb6907559d112ab063 src/glean/api_client/models/operatorscope.py: id: 143660b5a54b last_write_checksum: sha1:1fa91c313b4259beb30b7d590d5c32b3f2a45be0 @@ -4327,20 +4383,20 @@ trackedFiles: pristine_git_object: e9511127696034578efc1cc3b778b87564be531e src/glean/api_client/models/personmetadata.py: id: c3af6f3d50a4 - last_write_checksum: sha1:19f4e1d39b6f0bf2d38ae53f417938ff9a91b08c - pristine_git_object: 113c013c438a2a6a2a065910502f8d3e52d0663c + last_write_checksum: sha1:b5c97bde53c1d54deed65cd0fb4f53020759ddc3 + pristine_git_object: 19252b1b781d908b5ad9ff3d9ecb9383053f8352 src/glean/api_client/models/personobject.py: id: 59af9c1e1c5f last_write_checksum: sha1:8e37069549deee32a725de213e86c704bf1352ab pristine_git_object: ab476930b20a2aafb05dc45a84edc2abf666a128 src/glean/api_client/models/personteam.py: id: af542996b2bc - last_write_checksum: sha1:35ff8182143974a0e1fc50954e96a18fc3850410 - pristine_git_object: 9901d3e3243a983ef70a2e7f6a1c8c1635b8fa52 + last_write_checksum: sha1:ac1408767fcd5e02d39347b5dc5378b00b623753 + pristine_git_object: c6a148ca03dc3dbd2199a8d22e9b502eec8f0a41 src/glean/api_client/models/persontoteamrelationship.py: id: d81f4d7f9bd8 - last_write_checksum: sha1:228be121735e0cb122348922461066cef1a701af - pristine_git_object: 6cb4d329f709e57186df6f26be075a4e6ef6b33c + last_write_checksum: sha1:5f3c59624c25290487aed0d93877b5ae15098314 + pristine_git_object: 44d01449dec7c189c6a9176d90052bb21219cbd0 src/glean/api_client/models/peruserassistantinsight.py: id: aad2213c6217 last_write_checksum: sha1:74bf0d3fce89166352965da456ed3068e356f0d7 @@ -4403,8 +4459,8 @@ trackedFiles: pristine_git_object: 83dadeda33bfe6a4cbc6a4953627354d0af122e2 src/glean/api_client/models/propertydefinition.py: id: a5640d2ddbc8 - last_write_checksum: sha1:2a4ccd9b9360534685f2a6fce2b371c71ff45dbb - pristine_git_object: 8116de2d2aa95d93219cca38063736cf063b0a20 + last_write_checksum: sha1:28c1685b84127fbca7e73da923a95a3c2c2a709c + pristine_git_object: 2e5775c9e98d9c844c3145fb84b4c5a33e36c4b0 src/glean/api_client/models/propertygroup.py: id: f592edab23dd last_write_checksum: sha1:7e06b0a348880244352809c95ce0be5ba5e3cb72 @@ -4419,16 +4475,16 @@ trackedFiles: pristine_git_object: 8d5b0fedd461aa35cb427bd96d989accb305401b src/glean/api_client/models/quicklink.py: id: 0304461c2f90 - last_write_checksum: sha1:73b41ae0507ced2e67a87a15a688943d45953558 - pristine_git_object: 0312b05d54abb2bb90fec5c347fcc5c562f3cdcd + last_write_checksum: sha1:f24197e57a9d57d4b768de3210d6ed112201e65f + pristine_git_object: 9ade67c4eb52f36066c72a993ab3796dd95a512b src/glean/api_client/models/reaction.py: id: 076b69450df3 last_write_checksum: sha1:2fba20d30abeb7cd48a36392e4ad83ad25417a59 pristine_git_object: d6af14e2c6b394603c35eb1a060d47c8b97fbf44 src/glean/api_client/models/readpermission.py: id: 13410259df92 - last_write_checksum: sha1:6bbacbd60aecaf4e8d10020dbd46a05f5ef4e5a7 - pristine_git_object: 9ac9f9e25e97e55877820a762f1ecfbb72fab46a + last_write_checksum: sha1:1ae3e2b1810cc6af344d5eb249f6e7da852b5420 + pristine_git_object: 9c80bb2e7de99ef3e9ab9d863c7669073312d700 src/glean/api_client/models/recommendationsop.py: id: ee5dd14cd496 last_write_checksum: sha1:448097fe0d644676361b5ddaf75f70724dec4018 @@ -4447,8 +4503,8 @@ trackedFiles: pristine_git_object: 45726489c4ea6a2a664e679bfb833b4ddc49e1ed src/glean/api_client/models/relateddocuments.py: id: "956195080413" - last_write_checksum: sha1:bd9688bde6bf74d4f4270d62ef3c75146d08c78f - pristine_git_object: 034a4c3a437b9f641a8ff4934ca4748d7648ea33 + last_write_checksum: sha1:6fe40fafb830815c5d743ec4d310e2b7c62b9026 + pristine_git_object: 55f46adf0fd58de98baaeb343443b2777701345d src/glean/api_client/models/relatedobject.py: id: c8937c435039 last_write_checksum: sha1:420e9303bf60fc927a99d5efda0174d8565d1464 @@ -4471,8 +4527,8 @@ trackedFiles: pristine_git_object: 774077db3c79a83593958d01595ed3f6b6b8a6e8 src/glean/api_client/models/reportstatusresponse.py: id: 772284b8ed0e - last_write_checksum: sha1:5254967a9c2c2afaf99e2eafdaa6faaa0e6614ef - pristine_git_object: 2522a82e660b9911510d19a6d2c6dabdd975b707 + last_write_checksum: sha1:dc063af1b02cfa0ddd4e138b9bab8130b7d96ac1 + pristine_git_object: 58380be4cf9fe139e4a61c01fbf3cc48704530e1 src/glean/api_client/models/restrictionfilters.py: id: 2fb7b9c3c114 last_write_checksum: sha1:a4a5b50c69652947127d21bc5e87798107a22d3c @@ -4495,8 +4551,8 @@ trackedFiles: pristine_git_object: f9b9e44f8b3128fa27e85accd60bf34bf3f23a0c src/glean/api_client/models/scopetype.py: id: 2f48507a9410 - last_write_checksum: sha1:d460ea7e8d17a038e43c2eb26ce16ac276140d87 - pristine_git_object: 3f3b0004bc5152c445ae5e6b2a52e3a2d416d9fe + last_write_checksum: sha1:4245fb548034949fad3ffea8f6afa5ddea1ffde0 + pristine_git_object: e45814ba47a94bde527ff4fe6f216224211eb3af src/glean/api_client/models/searchagentsrequest.py: id: e4777828bb53 last_write_checksum: sha1:304fec4d49f1ea5033de379d68809ee463e569d2 @@ -4523,8 +4579,8 @@ trackedFiles: pristine_git_object: f5ea350845369391ec299ffe056f8f471299bcb8 src/glean/api_client/models/searchrequestoptions.py: id: c7963bd59328 - last_write_checksum: sha1:cc91cc0d63d811f44d4cce961d0bb356c9dfee40 - pristine_git_object: 9ee1139fb9b5619fb6eafd782e6a11d7e20c6bda + last_write_checksum: sha1:a57e90171b5a4609f51871752f3004dd8104b595 + pristine_git_object: a25a2d04bbedf92a2bdc23580a6067686c26df11 src/glean/api_client/models/searchresponse.py: id: d705ad40d03c last_write_checksum: sha1:83d422a78f65c92a234626e4b8e2e55a279596e4 @@ -4535,24 +4591,24 @@ trackedFiles: pristine_git_object: c7157ae618ad475d51fcdd87ea55802e931fefe0 src/glean/api_client/models/searchresult.py: id: 80390a0977b7 - last_write_checksum: sha1:f02cd34af816102446a9df80a898c1dc84bb34b4 - pristine_git_object: c476686ed7b98ee0b8e069b13963d1e75d627ebb + last_write_checksum: sha1:25cd177ecfa5b61f92abb88003b4fd061c4020c4 + pristine_git_object: ceb26500bffd76556bfac4e838e2c8fd8dcadfcb src/glean/api_client/models/searchresultprominenceenum.py: id: 611302793a36 - last_write_checksum: sha1:4225ab438686c0ad0beb7c0f11bcb523a01e3e67 - pristine_git_object: ddf2e8f1cfe9e3860a5753d118bbde9bbb3ed34c + last_write_checksum: sha1:75da9f35ae33d71515f58654134b6d614f453ecf + pristine_git_object: 27ef471f64a9f280f3142d2f9b825c0058b2c365 src/glean/api_client/models/searchresultsnippet.py: id: 70ba81075b57 last_write_checksum: sha1:926645aaabf6aac684e5018645b73cf6dfd723a0 pristine_git_object: c235ac1f310e375c69bff593f56d226d37793e0f src/glean/api_client/models/searchwarning.py: id: c2eca228f00f - last_write_checksum: sha1:4951154af78b80453a435e8f3b7f235e5142720b - pristine_git_object: 72c2fb915b0a912916067ff56e5b5d6054f8b8c5 + last_write_checksum: sha1:25aa42ef2ea3e48d5210036853a88492daeae464 + pristine_git_object: 062363ded2714b3e6671f1a5b79308b952d069b1 src/glean/api_client/models/sectiontype.py: id: 9b5de392015d - last_write_checksum: sha1:6bfac99bee31c88303dbda27576b7f283eb0eabf - pristine_git_object: 2dbb489e5e57896b6bac27ee2e7aa6d9b6acc986 + last_write_checksum: sha1:130b8a1f543787e1f3f63915036bcf448ec52ceb + pristine_git_object: 59fe1bb6ae5db2711599be0bb64971a8a8aa4c9f src/glean/api_client/models/security.py: id: 79159407101e last_write_checksum: sha1:d6eec3a1ca1d3a71d6c2ba5d89d45b6ed644bb9e @@ -4571,8 +4627,8 @@ trackedFiles: pristine_git_object: ddc4bf2e43c37f93aead49b02339dd7780d077cb src/glean/api_client/models/sensitiveinfotype.py: id: 6d9d1a461507 - last_write_checksum: sha1:eeda43e2e6e951aa72c007d7b4b29633b5c89307 - pristine_git_object: 69c211224ef92c406a6cea81fd9bf10c2a3476f8 + last_write_checksum: sha1:18c1fe30f253045f329338a5eb7e38356cca2613 + pristine_git_object: 95dec2f71c4e4235160bec884d91fef32a3007b0 src/glean/api_client/models/sessioninfo.py: id: 4127a11bdfbc last_write_checksum: sha1:f81f0f43df044f115bc04120f6122c9a52d764b2 @@ -4591,8 +4647,8 @@ trackedFiles: pristine_git_object: c36e2aa4522107840f3d5fcb3d8b11cbd33bb97f src/glean/api_client/models/shortcuterror.py: id: 2f86c1d02a49 - last_write_checksum: sha1:267fbcee22f522f1dba995b778eb6087a32d57f2 - pristine_git_object: bc2d9b7fe2642c63690226658357a88c3c806200 + last_write_checksum: sha1:ac9b6a68c7b67aab2a5c6f16de7dc947e0e0c392 + pristine_git_object: ac2407ce9d1cea8509cca5a38dddf61d1cf1e341 src/glean/api_client/models/shortcutmutableproperties.py: id: 16671c35b7ba last_write_checksum: sha1:15dad72640797d70f44e84a8bcce767d809daa9b @@ -4627,8 +4683,8 @@ trackedFiles: pristine_git_object: b4281e4e2e4a9058ac0be6d86f6e0262bd3c50c2 src/glean/api_client/models/structuredresult.py: id: 1777b707d24b - last_write_checksum: sha1:0eb9dc0e8959d4947afcddd83c1603a4682cc647 - pristine_git_object: ece0abe67a14e54392afb30f40b099ed84c373e7 + last_write_checksum: sha1:faec99113dba8d01b66d853a55c3dd42da8f7b64 + pristine_git_object: 8f1d1e2824dc80e0bc850fc451c678f4d590bcdc src/glean/api_client/models/structuredtext.py: id: 5a5980e70744 last_write_checksum: sha1:c27d7710c18265efe0f3ae36a3a5218834ce0411 @@ -4659,8 +4715,8 @@ trackedFiles: pristine_git_object: a99d75250f0054283cd58035654a7808e2458a2d src/glean/api_client/models/team.py: id: 8899a02080f7 - last_write_checksum: sha1:5c9a717187e8fe5d67bf2eeb8095190a61da80a6 - pristine_git_object: c688efcded11ab107b167ad9d9b6c950c5ffc353 + last_write_checksum: sha1:b5ec9026571a54bb61339923f9ce1ea47e45b90d + pristine_git_object: 4abb136d2f0ff142ba0ec0c14d682c22fced605c src/glean/api_client/models/teamemail.py: id: e0dd0042405b last_write_checksum: sha1:132b7d70088f21bb60f3d6837637bce513498c0a @@ -4675,8 +4731,8 @@ trackedFiles: pristine_git_object: d6cece46d1ce6bf24e0233b882eb5060218b535d src/glean/api_client/models/textrange.py: id: fd0971fbe1a2 - last_write_checksum: sha1:764d7773d4cce699f50bedc6c9fff66ca1b3fabe - pristine_git_object: 2d665a5175674f42972967a8905ee1333c3c9646 + last_write_checksum: sha1:12a2657f0cab8fd70ac4a0f6df3c01f0a4ce2029 + pristine_git_object: fea3df5e0ef885877d93df525287f8775684b0b1 src/glean/api_client/models/thumbnail.py: id: f1c4780867a9 last_write_checksum: sha1:a5bcb1ac09080d558fcb1233ee92499c2292186b @@ -4695,24 +4751,24 @@ trackedFiles: pristine_git_object: c8b09f0dfc36c43b457735a04f05b40defd00a3c src/glean/api_client/models/timerangefilter.py: id: 0eead7612909 - last_write_checksum: sha1:80a5705ef0d89b517c49398428ba467352cb981f - pristine_git_object: 92f7896e6fe209e76f49ef557b5ec89edcf4b8a7 + last_write_checksum: sha1:58a0b71b056d6e8d54c6b206eeddf70fad8d615f + pristine_git_object: 49087f7a388533520f5bcddf9268c3628c239199 src/glean/api_client/models/tool.py: id: acaa76f0ab87 - last_write_checksum: sha1:e7c5f78afb4df7a4055f87b4b48157475e6add8a - pristine_git_object: 7252330cef23eb73eb1dc59d7d8e861698162979 + last_write_checksum: sha1:23eb68406940b432e2a21c41182c782670071581 + pristine_git_object: 6469ec58da7363dc67e70cb280f74678d0d2cd52 src/glean/api_client/models/toolinfo.py: id: f210c6276023 last_write_checksum: sha1:641917d251dda9d4be07e214d2b4d1e9671fcd91 pristine_git_object: a83308e92b4f42f49bb53e8b81ae6af103f296f7 src/glean/api_client/models/toolmetadata.py: id: 7ed199e1f217 - last_write_checksum: sha1:2c9ffcf95cc30526a0a8d15de1c11a8fdccd6760 - pristine_git_object: 10e8f64dfc89c729232a8ea787cb30962b456cf3 + last_write_checksum: sha1:30edd211c5481866ebb236c0b2c8db8a895e89c2 + pristine_git_object: bac0b288c27e25296472ae6aabae24dd8f9f2666 src/glean/api_client/models/toolparameter.py: id: 630b822ac98b - last_write_checksum: sha1:efdfb57855d6f12507bb9b16c32669abcacd5a57 - pristine_git_object: 31e41566b184b56f787bb46a60815d89bc6c03ca + last_write_checksum: sha1:fa235cdb66ece6bd8c830fcbf31efe9ba1ac0e39 + pristine_git_object: a01ddb8e9b65d4ba1680822a6d737ca93bfc62ea src/glean/api_client/models/toolscallparameter.py: id: 983b41ea115b last_write_checksum: sha1:1dde2fd7bfd393a253f0303f067362deebe8ba44 @@ -4735,12 +4791,12 @@ trackedFiles: pristine_git_object: d20d237b50f1ee24740e67aeaee522b0999d5fb1 src/glean/api_client/models/ugctype.py: id: 9afda9fb9dd7 - last_write_checksum: sha1:8f7e4236f023551cae93d5a75872ea6d1a3d3c29 - pristine_git_object: 9594a7bfffd04c21e4fdf0c792b3474ed631cb6d + last_write_checksum: sha1:7bb78a72d4d92f1c8a40fac54473773b6021273c + pristine_git_object: 7ed8033e228711e774ab6486840e0b85f159413e src/glean/api_client/models/unauthorizeddatasourceinstance.py: id: d3507c78b8df - last_write_checksum: sha1:f296ce21379e31857108f7d3f0c77c4346385bef - pristine_git_object: bec92224397eb6772fbc857bb6048360d48b5eb1 + last_write_checksum: sha1:e3fa0a443633af8a9ce33af5eb4d968020044e4e + pristine_git_object: c4067eccdc55a843f937122d01a5740244a98c7d src/glean/api_client/models/unpin.py: id: fd3f7ecf7a4f last_write_checksum: sha1:38b097cc87897b932f2f52ecc1e8cebc9a7833a8 @@ -4757,22 +4813,30 @@ trackedFiles: id: 4e395ad26b24 last_write_checksum: sha1:e64f4b907ba1a3772743265b327ac18786567362 pristine_git_object: ef92fe1d3b9a1b80dca2de84fe415d3c13c9a167 + src/glean/api_client/models/updatedatasourceconfigurationrequest.py: + id: 2d2985d17d84 + last_write_checksum: sha1:e08a352d5d8c680c7d07e762f8eacefbb5122bc8 + pristine_git_object: e1a2c5a3409aaa0d3dc3a187d2a2c294064771ab + src/glean/api_client/models/updatedatasourceinstanceconfigurationop.py: + id: 8678b3d30355 + last_write_checksum: sha1:64a508426d218a72ef740a0d5aa0bd2924b421f8 + pristine_git_object: 1f77deeb8fb6a8a875f49e590e9a98381e5fce41 src/glean/api_client/models/updatedlpconfigrequest.py: id: a3d254d01c5f last_write_checksum: sha1:34623e584ba9a2816d236628d4b0c7a8b2d3649d pristine_git_object: 9111f9594e279c16a0f3b4cddb401a2f00a56a7e src/glean/api_client/models/updatedlpconfigresponse.py: id: ebdba2bf5b4f - last_write_checksum: sha1:f92222e8d3f302abd684094e2c7d62a3a8771e62 - pristine_git_object: d415f88dc3a7afa2f8b45fb526a82273c5da51cb + last_write_checksum: sha1:d792b72dd8d02d35e63d5d38a9709de98186c7b4 + pristine_git_object: 469506585a8fd48f09ef6535b8b2144c49186b1a src/glean/api_client/models/updatedlpreportrequest.py: id: 955dc0f697ca - last_write_checksum: sha1:55a4f8cb42668fbe54332b3beab188aa6d251ceb - pristine_git_object: 63f109621370d73b887ac18861f96f2ae392be89 + last_write_checksum: sha1:3bb4ba640c4a3214d2e9804d9b7624760eb418fe + pristine_git_object: 4f30204129c852720f00acbc7d5039becd9b9efc src/glean/api_client/models/updatedlpreportresponse.py: id: 4d603da790ea - last_write_checksum: sha1:2ac8aba5b1984b62064116ac115c4841e799a173 - pristine_git_object: c65474b8476df87408a80b0504e69c2238ac7981 + last_write_checksum: sha1:09af5d21f0546892bafc9ed52009933ca75ab37a + pristine_git_object: fd8846794821958b4005d7d017e8a662586da1ef src/glean/api_client/models/updatedocumentvisibilityoverridesrequest.py: id: 90d244edbd6e last_write_checksum: sha1:361acce6d6e7374db7016978da474b2d79aa4bef @@ -4803,8 +4867,8 @@ trackedFiles: pristine_git_object: ed28c5ae287b6c83e83cae488702f3a7046ee6d6 src/glean/api_client/models/updatetype.py: id: bdade91a9b2b - last_write_checksum: sha1:e4958a4a45413b8e471a5311068792ab8c6adb96 - pristine_git_object: 687544d47bd9c1e71f933ec6fb4e5a33f197b49b + last_write_checksum: sha1:7b185f14a24c29e8b53ce58533971828af23f4ef + pristine_git_object: 6a51a4bbf41b92eae18eeca9df409b52522ab70d src/glean/api_client/models/uploadchatfilesop.py: id: 29eaccdd7727 last_write_checksum: sha1:4754d58e641d54d4d16c2f2423ca2c1ecf99cbdf @@ -4823,20 +4887,20 @@ trackedFiles: pristine_git_object: 292988f6e1fae0b2665567fea0f33ab87b9d6ccb src/glean/api_client/models/uploadstatusenum.py: id: a93d3718abcc - last_write_checksum: sha1:867bb71590ac5c8188a6123232f168bbdecbdd43 - pristine_git_object: c7ca19e2a45578fa30dc8ca998f2e4197149cd17 + last_write_checksum: sha1:3de738be3c16545f46bc3a05ba903e5cab17a216 + pristine_git_object: 950f6a404fa4ea4f8667a58817fd471f0b000b7a src/glean/api_client/models/user.py: id: 4a3ebe791009 last_write_checksum: sha1:1d8ac49787f531c6d9eb2535d649e7103c0fd890 pristine_git_object: 01fc7ac27357a9e8f11513cbd740b11b53728e4f src/glean/api_client/models/useractivity.py: id: 7ed02b8eeead - last_write_checksum: sha1:0ada3cb3d5fb89e9b4e4c2725373fb99869fa0e5 - pristine_git_object: 5108bb40601228bd8798e2bfae259b48becae62e + last_write_checksum: sha1:ae9c2cf794333d040d663001e25bd60b0783f41f + pristine_git_object: c194604a30237f7e9d3ddf7a482019e9378e9786 src/glean/api_client/models/useractivityinsight.py: id: 07ac5bf2e903 - last_write_checksum: sha1:9831f8d682fde6d6cc3620e28daa778e986e8800 - pristine_git_object: 76d1560024db47e6a7efe3863300185d7bb0f9f1 + last_write_checksum: sha1:866aca94e7fa533ac68a0df7411d139d6897b47b + pristine_git_object: 9eae4fc553f8bfbe30aec896a0e9f9d561ce77c2 src/glean/api_client/models/usergeneratedcontentid.py: id: e51bf3d3e0b3 last_write_checksum: sha1:59eca6f26e30abfb8589fd5d3edb6e1231b2be65 @@ -4847,24 +4911,24 @@ trackedFiles: pristine_git_object: 9c914212cf415865eb92b0e538b0b24b4b4e442f src/glean/api_client/models/userrole.py: id: 63599e4c3216 - last_write_checksum: sha1:d4af1e99c1ee0fbb990b5b7e6c12eaa5f6a1c1fb - pristine_git_object: f4aa28fa6fb4bd2effb97fa28569a9fba7271800 + last_write_checksum: sha1:4ec82f0c733b59d7b8de27a5d655e8edba17e88b + pristine_git_object: 2768603fd77e16d9f82da184d9e236a9e2a8fde2 src/glean/api_client/models/userrolespecification.py: id: c746dd831aa4 - last_write_checksum: sha1:26aaf275b11e92afc1cbe7c115a0cf979a9973e4 - pristine_git_object: b6902a8c240c1dbd277b6ad7d726dfd9c5aefd25 + last_write_checksum: sha1:1f31ef036c5e6161963da1a372e49f0ca81a4e91 + pristine_git_object: d67f51b852f764dc90a2219a4632da01372f0ed3 src/glean/api_client/models/userstatusresponse.py: id: 30477cf9a61f - last_write_checksum: sha1:e5681fa1f9894a2ca8b37eab2ab57233caa3b0c9 - pristine_git_object: e8fb646ff576ff3eae2c46df59899988bc979bf9 + last_write_checksum: sha1:ee7bdf416296c94a5cb8bda66c63341122338183 + pristine_git_object: 8131eca9e924a539e0235c4b46d8055357ed146a src/glean/api_client/models/userviewinfo.py: id: d03415292af5 last_write_checksum: sha1:9bc5a59461e0220ad3b82c7b510f476fb52f8ca6 pristine_git_object: a81bd1ea1d07274bd46f3b5f601e105e91baed1f src/glean/api_client/models/verification.py: id: f20b858aacfe - last_write_checksum: sha1:b5a6f0075cc0ed99893b1c25f392b3c733d76432 - pristine_git_object: 4aa8837dbf80e8e486795e1377812f49b4b3d5f4 + last_write_checksum: sha1:2b47c65ece4ed049060977ebc3ab470110b8cbeb + pristine_git_object: 752197e3de2c7f48e9871008b6c1db08c90ed900 src/glean/api_client/models/verificationfeed.py: id: a4d305725b8f last_write_checksum: sha1:c5c5ccdc36871293a8a9982b62c9afac19fd93a9 @@ -4883,8 +4947,8 @@ trackedFiles: pristine_git_object: acdc17d5eeaac57038aa3a2c80e62837ff2690c2 src/glean/api_client/models/viewerinfo.py: id: dc44fac102b9 - last_write_checksum: sha1:3475d911e27f276f8c91025e359b38374e256ce1 - pristine_git_object: b27ade10d3eb1f02c1956f33f7da6aae34e8216d + last_write_checksum: sha1:0a37ee4b111e8859011da416f126e816572be078 + pristine_git_object: f707d635a99b81cf082a9579e253caa89ecd06ac src/glean/api_client/models/workflow.py: id: e59e0fe5f663 last_write_checksum: sha1:21a4afe44430b007e269272463239ffca96427ac @@ -4899,16 +4963,16 @@ trackedFiles: pristine_git_object: b3e81a84fad5595cccb410baafe741420914243c src/glean/api_client/models/writeactionparameter.py: id: 3a7daceaf3fc - last_write_checksum: sha1:14b9e94734e9f25e5f006f575e1c47f3a966165c - pristine_git_object: cd9682d9f9474e24b050e26503a4d9ef8ff77907 + last_write_checksum: sha1:70ae8e918dbf0543f6d0086ab6e80af9c7970245 + pristine_git_object: aff7513d27c23970ea0496152945359d256760ef src/glean/api_client/models/writepermission.py: id: e15ed09cb123 - last_write_checksum: sha1:cebd5dc2e98d93b6ecae3bc236d0dcc748b92f25 - pristine_git_object: 4a9c4635d3ed78a5b63c770dfbcb16373789a90e + last_write_checksum: sha1:2713c19278c3de809dcad841328c5dc709f231e6 + pristine_git_object: 7cea3a93bcb833f4e970a3a3495218fe1e0f02b6 src/glean/api_client/people.py: id: e32c03723ded - last_write_checksum: sha1:02560fa5e7b4358ec6c3677c27e7ee575f241d7f - pristine_git_object: 984073db79503d8bde3a58f8cddc54ddfc2ee331 + last_write_checksum: sha1:9535a8a2203accd99ed9b319a3a4d1263068f0c9 + pristine_git_object: f240b57ccfe87b35762689f0a44122f33618ecb9 src/glean/api_client/pins.py: id: 4a37ead65f8a last_write_checksum: sha1:9c72f34fc747fd9753beb6dcb967366d8c1c9181 @@ -4927,8 +4991,8 @@ trackedFiles: pristine_git_object: fc7fbb02488d301c6bdfcfe1430d61e35efd4e6f src/glean/api_client/sdk.py: id: e2de37b3ce92 - last_write_checksum: sha1:87a22ee048fef8c5ac40fd39aae8027b032849a2 - pristine_git_object: a0a9f4fe7d0fa93eed408014189bb36e537da847 + last_write_checksum: sha1:20b123aa68f6f743456a2483e97c05ceb3583bdc + pristine_git_object: be0521641c7aaea770d62e9347538ad716205930 src/glean/api_client/sdkconfiguration.py: id: f356ce00b5b7 last_write_checksum: sha1:1ae43e08ae57ae277b3ab5e66b52d020149ebe00 @@ -5042,9 +5106,9 @@ trackedFiles: tests/mockserver/README.md: last_write_checksum: sha1:aa2bb9124570a1c12a3c81d728100c305a59220c tests/mockserver/go.mod: - last_write_checksum: sha1:44fa2062991ca9acb37a7ade5fb75d0b7731154a + last_write_checksum: sha1:c2b6f5a81e03003990983f5befd1da3f1a0396b6 tests/mockserver/go.sum: - last_write_checksum: sha1:d487c9e78318f86734588c530c3dfd01d02dd044 + last_write_checksum: sha1:cdeb52f5f4c63d07ba612730867a95b0ddb14b2d tests/mockserver/internal/handler/assert/contenttype.go: last_write_checksum: sha1:2d059a68e53e70b269ddf897f8c6017f94434e18 tests/mockserver/internal/handler/assert/header.go: @@ -5060,11 +5124,13 @@ trackedFiles: tests/mockserver/internal/handler/generated_handler.go: last_write_checksum: sha1:32101ddff940c59f43a805af303cf645a2bcca0d tests/mockserver/internal/handler/generated_handlers.go: - last_write_checksum: sha1:2aaafbb3aade11b06561dc8efe935abbe714195d + last_write_checksum: sha1:19821864a3ed96150e35949d5d12e9220cfb6ff6 tests/mockserver/internal/handler/pathgetrestapiv1agentsagentid.go: last_write_checksum: sha1:5210b43a5c1c7157ff57f7140449d82dc622931f tests/mockserver/internal/handler/pathgetrestapiv1agentsagentidschemas.go: last_write_checksum: sha1:a70fc628d284a0c11701c7d69a5d22dfdf118706 + tests/mockserver/internal/handler/pathgetrestapiv1configuredatasourcesdatasourceidinstancesinstanceid.go: + last_write_checksum: sha1:be1ef6d303273236aa6b9797453a04bb778cdd62 tests/mockserver/internal/handler/pathgetrestapiv1governancedatafindingsexports.go: last_write_checksum: sha1:06b13f04c06621c32cd5d4664612a3804ffc49c2 tests/mockserver/internal/handler/pathgetrestapiv1governancedatapolicies.go: @@ -5073,6 +5139,8 @@ trackedFiles: last_write_checksum: sha1:08b8057f91f2a800304987937336f033580406df tests/mockserver/internal/handler/pathgetrestapiv1toolslist.go: last_write_checksum: sha1:8b0d26cd221009e78396ed0c573e78c0ac719e36 + tests/mockserver/internal/handler/pathpatchrestapiv1configuredatasourcesdatasourceidinstancesinstanceid.go: + last_write_checksum: sha1:14d3e93a3f37b61145188a9e6544398fcfc200e4 tests/mockserver/internal/handler/pathpostapiindexv1adddatasource.go: last_write_checksum: sha1:f1c92a8b8e4db16ee9334d7e28f8abec8c52d50e tests/mockserver/internal/handler/pathpostapiindexv1betausers.go: @@ -5130,7 +5198,7 @@ trackedFiles: tests/mockserver/internal/handler/pathpostrestapiv1addverificationreminder.go: last_write_checksum: sha1:c84407a2fea61f697db312567614db6b63718d19 tests/mockserver/internal/handler/pathpostrestapiv1adminsearch.go: - last_write_checksum: sha1:eca93b5859c110232d3d2235976ea5d4681fc2e1 + last_write_checksum: sha1:f72a007fdcdc280a3750b7743281ff5a1babbbc3 tests/mockserver/internal/handler/pathpostrestapiv1autocomplete.go: last_write_checksum: sha1:094d64ddc73a91d38e64e3be18690ebb9d4ef3d3 tests/mockserver/internal/handler/pathpostrestapiv1chat.go: @@ -5144,7 +5212,7 @@ trackedFiles: tests/mockserver/internal/handler/pathpostrestapiv1createauthtoken.go: last_write_checksum: sha1:6ce83ba03066acb436796c018d19715615f548c1 tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go: - last_write_checksum: sha1:f9f4c718408bddadbdf826194f07970bb111e57e + last_write_checksum: sha1:14b4a1d98dd55ce2b487ae1aaab4a7dece08df25 tests/mockserver/internal/handler/pathpostrestapiv1createshortcut.go: last_write_checksum: sha1:dcdf684a85e20db1aee571db9a54a3ee259d71d5 tests/mockserver/internal/handler/pathpostrestapiv1deleteallchats.go: @@ -5212,7 +5280,7 @@ trackedFiles: tests/mockserver/internal/handler/pathpostrestapiv1listverifications.go: last_write_checksum: sha1:7b99f010057f6b98a1221d36c4eb56c1db2b0024 tests/mockserver/internal/handler/pathpostrestapiv1messages.go: - last_write_checksum: sha1:410a1891eccae89371ea0a5ad56e1a8e929d08c4 + last_write_checksum: sha1:aa643571dade54af9fd139769a3f89ffdabfad9f tests/mockserver/internal/handler/pathpostrestapiv1people.go: last_write_checksum: sha1:7a2c7c4195547c84ad45b183e8f3ad0992d531fc tests/mockserver/internal/handler/pathpostrestapiv1pin.go: @@ -5220,7 +5288,7 @@ trackedFiles: tests/mockserver/internal/handler/pathpostrestapiv1recommendations.go: last_write_checksum: sha1:1fd737e7116aee5777f6805e5687923531d171b0 tests/mockserver/internal/handler/pathpostrestapiv1search.go: - last_write_checksum: sha1:936fe2abfb7a02c61f1fd7fc399938da801cc744 + last_write_checksum: sha1:fa29db563d6e88b9dd0f93dbe02a00fe13cc471f tests/mockserver/internal/handler/pathpostrestapiv1summarize.go: last_write_checksum: sha1:eafbc420f54c1395f41af4735d74af6105c8d50d tests/mockserver/internal/handler/pathpostrestapiv1toolscall.go: @@ -5252,7 +5320,7 @@ trackedFiles: tests/mockserver/internal/logging/oas_operation_call.go: last_write_checksum: sha1:1ec2244b5fc171dfe7e4e339420b2b17f0df48c9 tests/mockserver/internal/sdk/models/components/actionsummary.go: - last_write_checksum: sha1:26174d625f915fc8a07febb491ccce4dd6d1cbbd + last_write_checksum: sha1:b0345a64f421c33e04cd1aa4c8206c43d7d0f649 tests/mockserver/internal/sdk/models/components/activity.go: last_write_checksum: sha1:62ed2988de11a8af0b36342f9e557621d32cb6d4 tests/mockserver/internal/sdk/models/components/activityevent.go: @@ -5318,7 +5386,7 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/autocompleterequest.go: last_write_checksum: sha1:1afcc6580c049f904d96944dcbf6f96dc9ba0b5a tests/mockserver/internal/sdk/models/components/autocompleteresponse.go: - last_write_checksum: sha1:cb095d71f723f218f37e5846e06708f2c62831c2 + last_write_checksum: sha1:ac7d26f25b2828f520494f4fbe7cd7c2beb9f44a tests/mockserver/internal/sdk/models/components/autocompleteresult.go: last_write_checksum: sha1:8438ff71f398ed3de8208f2f2c8b2d63819c83f2 tests/mockserver/internal/sdk/models/components/autocompleteresultgroup.go: @@ -5374,7 +5442,7 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/chatrequest.go: last_write_checksum: sha1:7d090933c080d356c3716f23a13b2b92cdc93ee9 tests/mockserver/internal/sdk/models/components/chatresponse.go: - last_write_checksum: sha1:9ac97b99d0307f7027ccde644388b29c463de31b + last_write_checksum: sha1:4c8a0d78656e7d6d5f68b5c13734c4c8de76a815 tests/mockserver/internal/sdk/models/components/chatrestrictionfilters.go: last_write_checksum: sha1:528172b6e5a087f2f516ee7e192a7772bc1ee373 tests/mockserver/internal/sdk/models/components/chatresult.go: @@ -5423,6 +5491,8 @@ trackedFiles: last_write_checksum: sha1:26417a78d66849ecd21f05bf40899c5db373f39b tests/mockserver/internal/sdk/models/components/conferencedata.go: last_write_checksum: sha1:64eabce460dc274803c7fb0b7bb45cc9d58d8463 + tests/mockserver/internal/sdk/models/components/configurationvalue.go: + last_write_checksum: sha1:ddbf742f0df37badaee68310779ed24a2895bc72 tests/mockserver/internal/sdk/models/components/connectortype.go: last_write_checksum: sha1:0e2f6006ffa974b582362f1d259dd55fdb02a00e tests/mockserver/internal/sdk/models/components/contentdefinition.go: @@ -5481,8 +5551,12 @@ trackedFiles: last_write_checksum: sha1:f30c464c189f3ca3bd09a64e0949add64287ed40 tests/mockserver/internal/sdk/models/components/datasourcebulkmembershipdefinition.go: last_write_checksum: sha1:7461564626030cdc092d351d101243469e0cf16a + tests/mockserver/internal/sdk/models/components/datasourceconfigurationresponse.go: + last_write_checksum: sha1:0e571c4aab6d7ed0f03e2d834369353cdf4b82d3 tests/mockserver/internal/sdk/models/components/datasourcegroupdefinition.go: last_write_checksum: sha1:7901f25f2a1b52801631df10246ed50357d37837 + tests/mockserver/internal/sdk/models/components/datasourceinstanceconfiguration.go: + last_write_checksum: sha1:f4022b1e8bf17fcaeaaf52f4cdcf1763749389c3 tests/mockserver/internal/sdk/models/components/datasourcemembershipdefinition.go: last_write_checksum: sha1:b2671c4d71318bb6c61f5c7a8b374ef7a5c3f544 tests/mockserver/internal/sdk/models/components/datasourceobjecttypedocumentcountentry.go: @@ -5734,7 +5808,7 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/gleanassistinsightsresponse.go: last_write_checksum: sha1:5b8a4fdefd05ed9e53cbee94c32b0a428175ad22 tests/mockserver/internal/sdk/models/components/gleandataerror.go: - last_write_checksum: sha1:574707e36ef6fbd82f22e354f1771cde58491703 + last_write_checksum: sha1:fa6d4a5917a90f72a97628ba20e31dd31b02af0c tests/mockserver/internal/sdk/models/components/grantpermission.go: last_write_checksum: sha1:83d69c5a502306994095bc1a515d6c52798fa696 tests/mockserver/internal/sdk/models/components/greenlistusersrequest.go: @@ -5788,7 +5862,7 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/invalidoperatorvalueerror.go: last_write_checksum: sha1:6e8e407afa9e6caf4bc946a51054037a0b64100f tests/mockserver/internal/sdk/models/components/inviteinfo.go: - last_write_checksum: sha1:61032a89375395328097e99d31bf547ae52f5870 + last_write_checksum: sha1:a34f4007a255687f057ad9d07c76096ffc122a99 tests/mockserver/internal/sdk/models/components/labeledcountinfo.go: last_write_checksum: sha1:93763fcdc7d3a1e7b6ffc5cfc2e77fe7270e736d tests/mockserver/internal/sdk/models/components/listanswersrequest.go: @@ -5918,7 +5992,7 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/resultsdescription.go: last_write_checksum: sha1:222d4cd162257aa1fa51a4618c5fe5878f620e51 tests/mockserver/internal/sdk/models/components/resultsresponse.go: - last_write_checksum: sha1:0f0c1e24f84e466afbe162723e77c992ea86234a + last_write_checksum: sha1:11f1bf56e8b41e71b3b458d39f4a18b9ad7ae0e3 tests/mockserver/internal/sdk/models/components/resulttab.go: last_write_checksum: sha1:0c61e42fad9332219ca1e3642fb386c3cf9228ad tests/mockserver/internal/sdk/models/components/rotatetokenresponse.go: @@ -5938,7 +6012,7 @@ trackedFiles: tests/mockserver/internal/sdk/models/components/searchrequestoptions.go: last_write_checksum: sha1:17ee2976b192f2b65f9b431afb0e9056aae72278 tests/mockserver/internal/sdk/models/components/searchresponse.go: - last_write_checksum: sha1:f5525fc2fce0c9527511393ea5f25dd9ef017535 + last_write_checksum: sha1:eb63c5279cb78ba8d445ec077a50a898af7f3cc4 tests/mockserver/internal/sdk/models/components/searchresponsemetadata.go: last_write_checksum: sha1:5ba373bccf0e7b975614650485d334c3099aa38a tests/mockserver/internal/sdk/models/components/searchresult.go: @@ -6047,6 +6121,8 @@ trackedFiles: last_write_checksum: sha1:6bd1f6c9f451492810949a589b7cf0e07ede176d tests/mockserver/internal/sdk/models/components/updateannouncementrequest.go: last_write_checksum: sha1:8b10184d480e07a4631098d08ef3c16bfbdfcc33 + tests/mockserver/internal/sdk/models/components/updatedatasourceconfigurationrequest.go: + last_write_checksum: sha1:5710dfb763b96275a55fe0e6b16269cded3f9b9d tests/mockserver/internal/sdk/models/components/updatedlpconfigrequest.go: last_write_checksum: sha1:0612a19ee35705f71346a5d3b6ec4eaec4d9f029 tests/mockserver/internal/sdk/models/components/updatedlpconfigresponse.go: @@ -6199,6 +6275,8 @@ trackedFiles: last_write_checksum: sha1:b9331fcb429d8bb22487234f7fa3627ee91b21f9 tests/mockserver/internal/sdk/models/operations/getcollection.go: last_write_checksum: sha1:758de3276a51cb9ef5e2bc09d8e689a95ff4fc53 + tests/mockserver/internal/sdk/models/operations/getdatasourceinstanceconfiguration.go: + last_write_checksum: sha1:1570d25442383d4a4d95f8e55ffc0f6c426f683e tests/mockserver/internal/sdk/models/operations/getdocpermissions.go: last_write_checksum: sha1:dfd7bfff0ab9672ecfed72ca75845eeb6e1572b3 tests/mockserver/internal/sdk/models/operations/getdocuments.go: @@ -6333,6 +6411,8 @@ trackedFiles: last_write_checksum: sha1:ebc6723ce70f20e4847d322b1f63ab297b7b4d39 tests/mockserver/internal/sdk/models/operations/updateannouncement.go: last_write_checksum: sha1:219c6a8e147028e49185ebfe1488b8efe1e5f4a3 + tests/mockserver/internal/sdk/models/operations/updatedatasourceinstanceconfiguration.go: + last_write_checksum: sha1:9138b5126887e93c98c8c5d936909af27faa6236 tests/mockserver/internal/sdk/models/operations/updatepolicy.go: last_write_checksum: sha1:555e1077b891a4d7a21f275bcffe983b7fff9120 tests/mockserver/internal/sdk/models/operations/updateshortcut.go: @@ -6343,8 +6423,14 @@ trackedFiles: last_write_checksum: sha1:f20f8fd1bbf3169e0e4516595d7971e5cae03951 tests/mockserver/internal/sdk/models/sdkerrors/collectionerror.go: last_write_checksum: sha1:a8ce08145cf00a84487714f875ba1d3a8d84be1d + tests/mockserver/internal/sdk/models/sdkerrors/errorresponse.go: + last_write_checksum: sha1:eecdd5dcfa17d3c57965b06f8d75065b5ccf243b tests/mockserver/internal/sdk/models/sdkerrors/gleandataerror.go: - last_write_checksum: sha1:5f4302649777ef141443c9a78f4f2fe8e9a5fbc0 + last_write_checksum: sha1:ee697c8e2807f2b86c3de73bcbc013bbaf4ee2e9 + tests/mockserver/internal/sdk/optionalnullable/optionalnullable.go: + last_write_checksum: sha1:aa5ff815f31a3657487ad5e0c3f023f573b1fcab + tests/mockserver/internal/sdk/optionalnullable/optionalnullable_test.go: + last_write_checksum: sha1:c0ca755fb35acd8f838567e22c2b5722592fe1c3 tests/mockserver/internal/sdk/types/bigint.go: last_write_checksum: sha1:49b004005d0461fb04b846eca062b070b0360b31 tests/mockserver/internal/sdk/types/date.go: @@ -6358,7 +6444,7 @@ trackedFiles: tests/mockserver/internal/sdk/types/pointers.go: last_write_checksum: sha1:fc2275ea006257ba9ba4ff6f2a2cdb6205371eef tests/mockserver/internal/sdk/utils/json.go: - last_write_checksum: sha1:6c771a2a3442f04ef7f925fc37b3e16655cd6ab4 + last_write_checksum: sha1:53a656712673e70bd0a3e9e8515bdab105e60f3e tests/mockserver/internal/sdk/utils/reflect.go: last_write_checksum: sha1:2e555f970ae33dd41130199d1b87c9864b485fdf tests/mockserver/internal/sdk/utils/sort.go: @@ -6445,8 +6531,8 @@ trackedFiles: pristine_git_object: 4e7e05cd255ebd497afde50b97fcfa63e4367e2a tests/test_datasources.py: id: 0a9c5268286f - last_write_checksum: sha1:a762f2d7867ba2516772bc38f230660fd4f4c847 - pristine_git_object: 8aaeb530d87bce0eeaf8c1ee7b55d04b4871bde6 + last_write_checksum: sha1:9e67336fc25773bafd6fcf48aeadc3353b2e8344 + pristine_git_object: 68d59bc6412f5a078b332b11f73ecc5db38e5a7a tests/test_displayablelists.py: id: aa656a7efeb2 last_write_checksum: sha1:ad6e518e489b98d4f21c7e0ebab2f085f49be421 @@ -6591,7 +6677,7 @@ examples: application/json: {"messages": [{"author": "USER", "fragments": [{"text": "Who was the first person to land on the moon?"}], "messageType": "CONTENT"}], "agentConfig": {"agent": "GPT"}} responses: "200": - application/json: {"messages": [{"author": "USER", "citations": [{"sourceDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "sourceFile": {"id": "FILE_1234", "url": "www.google.com", "name": "sample.pdf"}, "sourcePerson": {"name": "George Clooney", "obfuscatedId": "abc123"}, "referenceRanges": [{"textRange": {"startIndex": 831084, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}]}]}], "fragments": [{"structuredResults": [{"document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "customer": {"id": "", "company": {"name": "", "location": "New York City", "industry": "Finances", "about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"}, "poc": [{"name": "George Clooney", "obfuscatedId": "abc123"}], "mergedCustomers": [{"id": "", "company": {"name": "", "location": "New York City", "industry": "Finances", "about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"}, "notes": "CIO is interested in trying out the product."}], "notes": "CIO is interested in trying out the product."}, "team": {"id": "", "name": "", "members": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "relationship": "MEMBER"}], "customFields": [{"label": "", "values": [{}], "displayable": true}], "datasourceProfiles": [{"datasource": "github", "handle": ""}], "status": "PROCESSED", "canBeDeleted": true}, "customEntity": {"roles": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "role": "VIEWER"}]}, "answer": {"id": 3, "docId": "ANSWERS_answer_3", "question": "Why is the sky blue?", "bodyText": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "addedRoles": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "role": "ANSWER_MODERATOR"}], "removedRoles": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "role": "VERIFIER"}], "combinedAnswerText": {"text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", "structuredList": [{"link": "https://en.wikipedia.org/wiki/Diffuse_sky_radiation", "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "text": "Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.", "structuredResult": {"document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "customer": {"id": "", "company": {"name": "", "location": "New York City", "industry": "Finances", "about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"}, "poc": [{"name": "George Clooney", "obfuscatedId": "abc123"}], "mergedCustomers": [{"id": "", "company": {"name": "", "location": "New York City", "industry": "Finances", "about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"}, "notes": "CIO is interested in trying out the product."}], "notes": "CIO is interested in trying out the product."}, "team": {"id": "", "name": "", "members": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "relationship": "MEMBER"}], "customFields": [{"label": "", "values": [{}], "displayable": true}], "datasourceProfiles": [{"datasource": "github", "handle": ""}], "status": "PROCESSED", "canBeDeleted": true}, "customEntity": {"roles": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "role": "VIEWER"}]}, "answer": {"id": 3, "docId": "ANSWERS_answer_3", "question": "Why is the sky blue?", "bodyText": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "combinedAnswerText": {"text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."}, "likes": {"likedBy": [], "likedByUser": false, "numLikes": 204638}, "author": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "verification": {"state": "UNVERIFIED", "metadata": {"lastVerifier": {"name": "George Clooney", "obfuscatedId": "abc123"}, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "reminders": [{"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "requestor": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 175584}], "lastReminder": {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "requestor": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 100341}, "candidateVerifiers": [{"name": "George Clooney", "obfuscatedId": "abc123"}]}}, "collections": [{"name": "", "description": "or into as", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 547453, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "items": [{"collectionId": 741089, "createdBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "shortcut": {"inputAlias": "", "createdBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "destinationDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "collection": {"name": "", "description": "inside acknowledge painfully", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 902618, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "children": [{"name": "", "description": "inwardly quietly clinch whether murky before ew diver that knottily", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 719075, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "itemType": "COLLECTION"}]}], "sourceDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "extractedQnA": {"questionResult": {"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}], "mustIncludeSuggestions": {"suggestions": [{"query": "app:github type:pull author:mortimer", "label": "Mortimer's PRs", "datasource": "github"}], "person": {"name": "George Clooney", "obfuscatedId": "abc123"}}}}, "meeting": {"attendees": {"people": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "groupAttendees": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}]}}, "collection": {"name": "", "description": "inside acknowledge painfully", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 902618, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "children": [{"name": "", "description": "inwardly quietly clinch whether murky before ew diver that knottily", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 719075, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "code": {"repoName": "scio", "fileName": "README.md"}, "shortcut": {"inputAlias": "", "createdBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "destinationDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "querySuggestions": {"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}, "relatedDocuments": [{"querySuggestion": {"query": "app:github type:pull author:mortimer", "label": "Mortimer's PRs", "datasource": "github"}, "results": [{"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}], "mustIncludeSuggestions": {"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}}]}], "relatedQuestion": {"ranges": [{"startIndex": 629124, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}]}}}]}, "likes": {"likedBy": [], "likedByUser": false, "numLikes": 204638}, "author": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "verification": {"state": "UNVERIFIED", "metadata": {"lastVerifier": {"name": "George Clooney", "obfuscatedId": "abc123"}, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "reminders": [{"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "requestor": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 175584}], "lastReminder": {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "requestor": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 100341}, "candidateVerifiers": [{"name": "George Clooney", "obfuscatedId": "abc123"}]}}, "sourceDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "extractedQnA": {"questionResult": {"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}], "mustIncludeSuggestions": {"suggestions": [{"query": "app:github type:pull author:mortimer", "label": "Mortimer's PRs", "datasource": "github"}], "person": {"name": "George Clooney", "obfuscatedId": "abc123"}}}}, "meeting": {"attendees": {"people": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "groupAttendees": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}]}}, "collection": {"name": "", "description": "inside acknowledge painfully", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 902618, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "children": [{"name": "", "description": "inwardly quietly clinch whether murky before ew diver that knottily", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 719075, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "code": {"repoName": "scio", "fileName": "README.md"}, "shortcut": {"inputAlias": "", "createdBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "destinationDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "querySuggestions": {"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}, "relatedQuestion": {"ranges": [{"startIndex": 629124, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}]}}], "querySuggestion": {"query": "app:github type:pull author:mortimer", "label": "Mortimer's PRs", "datasource": "github"}, "file": {"id": "FILE_1234", "url": "www.google.com", "name": "sample.pdf"}, "action": {"metadata": {"type": "RETRIEVAL", "name": "", "displayName": "Cecil20", "displayDescription": "", "objectName": "[\"HR ticket\",\"Email\",\"Chat message\"]"}}}], "messageType": "CONTENT"}], "backendTimeMillis": 1100, "unauthorizedDatasourceInstances": [{"datasourceInstance": "slack_0", "displayName": "Slack"}]} + application/json: {"messages": [{"author": "USER", "citations": [{"sourceDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "sourceFile": {"id": "FILE_1234", "url": "www.google.com", "name": "sample.pdf"}, "sourcePerson": {"name": "George Clooney", "obfuscatedId": "abc123"}, "referenceRanges": [{"textRange": {"startIndex": 831084, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}]}]}], "fragments": [{"structuredResults": [{"document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "customer": {"id": "", "company": {"name": "", "location": "New York City", "industry": "Finances", "about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"}, "poc": [{"name": "George Clooney", "obfuscatedId": "abc123"}], "mergedCustomers": [{"id": "", "company": {"name": "", "location": "New York City", "industry": "Finances", "about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"}, "notes": "CIO is interested in trying out the product."}], "notes": "CIO is interested in trying out the product."}, "team": {"id": "", "name": "", "members": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "relationship": "MEMBER"}], "customFields": [{"label": "", "values": [{}], "displayable": true}], "datasourceProfiles": [{"datasource": "github", "handle": ""}], "status": "PROCESSED", "canBeDeleted": true}, "customEntity": {"roles": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "role": "VIEWER"}]}, "answer": {"id": 3, "docId": "ANSWERS_answer_3", "question": "Why is the sky blue?", "bodyText": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "addedRoles": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "role": "ANSWER_MODERATOR"}], "removedRoles": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "role": "VERIFIER"}], "combinedAnswerText": {"text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", "structuredList": [{"link": "https://en.wikipedia.org/wiki/Diffuse_sky_radiation", "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "text": "Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.", "structuredResult": {"document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "customer": {"id": "", "company": {"name": "", "location": "New York City", "industry": "Finances", "about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"}, "poc": [{"name": "George Clooney", "obfuscatedId": "abc123"}], "mergedCustomers": [{"id": "", "company": {"name": "", "location": "New York City", "industry": "Finances", "about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"}, "notes": "CIO is interested in trying out the product."}], "notes": "CIO is interested in trying out the product."}, "team": {"id": "", "name": "", "members": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "relationship": "MEMBER"}], "customFields": [{"label": "", "values": [{}], "displayable": true}], "datasourceProfiles": [{"datasource": "github", "handle": ""}], "status": "PROCESSED", "canBeDeleted": true}, "customEntity": {"roles": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "role": "VIEWER"}]}, "answer": {"id": 3, "docId": "ANSWERS_answer_3", "question": "Why is the sky blue?", "bodyText": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "combinedAnswerText": {"text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."}, "likes": {"likedBy": [], "likedByUser": false, "numLikes": 204638}, "author": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "verification": {"state": "UNVERIFIED", "metadata": {"lastVerifier": {"name": "George Clooney", "obfuscatedId": "abc123"}, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "reminders": [{"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "requestor": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 175584}], "lastReminder": {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "requestor": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 100341}, "candidateVerifiers": [{"name": "George Clooney", "obfuscatedId": "abc123"}]}}, "collections": [{"name": "", "description": "or into as", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 547453, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "items": [{"collectionId": 741089, "createdBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "shortcut": {"inputAlias": "", "createdBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "destinationDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "collection": {"name": "", "description": "inside acknowledge painfully", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 902618, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "children": [{"name": "", "description": "inwardly quietly clinch whether murky before ew diver that knottily", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 719075, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "itemType": "COLLECTION"}]}], "sourceDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "extractedQnA": {"questionResult": {"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}], "mustIncludeSuggestions": {"suggestions": [{"query": "app:github type:pull author:mortimer", "label": "Mortimer's PRs", "datasource": "github"}], "person": {"name": "George Clooney", "obfuscatedId": "abc123"}}}}, "meeting": {"attendees": {"people": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "groupAttendees": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}]}}, "collection": {"name": "", "description": "inside acknowledge painfully", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 902618, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "children": [{"name": "", "description": "inwardly quietly clinch whether murky before ew diver that knottily", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 719075, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "code": {"repoName": "scio", "fileName": "README.md"}, "shortcut": {"inputAlias": "", "createdBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "destinationDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "querySuggestions": {"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}, "relatedDocuments": [{"querySuggestion": {"query": "app:github type:pull author:mortimer", "label": "Mortimer's PRs", "datasource": "github"}, "results": [{"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}], "mustIncludeSuggestions": {"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}}]}], "relatedQuestion": {"ranges": [{"startIndex": 629124, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}]}}}]}, "likes": {"likedBy": [], "likedByUser": false, "numLikes": 204638}, "author": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "verification": {"state": "UNVERIFIED", "metadata": {"lastVerifier": {"name": "George Clooney", "obfuscatedId": "abc123"}, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "reminders": [{"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "requestor": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 175584}], "lastReminder": {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "requestor": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 100341}, "candidateVerifiers": [{"name": "George Clooney", "obfuscatedId": "abc123"}]}}, "sourceDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "extractedQnA": {"questionResult": {"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}], "mustIncludeSuggestions": {"suggestions": [{"query": "app:github type:pull author:mortimer", "label": "Mortimer's PRs", "datasource": "github"}], "person": {"name": "George Clooney", "obfuscatedId": "abc123"}}}}, "meeting": {"attendees": {"people": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "groupAttendees": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}]}}, "collection": {"name": "", "description": "inside acknowledge painfully", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 902618, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "children": [{"name": "", "description": "inwardly quietly clinch whether murky before ew diver that knottily", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 719075, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "code": {"repoName": "scio", "fileName": "README.md"}, "shortcut": {"inputAlias": "", "createdBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "destinationDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "querySuggestions": {"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}, "relatedQuestion": {"ranges": [{"startIndex": 629124, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}]}}], "querySuggestion": {"query": "app:github type:pull author:mortimer", "label": "Mortimer's PRs", "datasource": "github"}, "file": {"id": "FILE_1234", "url": "www.google.com", "name": "sample.pdf"}, "action": {"metadata": {"type": "RETRIEVAL", "name": "", "displayName": "Cecil20", "displayDescription": "", "objectName": "[\"HR ticket\",\"Email\",\"Chat message\"]"}}}], "messageType": "CONTENT"}], "backendTimeMillis": 1100} streamingExample: requestBody: application/json: {"messages": [], "timeoutMillis": 30000} @@ -6691,6 +6777,8 @@ examples: responses: "200": application/json: {"agent_id": "mho4lwzylcozgoc2", "name": "HR Policy Agent", "description": "This agent answers questions about the current company HR policies.", "capabilities": {}} + "404": + application/json: {} getAgentSchemas: speakeasy-default-get-agent-schemas: parameters: @@ -6699,6 +6787,8 @@ examples: responses: "200": application/json: {"agent_id": "mho4lwzylcozgoc2", "input_schema": {}, "output_schema": {}} + "404": + application/json: {} searchAgents: speakeasy-default-search-agents: requestBody: @@ -6706,6 +6796,8 @@ examples: responses: "200": application/json: {"agents": [{"agent_id": "mho4lwzylcozgoc2", "name": "HR Policy Agent", "description": "This agent answers questions about the current company HR policies.", "capabilities": {}}]} + "404": + application/json: {} createAndStreamRun: speakeasy-default-create-and-stream-run: requestBody: @@ -6713,6 +6805,8 @@ examples: responses: "200": text/event-stream: "" + "404": + application/json: {} createAndWaitRun: speakeasy-default-create-and-wait-run: requestBody: @@ -6860,7 +6954,7 @@ examples: "200": application/json: {"trackingToken": "trackingToken", "results": [{"title": "title", "url": "https://www.example.com/", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}]}, {"title": "title", "url": "https://www.example.com/", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}]}], "errorInfo": {"errorMessages": [{"source": "gmail", "errorMessage": "invalid token"}, {"source": "slack", "errorMessage": "expired token"}]}, "requestID": "5e345ae500ff0befa2b9d1a3ba0001737e7363696f312d323535323137000171756572792d656e64706f696e743a323032303031333074313830343032000100", "facetResults": [{"sourceName": "sourceName", "operatorName": "operatorName", "buckets": [{"count": 1, "percentage": 5, "value": {"stringValue": "stringValue", "integerValue": 5}}, {"count": 1, "percentage": 5, "value": {"stringValue": "stringValue", "integerValue": 5}}]}, {"sourceName": "sourceName", "operatorName": "operatorName", "buckets": [{"count": 1, "percentage": 5, "value": {"stringValue": "stringValue", "integerValue": 5}}, {"count": 1, "percentage": 5, "value": {"stringValue": "stringValue", "integerValue": 5}}]}], "rewrittenFacetFilters": [{"fieldName": "fieldName", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Spreadsheet", "relationType": "EQUALS"}]}, {"fieldName": "fieldName", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Spreadsheet", "relationType": "EQUALS"}]}], "hasMoreResults": true} "403": - application/json: {"unauthorizedDatasourceInstances": [{"datasourceInstance": "slack_0", "displayName": "Slack"}]} + application/json: {} autocomplete: speakeasy-default-autocomplete: requestBody: @@ -6881,7 +6975,7 @@ examples: application/json: {"sourceDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "pageSize": 100, "maxSnippetSize": 400, "requestOptions": {"facetFilterSets": [{"filters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}]}], "context": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}} responses: "200": - application/json: {"results": [{"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}], "mustIncludeSuggestions": {"suggestions": [{"query": "app:github type:pull author:mortimer", "label": "Mortimer's PRs", "datasource": "github"}], "person": {"name": "George Clooney", "obfuscatedId": "abc123"}}}], "structuredResults": [{"document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "customer": {"id": "", "company": {"name": "", "location": "New York City", "industry": "Finances", "about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"}, "poc": [{"name": "George Clooney", "obfuscatedId": "abc123"}], "mergedCustomers": [{"id": "", "company": {"name": "", "location": "New York City", "industry": "Finances", "about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"}, "notes": "CIO is interested in trying out the product."}], "notes": "CIO is interested in trying out the product."}, "team": {"id": "", "name": "", "members": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "relationship": "MEMBER"}], "customFields": [{"label": "", "values": [], "displayable": true}], "datasourceProfiles": [{"datasource": "github", "handle": ""}], "status": "PROCESSED", "canBeDeleted": true}, "customEntity": {"roles": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "role": "EDITOR"}]}, "answer": {"id": 3, "docId": "ANSWERS_answer_3", "question": "Why is the sky blue?", "bodyText": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "addedRoles": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "role": "EDITOR"}], "removedRoles": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "role": "ANSWER_MODERATOR"}], "combinedAnswerText": {"text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", "structuredList": [{"link": "https://en.wikipedia.org/wiki/Diffuse_sky_radiation", "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "text": "Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.", "structuredResult": {"document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "customer": {"id": "", "company": {"name": "", "location": "New York City", "industry": "Finances", "about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"}, "poc": [{"name": "George Clooney", "obfuscatedId": "abc123"}], "mergedCustomers": [{"id": "", "company": {"name": "", "location": "New York City", "industry": "Finances", "about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"}, "notes": "CIO is interested in trying out the product."}], "notes": "CIO is interested in trying out the product."}, "team": {"id": "", "name": "", "members": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "relationship": "MEMBER"}], "customFields": [{"label": "", "values": [], "displayable": true}], "datasourceProfiles": [{"datasource": "github", "handle": ""}], "status": "PROCESSED", "canBeDeleted": true}, "customEntity": {"roles": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "role": "EDITOR"}]}, "answer": {"id": 3, "docId": "ANSWERS_answer_3", "question": "Why is the sky blue?", "bodyText": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "combinedAnswerText": {"text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."}, "likes": {"likedBy": [{"user": {"name": "George Clooney", "obfuscatedId": "abc123"}}], "likedByUser": true, "numLikes": 252096}, "author": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "verification": {"state": "VERIFIED", "metadata": {"lastVerifier": {"name": "George Clooney", "obfuscatedId": "abc123"}, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "reminders": [{"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "requestor": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 321130}], "lastReminder": {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "requestor": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 284307}, "candidateVerifiers": [{"name": "George Clooney", "obfuscatedId": "abc123"}]}}, "collections": [{"name": "", "description": "untimely underneath boo", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 106210, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "items": [{"collectionId": 502218, "createdBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "shortcut": {"inputAlias": "", "createdBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "destinationDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "collection": {"name": "", "description": "than ew cycle beyond twist", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 612012, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "children": [{"name": "", "description": "furlough lest hydrant past unto ah", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 234815, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "itemType": "COLLECTION"}]}], "sourceDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "extractedQnA": {"questionResult": {"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}], "mustIncludeSuggestions": {"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}}}, "meeting": {"attendees": {"people": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "groupAttendees": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}]}}, "collection": {"name": "", "description": "than ew cycle beyond twist", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 612012, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "children": [{"name": "", "description": "furlough lest hydrant past unto ah", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 234815, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "code": {"repoName": "scio", "fileName": "README.md"}, "shortcut": {"inputAlias": "", "createdBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "destinationDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "querySuggestions": {"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}, "relatedDocuments": [{"querySuggestion": {"query": "app:github type:pull author:mortimer", "label": "Mortimer's PRs", "datasource": "github"}}], "relatedQuestion": {"ranges": [{"startIndex": 710108, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}]}}}]}, "likes": {"likedBy": [{"user": {"name": "George Clooney", "obfuscatedId": "abc123"}}], "likedByUser": true, "numLikes": 252096}, "author": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "verification": {"state": "VERIFIED", "metadata": {"lastVerifier": {"name": "George Clooney", "obfuscatedId": "abc123"}, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "reminders": [{"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "requestor": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 321130}], "lastReminder": {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "requestor": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 284307}, "candidateVerifiers": [{"name": "George Clooney", "obfuscatedId": "abc123"}]}}, "sourceDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "extractedQnA": {"questionResult": {"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}], "mustIncludeSuggestions": {"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}}}, "meeting": {"attendees": {"people": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "groupAttendees": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}]}}, "collection": {"name": "", "description": "than ew cycle beyond twist", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 612012, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "children": [{"name": "", "description": "furlough lest hydrant past unto ah", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 234815, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "code": {"repoName": "scio", "fileName": "README.md"}, "shortcut": {"inputAlias": "", "createdBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "destinationDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "querySuggestions": {"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}, "relatedQuestion": {"ranges": [{"startIndex": 710108, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}]}}], "generatedQnaResult": {"ranges": [{"startIndex": 710108, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}]}, "errorInfo": {"unauthorizedDatasourceInstances": [{"datasourceInstance": "slack_0", "displayName": "Slack"}]}, "backendTimeMillis": 1100} + application/json: {"results": [{"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}], "mustIncludeSuggestions": {"suggestions": [{"query": "app:github type:pull author:mortimer", "label": "Mortimer's PRs", "datasource": "github"}], "person": {"name": "George Clooney", "obfuscatedId": "abc123"}}}], "structuredResults": [{"document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "customer": {"id": "", "company": {"name": "", "location": "New York City", "industry": "Finances", "about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"}, "poc": [{"name": "George Clooney", "obfuscatedId": "abc123"}], "mergedCustomers": [{"id": "", "company": {"name": "", "location": "New York City", "industry": "Finances", "about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"}, "notes": "CIO is interested in trying out the product."}], "notes": "CIO is interested in trying out the product."}, "team": {"id": "", "name": "", "members": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "relationship": "MEMBER"}], "customFields": [{"label": "", "values": [], "displayable": true}], "datasourceProfiles": [{"datasource": "github", "handle": ""}], "status": "PROCESSED", "canBeDeleted": true}, "customEntity": {"roles": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "role": "EDITOR"}]}, "answer": {"id": 3, "docId": "ANSWERS_answer_3", "question": "Why is the sky blue?", "bodyText": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "addedRoles": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "role": "EDITOR"}], "removedRoles": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "role": "ANSWER_MODERATOR"}], "combinedAnswerText": {"text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", "structuredList": [{"link": "https://en.wikipedia.org/wiki/Diffuse_sky_radiation", "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "text": "Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.", "structuredResult": {"document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "customer": {"id": "", "company": {"name": "", "location": "New York City", "industry": "Finances", "about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"}, "poc": [{"name": "George Clooney", "obfuscatedId": "abc123"}], "mergedCustomers": [{"id": "", "company": {"name": "", "location": "New York City", "industry": "Finances", "about": "Financial, software, data, and media company headquartered in Midtown Manhattan, New York City"}, "notes": "CIO is interested in trying out the product."}], "notes": "CIO is interested in trying out the product."}, "team": {"id": "", "name": "", "members": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "relationship": "MEMBER"}], "customFields": [{"label": "", "values": [], "displayable": true}], "datasourceProfiles": [{"datasource": "github", "handle": ""}], "status": "PROCESSED", "canBeDeleted": true}, "customEntity": {"roles": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "role": "EDITOR"}]}, "answer": {"id": 3, "docId": "ANSWERS_answer_3", "question": "Why is the sky blue?", "bodyText": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "combinedAnswerText": {"text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light."}, "likes": {"likedBy": [{"user": {"name": "George Clooney", "obfuscatedId": "abc123"}}], "likedByUser": true, "numLikes": 252096}, "author": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "verification": {"state": "VERIFIED", "metadata": {"lastVerifier": {"name": "George Clooney", "obfuscatedId": "abc123"}, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "reminders": [{"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "requestor": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 321130}], "lastReminder": {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "requestor": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 284307}, "candidateVerifiers": [{"name": "George Clooney", "obfuscatedId": "abc123"}]}}, "collections": [{"name": "", "description": "untimely underneath boo", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 106210, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "items": [{"collectionId": 502218, "createdBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "shortcut": {"inputAlias": "", "createdBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "destinationDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "collection": {"name": "", "description": "than ew cycle beyond twist", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 612012, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "children": [{"name": "", "description": "furlough lest hydrant past unto ah", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 234815, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "itemType": "COLLECTION"}]}], "sourceDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "extractedQnA": {"questionResult": {"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}], "mustIncludeSuggestions": {"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}}}, "meeting": {"attendees": {"people": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "groupAttendees": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}]}}, "collection": {"name": "", "description": "than ew cycle beyond twist", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 612012, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "children": [{"name": "", "description": "furlough lest hydrant past unto ah", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 234815, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "code": {"repoName": "scio", "fileName": "README.md"}, "shortcut": {"inputAlias": "", "createdBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "destinationDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "querySuggestions": {"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}, "relatedDocuments": [{"querySuggestion": {"query": "app:github type:pull author:mortimer", "label": "Mortimer's PRs", "datasource": "github"}}], "relatedQuestion": {"ranges": [{"startIndex": 710108, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}]}}}]}, "likes": {"likedBy": [{"user": {"name": "George Clooney", "obfuscatedId": "abc123"}}], "likedByUser": true, "numLikes": 252096}, "author": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "verification": {"state": "VERIFIED", "metadata": {"lastVerifier": {"name": "George Clooney", "obfuscatedId": "abc123"}, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "reminders": [{"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "requestor": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 321130}], "lastReminder": {"assignee": {"name": "George Clooney", "obfuscatedId": "abc123"}, "requestor": {"name": "George Clooney", "obfuscatedId": "abc123"}, "remindAt": 284307}, "candidateVerifiers": [{"name": "George Clooney", "obfuscatedId": "abc123"}]}}, "sourceDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "extractedQnA": {"questionResult": {"title": "title", "url": "https://example.com/foo/bar", "nativeAppUrl": "slack://foo/bar", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}], "mustIncludeSuggestions": {"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}}}, "meeting": {"attendees": {"people": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}, "groupAttendees": [{"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}]}}, "collection": {"name": "", "description": "than ew cycle beyond twist", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 612012, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "children": [{"name": "", "description": "furlough lest hydrant past unto ah", "audienceFilters": [{"fieldName": "type", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Presentation", "relationType": "EQUALS"}]}], "id": 234815, "creator": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}}]}, "code": {"repoName": "scio", "fileName": "README.md"}, "shortcut": {"inputAlias": "", "createdBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "updatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "destinationDocument": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}, "querySuggestions": {"person": {"name": "George Clooney", "obfuscatedId": "abc123"}}, "relatedQuestion": {"ranges": [{"startIndex": 710108, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}]}}], "generatedQnaResult": {"ranges": [{"startIndex": 710108, "document": {"containerDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "parentDocument": {"metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}, "metadata": {"datasource": "datasource", "objectType": "Feature Request", "container": "container", "parentId": "JIRA_EN-1337", "mimeType": "mimeType", "documentId": "documentId", "createTime": "2000-01-23T04:56:07.000Z", "updateTime": "2000-01-23T04:56:07.000Z", "author": {"name": "name", "obfuscatedId": ""}, "components": ["Backend", "Networking"], "status": "[\"Done\"]", "customData": {"someCustomField": {}}}}}]}, "backendTimeMillis": 1100} search: speakeasy-default-search: requestBody: @@ -6890,7 +6984,7 @@ examples: "200": application/json: {"trackingToken": "trackingToken", "results": [{"title": "title", "url": "https://www.example.com/", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}]}, {"title": "title", "url": "https://www.example.com/", "snippets": [{"mimeType": "mimeType", "snippet": "snippet"}]}], "errorInfo": {"errorMessages": [{"source": "gmail", "errorMessage": "invalid token"}, {"source": "slack", "errorMessage": "expired token"}]}, "requestID": "5e345ae500ff0befa2b9d1a3ba0001737e7363696f312d323535323137000171756572792d656e64706f696e743a323032303031333074313830343032000100", "facetResults": [{"sourceName": "sourceName", "operatorName": "operatorName", "buckets": [{"count": 1, "percentage": 5, "value": {"stringValue": "stringValue", "integerValue": 5}}, {"count": 1, "percentage": 5, "value": {"stringValue": "stringValue", "integerValue": 5}}]}, {"sourceName": "sourceName", "operatorName": "operatorName", "buckets": [{"count": 1, "percentage": 5, "value": {"stringValue": "stringValue", "integerValue": 5}}, {"count": 1, "percentage": 5, "value": {"stringValue": "stringValue", "integerValue": 5}}]}], "rewrittenFacetFilters": [{"fieldName": "fieldName", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Spreadsheet", "relationType": "EQUALS"}]}, {"fieldName": "fieldName", "values": [{"value": "Spreadsheet", "relationType": "EQUALS"}, {"value": "Spreadsheet", "relationType": "EQUALS"}]}], "hasMoreResults": true} "403": - application/json: {"unauthorizedDatasourceInstances": [{"datasourceInstance": "slack_0", "displayName": "Slack"}]} + application/json: {} listentities: speakeasy-default-listentities: requestBody: @@ -7248,6 +7342,30 @@ examples: responses: "200": application/json: {"unauthorizedDatasourceInstances": [{"datasourceInstance": "slack_0", "displayName": "Slack"}]} + getDatasourceInstanceConfiguration: + speakeasy-default-get-datasource-instance-configuration: + parameters: + path: + datasourceId: "o365sharepoint" + instanceId: "o365sharepoint_abc123" + responses: + "200": + application/json: {"configuration": {"values": {"key": {}}}} + "400": + application/json: {} + updateDatasourceInstanceConfiguration: + speakeasy-default-update-datasource-instance-configuration: + parameters: + path: + datasourceId: "o365sharepoint" + instanceId: "o365sharepoint_abc123" + requestBody: + application/json: {"configuration": {"values": {}}} + responses: + "200": + application/json: {"configuration": {"values": {}}} + "400": + application/json: {} examplesVersion: 1.0.2 generatedTests: activity: "2025-04-28T22:05:12+01:00" @@ -7396,9 +7514,9 @@ generatedTests: listfindingsexports: "2025-12-10T17:53:31Z" downloadfindingsexport: "2025-12-10T17:53:31Z" checkdatasourceauth: "2026-02-19T15:48:52Z" -releaseNotes: | - ## Python SDK Changes: - * `glean.authentication.checkdatasourceauth()`: `response.unauthorized_datasource_instances` **Changed** + getDatasourceInstanceConfiguration: "2026-02-25T22:07:43Z" + updateDatasourceInstanceConfiguration: "2026-02-25T22:07:43Z" +releaseNotes: "## Python SDK Changes:\n* `glean.client.messages.retrieve()`: `response.search_response.glean_data_error.unauthorized_datasource_instances` **Removed** (Breaking ⚠️)\n* `glean.client.search.query()`: \n * `response.glean_data_error.unauthorized_datasource_instances` **Removed** (Breaking ⚠️)\n * `error.unauthorized_datasource_instances` **Removed** (Breaking ⚠️)\n* `glean.client.chat.create()`: `response.unauthorized_datasource_instances` **Removed** (Breaking ⚠️)\n* `glean.client.search.recommendations()`: `response.glean_data_error.unauthorized_datasource_instances` **Removed** (Breaking ⚠️)\n* `glean.client.search.autocomplete()`: `response.glean_data_error.unauthorized_datasource_instances` **Removed** (Breaking ⚠️)\n* `glean.client.search.query_as_admin()`: \n * `response.glean_data_error.unauthorized_datasource_instances` **Removed** (Breaking ⚠️)\n * `error.unauthorized_datasource_instances` **Removed** (Breaking ⚠️)\n* `glean.client.agents.retrieve()`: `error.status[404]` **Added**\n* `glean.client.agents.run_stream()`: `error` **Changed**\n* `glean.client.agents.list()`: `error` **Changed**\n* `glean.client.agents.retrieve_schemas()`: \n * `response.tools[]` **Changed**\n * `error` **Changed**\n* `glean.datasources.get_datasource_instance_configuration()`: **Added**\n* `glean.datasources.update_datasource_instance_configuration()`: **Added**\n* `glean.indexing.people.bulk_index()`: **Deprecated**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index c00ea6f2..7f8ba298 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -17,6 +17,7 @@ generation: securityFeb2025: true sharedErrorComponentsApr2025: true sharedNestedComponentsJan2026: false + nameOverrideFeb2026: false auth: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false @@ -33,7 +34,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true python: - version: 0.12.8 + version: 0.12.9 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index a069bf8a..8cd2f05f 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: 56c08697ca3b6869022a262114e61f1385914425 + x-source-commit-sha: e819a92c6fd890db133bf4037780b6a479b3b056 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: daa8736a6f0763faffd2c1079da8a42345536ed7 + x-open-api-commit-sha: 049dcea9affe297a8ceaa2bc48a194b28fb21f82 x-speakeasy-name: 'Glean API' servers: - url: https://{instance}-be.glean.com @@ -3122,6 +3122,13 @@ paths: description: Not Authorized "409": description: Conflict + deprecated: true + x-speakeasy-deprecation-message: "Deprecated on 2026-02-03, removal scheduled for 2026-10-15: Endpoint is deprecated" + x-glean-deprecated: + id: ce596f49-55c4-465e-bf3c-5a3a33906e1f + introduced: "2026-02-03" + message: Endpoint is deprecated + removal: "2026-10-15" x-speakeasy-name-override: bulkIndex x-speakeasy-group: indexing.people /api/index/v1/indexemployeelist: {} @@ -3676,6 +3683,89 @@ paths: "500": description: Internal error x-visibility: Public + /rest/api/v1/configure/datasources/{datasourceId}/instances/{instanceId}: + get: + operationId: getDatasourceInstanceConfiguration + summary: Get datasource instance configuration + description: | + Gets the greenlisted configuration values for a datasource instance. Returns only configuration keys that are exposed via the public API greenlist. + tags: + - Datasources + parameters: + - $ref: '#/components/parameters/datasourceId' + - $ref: '#/components/parameters/instanceId' + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DatasourceConfigurationResponse' + "400": + description: Invalid request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "401": + description: Not authorized + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "404": + description: Datasource instance not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + x-visibility: Preview + patch: + operationId: updateDatasourceInstanceConfiguration + summary: Update datasource instance configuration + description: | + Updates the greenlisted configuration values for a datasource instance. Only configuration keys that are exposed via the public API greenlist may be set. Returns the full greenlisted configuration after the update is applied. + tags: + - Datasources + parameters: + - $ref: '#/components/parameters/datasourceId' + - $ref: '#/components/parameters/instanceId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateDatasourceConfigurationRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DatasourceConfigurationResponse' + "400": + description: Invalid request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "401": + description: Not authorized + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "404": + description: Datasource instance not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + x-visibility: Preview /rest/api/v1/chat#stream: post: tags: @@ -6547,16 +6637,34 @@ components: deprecated: true description: The person that invited this person. $ref: "#/components/schemas/Person" + x-glean-deprecated: + id: 1d3cd23f-9085-4378-b466-9bdc2e344a71 + introduced: "2026-02-05" + message: Use ChannelInviteInfo instead + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use ChannelInviteInfo instead" inviteTime: deprecated: true type: string format: date-time description: The time this person was invited in ISO format (ISO 8601). + x-glean-deprecated: + id: 2dc3f572-cded-483d-af07-fc9fc7fd0ae4 + introduced: "2026-02-05" + message: Use ChannelInviteInfo instead + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use ChannelInviteInfo instead" reminderTime: deprecated: true type: string format: date-time description: The time this person was reminded in ISO format (ISO 8601) if a reminder was sent. + x-glean-deprecated: + id: d02d58cf-eb90-45d0-ab90-f7a9d707ae3c + introduced: "2026-02-05" + message: Use ChannelInviteInfo instead + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use ChannelInviteInfo instead" ReadPermission: description: Describes the read permission level that a user has for a specific feature properties: @@ -7944,12 +8052,6 @@ components: chatSessionTrackingToken: type: string description: A token that is used to track the session. - unauthorizedDatasourceInstances: - type: array - description: | - Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth, aggregated across all tools invoked in this turn. - items: - $ref: "#/components/schemas/UnauthorizedDatasourceInstance" DeleteChatsRequest: required: - ids @@ -8107,9 +8209,12 @@ components: description: Whether the agent supports streaming output. If true, you you can stream agent ouput. All agents currently support streaming. additionalProperties: true ErrorResponse: - type: string - title: ErrorResponse - description: Error message returned from the server + type: object + description: Error response returned for failed requests + properties: + message: + type: string + description: Client-facing error message describing what went wrong ActionSummary: type: object description: Represents a minimal summary of an action. @@ -8123,6 +8228,32 @@ components: display_name: type: string description: The display name of the action. + type: + type: string + description: The type of tool - RETRIEVAL for read-only operations, ACTION for operations that modify data. + auth_type: + type: string + description: The authentication type required - OAUTH_USER, OAUTH_ADMIN, API_KEY, BASIC_AUTH, DWD (domain-wide delegation), or NONE. + write_action_type: + type: string + description: For write actions only - REDIRECT (client renders URL) or EXECUTION (external server call). + is_setup_finished: + type: boolean + description: Whether this action has been fully configured and validated. + x-includeEmpty: true + data_source: + type: string + description: | + Indicates the kind of knowledge a tool would access or modify. + Company knowledge: + - Glean search, and any native tools that derive from it (e.g., expert search, code search) + - Native federated tools to company data sources (e.g., outlook search) + World knowledge: + - Native tools that bring in public content (e.g., web browser) + - Platform action like bingwebsearch, geminiwebsearch, etc + Neutral knowledge: + - Native tools that don't access or modify content via APIs (e.g., file analyst, think) + - Platform read or write tools (creator has to determine their knowledge implications) AgentSchemas: properties: agent_id: @@ -9026,12 +9157,6 @@ components: federatedSearchRateLimitError: type: boolean description: Indicates the federated search results could not be fetched due to rate limiting. - unauthorizedDatasourceInstances: - type: array - description: | - Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth. - items: - $ref: "#/components/schemas/UnauthorizedDatasourceInstance" x-speakeasy-name-override: GleanDataError ResultsResponse: properties: @@ -13217,6 +13342,49 @@ components: items: type: string description: List of field names to exclude from the export + ConfigurationValue: + type: object + properties: + value: + type: string + description: The configuration value as a string. Only one of value or valueList should be populated. + valueList: + type: array + items: + type: string + description: The configuration value as a list of strings. Only one of value or valueList should be populated. + description: A single configuration value, either a scalar or a list + ConfigurationValues: + type: object + additionalProperties: + $ref: '#/components/schemas/ConfigurationValue' + description: A map from configuration key names to their values + DatasourceInstanceConfiguration: + type: object + properties: + values: + $ref: '#/components/schemas/ConfigurationValues' + required: + - values + description: Configuration for a datasource instance + DatasourceConfigurationResponse: + type: object + properties: + configuration: + $ref: '#/components/schemas/DatasourceInstanceConfiguration' + required: + - configuration + description: | + The greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist are included. + UpdateDatasourceConfigurationRequest: + type: object + properties: + configuration: + $ref: '#/components/schemas/DatasourceInstanceConfiguration' + required: + - configuration + description: | + Request to update greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist may be set. ChatRequestStream: required: - messages @@ -13274,6 +13442,22 @@ components: description: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. schema: type: integer + datasourceId: + name: datasourceId + in: path + description: The datasource type identifier (e.g. o365sharepoint) + required: true + schema: + type: string + example: o365sharepoint + instanceId: + name: instanceId + in: path + description: The datasource instance identifier + required: true + schema: + type: string + example: o365sharepoint_abc123 responses: SuccessResponse: description: OK diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index 4494b3be..e0928b37 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -158449,3 +158449,48 @@ workflows: type: simple x-speakeasy-test-group: Authentication x-speakeasy-test-rebuild: true + - workflowId: getDatasourceInstanceConfiguration + steps: + - stepId: test + operationId: getDatasourceInstanceConfiguration + parameters: + - name: datasourceId + in: path + value: o365sharepoint + - name: instanceId + in: path + value: o365sharepoint_abc123 + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"configuration":{"values":{"key":{}}}} + type: simple + x-speakeasy-test-group: Datasources + x-speakeasy-test-rebuild: true + - workflowId: updateDatasourceInstanceConfiguration + steps: + - stepId: test + operationId: updateDatasourceInstanceConfiguration + parameters: + - name: datasourceId + in: path + value: o365sharepoint + - name: instanceId + in: path + value: o365sharepoint_abc123 + requestBody: + contentType: application/json + payload: + configuration: + values: {} + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"configuration":{"values":{}}} + type: simple + x-speakeasy-test-group: Datasources + x-speakeasy-test-rebuild: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index a38a230a..7f70a7fa 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,12 +1,12 @@ -speakeasyVersion: 1.722.7 +speakeasyVersion: 1.730.0 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:8b912e61e9727548c1e231c33a1cab5988630896d3c81639fe9b2961c8656d94 - sourceBlobDigest: sha256:079082f8fabe8221e1d14af242c72c22efa7be6626969593ccebcd74d19c3c80 + sourceRevisionDigest: sha256:dec76e132680986b839fe2b5ce176ffb52bab717f8b9bd43e3ff83dac2ce0e22 + sourceBlobDigest: sha256:18fc525fc9f382783d26ae6ca1d05dfd32fb1f165d420e1ec2fae8cdb14fe59a tags: - latest - - speakeasy-sdk-regen-1771525162 + - speakeasy-sdk-regen-1771639536 Glean Client API: sourceNamespace: glean-client-api sourceRevisionDigest: sha256:4edc63ad559e4f2c9fb9ebf5edaaaaa9269f1874d271cfd84b441d6dacac43d2 @@ -17,10 +17,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:8b912e61e9727548c1e231c33a1cab5988630896d3c81639fe9b2961c8656d94 - sourceBlobDigest: sha256:079082f8fabe8221e1d14af242c72c22efa7be6626969593ccebcd74d19c3c80 + sourceRevisionDigest: sha256:dec76e132680986b839fe2b5ce176ffb52bab717f8b9bd43e3ff83dac2ce0e22 + sourceBlobDigest: sha256:18fc525fc9f382783d26ae6ca1d05dfd32fb1f165d420e1ec2fae8cdb14fe59a codeSamplesNamespace: glean-api-specs-python-code-samples - codeSamplesRevisionDigest: sha256:07c1eebc0272335ffeb2b98c0b094c73bfefcf74858173515c00c683b16702f6 + codeSamplesRevisionDigest: sha256:6d90f2a18ec8e38c09e2cca697ce65cd5d1a6730c207dc72ac4f8e2240a23193 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 0e9dcb12..38913b04 100644 --- a/README.md +++ b/README.md @@ -470,6 +470,11 @@ For more information on obtaining the appropriate token type, please contact you * [list](docs/sdks/clientverification/README.md#list) - List verifications * [verify](docs/sdks/clientverification/README.md#verify) - Update verification +### [Datasources](docs/sdks/datasources/README.md) + +* [get_datasource_instance_configuration](docs/sdks/datasources/README.md#get_datasource_instance_configuration) - Get datasource instance configuration +* [update_datasource_instance_configuration](docs/sdks/datasources/README.md#update_datasource_instance_configuration) - Update datasource instance configuration + ### [Governance](docs/sdks/governance/README.md) * [createfindingsexport](docs/sdks/governance/README.md#createfindingsexport) - Creates findings export @@ -486,10 +491,10 @@ For more information on obtaining the appropriate token type, please contact you * [status](docs/sdks/indexingdatasource/README.md#status) - Beta: Get datasource status -### [Indexing.Datasources](docs/sdks/datasources/README.md) +### [Indexing.Datasources](docs/sdks/indexingdatasources/README.md) -* [add](docs/sdks/datasources/README.md#add) - Add or update datasource -* [retrieve_config](docs/sdks/datasources/README.md#retrieve_config) - Get datasource config +* [add](docs/sdks/indexingdatasources/README.md#add) - Add or update datasource +* [retrieve_config](docs/sdks/indexingdatasources/README.md#retrieve_config) - Get datasource config ### [Indexing.Documents](docs/sdks/indexingdocuments/README.md) @@ -512,7 +517,7 @@ For more information on obtaining the appropriate token type, please contact you * [~~count~~](docs/sdks/people/README.md#count) - Get user count :warning: **Deprecated** * [index](docs/sdks/people/README.md#index) - Index employee -* [bulk_index](docs/sdks/people/README.md#bulk_index) - Bulk index employees +* [~~bulk_index~~](docs/sdks/people/README.md#bulk_index) - Bulk index employees :warning: **Deprecated** * [process_all_employees_and_teams](docs/sdks/people/README.md#process_all_employees_and_teams) - Schedules the processing of uploaded employees and teams * [delete](docs/sdks/people/README.md#delete) - Delete employee * [index_team](docs/sdks/people/README.md#index_team) - Index team diff --git a/RELEASES.md b/RELEASES.md index 4bd4269a..2e022483 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -588,4 +588,14 @@ Based on: ### Generated - [python v0.12.8] . ### Releases -- [PyPI v0.12.8] https://pypi.org/project/glean-api-client/0.12.8 - . \ No newline at end of file +- [PyPI v0.12.8] https://pypi.org/project/glean-api-client/0.12.8 - . + +## 2026-02-25 22:06:41 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.730.0 (2.844.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.12.9] . +### Releases +- [PyPI v0.12.9] https://pypi.org/project/glean-api-client/0.12.9 - . \ No newline at end of file diff --git a/docs/errors/errorresponse.md b/docs/errors/errorresponse.md new file mode 100644 index 00000000..7ac30077 --- /dev/null +++ b/docs/errors/errorresponse.md @@ -0,0 +1,10 @@ +# ErrorResponse + +Error response returned for failed requests + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `message` | *Optional[str]* | :heavy_minus_sign: | Client-facing error message describing what went wrong | \ No newline at end of file diff --git a/docs/errors/gleandataerror.md b/docs/errors/gleandataerror.md index 4ea69fbe..7c4c0d90 100644 --- a/docs/errors/gleandataerror.md +++ b/docs/errors/gleandataerror.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `bad_gmail_token` | *Optional[bool]* | :heavy_minus_sign: | Indicates the gmail results could not be fetched due to bad token. | -| `bad_outlook_token` | *Optional[bool]* | :heavy_minus_sign: | Indicates the outlook results could not be fetched due to bad token. | -| `invalid_operators` | List[[models.InvalidOperatorValueError](../models/invalidoperatorvalueerror.md)] | :heavy_minus_sign: | Indicates results could not be fetched due to invalid operators in the query. | -| `error_messages` | List[[models.ErrorMessage](../models/errormessage.md)] | :heavy_minus_sign: | N/A | -| `federated_search_rate_limit_error` | *Optional[bool]* | :heavy_minus_sign: | Indicates the federated search results could not be fetched due to rate limiting. | -| `unauthorized_datasource_instances` | List[[models.UnauthorizedDatasourceInstance](../models/unauthorizeddatasourceinstance.md)] | :heavy_minus_sign: | Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth.
| \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `bad_gmail_token` | *Optional[bool]* | :heavy_minus_sign: | Indicates the gmail results could not be fetched due to bad token. | +| `bad_outlook_token` | *Optional[bool]* | :heavy_minus_sign: | Indicates the outlook results could not be fetched due to bad token. | +| `invalid_operators` | List[[models.InvalidOperatorValueError](../models/invalidoperatorvalueerror.md)] | :heavy_minus_sign: | Indicates results could not be fetched due to invalid operators in the query. | +| `error_messages` | List[[models.ErrorMessage](../models/errormessage.md)] | :heavy_minus_sign: | N/A | +| `federated_search_rate_limit_error` | *Optional[bool]* | :heavy_minus_sign: | Indicates the federated search results could not be fetched due to rate limiting. | \ No newline at end of file diff --git a/docs/models/actionsummary.md b/docs/models/actionsummary.md index 3bf02ee0..853df19f 100644 --- a/docs/models/actionsummary.md +++ b/docs/models/actionsummary.md @@ -5,7 +5,12 @@ Represents a minimal summary of an action. ## Fields -| Field | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `tool_id` | *str* | :heavy_check_mark: | The unique identifier of the action. | -| `display_name` | *str* | :heavy_check_mark: | The display name of the action. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tool_id` | *str* | :heavy_check_mark: | The unique identifier of the action. | +| `display_name` | *str* | :heavy_check_mark: | The display name of the action. | +| `type` | *Optional[str]* | :heavy_minus_sign: | The type of tool - RETRIEVAL for read-only operations, ACTION for operations that modify data. | +| `auth_type` | *Optional[str]* | :heavy_minus_sign: | The authentication type required - OAUTH_USER, OAUTH_ADMIN, API_KEY, BASIC_AUTH, DWD (domain-wide delegation), or NONE. | +| `write_action_type` | *Optional[str]* | :heavy_minus_sign: | For write actions only - REDIRECT (client renders URL) or EXECUTION (external server call). | +| `is_setup_finished` | *Optional[bool]* | :heavy_minus_sign: | Whether this action has been fully configured and validated. | +| `data_source` | *Optional[str]* | :heavy_minus_sign: | Indicates the kind of knowledge a tool would access or modify.
Company knowledge:
- Glean search, and any native tools that derive from it (e.g., expert search, code search)
- Native federated tools to company data sources (e.g., outlook search)
World knowledge:
- Native tools that bring in public content (e.g., web browser)
- Platform action like bingwebsearch, geminiwebsearch, etc
Neutral knowledge:
- Native tools that don't access or modify content via APIs (e.g., file analyst, think)
- Platform read or write tools (creator has to determine their knowledge implications)
| \ No newline at end of file diff --git a/docs/models/chatresponse.md b/docs/models/chatresponse.md index 0ea540ed..c1e42aeb 100644 --- a/docs/models/chatresponse.md +++ b/docs/models/chatresponse.md @@ -5,11 +5,10 @@ A single response from the /chat backend. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `messages` | List[[models.ChatMessage](../models/chatmessage.md)] | :heavy_minus_sign: | N/A | | -| `chat_id` | *Optional[str]* | :heavy_minus_sign: | The id of the associated Chat the messages belong to, if one exists. | | -| `follow_up_prompts` | List[*str*] | :heavy_minus_sign: | Follow-up prompts for the user to potentially use | | -| `backend_time_millis` | *Optional[int]* | :heavy_minus_sign: | Time in milliseconds the backend took to respond to the request. | 1100 | -| `chat_session_tracking_token` | *Optional[str]* | :heavy_minus_sign: | A token that is used to track the session. | | -| `unauthorized_datasource_instances` | List[[models.UnauthorizedDatasourceInstance](../models/unauthorizeddatasourceinstance.md)] | :heavy_minus_sign: | Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth, aggregated across all tools invoked in this turn.
| | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `messages` | List[[models.ChatMessage](../models/chatmessage.md)] | :heavy_minus_sign: | N/A | | +| `chat_id` | *Optional[str]* | :heavy_minus_sign: | The id of the associated Chat the messages belong to, if one exists. | | +| `follow_up_prompts` | List[*str*] | :heavy_minus_sign: | Follow-up prompts for the user to potentially use | | +| `backend_time_millis` | *Optional[int]* | :heavy_minus_sign: | Time in milliseconds the backend took to respond to the request. | 1100 | +| `chat_session_tracking_token` | *Optional[str]* | :heavy_minus_sign: | A token that is used to track the session. | | \ No newline at end of file diff --git a/docs/models/configurationvalue.md b/docs/models/configurationvalue.md new file mode 100644 index 00000000..aea215fe --- /dev/null +++ b/docs/models/configurationvalue.md @@ -0,0 +1,11 @@ +# ConfigurationValue + +A single configuration value, either a scalar or a list + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `value` | *Optional[str]* | :heavy_minus_sign: | The configuration value as a string. Only one of value or valueList should be populated. | +| `value_list` | List[*str*] | :heavy_minus_sign: | The configuration value as a list of strings. Only one of value or valueList should be populated. | \ No newline at end of file diff --git a/docs/models/datasourceconfigurationresponse.md b/docs/models/datasourceconfigurationresponse.md new file mode 100644 index 00000000..ba3be132 --- /dev/null +++ b/docs/models/datasourceconfigurationresponse.md @@ -0,0 +1,11 @@ +# DatasourceConfigurationResponse + +The greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist are included. + + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `configuration` | [models.DatasourceInstanceConfiguration](../models/datasourceinstanceconfiguration.md) | :heavy_check_mark: | Configuration for a datasource instance | \ No newline at end of file diff --git a/docs/models/datasourceinstanceconfiguration.md b/docs/models/datasourceinstanceconfiguration.md new file mode 100644 index 00000000..4aa3cb98 --- /dev/null +++ b/docs/models/datasourceinstanceconfiguration.md @@ -0,0 +1,10 @@ +# DatasourceInstanceConfiguration + +Configuration for a datasource instance + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `values` | Dict[str, [models.ConfigurationValue](../models/configurationvalue.md)] | :heavy_check_mark: | A map from configuration key names to their values | \ No newline at end of file diff --git a/docs/models/getdatasourceinstanceconfigurationrequest.md b/docs/models/getdatasourceinstanceconfigurationrequest.md new file mode 100644 index 00000000..949f49d1 --- /dev/null +++ b/docs/models/getdatasourceinstanceconfigurationrequest.md @@ -0,0 +1,9 @@ +# GetDatasourceInstanceConfigurationRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `datasource_id` | *str* | :heavy_check_mark: | The datasource type identifier (e.g. o365sharepoint) | o365sharepoint | +| `instance_id` | *str* | :heavy_check_mark: | The datasource instance identifier | o365sharepoint_abc123 | \ No newline at end of file diff --git a/docs/models/gleandataerror.md b/docs/models/gleandataerror.md index 4ea69fbe..7c4c0d90 100644 --- a/docs/models/gleandataerror.md +++ b/docs/models/gleandataerror.md @@ -3,11 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `bad_gmail_token` | *Optional[bool]* | :heavy_minus_sign: | Indicates the gmail results could not be fetched due to bad token. | -| `bad_outlook_token` | *Optional[bool]* | :heavy_minus_sign: | Indicates the outlook results could not be fetched due to bad token. | -| `invalid_operators` | List[[models.InvalidOperatorValueError](../models/invalidoperatorvalueerror.md)] | :heavy_minus_sign: | Indicates results could not be fetched due to invalid operators in the query. | -| `error_messages` | List[[models.ErrorMessage](../models/errormessage.md)] | :heavy_minus_sign: | N/A | -| `federated_search_rate_limit_error` | *Optional[bool]* | :heavy_minus_sign: | Indicates the federated search results could not be fetched due to rate limiting. | -| `unauthorized_datasource_instances` | List[[models.UnauthorizedDatasourceInstance](../models/unauthorizeddatasourceinstance.md)] | :heavy_minus_sign: | Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth.
| \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `bad_gmail_token` | *Optional[bool]* | :heavy_minus_sign: | Indicates the gmail results could not be fetched due to bad token. | +| `bad_outlook_token` | *Optional[bool]* | :heavy_minus_sign: | Indicates the outlook results could not be fetched due to bad token. | +| `invalid_operators` | List[[models.InvalidOperatorValueError](../models/invalidoperatorvalueerror.md)] | :heavy_minus_sign: | Indicates results could not be fetched due to invalid operators in the query. | +| `error_messages` | List[[models.ErrorMessage](../models/errormessage.md)] | :heavy_minus_sign: | N/A | +| `federated_search_rate_limit_error` | *Optional[bool]* | :heavy_minus_sign: | Indicates the federated search results could not be fetched due to rate limiting. | \ No newline at end of file diff --git a/docs/models/inviteinfo.md b/docs/models/inviteinfo.md index e929b033..62732992 100644 --- a/docs/models/inviteinfo.md +++ b/docs/models/inviteinfo.md @@ -10,5 +10,5 @@ Information regarding the invite status of a person. | `sign_up_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The time this person signed up in ISO format (ISO 8601). | | | `invites` | List[[models.ChannelInviteInfo](../models/channelinviteinfo.md)] | :heavy_minus_sign: | Latest invites received by the user for each channel | | | `inviter` | [Optional[models.Person]](../models/person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | -| ~~`invite_time`~~ | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The time this person was invited in ISO format (ISO 8601). | | -| ~~`reminder_time`~~ | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The time this person was reminded in ISO format (ISO 8601) if a reminder was sent. | | \ No newline at end of file +| ~~`invite_time`~~ | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | : warning: ** DEPRECATED **: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use ChannelInviteInfo instead.

The time this person was invited in ISO format (ISO 8601). | | +| ~~`reminder_time`~~ | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | : warning: ** DEPRECATED **: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use ChannelInviteInfo instead.

The time this person was reminded in ISO format (ISO 8601) if a reminder was sent. | | \ No newline at end of file diff --git a/docs/models/updatedatasourceconfigurationrequest.md b/docs/models/updatedatasourceconfigurationrequest.md new file mode 100644 index 00000000..938e8f1b --- /dev/null +++ b/docs/models/updatedatasourceconfigurationrequest.md @@ -0,0 +1,11 @@ +# UpdateDatasourceConfigurationRequest + +Request to update greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist may be set. + + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `configuration` | [models.DatasourceInstanceConfiguration](../models/datasourceinstanceconfiguration.md) | :heavy_check_mark: | Configuration for a datasource instance | \ No newline at end of file diff --git a/docs/models/updatedatasourceinstanceconfigurationrequest.md b/docs/models/updatedatasourceinstanceconfigurationrequest.md new file mode 100644 index 00000000..50e0f667 --- /dev/null +++ b/docs/models/updatedatasourceinstanceconfigurationrequest.md @@ -0,0 +1,10 @@ +# UpdateDatasourceInstanceConfigurationRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `datasource_id` | *str* | :heavy_check_mark: | The datasource type identifier (e.g. o365sharepoint) | o365sharepoint | +| `instance_id` | *str* | :heavy_check_mark: | The datasource instance identifier | o365sharepoint_abc123 | +| `update_datasource_configuration_request` | [models.UpdateDatasourceConfigurationRequest](../models/updatedatasourceconfigurationrequest.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index bf4a2db8..2856eeeb 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -48,9 +48,10 @@ with Glean( ### Errors -| Error Type | Status Code | Content Type | -| ----------------- | ----------------- | ----------------- | -| errors.GleanError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | 404 | application/json | +| errors.GleanError | 4XX, 5XX | \*/\* | ## retrieve_schemas @@ -90,9 +91,10 @@ with Glean( ### Errors -| Error Type | Status Code | Content Type | -| ----------------- | ----------------- | ----------------- | -| errors.GleanError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | 404, 422 | application/json | +| errors.GleanError | 4XX, 5XX | \*/\* | ## list @@ -130,9 +132,10 @@ with Glean( ### Errors -| Error Type | Status Code | Content Type | -| ----------------- | ----------------- | ----------------- | -| errors.GleanError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | 404, 422 | application/json | +| errors.GleanError | 4XX, 5XX | \*/\* | ## run_stream @@ -177,9 +180,10 @@ with Glean( ### Errors -| Error Type | Status Code | Content Type | -| ----------------- | ----------------- | ----------------- | -| errors.GleanError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | 404, 409, 422 | application/json | +| errors.GleanError | 4XX, 5XX | \*/\* | ## run diff --git a/docs/sdks/datasources/README.md b/docs/sdks/datasources/README.md index c9f66bdb..03c2257d 100644 --- a/docs/sdks/datasources/README.md +++ b/docs/sdks/datasources/README.md @@ -1,21 +1,24 @@ -# Indexing.Datasources +# Datasources ## Overview +Manage datasources. + ### Available Operations -* [add](#add) - Add or update datasource -* [retrieve_config](#retrieve_config) - Get datasource config +* [get_datasource_instance_configuration](#get_datasource_instance_configuration) - Get datasource instance configuration +* [update_datasource_instance_configuration](#update_datasource_instance_configuration) - Update datasource instance configuration + +## get_datasource_instance_configuration -## add +Gets the greenlisted configuration values for a datasource instance. Returns only configuration keys that are exposed via the public API greenlist. -Add or update a custom datasource and its schema. ### Example Usage - + ```python -from glean.api_client import Glean, models +from glean.api_client import Glean import os @@ -23,67 +26,40 @@ with Glean( api_token=os.getenv("GLEAN_API_TOKEN", ""), ) as glean: - glean.indexing.datasources.add(name="", datasource_category=models.DatasourceCategory.UNCATEGORIZED, url_regex="https://example-company.datasource.com/.*", quicklinks=[ - { - "icon_config": { - "color": "#343CED", - "key": "person_icon", - "icon_type": models.IconType.GLYPH, - "name": "user", - }, - }, - ], trust_url_regex_for_view_activity=True, strip_fragment_in_canonical_url=True, is_entity_datasource=False, is_test_datasource=False) + res = glean.datasources.get_datasource_instance_configuration(datasource_id="o365sharepoint", instance_id="o365sharepoint_abc123") - # Use the SDK ... + # Handle response + print(res) ``` ### Parameters -| Parameter | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | Unique identifier of datasource instance to which this config applies. | | -| `display_name` | *Optional[str]* | :heavy_minus_sign: | The user-friendly instance label to display. If omitted, falls back to the title-cased `name`. | | -| `datasource_category` | [Optional[models.DatasourceCategory]](../../models/datasourcecategory.md) | :heavy_minus_sign: | The type of this datasource. It is an important signal for relevance and must be specified and cannot be UNCATEGORIZED. Please refer to [this](https://developers.glean.com/docs/indexing_api_datasource_category/) for more details. | | -| `url_regex` | *Optional[str]* | :heavy_minus_sign: | Regular expression that matches URLs of documents of the datasource instance. The behavior for multiple matches is non-deterministic. **Note: `urlRegex` is a required field for non-entity datasources, but not required if the datasource is used to push custom entities (ie. datasources where isEntityDatasource is false). Please add a regex as specific as possible to this datasource instance.** | https://example-company.datasource.com/.* | -| `icon_url` | *Optional[str]* | :heavy_minus_sign: | The URL to an image to be displayed as an icon for this datasource instance. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). | | -| `object_definitions` | List[[models.ObjectDefinition](../../models/objectdefinition.md)] | :heavy_minus_sign: | The list of top-level `objectType`s for the datasource. | | -| `suggestion_text` | *Optional[str]* | :heavy_minus_sign: | Example text for what to search for in this datasource | | -| `home_url` | *Optional[str]* | :heavy_minus_sign: | The URL of the landing page for this datasource instance. Should point to the most useful page for users, not the company marketing page. | | -| `crawler_seed_urls` | List[*str*] | :heavy_minus_sign: | This only applies to WEB_CRAWL and BROWSER_CRAWL datasources. Defines the seed URLs for crawling. | | -| `icon_dark_url` | *Optional[str]* | :heavy_minus_sign: | The URL to an image to be displayed as an icon for this datasource instance in dark mode. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). | | -| `hide_built_in_facets` | List[[models.HideBuiltInFacet](../../models/hidebuiltinfacet.md)] | :heavy_minus_sign: | List of built-in facet types that should be hidden for the datasource. | | -| `canonicalizing_url_regex` | List[[models.CanonicalizingRegexType](../../models/canonicalizingregextype.md)] | :heavy_minus_sign: | A list of regular expressions to apply to an arbitrary URL to transform it into a canonical URL for this datasource instance. Regexes are to be applied in the order specified in this list. | | -| `canonicalizing_title_regex` | List[[models.CanonicalizingRegexType](../../models/canonicalizingregextype.md)] | :heavy_minus_sign: | A list of regular expressions to apply to an arbitrary title to transform it into a title that will be displayed in the search results | | -| `redlist_title_regex` | *Optional[str]* | :heavy_minus_sign: | A regex that identifies titles that should not be indexed | | -| `connector_type` | [Optional[models.CustomDatasourceConfigConnectorType]](../../models/customdatasourceconfigconnectortype.md) | :heavy_minus_sign: | N/A | | -| `quicklinks` | List[[models.Quicklink](../../models/quicklink.md)] | :heavy_minus_sign: | List of actions for this datasource instance that will show up in autocomplete and app card, e.g. "Create new issue" for jira | | -| `render_config_preset` | *Optional[str]* | :heavy_minus_sign: | The name of a render config to use for displaying results from this datasource. Any well known datasource name may be used to render the same as that source, e.g. `web` or `gdrive`. Please refer to [this](https://developers.glean.com/docs/rendering_search_results/) for more details | | -| `aliases` | List[*str*] | :heavy_minus_sign: | Aliases that can be used as `app` operator-values. | | -| `is_on_prem` | *Optional[bool]* | :heavy_minus_sign: | Whether or not this datasource is hosted on-premise. | | -| `trust_url_regex_for_view_activity` | *Optional[bool]* | :heavy_minus_sign: | True if browser activity is able to report the correct URL for VIEW events. Set this to true if the URLs reported by Chrome are constant throughout each page load. Set this to false if the page has Javascript that modifies the URL during or after the load. | | -| `include_utm_source` | *Optional[bool]* | :heavy_minus_sign: | If true, a utm_source query param will be added to outbound links to this datasource within Glean. | | -| `strip_fragment_in_canonical_url` | *Optional[bool]* | :heavy_minus_sign: | If true, the fragment part of the URL will be stripped when converting to a canonical url. | | -| `identity_datasource_name` | *Optional[str]* | :heavy_minus_sign: | If the datasource uses another datasource for identity info, then the name of the datasource. The identity datasource must exist already and the datasource with identity info should have its visibility enabled for search results. | | -| `product_access_group` | *Optional[str]* | :heavy_minus_sign: | If the datasource uses a specific product access group, then the name of that group. | | -| `is_user_referenced_by_email` | *Optional[bool]* | :heavy_minus_sign: | whether email is used to reference users in document ACLs and in group memberships. | | -| `is_entity_datasource` | *Optional[bool]* | :heavy_minus_sign: | True if this datasource is used to push custom entities. | | -| `is_test_datasource` | *Optional[bool]* | :heavy_minus_sign: | True if this datasource will be used for testing purpose only. Documents from such a datasource wouldn't have any effect on search rankings. | | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `datasource_id` | *str* | :heavy_check_mark: | The datasource type identifier (e.g. o365sharepoint) | o365sharepoint | +| `instance_id` | *str* | :heavy_check_mark: | The datasource instance identifier | o365sharepoint_abc123 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.DatasourceConfigurationResponse](../../models/datasourceconfigurationresponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| ----------------- | ----------------- | ----------------- | -| errors.GleanError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | 400, 403, 404 | application/json | +| errors.GleanError | 4XX, 5XX | \*/\* | -## retrieve_config +## update_datasource_instance_configuration + +Updates the greenlisted configuration values for a datasource instance. Only configuration keys that are exposed via the public API greenlist may be set. Returns the full greenlisted configuration after the update is applied. -Fetches the datasource config for the specified custom datasource. ### Example Usage - + ```python from glean.api_client import Glean import os @@ -93,7 +69,11 @@ with Glean( api_token=os.getenv("GLEAN_API_TOKEN", ""), ) as glean: - res = glean.indexing.datasources.retrieve_config(datasource="") + res = glean.datasources.update_datasource_instance_configuration(datasource_id="o365sharepoint", instance_id="o365sharepoint_abc123", configuration={ + "values": { + + }, + }) # Handle response print(res) @@ -102,17 +82,20 @@ with Glean( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `datasource` | *str* | :heavy_check_mark: | Datasource name for which config is needed. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `datasource_id` | *str* | :heavy_check_mark: | The datasource type identifier (e.g. o365sharepoint) | o365sharepoint | +| `instance_id` | *str* | :heavy_check_mark: | The datasource instance identifier | o365sharepoint_abc123 | +| `configuration` | [models.DatasourceInstanceConfiguration](../../models/datasourceinstanceconfiguration.md) | :heavy_check_mark: | Configuration for a datasource instance | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response -**[models.CustomDatasourceConfig](../../models/customdatasourceconfig.md)** +**[models.DatasourceConfigurationResponse](../../models/datasourceconfigurationresponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| ----------------- | ----------------- | ----------------- | -| errors.GleanError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| errors.ErrorResponse | 400, 403, 404 | application/json | +| errors.GleanError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/indexingdatasources/README.md b/docs/sdks/indexingdatasources/README.md new file mode 100644 index 00000000..c9f66bdb --- /dev/null +++ b/docs/sdks/indexingdatasources/README.md @@ -0,0 +1,118 @@ +# Indexing.Datasources + +## Overview + +### Available Operations + +* [add](#add) - Add or update datasource +* [retrieve_config](#retrieve_config) - Get datasource config + +## add + +Add or update a custom datasource and its schema. + +### Example Usage + + +```python +from glean.api_client import Glean, models +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + glean.indexing.datasources.add(name="", datasource_category=models.DatasourceCategory.UNCATEGORIZED, url_regex="https://example-company.datasource.com/.*", quicklinks=[ + { + "icon_config": { + "color": "#343CED", + "key": "person_icon", + "icon_type": models.IconType.GLYPH, + "name": "user", + }, + }, + ], trust_url_regex_for_view_activity=True, strip_fragment_in_canonical_url=True, is_entity_datasource=False, is_test_datasource=False) + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | Unique identifier of datasource instance to which this config applies. | | +| `display_name` | *Optional[str]* | :heavy_minus_sign: | The user-friendly instance label to display. If omitted, falls back to the title-cased `name`. | | +| `datasource_category` | [Optional[models.DatasourceCategory]](../../models/datasourcecategory.md) | :heavy_minus_sign: | The type of this datasource. It is an important signal for relevance and must be specified and cannot be UNCATEGORIZED. Please refer to [this](https://developers.glean.com/docs/indexing_api_datasource_category/) for more details. | | +| `url_regex` | *Optional[str]* | :heavy_minus_sign: | Regular expression that matches URLs of documents of the datasource instance. The behavior for multiple matches is non-deterministic. **Note: `urlRegex` is a required field for non-entity datasources, but not required if the datasource is used to push custom entities (ie. datasources where isEntityDatasource is false). Please add a regex as specific as possible to this datasource instance.** | https://example-company.datasource.com/.* | +| `icon_url` | *Optional[str]* | :heavy_minus_sign: | The URL to an image to be displayed as an icon for this datasource instance. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). | | +| `object_definitions` | List[[models.ObjectDefinition](../../models/objectdefinition.md)] | :heavy_minus_sign: | The list of top-level `objectType`s for the datasource. | | +| `suggestion_text` | *Optional[str]* | :heavy_minus_sign: | Example text for what to search for in this datasource | | +| `home_url` | *Optional[str]* | :heavy_minus_sign: | The URL of the landing page for this datasource instance. Should point to the most useful page for users, not the company marketing page. | | +| `crawler_seed_urls` | List[*str*] | :heavy_minus_sign: | This only applies to WEB_CRAWL and BROWSER_CRAWL datasources. Defines the seed URLs for crawling. | | +| `icon_dark_url` | *Optional[str]* | :heavy_minus_sign: | The URL to an image to be displayed as an icon for this datasource instance in dark mode. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). | | +| `hide_built_in_facets` | List[[models.HideBuiltInFacet](../../models/hidebuiltinfacet.md)] | :heavy_minus_sign: | List of built-in facet types that should be hidden for the datasource. | | +| `canonicalizing_url_regex` | List[[models.CanonicalizingRegexType](../../models/canonicalizingregextype.md)] | :heavy_minus_sign: | A list of regular expressions to apply to an arbitrary URL to transform it into a canonical URL for this datasource instance. Regexes are to be applied in the order specified in this list. | | +| `canonicalizing_title_regex` | List[[models.CanonicalizingRegexType](../../models/canonicalizingregextype.md)] | :heavy_minus_sign: | A list of regular expressions to apply to an arbitrary title to transform it into a title that will be displayed in the search results | | +| `redlist_title_regex` | *Optional[str]* | :heavy_minus_sign: | A regex that identifies titles that should not be indexed | | +| `connector_type` | [Optional[models.CustomDatasourceConfigConnectorType]](../../models/customdatasourceconfigconnectortype.md) | :heavy_minus_sign: | N/A | | +| `quicklinks` | List[[models.Quicklink](../../models/quicklink.md)] | :heavy_minus_sign: | List of actions for this datasource instance that will show up in autocomplete and app card, e.g. "Create new issue" for jira | | +| `render_config_preset` | *Optional[str]* | :heavy_minus_sign: | The name of a render config to use for displaying results from this datasource. Any well known datasource name may be used to render the same as that source, e.g. `web` or `gdrive`. Please refer to [this](https://developers.glean.com/docs/rendering_search_results/) for more details | | +| `aliases` | List[*str*] | :heavy_minus_sign: | Aliases that can be used as `app` operator-values. | | +| `is_on_prem` | *Optional[bool]* | :heavy_minus_sign: | Whether or not this datasource is hosted on-premise. | | +| `trust_url_regex_for_view_activity` | *Optional[bool]* | :heavy_minus_sign: | True if browser activity is able to report the correct URL for VIEW events. Set this to true if the URLs reported by Chrome are constant throughout each page load. Set this to false if the page has Javascript that modifies the URL during or after the load. | | +| `include_utm_source` | *Optional[bool]* | :heavy_minus_sign: | If true, a utm_source query param will be added to outbound links to this datasource within Glean. | | +| `strip_fragment_in_canonical_url` | *Optional[bool]* | :heavy_minus_sign: | If true, the fragment part of the URL will be stripped when converting to a canonical url. | | +| `identity_datasource_name` | *Optional[str]* | :heavy_minus_sign: | If the datasource uses another datasource for identity info, then the name of the datasource. The identity datasource must exist already and the datasource with identity info should have its visibility enabled for search results. | | +| `product_access_group` | *Optional[str]* | :heavy_minus_sign: | If the datasource uses a specific product access group, then the name of that group. | | +| `is_user_referenced_by_email` | *Optional[bool]* | :heavy_minus_sign: | whether email is used to reference users in document ACLs and in group memberships. | | +| `is_entity_datasource` | *Optional[bool]* | :heavy_minus_sign: | True if this datasource is used to push custom entities. | | +| `is_test_datasource` | *Optional[bool]* | :heavy_minus_sign: | True if this datasource will be used for testing purpose only. Documents from such a datasource wouldn't have any effect on search rankings. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------- | ----------------- | ----------------- | +| errors.GleanError | 4XX, 5XX | \*/\* | + +## retrieve_config + +Fetches the datasource config for the specified custom datasource. + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.indexing.datasources.retrieve_config(datasource="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `datasource` | *str* | :heavy_check_mark: | Datasource name for which config is needed. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.CustomDatasourceConfig](../../models/customdatasourceconfig.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------- | ----------------- | ----------------- | +| errors.GleanError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/people/README.md b/docs/sdks/people/README.md index 8b35d44d..363dfc32 100644 --- a/docs/sdks/people/README.md +++ b/docs/sdks/people/README.md @@ -8,7 +8,7 @@ * [~~count~~](#count) - Get user count :warning: **Deprecated** * [index](#index) - Index employee -* [bulk_index](#bulk_index) - Bulk index employees +* [~~bulk_index~~](#bulk_index) - Bulk index employees :warning: **Deprecated** * [process_all_employees_and_teams](#process_all_employees_and_teams) - Schedules the processing of uploaded employees and teams * [delete](#delete) - Delete employee * [index_team](#index_team) - Index team @@ -149,10 +149,12 @@ with Glean( | ----------------- | ----------------- | ----------------- | | errors.GleanError | 4XX, 5XX | \*/\* | -## bulk_index +## ~~bulk_index~~ Replaces all the currently indexed employees using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-upload-model) documentation for an explanation of how to use bulk endpoints. +> :warning: **DEPRECATED**: Deprecated on 2026-02-03, removal scheduled for 2026-10-15: Endpoint is deprecated. + ### Example Usage diff --git a/pyproject.toml b/pyproject.toml index 358810d2..3dce96bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "glean-api-client" -version = "0.12.8" +version = "0.12.9" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Glean Technologies, Inc." },] readme = "README-PYPI.md" diff --git a/src/glean/api_client/_version.py b/src/glean/api_client/_version.py index ff2fde54..df68600a 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.12.8" +__version__: str = "0.12.9" __openapi_doc_version__: str = "0.9.0" -__gen_version__: str = "2.832.9" -__user_agent__: str = "speakeasy-sdk/python 0.12.8 2.832.9 0.9.0 glean-api-client" +__gen_version__: str = "2.844.2" +__user_agent__: str = "speakeasy-sdk/python 0.12.9 2.844.2 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 e83595d0..134cc9ba 100644 --- a/src/glean/api_client/agents.py +++ b/src/glean/api_client/agents.py @@ -89,9 +89,13 @@ def retrieve( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response(models.Agent, http_res) - if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response(errors.ErrorResponseData, http_res) + raise errors.ErrorResponse(response_data, http_res) + if utils.match_response(http_res, ["400", "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"], "*"): @@ -179,9 +183,13 @@ async def retrieve_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response(models.Agent, http_res) - if utils.match_response(http_res, ["400", "403", "404", "4XX"], "*"): + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response(errors.ErrorResponseData, http_res) + raise errors.ErrorResponse(response_data, http_res) + if utils.match_response(http_res, ["400", "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"], "*"): @@ -269,9 +277,13 @@ def retrieve_schemas( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response(models.AgentSchemas, http_res) - if utils.match_response(http_res, ["400", "403", "404", "422", "4XX"], "*"): + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response(errors.ErrorResponseData, http_res) + raise errors.ErrorResponse(response_data, http_res) + if utils.match_response(http_res, ["400", "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"], "*"): @@ -359,9 +371,13 @@ async def retrieve_schemas_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response(models.AgentSchemas, http_res) - if utils.match_response(http_res, ["400", "403", "404", "422", "4XX"], "*"): + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response(errors.ErrorResponseData, http_res) + raise errors.ErrorResponse(response_data, http_res) + if utils.match_response(http_res, ["400", "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"], "*"): @@ -446,9 +462,13 @@ def list( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response(models.SearchAgentsResponse, http_res) - if utils.match_response(http_res, ["400", "403", "404", "422", "4XX"], "*"): + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response(errors.ErrorResponseData, http_res) + raise errors.ErrorResponse(response_data, http_res) + if utils.match_response(http_res, ["400", "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"], "*"): @@ -533,9 +553,13 @@ async def list_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response(models.SearchAgentsResponse, http_res) - if utils.match_response(http_res, ["400", "403", "404", "422", "4XX"], "*"): + if utils.match_response(http_res, ["404", "422"], "application/json"): + response_data = unmarshal_json_response(errors.ErrorResponseData, http_res) + raise errors.ErrorResponse(response_data, http_res) + if utils.match_response(http_res, ["400", "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"], "*"): @@ -631,11 +655,13 @@ def run_stream( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "text/event-stream"): return http_res.text - if utils.match_response( - http_res, ["400", "403", "404", "409", "422", "4XX"], "*" - ): + if utils.match_response(http_res, ["404", "409", "422"], "application/json"): + response_data = unmarshal_json_response(errors.ErrorResponseData, http_res) + raise errors.ErrorResponse(response_data, http_res) + if utils.match_response(http_res, ["400", "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"], "*"): @@ -731,11 +757,13 @@ async def run_stream_async( retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "text/event-stream"): return http_res.text - if utils.match_response( - http_res, ["400", "403", "404", "409", "422", "4XX"], "*" - ): + if utils.match_response(http_res, ["404", "409", "422"], "application/json"): + response_data = unmarshal_json_response(errors.ErrorResponseData, http_res) + raise errors.ErrorResponse(response_data, http_res) + if utils.match_response(http_res, ["400", "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"], "*"): diff --git a/src/glean/api_client/datasources.py b/src/glean/api_client/datasources.py index d7340a08..60e6da53 100644 --- a/src/glean/api_client/datasources.py +++ b/src/glean/api_client/datasources.py @@ -6,92 +6,29 @@ 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 Any, Mapping, Optional, Union class Datasources(BaseSDK): - def add( + r"""Manage datasources.""" + + def get_datasource_instance_configuration( self, *, - name: str, - display_name: Optional[str] = None, - datasource_category: Optional[ - models.DatasourceCategory - ] = models.DatasourceCategory.UNCATEGORIZED, - url_regex: Optional[str] = None, - icon_url: Optional[str] = None, - object_definitions: Optional[ - Union[List[models.ObjectDefinition], List[models.ObjectDefinitionTypedDict]] - ] = None, - suggestion_text: Optional[str] = None, - home_url: Optional[str] = None, - crawler_seed_urls: Optional[List[str]] = None, - icon_dark_url: Optional[str] = None, - hide_built_in_facets: Optional[List[models.HideBuiltInFacet]] = None, - canonicalizing_url_regex: Optional[ - Union[ - List[models.CanonicalizingRegexType], - List[models.CanonicalizingRegexTypeTypedDict], - ] - ] = None, - canonicalizing_title_regex: Optional[ - Union[ - List[models.CanonicalizingRegexType], - List[models.CanonicalizingRegexTypeTypedDict], - ] - ] = None, - redlist_title_regex: Optional[str] = None, - connector_type: Optional[models.CustomDatasourceConfigConnectorType] = None, - quicklinks: Optional[ - Union[List[models.Quicklink], List[models.QuicklinkTypedDict]] - ] = None, - render_config_preset: Optional[str] = None, - aliases: Optional[List[str]] = None, - is_on_prem: Optional[bool] = None, - trust_url_regex_for_view_activity: Optional[bool] = True, - include_utm_source: Optional[bool] = None, - strip_fragment_in_canonical_url: Optional[bool] = True, - identity_datasource_name: Optional[str] = None, - product_access_group: Optional[str] = None, - is_user_referenced_by_email: Optional[bool] = None, - is_entity_datasource: Optional[bool] = False, - is_test_datasource: Optional[bool] = False, + datasource_id: str, + instance_id: str, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ): - r"""Add or update datasource - - Add or update a custom datasource and its schema. - - :param name: Unique identifier of datasource instance to which this config applies. - :param display_name: The user-friendly instance label to display. If omitted, falls back to the title-cased `name`. - :param datasource_category: The type of this datasource. It is an important signal for relevance and must be specified and cannot be UNCATEGORIZED. Please refer to [this](https://developers.glean.com/docs/indexing_api_datasource_category/) for more details. - :param url_regex: Regular expression that matches URLs of documents of the datasource instance. The behavior for multiple matches is non-deterministic. **Note: `urlRegex` is a required field for non-entity datasources, but not required if the datasource is used to push custom entities (ie. datasources where isEntityDatasource is false). Please add a regex as specific as possible to this datasource instance.** - :param icon_url: The URL to an image to be displayed as an icon for this datasource instance. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). - :param object_definitions: The list of top-level `objectType`s for the datasource. - :param suggestion_text: Example text for what to search for in this datasource - :param home_url: The URL of the landing page for this datasource instance. Should point to the most useful page for users, not the company marketing page. - :param crawler_seed_urls: This only applies to WEB_CRAWL and BROWSER_CRAWL datasources. Defines the seed URLs for crawling. - :param icon_dark_url: The URL to an image to be displayed as an icon for this datasource instance in dark mode. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). - :param hide_built_in_facets: List of built-in facet types that should be hidden for the datasource. - :param canonicalizing_url_regex: A list of regular expressions to apply to an arbitrary URL to transform it into a canonical URL for this datasource instance. Regexes are to be applied in the order specified in this list. - :param canonicalizing_title_regex: A list of regular expressions to apply to an arbitrary title to transform it into a title that will be displayed in the search results - :param redlist_title_regex: A regex that identifies titles that should not be indexed - :param connector_type: - :param quicklinks: List of actions for this datasource instance that will show up in autocomplete and app card, e.g. \"Create new issue\" for jira - :param render_config_preset: The name of a render config to use for displaying results from this datasource. Any well known datasource name may be used to render the same as that source, e.g. `web` or `gdrive`. Please refer to [this](https://developers.glean.com/docs/rendering_search_results/) for more details - :param aliases: Aliases that can be used as `app` operator-values. - :param is_on_prem: Whether or not this datasource is hosted on-premise. - :param trust_url_regex_for_view_activity: True if browser activity is able to report the correct URL for VIEW events. Set this to true if the URLs reported by Chrome are constant throughout each page load. Set this to false if the page has Javascript that modifies the URL during or after the load. - :param include_utm_source: If true, a utm_source query param will be added to outbound links to this datasource within Glean. - :param strip_fragment_in_canonical_url: If true, the fragment part of the URL will be stripped when converting to a canonical url. - :param identity_datasource_name: If the datasource uses another datasource for identity info, then the name of the datasource. The identity datasource must exist already and the datasource with identity info should have its visibility enabled for search results. - :param product_access_group: If the datasource uses a specific product access group, then the name of that group. - :param is_user_referenced_by_email: whether email is used to reference users in document ACLs and in group memberships. - :param is_entity_datasource: True if this datasource is used to push custom entities. - :param is_test_datasource: True if this datasource will be used for testing purpose only. Documents from such a datasource wouldn't have any effect on search rankings. + ) -> models.DatasourceConfigurationResponse: + r"""Get datasource instance configuration + + Gets the greenlisted configuration values for a datasource instance. Returns only configuration keys that are exposed via the public API greenlist. + + + :param datasource_id: The datasource type identifier (e.g. o365sharepoint) + :param instance_id: The datasource instance identifier :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 @@ -107,61 +44,24 @@ def add( else: base_url = self._get_url(base_url, url_variables) - request = models.CustomDatasourceConfig( - name=name, - display_name=display_name, - datasource_category=datasource_category, - url_regex=url_regex, - icon_url=icon_url, - object_definitions=utils.get_pydantic_model( - object_definitions, Optional[List[models.ObjectDefinition]] - ), - suggestion_text=suggestion_text, - home_url=home_url, - crawler_seed_urls=crawler_seed_urls, - icon_dark_url=icon_dark_url, - hide_built_in_facets=hide_built_in_facets, - canonicalizing_url_regex=utils.get_pydantic_model( - canonicalizing_url_regex, Optional[List[models.CanonicalizingRegexType]] - ), - canonicalizing_title_regex=utils.get_pydantic_model( - canonicalizing_title_regex, - Optional[List[models.CanonicalizingRegexType]], - ), - redlist_title_regex=redlist_title_regex, - connector_type=connector_type, - quicklinks=utils.get_pydantic_model( - quicklinks, Optional[List[models.Quicklink]] - ), - render_config_preset=render_config_preset, - aliases=aliases, - is_on_prem=is_on_prem, - trust_url_regex_for_view_activity=trust_url_regex_for_view_activity, - include_utm_source=include_utm_source, - strip_fragment_in_canonical_url=strip_fragment_in_canonical_url, - identity_datasource_name=identity_datasource_name, - product_access_group=product_access_group, - is_user_referenced_by_email=is_user_referenced_by_email, - is_entity_datasource=is_entity_datasource, - is_test_datasource=is_test_datasource, + request = models.GetDatasourceInstanceConfigurationRequest( + datasource_id=datasource_id, + instance_id=instance_id, ) req = self._build_request( - method="POST", - path="/api/index/v1/adddatasource", + method="GET", + path="/rest/api/v1/configure/datasources/{datasourceId}/instances/{instanceId}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, - request_has_path_params=False, + request_body_required=False, + request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="*/*", + accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.CustomDatasourceConfig - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -178,20 +78,26 @@ def add( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="post_/api/index/v1/adddatasource", + operation_id="getDatasourceInstanceConfiguration", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["400", "401", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "5XX"], retry_config=retry_config, ) - if utils.match_response(http_res, "200", "*"): - return - if utils.match_response(http_res, ["400", "401", "4XX"], "*"): + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.DatasourceConfigurationResponse, http_res + ) + if utils.match_response(http_res, ["400", "403", "404"], "application/json"): + response_data = unmarshal_json_response(errors.ErrorResponseData, http_res) + raise errors.ErrorResponse(response_data, http_res) + if utils.match_response(http_res, ["401", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.GleanError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): @@ -200,88 +106,23 @@ def add( raise errors.GleanError("Unexpected response received", http_res) - async def add_async( + async def get_datasource_instance_configuration_async( self, *, - name: str, - display_name: Optional[str] = None, - datasource_category: Optional[ - models.DatasourceCategory - ] = models.DatasourceCategory.UNCATEGORIZED, - url_regex: Optional[str] = None, - icon_url: Optional[str] = None, - object_definitions: Optional[ - Union[List[models.ObjectDefinition], List[models.ObjectDefinitionTypedDict]] - ] = None, - suggestion_text: Optional[str] = None, - home_url: Optional[str] = None, - crawler_seed_urls: Optional[List[str]] = None, - icon_dark_url: Optional[str] = None, - hide_built_in_facets: Optional[List[models.HideBuiltInFacet]] = None, - canonicalizing_url_regex: Optional[ - Union[ - List[models.CanonicalizingRegexType], - List[models.CanonicalizingRegexTypeTypedDict], - ] - ] = None, - canonicalizing_title_regex: Optional[ - Union[ - List[models.CanonicalizingRegexType], - List[models.CanonicalizingRegexTypeTypedDict], - ] - ] = None, - redlist_title_regex: Optional[str] = None, - connector_type: Optional[models.CustomDatasourceConfigConnectorType] = None, - quicklinks: Optional[ - Union[List[models.Quicklink], List[models.QuicklinkTypedDict]] - ] = None, - render_config_preset: Optional[str] = None, - aliases: Optional[List[str]] = None, - is_on_prem: Optional[bool] = None, - trust_url_regex_for_view_activity: Optional[bool] = True, - include_utm_source: Optional[bool] = None, - strip_fragment_in_canonical_url: Optional[bool] = True, - identity_datasource_name: Optional[str] = None, - product_access_group: Optional[str] = None, - is_user_referenced_by_email: Optional[bool] = None, - is_entity_datasource: Optional[bool] = False, - is_test_datasource: Optional[bool] = False, + datasource_id: str, + instance_id: str, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ): - r"""Add or update datasource - - Add or update a custom datasource and its schema. - - :param name: Unique identifier of datasource instance to which this config applies. - :param display_name: The user-friendly instance label to display. If omitted, falls back to the title-cased `name`. - :param datasource_category: The type of this datasource. It is an important signal for relevance and must be specified and cannot be UNCATEGORIZED. Please refer to [this](https://developers.glean.com/docs/indexing_api_datasource_category/) for more details. - :param url_regex: Regular expression that matches URLs of documents of the datasource instance. The behavior for multiple matches is non-deterministic. **Note: `urlRegex` is a required field for non-entity datasources, but not required if the datasource is used to push custom entities (ie. datasources where isEntityDatasource is false). Please add a regex as specific as possible to this datasource instance.** - :param icon_url: The URL to an image to be displayed as an icon for this datasource instance. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). - :param object_definitions: The list of top-level `objectType`s for the datasource. - :param suggestion_text: Example text for what to search for in this datasource - :param home_url: The URL of the landing page for this datasource instance. Should point to the most useful page for users, not the company marketing page. - :param crawler_seed_urls: This only applies to WEB_CRAWL and BROWSER_CRAWL datasources. Defines the seed URLs for crawling. - :param icon_dark_url: The URL to an image to be displayed as an icon for this datasource instance in dark mode. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). - :param hide_built_in_facets: List of built-in facet types that should be hidden for the datasource. - :param canonicalizing_url_regex: A list of regular expressions to apply to an arbitrary URL to transform it into a canonical URL for this datasource instance. Regexes are to be applied in the order specified in this list. - :param canonicalizing_title_regex: A list of regular expressions to apply to an arbitrary title to transform it into a title that will be displayed in the search results - :param redlist_title_regex: A regex that identifies titles that should not be indexed - :param connector_type: - :param quicklinks: List of actions for this datasource instance that will show up in autocomplete and app card, e.g. \"Create new issue\" for jira - :param render_config_preset: The name of a render config to use for displaying results from this datasource. Any well known datasource name may be used to render the same as that source, e.g. `web` or `gdrive`. Please refer to [this](https://developers.glean.com/docs/rendering_search_results/) for more details - :param aliases: Aliases that can be used as `app` operator-values. - :param is_on_prem: Whether or not this datasource is hosted on-premise. - :param trust_url_regex_for_view_activity: True if browser activity is able to report the correct URL for VIEW events. Set this to true if the URLs reported by Chrome are constant throughout each page load. Set this to false if the page has Javascript that modifies the URL during or after the load. - :param include_utm_source: If true, a utm_source query param will be added to outbound links to this datasource within Glean. - :param strip_fragment_in_canonical_url: If true, the fragment part of the URL will be stripped when converting to a canonical url. - :param identity_datasource_name: If the datasource uses another datasource for identity info, then the name of the datasource. The identity datasource must exist already and the datasource with identity info should have its visibility enabled for search results. - :param product_access_group: If the datasource uses a specific product access group, then the name of that group. - :param is_user_referenced_by_email: whether email is used to reference users in document ACLs and in group memberships. - :param is_entity_datasource: True if this datasource is used to push custom entities. - :param is_test_datasource: True if this datasource will be used for testing purpose only. Documents from such a datasource wouldn't have any effect on search rankings. + ) -> models.DatasourceConfigurationResponse: + r"""Get datasource instance configuration + + Gets the greenlisted configuration values for a datasource instance. Returns only configuration keys that are exposed via the public API greenlist. + + + :param datasource_id: The datasource type identifier (e.g. o365sharepoint) + :param instance_id: The datasource instance identifier :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 @@ -297,61 +138,24 @@ async def add_async( else: base_url = self._get_url(base_url, url_variables) - request = models.CustomDatasourceConfig( - name=name, - display_name=display_name, - datasource_category=datasource_category, - url_regex=url_regex, - icon_url=icon_url, - object_definitions=utils.get_pydantic_model( - object_definitions, Optional[List[models.ObjectDefinition]] - ), - suggestion_text=suggestion_text, - home_url=home_url, - crawler_seed_urls=crawler_seed_urls, - icon_dark_url=icon_dark_url, - hide_built_in_facets=hide_built_in_facets, - canonicalizing_url_regex=utils.get_pydantic_model( - canonicalizing_url_regex, Optional[List[models.CanonicalizingRegexType]] - ), - canonicalizing_title_regex=utils.get_pydantic_model( - canonicalizing_title_regex, - Optional[List[models.CanonicalizingRegexType]], - ), - redlist_title_regex=redlist_title_regex, - connector_type=connector_type, - quicklinks=utils.get_pydantic_model( - quicklinks, Optional[List[models.Quicklink]] - ), - render_config_preset=render_config_preset, - aliases=aliases, - is_on_prem=is_on_prem, - trust_url_regex_for_view_activity=trust_url_regex_for_view_activity, - include_utm_source=include_utm_source, - strip_fragment_in_canonical_url=strip_fragment_in_canonical_url, - identity_datasource_name=identity_datasource_name, - product_access_group=product_access_group, - is_user_referenced_by_email=is_user_referenced_by_email, - is_entity_datasource=is_entity_datasource, - is_test_datasource=is_test_datasource, + request = models.GetDatasourceInstanceConfigurationRequest( + datasource_id=datasource_id, + instance_id=instance_id, ) req = self._build_request_async( - method="POST", - path="/api/index/v1/adddatasource", + method="GET", + path="/rest/api/v1/configure/datasources/{datasourceId}/instances/{instanceId}", base_url=base_url, url_variables=url_variables, request=request, - request_body_required=True, - request_has_path_params=False, + request_body_required=False, + request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="*/*", + accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.CustomDatasourceConfig - ), allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -368,20 +172,26 @@ async def add_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="post_/api/index/v1/adddatasource", + operation_id="getDatasourceInstanceConfiguration", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["400", "401", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "5XX"], retry_config=retry_config, ) - if utils.match_response(http_res, "200", "*"): - return - if utils.match_response(http_res, ["400", "401", "4XX"], "*"): + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.DatasourceConfigurationResponse, http_res + ) + if utils.match_response(http_res, ["400", "403", "404"], "application/json"): + response_data = unmarshal_json_response(errors.ErrorResponseData, http_res) + raise errors.ErrorResponse(response_data, http_res) + if utils.match_response(http_res, ["401", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.GleanError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): @@ -390,20 +200,28 @@ async def add_async( raise errors.GleanError("Unexpected response received", http_res) - def retrieve_config( + def update_datasource_instance_configuration( self, *, - datasource: str, + datasource_id: str, + instance_id: str, + configuration: Union[ + models.DatasourceInstanceConfiguration, + models.DatasourceInstanceConfigurationTypedDict, + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.CustomDatasourceConfig: - r"""Get datasource config + ) -> models.DatasourceConfigurationResponse: + r"""Update datasource instance configuration + + Updates the greenlisted configuration values for a datasource instance. Only configuration keys that are exposed via the public API greenlist may be set. Returns the full greenlisted configuration after the update is applied. - Fetches the datasource config for the specified custom datasource. - :param datasource: Datasource name for which config is needed. + :param datasource_id: The datasource type identifier (e.g. o365sharepoint) + :param instance_id: The datasource instance identifier + :param configuration: Configuration for a datasource instance :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 @@ -419,25 +237,35 @@ def retrieve_config( else: base_url = self._get_url(base_url, url_variables) - request = models.GetDatasourceConfigRequest( - datasource=datasource, + request = models.UpdateDatasourceInstanceConfigurationRequest( + datasource_id=datasource_id, + instance_id=instance_id, + update_datasource_configuration_request=models.UpdateDatasourceConfigurationRequest( + configuration=utils.get_pydantic_model( + configuration, models.DatasourceInstanceConfiguration + ), + ), ) req = self._build_request( - method="POST", - path="/api/index/v1/getdatasourceconfig", + method="PATCH", + path="/rest/api/v1/configure/datasources/{datasourceId}/instances/{instanceId}", base_url=base_url, url_variables=url_variables, request=request, request_body_required=True, - request_has_path_params=False, + request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.GetDatasourceConfigRequest + request.update_datasource_configuration_request, + False, + False, + "json", + models.UpdateDatasourceConfigurationRequest, ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -455,20 +283,26 @@ def retrieve_config( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="post_/api/index/v1/getdatasourceconfig", + operation_id="updateDatasourceInstanceConfiguration", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["400", "401", "409", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "5XX"], retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.CustomDatasourceConfig, http_res) - if utils.match_response(http_res, ["400", "401", "409", "4XX"], "*"): + return unmarshal_json_response( + models.DatasourceConfigurationResponse, http_res + ) + if utils.match_response(http_res, ["400", "403", "404"], "application/json"): + response_data = unmarshal_json_response(errors.ErrorResponseData, http_res) + raise errors.ErrorResponse(response_data, http_res) + if utils.match_response(http_res, ["401", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.GleanError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): @@ -477,20 +311,28 @@ def retrieve_config( raise errors.GleanError("Unexpected response received", http_res) - async def retrieve_config_async( + async def update_datasource_instance_configuration_async( self, *, - datasource: str, + datasource_id: str, + instance_id: str, + configuration: Union[ + models.DatasourceInstanceConfiguration, + models.DatasourceInstanceConfigurationTypedDict, + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.CustomDatasourceConfig: - r"""Get datasource config + ) -> models.DatasourceConfigurationResponse: + r"""Update datasource instance configuration - Fetches the datasource config for the specified custom datasource. + Updates the greenlisted configuration values for a datasource instance. Only configuration keys that are exposed via the public API greenlist may be set. Returns the full greenlisted configuration after the update is applied. - :param datasource: Datasource name for which config is needed. + + :param datasource_id: The datasource type identifier (e.g. o365sharepoint) + :param instance_id: The datasource instance identifier + :param configuration: Configuration for a datasource instance :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 @@ -506,25 +348,35 @@ async def retrieve_config_async( else: base_url = self._get_url(base_url, url_variables) - request = models.GetDatasourceConfigRequest( - datasource=datasource, + request = models.UpdateDatasourceInstanceConfigurationRequest( + datasource_id=datasource_id, + instance_id=instance_id, + update_datasource_configuration_request=models.UpdateDatasourceConfigurationRequest( + configuration=utils.get_pydantic_model( + configuration, models.DatasourceInstanceConfiguration + ), + ), ) req = self._build_request_async( - method="POST", - path="/api/index/v1/getdatasourceconfig", + method="PATCH", + path="/rest/api/v1/configure/datasources/{datasourceId}/instances/{instanceId}", base_url=base_url, url_variables=url_variables, request=request, request_body_required=True, - request_has_path_params=False, + request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.GetDatasourceConfigRequest + request.update_datasource_configuration_request, + False, + False, + "json", + models.UpdateDatasourceConfigurationRequest, ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -542,20 +394,26 @@ async def retrieve_config_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="post_/api/index/v1/getdatasourceconfig", + operation_id="updateDatasourceInstanceConfiguration", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), ), request=req, - error_status_codes=["400", "401", "409", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "5XX"], retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.CustomDatasourceConfig, http_res) - if utils.match_response(http_res, ["400", "401", "409", "4XX"], "*"): + return unmarshal_json_response( + models.DatasourceConfigurationResponse, http_res + ) + if utils.match_response(http_res, ["400", "403", "404"], "application/json"): + response_data = unmarshal_json_response(errors.ErrorResponseData, http_res) + raise errors.ErrorResponse(response_data, http_res) + if utils.match_response(http_res, ["401", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.GleanError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): diff --git a/src/glean/api_client/errors/__init__.py b/src/glean/api_client/errors/__init__.py index 185efb34..b8998ad3 100644 --- a/src/glean/api_client/errors/__init__.py +++ b/src/glean/api_client/errors/__init__.py @@ -7,6 +7,7 @@ if TYPE_CHECKING: from .collectionerror import CollectionError, CollectionErrorData + from .errorresponse import ErrorResponse, ErrorResponseData from .gleandataerror import GleanDataError, GleanDataErrorData from .gleanerror import GleanError from .no_response_error import NoResponseError @@ -15,6 +16,8 @@ __all__ = [ "CollectionError", "CollectionErrorData", + "ErrorResponse", + "ErrorResponseData", "GleanBaseError", "GleanDataError", "GleanDataErrorData", @@ -26,6 +29,8 @@ _dynamic_imports: dict[str, str] = { "CollectionError": ".collectionerror", "CollectionErrorData": ".collectionerror", + "ErrorResponse": ".errorresponse", + "ErrorResponseData": ".errorresponse", "GleanDataError": ".gleandataerror", "GleanDataErrorData": ".gleandataerror", "GleanError": ".gleanerror", diff --git a/src/glean/api_client/errors/errorresponse.py b/src/glean/api_client/errors/errorresponse.py new file mode 100644 index 00000000..70cab4aa --- /dev/null +++ b/src/glean/api_client/errors/errorresponse.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from dataclasses import dataclass, field +from glean.api_client.errors import GleanBaseError +from glean.api_client.types import BaseModel +import httpx +from typing import Optional + + +class ErrorResponseData(BaseModel): + message: Optional[str] = None + r"""Client-facing error message describing what went wrong""" + + +@dataclass(unsafe_hash=True) +class ErrorResponse(GleanBaseError): + r"""Error response returned for failed requests""" + + data: ErrorResponseData = field(hash=False) + + def __init__( + self, + data: ErrorResponseData, + raw_response: httpx.Response, + body: Optional[str] = None, + ): + fallback = body or raw_response.text + message = str(data.message) or fallback + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) diff --git a/src/glean/api_client/errors/gleandataerror.py b/src/glean/api_client/errors/gleandataerror.py index 7b0dfa05..754c85de 100644 --- a/src/glean/api_client/errors/gleandataerror.py +++ b/src/glean/api_client/errors/gleandataerror.py @@ -6,7 +6,6 @@ from glean.api_client.models import ( errormessage as models_errormessage, invalidoperatorvalueerror as models_invalidoperatorvalueerror, - unauthorizeddatasourceinstance as models_unauthorizeddatasourceinstance, ) from glean.api_client.types import BaseModel import httpx @@ -37,15 +36,6 @@ class GleanDataErrorData(BaseModel): Optional[bool], pydantic.Field(alias="federatedSearchRateLimitError") ] = None r"""Indicates the federated search results could not be fetched due to rate limiting.""" - unauthorized_datasource_instances: Annotated[ - Optional[ - List[models_unauthorizeddatasourceinstance.UnauthorizedDatasourceInstance] - ], - pydantic.Field(alias="unauthorizedDatasourceInstances"), - ] = None - r"""Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth. - - """ @dataclass(unsafe_hash=True) diff --git a/src/glean/api_client/indexing.py b/src/glean/api_client/indexing.py index 27b07e8e..3a668c8c 100644 --- a/src/glean/api_client/indexing.py +++ b/src/glean/api_client/indexing.py @@ -2,9 +2,9 @@ from .basesdk import BaseSDK from .sdkconfiguration import SDKConfiguration -from glean.api_client.datasources import Datasources from glean.api_client.indexing_authentication import IndexingAuthentication from glean.api_client.indexing_datasource import IndexingDatasource +from glean.api_client.indexing_datasources import IndexingDatasources from glean.api_client.indexing_documents import IndexingDocuments from glean.api_client.indexing_permissions import IndexingPermissions from glean.api_client.indexing_shortcuts import IndexingShortcuts @@ -17,7 +17,7 @@ class Indexing(BaseSDK): permissions: IndexingPermissions datasource: IndexingDatasource people: People - datasources: Datasources + datasources: IndexingDatasources authentication: IndexingAuthentication shortcuts: IndexingShortcuts @@ -39,7 +39,7 @@ def _init_sdks(self): self.sdk_configuration, parent_ref=self.parent_ref ) self.people = People(self.sdk_configuration, parent_ref=self.parent_ref) - self.datasources = Datasources( + self.datasources = IndexingDatasources( self.sdk_configuration, parent_ref=self.parent_ref ) self.authentication = IndexingAuthentication( diff --git a/src/glean/api_client/indexing_datasources.py b/src/glean/api_client/indexing_datasources.py new file mode 100644 index 00000000..f5f55067 --- /dev/null +++ b/src/glean/api_client/indexing_datasources.py @@ -0,0 +1,565 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from glean.api_client import errors, models, utils +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 glean.api_client.utils.unmarshal_json_response import unmarshal_json_response +from typing import List, Mapping, Optional, Union + + +class IndexingDatasources(BaseSDK): + def add( + self, + *, + name: str, + display_name: Optional[str] = None, + datasource_category: Optional[ + models.DatasourceCategory + ] = models.DatasourceCategory.UNCATEGORIZED, + url_regex: Optional[str] = None, + icon_url: Optional[str] = None, + object_definitions: Optional[ + Union[List[models.ObjectDefinition], List[models.ObjectDefinitionTypedDict]] + ] = None, + suggestion_text: Optional[str] = None, + home_url: Optional[str] = None, + crawler_seed_urls: Optional[List[str]] = None, + icon_dark_url: Optional[str] = None, + hide_built_in_facets: Optional[List[models.HideBuiltInFacet]] = None, + canonicalizing_url_regex: Optional[ + Union[ + List[models.CanonicalizingRegexType], + List[models.CanonicalizingRegexTypeTypedDict], + ] + ] = None, + canonicalizing_title_regex: Optional[ + Union[ + List[models.CanonicalizingRegexType], + List[models.CanonicalizingRegexTypeTypedDict], + ] + ] = None, + redlist_title_regex: Optional[str] = None, + connector_type: Optional[models.CustomDatasourceConfigConnectorType] = None, + quicklinks: Optional[ + Union[List[models.Quicklink], List[models.QuicklinkTypedDict]] + ] = None, + render_config_preset: Optional[str] = None, + aliases: Optional[List[str]] = None, + is_on_prem: Optional[bool] = None, + trust_url_regex_for_view_activity: Optional[bool] = True, + include_utm_source: Optional[bool] = None, + strip_fragment_in_canonical_url: Optional[bool] = True, + identity_datasource_name: Optional[str] = None, + product_access_group: Optional[str] = None, + is_user_referenced_by_email: Optional[bool] = None, + is_entity_datasource: Optional[bool] = False, + is_test_datasource: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Add or update datasource + + Add or update a custom datasource and its schema. + + :param name: Unique identifier of datasource instance to which this config applies. + :param display_name: The user-friendly instance label to display. If omitted, falls back to the title-cased `name`. + :param datasource_category: The type of this datasource. It is an important signal for relevance and must be specified and cannot be UNCATEGORIZED. Please refer to [this](https://developers.glean.com/docs/indexing_api_datasource_category/) for more details. + :param url_regex: Regular expression that matches URLs of documents of the datasource instance. The behavior for multiple matches is non-deterministic. **Note: `urlRegex` is a required field for non-entity datasources, but not required if the datasource is used to push custom entities (ie. datasources where isEntityDatasource is false). Please add a regex as specific as possible to this datasource instance.** + :param icon_url: The URL to an image to be displayed as an icon for this datasource instance. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). + :param object_definitions: The list of top-level `objectType`s for the datasource. + :param suggestion_text: Example text for what to search for in this datasource + :param home_url: The URL of the landing page for this datasource instance. Should point to the most useful page for users, not the company marketing page. + :param crawler_seed_urls: This only applies to WEB_CRAWL and BROWSER_CRAWL datasources. Defines the seed URLs for crawling. + :param icon_dark_url: The URL to an image to be displayed as an icon for this datasource instance in dark mode. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). + :param hide_built_in_facets: List of built-in facet types that should be hidden for the datasource. + :param canonicalizing_url_regex: A list of regular expressions to apply to an arbitrary URL to transform it into a canonical URL for this datasource instance. Regexes are to be applied in the order specified in this list. + :param canonicalizing_title_regex: A list of regular expressions to apply to an arbitrary title to transform it into a title that will be displayed in the search results + :param redlist_title_regex: A regex that identifies titles that should not be indexed + :param connector_type: + :param quicklinks: List of actions for this datasource instance that will show up in autocomplete and app card, e.g. \"Create new issue\" for jira + :param render_config_preset: The name of a render config to use for displaying results from this datasource. Any well known datasource name may be used to render the same as that source, e.g. `web` or `gdrive`. Please refer to [this](https://developers.glean.com/docs/rendering_search_results/) for more details + :param aliases: Aliases that can be used as `app` operator-values. + :param is_on_prem: Whether or not this datasource is hosted on-premise. + :param trust_url_regex_for_view_activity: True if browser activity is able to report the correct URL for VIEW events. Set this to true if the URLs reported by Chrome are constant throughout each page load. Set this to false if the page has Javascript that modifies the URL during or after the load. + :param include_utm_source: If true, a utm_source query param will be added to outbound links to this datasource within Glean. + :param strip_fragment_in_canonical_url: If true, the fragment part of the URL will be stripped when converting to a canonical url. + :param identity_datasource_name: If the datasource uses another datasource for identity info, then the name of the datasource. The identity datasource must exist already and the datasource with identity info should have its visibility enabled for search results. + :param product_access_group: If the datasource uses a specific product access group, then the name of that group. + :param is_user_referenced_by_email: whether email is used to reference users in document ACLs and in group memberships. + :param is_entity_datasource: True if this datasource is used to push custom entities. + :param is_test_datasource: True if this datasource will be used for testing purpose only. Documents from such a datasource wouldn't have any effect on search rankings. + :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.CustomDatasourceConfig( + name=name, + display_name=display_name, + datasource_category=datasource_category, + url_regex=url_regex, + icon_url=icon_url, + object_definitions=utils.get_pydantic_model( + object_definitions, Optional[List[models.ObjectDefinition]] + ), + suggestion_text=suggestion_text, + home_url=home_url, + crawler_seed_urls=crawler_seed_urls, + icon_dark_url=icon_dark_url, + hide_built_in_facets=hide_built_in_facets, + canonicalizing_url_regex=utils.get_pydantic_model( + canonicalizing_url_regex, Optional[List[models.CanonicalizingRegexType]] + ), + canonicalizing_title_regex=utils.get_pydantic_model( + canonicalizing_title_regex, + Optional[List[models.CanonicalizingRegexType]], + ), + redlist_title_regex=redlist_title_regex, + connector_type=connector_type, + quicklinks=utils.get_pydantic_model( + quicklinks, Optional[List[models.Quicklink]] + ), + render_config_preset=render_config_preset, + aliases=aliases, + is_on_prem=is_on_prem, + trust_url_regex_for_view_activity=trust_url_regex_for_view_activity, + include_utm_source=include_utm_source, + strip_fragment_in_canonical_url=strip_fragment_in_canonical_url, + identity_datasource_name=identity_datasource_name, + product_access_group=product_access_group, + is_user_referenced_by_email=is_user_referenced_by_email, + is_entity_datasource=is_entity_datasource, + is_test_datasource=is_test_datasource, + ) + + req = self._build_request( + method="POST", + path="/api/index/v1/adddatasource", + 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="*/*", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CustomDatasourceConfig + ), + 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="post_/api/index/v1/adddatasource", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "*"): + return + if utils.match_response(http_res, ["400", "401", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def add_async( + self, + *, + name: str, + display_name: Optional[str] = None, + datasource_category: Optional[ + models.DatasourceCategory + ] = models.DatasourceCategory.UNCATEGORIZED, + url_regex: Optional[str] = None, + icon_url: Optional[str] = None, + object_definitions: Optional[ + Union[List[models.ObjectDefinition], List[models.ObjectDefinitionTypedDict]] + ] = None, + suggestion_text: Optional[str] = None, + home_url: Optional[str] = None, + crawler_seed_urls: Optional[List[str]] = None, + icon_dark_url: Optional[str] = None, + hide_built_in_facets: Optional[List[models.HideBuiltInFacet]] = None, + canonicalizing_url_regex: Optional[ + Union[ + List[models.CanonicalizingRegexType], + List[models.CanonicalizingRegexTypeTypedDict], + ] + ] = None, + canonicalizing_title_regex: Optional[ + Union[ + List[models.CanonicalizingRegexType], + List[models.CanonicalizingRegexTypeTypedDict], + ] + ] = None, + redlist_title_regex: Optional[str] = None, + connector_type: Optional[models.CustomDatasourceConfigConnectorType] = None, + quicklinks: Optional[ + Union[List[models.Quicklink], List[models.QuicklinkTypedDict]] + ] = None, + render_config_preset: Optional[str] = None, + aliases: Optional[List[str]] = None, + is_on_prem: Optional[bool] = None, + trust_url_regex_for_view_activity: Optional[bool] = True, + include_utm_source: Optional[bool] = None, + strip_fragment_in_canonical_url: Optional[bool] = True, + identity_datasource_name: Optional[str] = None, + product_access_group: Optional[str] = None, + is_user_referenced_by_email: Optional[bool] = None, + is_entity_datasource: Optional[bool] = False, + is_test_datasource: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Add or update datasource + + Add or update a custom datasource and its schema. + + :param name: Unique identifier of datasource instance to which this config applies. + :param display_name: The user-friendly instance label to display. If omitted, falls back to the title-cased `name`. + :param datasource_category: The type of this datasource. It is an important signal for relevance and must be specified and cannot be UNCATEGORIZED. Please refer to [this](https://developers.glean.com/docs/indexing_api_datasource_category/) for more details. + :param url_regex: Regular expression that matches URLs of documents of the datasource instance. The behavior for multiple matches is non-deterministic. **Note: `urlRegex` is a required field for non-entity datasources, but not required if the datasource is used to push custom entities (ie. datasources where isEntityDatasource is false). Please add a regex as specific as possible to this datasource instance.** + :param icon_url: The URL to an image to be displayed as an icon for this datasource instance. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). + :param object_definitions: The list of top-level `objectType`s for the datasource. + :param suggestion_text: Example text for what to search for in this datasource + :param home_url: The URL of the landing page for this datasource instance. Should point to the most useful page for users, not the company marketing page. + :param crawler_seed_urls: This only applies to WEB_CRAWL and BROWSER_CRAWL datasources. Defines the seed URLs for crawling. + :param icon_dark_url: The URL to an image to be displayed as an icon for this datasource instance in dark mode. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). + :param hide_built_in_facets: List of built-in facet types that should be hidden for the datasource. + :param canonicalizing_url_regex: A list of regular expressions to apply to an arbitrary URL to transform it into a canonical URL for this datasource instance. Regexes are to be applied in the order specified in this list. + :param canonicalizing_title_regex: A list of regular expressions to apply to an arbitrary title to transform it into a title that will be displayed in the search results + :param redlist_title_regex: A regex that identifies titles that should not be indexed + :param connector_type: + :param quicklinks: List of actions for this datasource instance that will show up in autocomplete and app card, e.g. \"Create new issue\" for jira + :param render_config_preset: The name of a render config to use for displaying results from this datasource. Any well known datasource name may be used to render the same as that source, e.g. `web` or `gdrive`. Please refer to [this](https://developers.glean.com/docs/rendering_search_results/) for more details + :param aliases: Aliases that can be used as `app` operator-values. + :param is_on_prem: Whether or not this datasource is hosted on-premise. + :param trust_url_regex_for_view_activity: True if browser activity is able to report the correct URL for VIEW events. Set this to true if the URLs reported by Chrome are constant throughout each page load. Set this to false if the page has Javascript that modifies the URL during or after the load. + :param include_utm_source: If true, a utm_source query param will be added to outbound links to this datasource within Glean. + :param strip_fragment_in_canonical_url: If true, the fragment part of the URL will be stripped when converting to a canonical url. + :param identity_datasource_name: If the datasource uses another datasource for identity info, then the name of the datasource. The identity datasource must exist already and the datasource with identity info should have its visibility enabled for search results. + :param product_access_group: If the datasource uses a specific product access group, then the name of that group. + :param is_user_referenced_by_email: whether email is used to reference users in document ACLs and in group memberships. + :param is_entity_datasource: True if this datasource is used to push custom entities. + :param is_test_datasource: True if this datasource will be used for testing purpose only. Documents from such a datasource wouldn't have any effect on search rankings. + :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.CustomDatasourceConfig( + name=name, + display_name=display_name, + datasource_category=datasource_category, + url_regex=url_regex, + icon_url=icon_url, + object_definitions=utils.get_pydantic_model( + object_definitions, Optional[List[models.ObjectDefinition]] + ), + suggestion_text=suggestion_text, + home_url=home_url, + crawler_seed_urls=crawler_seed_urls, + icon_dark_url=icon_dark_url, + hide_built_in_facets=hide_built_in_facets, + canonicalizing_url_regex=utils.get_pydantic_model( + canonicalizing_url_regex, Optional[List[models.CanonicalizingRegexType]] + ), + canonicalizing_title_regex=utils.get_pydantic_model( + canonicalizing_title_regex, + Optional[List[models.CanonicalizingRegexType]], + ), + redlist_title_regex=redlist_title_regex, + connector_type=connector_type, + quicklinks=utils.get_pydantic_model( + quicklinks, Optional[List[models.Quicklink]] + ), + render_config_preset=render_config_preset, + aliases=aliases, + is_on_prem=is_on_prem, + trust_url_regex_for_view_activity=trust_url_regex_for_view_activity, + include_utm_source=include_utm_source, + strip_fragment_in_canonical_url=strip_fragment_in_canonical_url, + identity_datasource_name=identity_datasource_name, + product_access_group=product_access_group, + is_user_referenced_by_email=is_user_referenced_by_email, + is_entity_datasource=is_entity_datasource, + is_test_datasource=is_test_datasource, + ) + + req = self._build_request_async( + method="POST", + path="/api/index/v1/adddatasource", + 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="*/*", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CustomDatasourceConfig + ), + 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="post_/api/index/v1/adddatasource", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "*"): + return + if utils.match_response(http_res, ["400", "401", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + def retrieve_config( + self, + *, + datasource: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CustomDatasourceConfig: + r"""Get datasource config + + Fetches the datasource config for the specified custom datasource. + + :param datasource: Datasource name for which config is needed. + :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.GetDatasourceConfigRequest( + datasource=datasource, + ) + + req = self._build_request( + method="POST", + path="/api/index/v1/getdatasourceconfig", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.GetDatasourceConfigRequest + ), + 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="post_/api/index/v1/getdatasourceconfig", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "409", "4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.CustomDatasourceConfig, http_res) + if utils.match_response(http_res, ["400", "401", "409", "4XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def retrieve_config_async( + self, + *, + datasource: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CustomDatasourceConfig: + r"""Get datasource config + + Fetches the datasource config for the specified custom datasource. + + :param datasource: Datasource name for which config is needed. + :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.GetDatasourceConfigRequest( + datasource=datasource, + ) + + req = self._build_request_async( + method="POST", + path="/api/index/v1/getdatasourceconfig", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.GetDatasourceConfigRequest + ), + 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="post_/api/index/v1/getdatasourceconfig", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "409", "4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.CustomDatasourceConfig, http_res) + if utils.match_response(http_res, ["400", "401", "409", "4XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) diff --git a/src/glean/api_client/models/__init__.py b/src/glean/api_client/models/__init__.py index 87205efe..980bdd63 100644 --- a/src/glean/api_client/models/__init__.py +++ b/src/glean/api_client/models/__init__.py @@ -310,6 +310,7 @@ ConferenceDataTypedDict, Provider, ) + from .configurationvalue import ConfigurationValue, ConfigurationValueTypedDict from .connectortype import ConnectorType from .contentdefinition import ContentDefinition, ContentDefinitionTypedDict from .contenttype import ContentType @@ -401,10 +402,18 @@ DatasourceBulkMembershipDefinition, DatasourceBulkMembershipDefinitionTypedDict, ) + from .datasourceconfigurationresponse import ( + DatasourceConfigurationResponse, + DatasourceConfigurationResponseTypedDict, + ) from .datasourcegroupdefinition import ( DatasourceGroupDefinition, DatasourceGroupDefinitionTypedDict, ) + from .datasourceinstanceconfiguration import ( + DatasourceInstanceConfiguration, + DatasourceInstanceConfigurationTypedDict, + ) from .datasourcemembershipdefinition import ( DatasourceMembershipDefinition, DatasourceMembershipDefinitionTypedDict, @@ -773,6 +782,10 @@ GetDatasourceConfigRequest, GetDatasourceConfigRequestTypedDict, ) + from .getdatasourceinstanceconfigurationop import ( + GetDatasourceInstanceConfigurationRequest, + GetDatasourceInstanceConfigurationRequestTypedDict, + ) from .getdlpreportresponse import ( GetDlpReportResponse, GetDlpReportResponseTypedDict, @@ -1258,6 +1271,14 @@ UpdateAnnouncementRequestPostType, UpdateAnnouncementRequestTypedDict, ) + from .updatedatasourceconfigurationrequest import ( + UpdateDatasourceConfigurationRequest, + UpdateDatasourceConfigurationRequestTypedDict, + ) + from .updatedatasourceinstanceconfigurationop import ( + UpdateDatasourceInstanceConfigurationRequest, + UpdateDatasourceInstanceConfigurationRequestTypedDict, + ) from .updatedlpconfigrequest import ( UpdateDlpConfigRequest, UpdateDlpConfigRequestTypedDict, @@ -1614,6 +1635,8 @@ "ConferenceData", "ConferenceDataSource", "ConferenceDataTypedDict", + "ConfigurationValue", + "ConfigurationValueTypedDict", "ConnectorType", "ContentDefinition", "ContentDefinitionTypedDict", @@ -1685,8 +1708,12 @@ "DatasourceBulkMembershipDefinition", "DatasourceBulkMembershipDefinitionTypedDict", "DatasourceCategory", + "DatasourceConfigurationResponse", + "DatasourceConfigurationResponseTypedDict", "DatasourceGroupDefinition", "DatasourceGroupDefinitionTypedDict", + "DatasourceInstanceConfiguration", + "DatasourceInstanceConfigurationTypedDict", "DatasourceMembershipDefinition", "DatasourceMembershipDefinitionTypedDict", "DatasourceObjectTypeDocumentCountEntry", @@ -1971,6 +1998,8 @@ "GetCollectionResponseTypedDict", "GetDatasourceConfigRequest", "GetDatasourceConfigRequestTypedDict", + "GetDatasourceInstanceConfigurationRequest", + "GetDatasourceInstanceConfigurationRequestTypedDict", "GetDlpReportResponse", "GetDlpReportResponseTypedDict", "GetDocPermissionsRequest", @@ -2459,6 +2488,10 @@ "UpdateAnnouncementRequestChannel", "UpdateAnnouncementRequestPostType", "UpdateAnnouncementRequestTypedDict", + "UpdateDatasourceConfigurationRequest", + "UpdateDatasourceConfigurationRequestTypedDict", + "UpdateDatasourceInstanceConfigurationRequest", + "UpdateDatasourceInstanceConfigurationRequestTypedDict", "UpdateDlpConfigRequest", "UpdateDlpConfigRequestTypedDict", "UpdateDlpConfigResponse", @@ -2729,6 +2762,8 @@ "ConferenceDataSource": ".conferencedata", "ConferenceDataTypedDict": ".conferencedata", "Provider": ".conferencedata", + "ConfigurationValue": ".configurationvalue", + "ConfigurationValueTypedDict": ".configurationvalue", "ConnectorType": ".connectortype", "ContentDefinition": ".contentdefinition", "ContentDefinitionTypedDict": ".contentdefinition", @@ -2794,8 +2829,12 @@ "CustomSensitiveRuleType": ".customsensitiveruletype", "DatasourceBulkMembershipDefinition": ".datasourcebulkmembershipdefinition", "DatasourceBulkMembershipDefinitionTypedDict": ".datasourcebulkmembershipdefinition", + "DatasourceConfigurationResponse": ".datasourceconfigurationresponse", + "DatasourceConfigurationResponseTypedDict": ".datasourceconfigurationresponse", "DatasourceGroupDefinition": ".datasourcegroupdefinition", "DatasourceGroupDefinitionTypedDict": ".datasourcegroupdefinition", + "DatasourceInstanceConfiguration": ".datasourceinstanceconfiguration", + "DatasourceInstanceConfigurationTypedDict": ".datasourceinstanceconfiguration", "DatasourceMembershipDefinition": ".datasourcemembershipdefinition", "DatasourceMembershipDefinitionTypedDict": ".datasourcemembershipdefinition", "DatasourceObjectTypeDocumentCountEntry": ".datasourceobjecttypedocumentcountentry", @@ -3085,6 +3124,8 @@ "GetCollectionResponseTypedDict": ".getcollectionresponse", "GetDatasourceConfigRequest": ".getdatasourceconfigrequest", "GetDatasourceConfigRequestTypedDict": ".getdatasourceconfigrequest", + "GetDatasourceInstanceConfigurationRequest": ".getdatasourceinstanceconfigurationop", + "GetDatasourceInstanceConfigurationRequestTypedDict": ".getdatasourceinstanceconfigurationop", "GetDlpReportResponse": ".getdlpreportresponse", "GetDlpReportResponseTypedDict": ".getdlpreportresponse", "GetdocpermissionsRequestRequest": ".getdocpermissionsop", @@ -3497,6 +3538,10 @@ "UpdateAnnouncementRequestChannel": ".updateannouncementrequest", "UpdateAnnouncementRequestPostType": ".updateannouncementrequest", "UpdateAnnouncementRequestTypedDict": ".updateannouncementrequest", + "UpdateDatasourceConfigurationRequest": ".updatedatasourceconfigurationrequest", + "UpdateDatasourceConfigurationRequestTypedDict": ".updatedatasourceconfigurationrequest", + "UpdateDatasourceInstanceConfigurationRequest": ".updatedatasourceinstanceconfigurationop", + "UpdateDatasourceInstanceConfigurationRequestTypedDict": ".updatedatasourceinstanceconfigurationop", "UpdateDlpConfigRequest": ".updatedlpconfigrequest", "UpdateDlpConfigRequestTypedDict": ".updatedlpconfigrequest", "UpdateDlpConfigResponse": ".updatedlpconfigresponse", diff --git a/src/glean/api_client/models/actionsummary.py b/src/glean/api_client/models/actionsummary.py index ed3d1250..a547e75e 100644 --- a/src/glean/api_client/models/actionsummary.py +++ b/src/glean/api_client/models/actionsummary.py @@ -1,8 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from glean.api_client.types import BaseModel -from typing_extensions import TypedDict +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict class ActionSummaryTypedDict(TypedDict): @@ -12,6 +14,27 @@ class ActionSummaryTypedDict(TypedDict): r"""The unique identifier of the action.""" display_name: str r"""The display name of the action.""" + type: NotRequired[str] + r"""The type of tool - RETRIEVAL for read-only operations, ACTION for operations that modify data.""" + auth_type: NotRequired[str] + r"""The authentication type required - OAUTH_USER, OAUTH_ADMIN, API_KEY, BASIC_AUTH, DWD (domain-wide delegation), or NONE.""" + write_action_type: NotRequired[str] + r"""For write actions only - REDIRECT (client renders URL) or EXECUTION (external server call).""" + is_setup_finished: NotRequired[bool] + r"""Whether this action has been fully configured and validated.""" + data_source: NotRequired[str] + r"""Indicates the kind of knowledge a tool would access or modify. + Company knowledge: + - Glean search, and any native tools that derive from it (e.g., expert search, code search) + - Native federated tools to company data sources (e.g., outlook search) + World knowledge: + - Native tools that bring in public content (e.g., web browser) + - Platform action like bingwebsearch, geminiwebsearch, etc + Neutral knowledge: + - Native tools that don't access or modify content via APIs (e.g., file analyst, think) + - Platform read or write tools (creator has to determine their knowledge implications) + + """ class ActionSummary(BaseModel): @@ -22,3 +45,53 @@ class ActionSummary(BaseModel): display_name: str r"""The display name of the action.""" + + type: Optional[str] = None + r"""The type of tool - RETRIEVAL for read-only operations, ACTION for operations that modify data.""" + + auth_type: Optional[str] = None + r"""The authentication type required - OAUTH_USER, OAUTH_ADMIN, API_KEY, BASIC_AUTH, DWD (domain-wide delegation), or NONE.""" + + write_action_type: Optional[str] = None + r"""For write actions only - REDIRECT (client renders URL) or EXECUTION (external server call).""" + + is_setup_finished: Optional[bool] = None + r"""Whether this action has been fully configured and validated.""" + + data_source: Optional[str] = None + r"""Indicates the kind of knowledge a tool would access or modify. + Company knowledge: + - Glean search, and any native tools that derive from it (e.g., expert search, code search) + - Native federated tools to company data sources (e.g., outlook search) + World knowledge: + - Native tools that bring in public content (e.g., web browser) + - Platform action like bingwebsearch, geminiwebsearch, etc + Neutral knowledge: + - Native tools that don't access or modify content via APIs (e.g., file analyst, think) + - Platform read or write tools (creator has to determine their knowledge implications) + + """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "type", + "auth_type", + "write_action_type", + "is_setup_finished", + "data_source", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + 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/agentconfig.py b/src/glean/api_client/models/agentconfig.py index a4b95362..8ec290ed 100644 --- a/src/glean/api_client/models/agentconfig.py +++ b/src/glean/api_client/models/agentconfig.py @@ -3,14 +3,15 @@ from __future__ import annotations from .toolsets import ToolSets, ToolSetsTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class AgentEnum(str, Enum): +class AgentEnum(str, Enum, metaclass=utils.OpenEnumMeta): r"""Name of the agent.""" # Integrates with your company's knowledge. This will soon be deprecated in favor of the FAST and ADVANCED `agent` values @@ -27,7 +28,7 @@ class AgentEnum(str, Enum): AUTO = "AUTO" -class Mode(str, Enum): +class Mode(str, Enum, metaclass=utils.OpenEnumMeta): r"""Top level modes to run GleanChat in.""" # Used if no mode supplied. @@ -66,6 +67,24 @@ class AgentConfig(BaseModel): ] = None r"""Whether the agent should create an image.""" + @field_serializer("agent") + def serialize_agent(self, value): + if isinstance(value, str): + try: + return models.AgentEnum(value) + except ValueError: + return value + return value + + @field_serializer("mode") + def serialize_mode(self, value): + if isinstance(value, str): + try: + return models.Mode(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["agent", "toolSets", "mode", "useImageGeneration"]) diff --git a/src/glean/api_client/models/agentexecutionstatus.py b/src/glean/api_client/models/agentexecutionstatus.py index fa71fb35..b93cae26 100644 --- a/src/glean/api_client/models/agentexecutionstatus.py +++ b/src/glean/api_client/models/agentexecutionstatus.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class AgentExecutionStatus(str, Enum): +class AgentExecutionStatus(str, Enum, metaclass=utils.OpenEnumMeta): r"""The status of the run. One of 'error', 'success'.""" ERROR = "error" diff --git a/src/glean/api_client/models/agentrun.py b/src/glean/api_client/models/agentrun.py index 4c519b56..259808eb 100644 --- a/src/glean/api_client/models/agentrun.py +++ b/src/glean/api_client/models/agentrun.py @@ -3,8 +3,9 @@ from __future__ import annotations from .agentexecutionstatus import AgentExecutionStatus from .message import Message, MessageTypedDict +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Any, Dict, List, Optional from typing_extensions import NotRequired, TypedDict @@ -42,6 +43,15 @@ class AgentRun(BaseModel): status: Optional[AgentExecutionStatus] = None r"""The status of the run. One of 'error', 'success'.""" + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.AgentExecutionStatus(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["input", "messages", "metadata", "status"]) diff --git a/src/glean/api_client/models/announcement.py b/src/glean/api_client/models/announcement.py index 10be615e..3f5ec7e1 100644 --- a/src/glean/api_client/models/announcement.py +++ b/src/glean/api_client/models/announcement.py @@ -9,21 +9,22 @@ from .thumbnail import Thumbnail, ThumbnailTypedDict from datetime import datetime from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict -class AnnouncementChannel(str, Enum): +class AnnouncementChannel(str, Enum, metaclass=utils.OpenEnumMeta): r"""This determines whether this is a Social Feed post or a regular announcement.""" MAIN = "MAIN" SOCIAL_FEED = "SOCIAL_FEED" -class AnnouncementPostType(str, Enum): +class AnnouncementPostType(str, Enum, metaclass=utils.OpenEnumMeta): r"""This determines whether this is an external-link post or a regular announcement post. TEXT - Regular announcement that can contain rich text. LINK - Announcement that is linked to an external site.""" TEXT = "TEXT" @@ -187,6 +188,24 @@ class Announcement(BaseModel): is_published: Annotated[Optional[bool], pydantic.Field(alias="isPublished")] = None r"""Whether or not the announcement is published.""" + @field_serializer("channel") + def serialize_channel(self, value): + if isinstance(value, str): + try: + return models.AnnouncementChannel(value) + except ValueError: + return value + return value + + @field_serializer("post_type") + def serialize_post_type(self, value): + if isinstance(value, str): + try: + return models.AnnouncementPostType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/anonymousevent.py b/src/glean/api_client/models/anonymousevent.py index 03b8cf1d..4b4ef1d9 100644 --- a/src/glean/api_client/models/anonymousevent.py +++ b/src/glean/api_client/models/anonymousevent.py @@ -3,14 +3,15 @@ from __future__ import annotations from .timeinterval import TimeInterval, TimeIntervalTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class AnonymousEventEventType(str, Enum): +class AnonymousEventEventType(str, Enum, metaclass=utils.OpenEnumMeta): r"""The nature of the event, for example \"out of office\".""" DEFAULT = "DEFAULT" @@ -35,6 +36,15 @@ class AnonymousEvent(BaseModel): ] = None r"""The nature of the event, for example \"out of office\".""" + @field_serializer("event_type") + def serialize_event_type(self, value): + if isinstance(value, str): + try: + return models.AnonymousEventEventType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["time", "eventType"]) diff --git a/src/glean/api_client/models/answer.py b/src/glean/api_client/models/answer.py index b6791d1e..31b7944a 100644 --- a/src/glean/api_client/models/answer.py +++ b/src/glean/api_client/models/answer.py @@ -6,9 +6,10 @@ from .objectpermissions import ObjectPermissions, ObjectPermissionsTypedDict from datetime import datetime from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional, TYPE_CHECKING from typing_extensions import Annotated, NotRequired, TypedDict @@ -25,7 +26,7 @@ from .verification import Verification, VerificationTypedDict -class AnswerSourceType(str, Enum): +class AnswerSourceType(str, Enum, metaclass=utils.OpenEnumMeta): DOCUMENT = "DOCUMENT" ASSISTANT = "ASSISTANT" @@ -157,6 +158,15 @@ class Answer(BaseModel): Optional["Document"], pydantic.Field(alias="sourceDocument") ] = None + @field_serializer("source_type") + def serialize_source_type(self, value): + if isinstance(value, str): + try: + return models.AnswerSourceType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/authconfig.py b/src/glean/api_client/models/authconfig.py index 4179e9d2..86f978f5 100644 --- a/src/glean/api_client/models/authconfig.py +++ b/src/glean/api_client/models/authconfig.py @@ -3,14 +3,15 @@ from __future__ import annotations from datetime import datetime from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict -class AuthConfigType(str, Enum): +class AuthConfigType(str, Enum, metaclass=utils.OpenEnumMeta): r"""The type of authentication being used. Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token. 'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users. @@ -27,14 +28,14 @@ class AuthConfigType(str, Enum): DWD = "DWD" -class GrantType(str, Enum): +class GrantType(str, Enum, metaclass=utils.OpenEnumMeta): r"""The type of grant type being used.""" AUTH_CODE = "AUTH_CODE" CLIENT_CREDENTIALS = "CLIENT_CREDENTIALS" -class AuthConfigStatus(str, Enum): +class AuthConfigStatus(str, Enum, metaclass=utils.OpenEnumMeta): r"""Auth status of the tool.""" AWAITING_AUTH = "AWAITING_AUTH" @@ -116,6 +117,33 @@ class AuthConfig(BaseModel): ] = None r"""The time the tool was last authorized in ISO format (ISO 8601).""" + @field_serializer("type") + def serialize_type(self, value): + if isinstance(value, str): + try: + return models.AuthConfigType(value) + except ValueError: + return value + return value + + @field_serializer("grant_type") + def serialize_grant_type(self, value): + if isinstance(value, str): + try: + return models.GrantType(value) + except ValueError: + return value + return value + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.AuthConfigStatus(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/authstatus.py b/src/glean/api_client/models/authstatus.py index 0916a831..ea66e454 100644 --- a/src/glean/api_client/models/authstatus.py +++ b/src/glean/api_client/models/authstatus.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class AuthStatus(str, Enum): +class AuthStatus(str, Enum, metaclass=utils.OpenEnumMeta): r"""The per-user authorization status for a datasource.""" DISABLED = "DISABLED" diff --git a/src/glean/api_client/models/autocompleteresult.py b/src/glean/api_client/models/autocompleteresult.py index 2a7b1789..cd95aafb 100644 --- a/src/glean/api_client/models/autocompleteresult.py +++ b/src/glean/api_client/models/autocompleteresult.py @@ -7,14 +7,15 @@ from .structuredresult import StructuredResult, StructuredResultTypedDict from .textrange import TextRange, TextRangeTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict -class AutocompleteResultResultType(str, Enum): +class AutocompleteResultResultType(str, Enum, metaclass=utils.OpenEnumMeta): ADDITIONAL_DOCUMENT = "ADDITIONAL_DOCUMENT" APP = "APP" BROWSER_HISTORY = "BROWSER_HISTORY" @@ -88,6 +89,15 @@ class AutocompleteResult(BaseModel): ranges: Optional[List[TextRange]] = None r"""Subsections of the result string to which some special formatting should be applied (eg. bold)""" + @field_serializer("result_type") + def serialize_result_type(self, value): + if isinstance(value, str): + try: + return models.AutocompleteResultResultType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/bulkuploadhistoryevent.py b/src/glean/api_client/models/bulkuploadhistoryevent.py index a5e3d43d..19b02462 100644 --- a/src/glean/api_client/models/bulkuploadhistoryevent.py +++ b/src/glean/api_client/models/bulkuploadhistoryevent.py @@ -2,21 +2,22 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class BulkUploadHistoryEventStatus(str, Enum): +class BulkUploadHistoryEventStatus(str, Enum, metaclass=utils.OpenEnumMeta): r"""The status of the upload, an enum of ACTIVE, SUCCESSFUL""" ACTIVE = "ACTIVE" SUCCESSFUL = "SUCCESSFUL" -class ProcessingState(str, Enum): +class ProcessingState(str, Enum, metaclass=utils.OpenEnumMeta): r"""The current state of the upload, an enum of UNAVAILABLE, UPLOAD STARTED, UPLOAD IN PROGRESS, UPLOAD COMPLETED, DELETION PAUSED, INDEXING COMPLETED""" UNAVAILABLE = "UNAVAILABLE" @@ -62,6 +63,24 @@ class BulkUploadHistoryEvent(BaseModel): ] = None r"""The current state of the upload, an enum of UNAVAILABLE, UPLOAD STARTED, UPLOAD IN PROGRESS, UPLOAD COMPLETED, DELETION PAUSED, INDEXING COMPLETED""" + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.BulkUploadHistoryEventStatus(value) + except ValueError: + return value + return value + + @field_serializer("processing_state") + def serialize_processing_state(self, value): + if isinstance(value, str): + try: + return models.ProcessingState(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/calendarattendee.py b/src/glean/api_client/models/calendarattendee.py index 3f79c72a..a9376eb5 100644 --- a/src/glean/api_client/models/calendarattendee.py +++ b/src/glean/api_client/models/calendarattendee.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional, TYPE_CHECKING from typing_extensions import Annotated, NotRequired, TypedDict @@ -12,7 +13,7 @@ from .person import Person, PersonTypedDict -class ResponseStatus(str, Enum): +class ResponseStatus(str, Enum, metaclass=utils.OpenEnumMeta): ACCEPTED = "ACCEPTED" DECLINED = "DECLINED" NO_RESPONSE = "NO_RESPONSE" @@ -48,6 +49,15 @@ class CalendarAttendee(BaseModel): Optional[ResponseStatus], pydantic.Field(alias="responseStatus") ] = None + @field_serializer("response_status") + def serialize_response_status(self, value): + if isinstance(value, str): + try: + return models.ResponseStatus(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/calendarevent.py b/src/glean/api_client/models/calendarevent.py index bf08702d..9fe34430 100644 --- a/src/glean/api_client/models/calendarevent.py +++ b/src/glean/api_client/models/calendarevent.py @@ -7,14 +7,15 @@ from .generatedattachment import GeneratedAttachment, GeneratedAttachmentTypedDict from .timeinterval import TimeInterval, TimeIntervalTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict -class CalendarEventEventType(str, Enum): +class CalendarEventEventType(str, Enum, metaclass=utils.OpenEnumMeta): r"""The nature of the event, for example \"out of office\".""" DEFAULT = "DEFAULT" @@ -95,6 +96,15 @@ class CalendarEvent(BaseModel): pydantic.Field(alias="generatedAttachments"), ] = None + @field_serializer("event_type") + def serialize_event_type(self, value): + if isinstance(value, str): + try: + return models.CalendarEventEventType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/channelinviteinfo.py b/src/glean/api_client/models/channelinviteinfo.py index d7d38ee4..f8743a88 100644 --- a/src/glean/api_client/models/channelinviteinfo.py +++ b/src/glean/api_client/models/channelinviteinfo.py @@ -3,9 +3,10 @@ from __future__ import annotations from .communicationchannel import CommunicationChannel from datetime import datetime +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional, TYPE_CHECKING from typing_extensions import Annotated, NotRequired, TypedDict @@ -48,6 +49,15 @@ class ChannelInviteInfo(BaseModel): ] = None r"""The time this person was reminded in ISO format (ISO 8601) if a reminder was sent.""" + @field_serializer("channel") + def serialize_channel(self, value): + if isinstance(value, str): + try: + return models.CommunicationChannel(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/chatfilefailurereason.py b/src/glean/api_client/models/chatfilefailurereason.py index fdae3190..cb81e15e 100644 --- a/src/glean/api_client/models/chatfilefailurereason.py +++ b/src/glean/api_client/models/chatfilefailurereason.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class ChatFileFailureReason(str, Enum): +class ChatFileFailureReason(str, Enum, metaclass=utils.OpenEnumMeta): r"""Reason for failed status.""" PARSE_FAILED = "PARSE_FAILED" diff --git a/src/glean/api_client/models/chatfilemetadata.py b/src/glean/api_client/models/chatfilemetadata.py index 2c657df7..73d55cac 100644 --- a/src/glean/api_client/models/chatfilemetadata.py +++ b/src/glean/api_client/models/chatfilemetadata.py @@ -3,9 +3,10 @@ from __future__ import annotations from .chatfilefailurereason import ChatFileFailureReason from .chatfilestatus import ChatFileStatus +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -47,6 +48,24 @@ class ChatFileMetadata(BaseModel): mime_type: Annotated[Optional[str], pydantic.Field(alias="mimeType")] = None r"""MIME type of the file.""" + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.ChatFileStatus(value) + except ValueError: + return value + return value + + @field_serializer("failure_reason") + def serialize_failure_reason(self, value): + if isinstance(value, str): + try: + return models.ChatFileFailureReason(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/chatfilestatus.py b/src/glean/api_client/models/chatfilestatus.py index c9a17724..0628b167 100644 --- a/src/glean/api_client/models/chatfilestatus.py +++ b/src/glean/api_client/models/chatfilestatus.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class ChatFileStatus(str, Enum): +class ChatFileStatus(str, Enum, metaclass=utils.OpenEnumMeta): r"""Current status of the file.""" PROCESSING = "PROCESSING" diff --git a/src/glean/api_client/models/chatmessage.py b/src/glean/api_client/models/chatmessage.py index 1755a240..16aa62ea 100644 --- a/src/glean/api_client/models/chatmessage.py +++ b/src/glean/api_client/models/chatmessage.py @@ -5,19 +5,20 @@ from .chatmessagecitation import ChatMessageCitation, ChatMessageCitationTypedDict from .chatmessagefragment import ChatMessageFragment, ChatMessageFragmentTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict -class Author(str, Enum): +class Author(str, Enum, metaclass=utils.OpenEnumMeta): USER = "USER" GLEAN_AI = "GLEAN_AI" -class MessageType(str, Enum): +class MessageType(str, Enum, metaclass=utils.OpenEnumMeta): r"""Semantically groups content of a certain type. It can be used for purposes such as differential UI treatment. USER authored messages should be of type CONTENT and do not need `messageType` specified.""" # An intermediate state message for progress updates. @@ -127,6 +128,24 @@ class ChatMessage(BaseModel): ] = None r"""Signals there are additional response fragments incoming.""" + @field_serializer("author") + def serialize_author(self, value): + if isinstance(value, str): + try: + return models.Author(value) + except ValueError: + return value + return value + + @field_serializer("message_type") + def serialize_message_type(self, value): + if isinstance(value, str): + try: + return models.MessageType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/chatresponse.py b/src/glean/api_client/models/chatresponse.py index 1ca61712..1d9c491f 100644 --- a/src/glean/api_client/models/chatresponse.py +++ b/src/glean/api_client/models/chatresponse.py @@ -2,10 +2,6 @@ from __future__ import annotations from .chatmessage import ChatMessage, ChatMessageTypedDict -from .unauthorizeddatasourceinstance import ( - UnauthorizedDatasourceInstance, - UnauthorizedDatasourceInstanceTypedDict, -) from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic from pydantic import model_serializer @@ -25,12 +21,6 @@ class ChatResponseTypedDict(TypedDict): r"""Time in milliseconds the backend took to respond to the request.""" chat_session_tracking_token: NotRequired[str] r"""A token that is used to track the session.""" - unauthorized_datasource_instances: NotRequired[ - List[UnauthorizedDatasourceInstanceTypedDict] - ] - r"""Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth, aggregated across all tools invoked in this turn. - - """ class ChatResponse(BaseModel): @@ -56,14 +46,6 @@ class ChatResponse(BaseModel): ] = None r"""A token that is used to track the session.""" - unauthorized_datasource_instances: Annotated[ - Optional[List[UnauthorizedDatasourceInstance]], - pydantic.Field(alias="unauthorizedDatasourceInstances"), - ] = None - r"""Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth, aggregated across all tools invoked in this turn. - - """ - @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -73,7 +55,6 @@ def serialize_model(self, handler): "followUpPrompts", "backendTimeMillis", "chatSessionTrackingToken", - "unauthorizedDatasourceInstances", ] ) serialized = handler(self) diff --git a/src/glean/api_client/models/clustergroup.py b/src/glean/api_client/models/clustergroup.py index e8a93332..64317cf2 100644 --- a/src/glean/api_client/models/clustergroup.py +++ b/src/glean/api_client/models/clustergroup.py @@ -2,9 +2,10 @@ from __future__ import annotations from .clustertypeenum import ClusterTypeEnum +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional, TYPE_CHECKING from typing_extensions import Annotated, NotRequired, TypedDict @@ -35,6 +36,15 @@ class ClusterGroup(BaseModel): ] = None r"""The reason for inclusion of clusteredResults.""" + @field_serializer("cluster_type") + def serialize_cluster_type(self, value): + if isinstance(value, str): + try: + return models.ClusterTypeEnum(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["clusteredResults", "clusterType"]) diff --git a/src/glean/api_client/models/clustertypeenum.py b/src/glean/api_client/models/clustertypeenum.py index 3e83e2ef..d599d8ac 100644 --- a/src/glean/api_client/models/clustertypeenum.py +++ b/src/glean/api_client/models/clustertypeenum.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class ClusterTypeEnum(str, Enum): +class ClusterTypeEnum(str, Enum, metaclass=utils.OpenEnumMeta): r"""The reason for inclusion of clusteredResults.""" SIMILAR = "SIMILAR" diff --git a/src/glean/api_client/models/collectionerror.py b/src/glean/api_client/models/collectionerror.py index ed055eda..ef1aa0da 100644 --- a/src/glean/api_client/models/collectionerror.py +++ b/src/glean/api_client/models/collectionerror.py @@ -2,12 +2,14 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel import pydantic +from pydantic import field_serializer from typing_extensions import Annotated, TypedDict -class CollectionErrorErrorCode(str, Enum): +class CollectionErrorErrorCode(str, Enum, metaclass=utils.OpenEnumMeta): NAME_EXISTS = "NAME_EXISTS" NOT_FOUND = "NOT_FOUND" COLLECTION_PINNED = "COLLECTION_PINNED" @@ -24,6 +26,15 @@ class CollectionErrorTypedDict(TypedDict): class CollectionError(BaseModel): error_code: Annotated[CollectionErrorErrorCode, pydantic.Field(alias="errorCode")] + @field_serializer("error_code") + def serialize_error_code(self, value): + if isinstance(value, str): + try: + return models.CollectionErrorErrorCode(value) + except ValueError: + return value + return value + try: CollectionError.model_rebuild() diff --git a/src/glean/api_client/models/collectionitem.py b/src/glean/api_client/models/collectionitem.py index 5a4f41f2..0f05f119 100644 --- a/src/glean/api_client/models/collectionitem.py +++ b/src/glean/api_client/models/collectionitem.py @@ -3,9 +3,10 @@ from __future__ import annotations from datetime import datetime from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional, TYPE_CHECKING from typing_extensions import Annotated, NotRequired, TypedDict @@ -16,7 +17,7 @@ from .shortcut import Shortcut, ShortcutTypedDict -class CollectionItemItemType(str, Enum): +class CollectionItemItemType(str, Enum, metaclass=utils.OpenEnumMeta): DOCUMENT = "DOCUMENT" TEXT = "TEXT" URL = "URL" @@ -82,6 +83,15 @@ class CollectionItem(BaseModel): collection: Optional["Collection"] = None + @field_serializer("item_type") + def serialize_item_type(self, value): + if isinstance(value, str): + try: + return models.CollectionItemItemType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/collectionpinnablecategories.py b/src/glean/api_client/models/collectionpinnablecategories.py index d28cd94a..55c467b9 100644 --- a/src/glean/api_client/models/collectionpinnablecategories.py +++ b/src/glean/api_client/models/collectionpinnablecategories.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class CollectionPinnableCategories(str, Enum): +class CollectionPinnableCategories(str, Enum, metaclass=utils.OpenEnumMeta): r"""Categories a Collection can be pinned to.""" COMPANY_RESOURCE = "COMPANY_RESOURCE" diff --git a/src/glean/api_client/models/collectionpinnabletargets.py b/src/glean/api_client/models/collectionpinnabletargets.py index eac2d5e7..c440d473 100644 --- a/src/glean/api_client/models/collectionpinnabletargets.py +++ b/src/glean/api_client/models/collectionpinnabletargets.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class CollectionPinnableTargets(str, Enum): +class CollectionPinnableTargets(str, Enum, metaclass=utils.OpenEnumMeta): r"""What targets can a Collection be pinned to.""" RESOURCE_CARD = "RESOURCE_CARD" diff --git a/src/glean/api_client/models/collectionpintarget.py b/src/glean/api_client/models/collectionpintarget.py index 173bcf4f..54c8ec92 100644 --- a/src/glean/api_client/models/collectionpintarget.py +++ b/src/glean/api_client/models/collectionpintarget.py @@ -3,8 +3,9 @@ from __future__ import annotations from .collectionpinnablecategories import CollectionPinnableCategories from .collectionpinnabletargets import CollectionPinnableTargets +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -28,6 +29,24 @@ class CollectionPinTarget(BaseModel): target: Optional[CollectionPinnableTargets] = None r"""What targets can a Collection be pinned to.""" + @field_serializer("category") + def serialize_category(self, value): + if isinstance(value, str): + try: + return models.CollectionPinnableCategories(value) + except ValueError: + return value + return value + + @field_serializer("target") + def serialize_target(self, value): + if isinstance(value, str): + try: + return models.CollectionPinnableTargets(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["value", "target"]) diff --git a/src/glean/api_client/models/communicationchannel.py b/src/glean/api_client/models/communicationchannel.py index e315cc1d..36d9d830 100644 --- a/src/glean/api_client/models/communicationchannel.py +++ b/src/glean/api_client/models/communicationchannel.py @@ -2,8 +2,9 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class CommunicationChannel(str, Enum): +class CommunicationChannel(str, Enum, metaclass=utils.OpenEnumMeta): COMMUNICATION_CHANNEL_EMAIL = "COMMUNICATION_CHANNEL_EMAIL" COMMUNICATION_CHANNEL_SLACK = "COMMUNICATION_CHANNEL_SLACK" diff --git a/src/glean/api_client/models/conferencedata.py b/src/glean/api_client/models/conferencedata.py index a890a8d1..805276d0 100644 --- a/src/glean/api_client/models/conferencedata.py +++ b/src/glean/api_client/models/conferencedata.py @@ -2,18 +2,19 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict -class Provider(str, Enum): +class Provider(str, Enum, metaclass=utils.OpenEnumMeta): ZOOM = "ZOOM" HANGOUTS = "HANGOUTS" -class ConferenceDataSource(str, Enum): +class ConferenceDataSource(str, Enum, metaclass=utils.OpenEnumMeta): NATIVE_CONFERENCE = "NATIVE_CONFERENCE" LOCATION = "LOCATION" DESCRIPTION = "DESCRIPTION" @@ -34,6 +35,24 @@ class ConferenceData(BaseModel): source: Optional[ConferenceDataSource] = None + @field_serializer("provider") + def serialize_provider(self, value): + if isinstance(value, str): + try: + return models.Provider(value) + except ValueError: + return value + return value + + @field_serializer("source") + def serialize_source(self, value): + if isinstance(value, str): + try: + return models.ConferenceDataSource(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["source"]) diff --git a/src/glean/api_client/models/configurationvalue.py b/src/glean/api_client/models/configurationvalue.py new file mode 100644 index 00000000..2055a0a3 --- /dev/null +++ b/src/glean/api_client/models/configurationvalue.py @@ -0,0 +1,49 @@ +"""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 List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConfigurationValueTypedDict(TypedDict): + r"""A single configuration value, either a scalar or a list""" + + value: NotRequired[str] + r"""The configuration value as a string. Only one of value or valueList should be populated.""" + value_list: NotRequired[List[str]] + r"""The configuration value as a list of strings. Only one of value or valueList should be populated.""" + + +class ConfigurationValue(BaseModel): + r"""A single configuration value, either a scalar or a list""" + + value: Optional[str] = None + r"""The configuration value as a string. Only one of value or valueList should be populated.""" + + value_list: Annotated[Optional[List[str]], pydantic.Field(alias="valueList")] = None + r"""The configuration value as a list of strings. Only one of value or valueList should be populated.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["value", "valueList"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + ConfigurationValue.model_rebuild() +except NameError: + pass diff --git a/src/glean/api_client/models/connectortype.py b/src/glean/api_client/models/connectortype.py index 8d612d97..8e99dab8 100644 --- a/src/glean/api_client/models/connectortype.py +++ b/src/glean/api_client/models/connectortype.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class ConnectorType(str, Enum): +class ConnectorType(str, Enum, metaclass=utils.OpenEnumMeta): r"""The source from which document content was pulled, e.g. an API crawl or browser history""" API_CRAWL = "API_CRAWL" diff --git a/src/glean/api_client/models/createdlpreportrequest.py b/src/glean/api_client/models/createdlpreportrequest.py index aa1c7eff..1af31f17 100644 --- a/src/glean/api_client/models/createdlpreportrequest.py +++ b/src/glean/api_client/models/createdlpreportrequest.py @@ -3,9 +3,10 @@ from __future__ import annotations from .dlpconfig import DlpConfig, DlpConfigTypedDict from .dlpfrequency import DlpFrequency +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -36,6 +37,15 @@ class CreateDlpReportRequest(BaseModel): ) r"""Controls whether the policy should hide documents with violations.""" + @field_serializer("frequency") + def serialize_frequency(self, value): + if isinstance(value, str): + try: + return models.DlpFrequency(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["name", "config", "frequency", "autoHideDocs"]) diff --git a/src/glean/api_client/models/customdatasourceconfig.py b/src/glean/api_client/models/customdatasourceconfig.py index 1e4a488d..919ca09d 100644 --- a/src/glean/api_client/models/customdatasourceconfig.py +++ b/src/glean/api_client/models/customdatasourceconfig.py @@ -8,14 +8,15 @@ from .objectdefinition import ObjectDefinition, ObjectDefinitionTypedDict from .quicklink import Quicklink, QuicklinkTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict -class DatasourceCategory(str, Enum): +class DatasourceCategory(str, Enum, metaclass=utils.OpenEnumMeta): r"""The type of this datasource. It is an important signal for relevance and must be specified and cannot be UNCATEGORIZED. Please refer to [this](https://developers.glean.com/docs/indexing_api_datasource_category/) for more details.""" UNCATEGORIZED = "UNCATEGORIZED" @@ -38,14 +39,14 @@ class DatasourceCategory(str, Enum): AGENTS = "AGENTS" -class HideBuiltInFacet(str, Enum): +class HideBuiltInFacet(str, Enum, metaclass=utils.OpenEnumMeta): TYPE = "TYPE" TAG = "TAG" AUTHOR = "AUTHOR" OWNER = "OWNER" -class CustomDatasourceConfigConnectorType(str, Enum): +class CustomDatasourceConfigConnectorType(str, Enum, metaclass=utils.OpenEnumMeta): r"""The source from which document content was pulled, e.g. an API crawl or browser history""" API_CRAWL = "API_CRAWL" @@ -238,6 +239,24 @@ class CustomDatasourceConfig(BaseModel): ] = False r"""True if this datasource will be used for testing purpose only. Documents from such a datasource wouldn't have any effect on search rankings.""" + @field_serializer("datasource_category") + def serialize_datasource_category(self, value): + if isinstance(value, str): + try: + return models.DatasourceCategory(value) + except ValueError: + return value + return value + + @field_serializer("connector_type") + def serialize_connector_type(self, value): + if isinstance(value, str): + try: + return models.CustomDatasourceConfigConnectorType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/customsensitiverule.py b/src/glean/api_client/models/customsensitiverule.py index b1c06a84..15b45973 100644 --- a/src/glean/api_client/models/customsensitiverule.py +++ b/src/glean/api_client/models/customsensitiverule.py @@ -3,14 +3,15 @@ from __future__ import annotations from .customsensitiveruletype import CustomSensitiveRuleType from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class CustomSensitiveRuleLikelihoodThreshold(str, Enum): +class CustomSensitiveRuleLikelihoodThreshold(str, Enum, metaclass=utils.OpenEnumMeta): r"""Likelihood threshold for BUILT_IN infotypes (e.g., LIKELY, VERY_LIKELY). Only applicable for BUILT_IN type.""" LIKELY = "LIKELY" @@ -47,6 +48,24 @@ class CustomSensitiveRule(BaseModel): ] = None r"""Likelihood threshold for BUILT_IN infotypes (e.g., LIKELY, VERY_LIKELY). Only applicable for BUILT_IN type.""" + @field_serializer("type") + def serialize_type(self, value): + if isinstance(value, str): + try: + return models.CustomSensitiveRuleType(value) + except ValueError: + return value + return value + + @field_serializer("likelihood_threshold") + def serialize_likelihood_threshold(self, value): + if isinstance(value, str): + try: + return models.CustomSensitiveRuleLikelihoodThreshold(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["id", "value", "type", "likelihoodThreshold"]) diff --git a/src/glean/api_client/models/customsensitiveruletype.py b/src/glean/api_client/models/customsensitiveruletype.py index be887e84..b273ac98 100644 --- a/src/glean/api_client/models/customsensitiveruletype.py +++ b/src/glean/api_client/models/customsensitiveruletype.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class CustomSensitiveRuleType(str, Enum): +class CustomSensitiveRuleType(str, Enum, metaclass=utils.OpenEnumMeta): r"""Type of the custom sensitive rule.""" REGEX = "REGEX" diff --git a/src/glean/api_client/models/datasourceconfigurationresponse.py b/src/glean/api_client/models/datasourceconfigurationresponse.py new file mode 100644 index 00000000..15b227d9 --- /dev/null +++ b/src/glean/api_client/models/datasourceconfigurationresponse.py @@ -0,0 +1,23 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .datasourceinstanceconfiguration import ( + DatasourceInstanceConfiguration, + DatasourceInstanceConfigurationTypedDict, +) +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class DatasourceConfigurationResponseTypedDict(TypedDict): + r"""The greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist are included.""" + + configuration: DatasourceInstanceConfigurationTypedDict + r"""Configuration for a datasource instance""" + + +class DatasourceConfigurationResponse(BaseModel): + r"""The greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist are included.""" + + configuration: DatasourceInstanceConfiguration + r"""Configuration for a datasource instance""" diff --git a/src/glean/api_client/models/datasourceinstanceconfiguration.py b/src/glean/api_client/models/datasourceinstanceconfiguration.py new file mode 100644 index 00000000..de6cd8aa --- /dev/null +++ b/src/glean/api_client/models/datasourceinstanceconfiguration.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .configurationvalue import ConfigurationValue, ConfigurationValueTypedDict +from glean.api_client.types import BaseModel +from typing import Dict +from typing_extensions import TypedDict + + +class DatasourceInstanceConfigurationTypedDict(TypedDict): + r"""Configuration for a datasource instance""" + + values: Dict[str, ConfigurationValueTypedDict] + r"""A map from configuration key names to their values""" + + +class DatasourceInstanceConfiguration(BaseModel): + r"""Configuration for a datasource instance""" + + values: Dict[str, ConfigurationValue] + r"""A map from configuration key names to their values""" diff --git a/src/glean/api_client/models/debugdatasourcestatusresponse.py b/src/glean/api_client/models/debugdatasourcestatusresponse.py index 46212470..9ebfaf15 100644 --- a/src/glean/api_client/models/debugdatasourcestatusresponse.py +++ b/src/glean/api_client/models/debugdatasourcestatusresponse.py @@ -18,9 +18,10 @@ ProcessingHistoryEventTypedDict, ) from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -138,7 +139,7 @@ def serialize_model(self, handler): return m -class DatasourceVisibility(str, Enum): +class DatasourceVisibility(str, Enum, metaclass=utils.OpenEnumMeta): r"""The visibility of the datasource, an enum of VISIBLE_TO_ALL, VISIBLE_TO_TEST_GROUP, NOT_VISIBLE""" ENABLED_FOR_ALL = "ENABLED_FOR_ALL" @@ -167,6 +168,15 @@ class DebugDatasourceStatusResponse(BaseModel): ] = None r"""The visibility of the datasource, an enum of VISIBLE_TO_ALL, VISIBLE_TO_TEST_GROUP, NOT_VISIBLE""" + @field_serializer("datasource_visibility") + def serialize_datasource_visibility(self, value): + if isinstance(value, str): + try: + return models.DatasourceVisibility(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["documents", "identity", "datasourceVisibility"]) diff --git a/src/glean/api_client/models/digestsection.py b/src/glean/api_client/models/digestsection.py index 3916bd17..0aafd8aa 100644 --- a/src/glean/api_client/models/digestsection.py +++ b/src/glean/api_client/models/digestsection.py @@ -3,9 +3,10 @@ from __future__ import annotations from .digestupdate import DigestUpdate, DigestUpdateTypedDict from .sectiontype import SectionType +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -60,6 +61,15 @@ class DigestSection(BaseModel): url: Optional[str] = None r"""Optional URL for the digest section. Should be populated only if the section is a CHANNEL type section.""" + @field_serializer("type") + def serialize_type(self, value): + if isinstance(value, str): + try: + return models.SectionType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/digestupdate.py b/src/glean/api_client/models/digestupdate.py index caba0d3b..dc68cb9a 100644 --- a/src/glean/api_client/models/digestupdate.py +++ b/src/glean/api_client/models/digestupdate.py @@ -2,8 +2,9 @@ from __future__ import annotations from .updatetype import UpdateType +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -42,6 +43,15 @@ class DigestUpdate(BaseModel): type: Optional[UpdateType] = None r"""Optional type classification for the update.""" + @field_serializer("type") + def serialize_type(self, value): + if isinstance(value, str): + try: + return models.UpdateType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["urls", "url", "title", "datasource", "summary", "type"]) diff --git a/src/glean/api_client/models/disambiguation.py b/src/glean/api_client/models/disambiguation.py index e4bf574e..4c2f6f06 100644 --- a/src/glean/api_client/models/disambiguation.py +++ b/src/glean/api_client/models/disambiguation.py @@ -2,8 +2,9 @@ from __future__ import annotations from .entitytype import EntityType +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -31,6 +32,15 @@ class Disambiguation(BaseModel): type: Optional[EntityType] = None r"""The type of entity.""" + @field_serializer("type") + def serialize_type(self, value): + if isinstance(value, str): + try: + return models.EntityType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["name", "id", "type"]) diff --git a/src/glean/api_client/models/dlpfindingfilter.py b/src/glean/api_client/models/dlpfindingfilter.py index 4b8b5377..5ff0c89d 100644 --- a/src/glean/api_client/models/dlpfindingfilter.py +++ b/src/glean/api_client/models/dlpfindingfilter.py @@ -3,9 +3,10 @@ from __future__ import annotations from .dlpseverity import DlpSeverity from .timerangefilter import TimeRangeFilter, TimeRangeFilterTypedDict +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -52,6 +53,15 @@ class DlpFindingFilter(BaseModel): archived: Optional[bool] = None + @field_serializer("severity") + def serialize_severity(self, value): + if isinstance(value, str): + try: + return models.DlpSeverity(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/dlpfrequency.py b/src/glean/api_client/models/dlpfrequency.py index a7da3a83..334f894f 100644 --- a/src/glean/api_client/models/dlpfrequency.py +++ b/src/glean/api_client/models/dlpfrequency.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class DlpFrequency(str, Enum): +class DlpFrequency(str, Enum, metaclass=utils.OpenEnumMeta): r"""Interval between scans. DAILY is deprecated.""" ONCE = "ONCE" diff --git a/src/glean/api_client/models/dlpreport.py b/src/glean/api_client/models/dlpreport.py index 706524ef..457ebe8a 100644 --- a/src/glean/api_client/models/dlpreport.py +++ b/src/glean/api_client/models/dlpreport.py @@ -6,14 +6,15 @@ from .dlpperson import DlpPerson, DlpPersonTypedDict from .dlpreportstatus import DlpReportStatus from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class LastScanStatus(str, Enum): +class LastScanStatus(str, Enum, metaclass=utils.OpenEnumMeta): PENDING = "PENDING" SUCCESS = "SUCCESS" FAILURE = "FAILURE" @@ -92,6 +93,33 @@ class DlpReport(BaseModel): updated_by: Annotated[Optional[DlpPerson], pydantic.Field(alias="updatedBy")] = None r"""Details about the person who created this report/policy.""" + @field_serializer("frequency") + def serialize_frequency(self, value): + if isinstance(value, str): + try: + return models.DlpFrequency(value) + except ValueError: + return value + return value + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.DlpReportStatus(value) + except ValueError: + return value + return value + + @field_serializer("last_scan_status") + def serialize_last_scan_status(self, value): + if isinstance(value, str): + try: + return models.LastScanStatus(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/dlpreportstatus.py b/src/glean/api_client/models/dlpreportstatus.py index 89f5b52f..c7768ce7 100644 --- a/src/glean/api_client/models/dlpreportstatus.py +++ b/src/glean/api_client/models/dlpreportstatus.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class DlpReportStatus(str, Enum): +class DlpReportStatus(str, Enum, metaclass=utils.OpenEnumMeta): r"""The status of the policy/report. Only ACTIVE status will be picked for scans.""" ACTIVE = "ACTIVE" diff --git a/src/glean/api_client/models/dlpseverity.py b/src/glean/api_client/models/dlpseverity.py index 625f32b8..bd785981 100644 --- a/src/glean/api_client/models/dlpseverity.py +++ b/src/glean/api_client/models/dlpseverity.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class DlpSeverity(str, Enum): +class DlpSeverity(str, Enum, metaclass=utils.OpenEnumMeta): r"""Severity levels for DLP findings and analyses.""" UNSPECIFIED = "UNSPECIFIED" diff --git a/src/glean/api_client/models/dlpsimpleresult.py b/src/glean/api_client/models/dlpsimpleresult.py index 83e95325..212efae1 100644 --- a/src/glean/api_client/models/dlpsimpleresult.py +++ b/src/glean/api_client/models/dlpsimpleresult.py @@ -2,8 +2,9 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class DlpSimpleResult(str, Enum): +class DlpSimpleResult(str, Enum, metaclass=utils.OpenEnumMeta): SUCCESS = "SUCCESS" FAILURE = "FAILURE" diff --git a/src/glean/api_client/models/document.py b/src/glean/api_client/models/document.py index 43f4b20e..88171691 100644 --- a/src/glean/api_client/models/document.py +++ b/src/glean/api_client/models/document.py @@ -4,9 +4,10 @@ from .connectortype import ConnectorType from .documentcontent import DocumentContent, DocumentContentTypedDict from .documentsection import DocumentSection, DocumentSectionTypedDict +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional, TYPE_CHECKING from typing_extensions import Annotated, NotRequired, TypedDict @@ -71,6 +72,15 @@ class Document(BaseModel): sections: Optional[List[DocumentSection]] = None r"""A list of content sub-sections in the document, e.g. text blocks with different headings in a Drive doc or Confluence page.""" + @field_serializer("connector_type") + def serialize_connector_type(self, value): + if isinstance(value, str): + try: + return models.ConnectorType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/documentmetadata.py b/src/glean/api_client/models/documentmetadata.py index 19cb2dc2..6fd3ba73 100644 --- a/src/glean/api_client/models/documentmetadata.py +++ b/src/glean/api_client/models/documentmetadata.py @@ -9,9 +9,10 @@ from .thumbnail import Thumbnail, ThumbnailTypedDict from .viewerinfo import ViewerInfo, ViewerInfoTypedDict from datetime import datetime +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Dict, List, Optional, TYPE_CHECKING from typing_extensions import Annotated, NotRequired, TypedDict @@ -228,6 +229,15 @@ class DocumentMetadata(BaseModel): ancestors: Optional[List["Document"]] = None r"""A list of documents that are ancestors of this document in the hierarchy of the document's datasource, for example parent folders or containers. Ancestors can be of different types and some may not be indexed. Higher level ancestors appear earlier in the list.""" + @field_serializer("visibility") + def serialize_visibility(self, value): + if isinstance(value, str): + try: + return models.DocumentVisibility(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/documentspec_union.py b/src/glean/api_client/models/documentspec_union.py index f0509023..368263cd 100644 --- a/src/glean/api_client/models/documentspec_union.py +++ b/src/glean/api_client/models/documentspec_union.py @@ -2,14 +2,15 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict -class DocumentSpecUgcType2(str, Enum): +class DocumentSpecUgcType2(str, Enum, metaclass=utils.OpenEnumMeta): r"""The type of the user generated content (UGC datasource).""" ANNOUNCEMENTS = "ANNOUNCEMENTS" @@ -38,6 +39,15 @@ class DocumentSpec4(BaseModel): doc_type: Annotated[Optional[str], pydantic.Field(alias="docType")] = None r"""The specific type of the user generated content type.""" + @field_serializer("ugc_type") + def serialize_ugc_type(self, value): + if isinstance(value, str): + try: + return models.DocumentSpecUgcType2(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["docType"]) @@ -55,7 +65,7 @@ def serialize_model(self, handler): return m -class DocumentSpecUgcType1(str, Enum): +class DocumentSpecUgcType1(str, Enum, metaclass=utils.OpenEnumMeta): r"""The type of the user generated content (UGC datasource).""" ANNOUNCEMENTS = "ANNOUNCEMENTS" @@ -84,6 +94,15 @@ class DocumentSpec3(BaseModel): doc_type: Annotated[Optional[str], pydantic.Field(alias="docType")] = None r"""The specific type of the user generated content type.""" + @field_serializer("ugc_type") + def serialize_ugc_type(self, value): + if isinstance(value, str): + try: + return models.DocumentSpecUgcType1(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["docType"]) diff --git a/src/glean/api_client/models/documentvisibility.py b/src/glean/api_client/models/documentvisibility.py index fb5813a9..59bfc052 100644 --- a/src/glean/api_client/models/documentvisibility.py +++ b/src/glean/api_client/models/documentvisibility.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class DocumentVisibility(str, Enum): +class DocumentVisibility(str, Enum, metaclass=utils.OpenEnumMeta): r"""The level of visibility of the document as understood by our system.""" # Only one person is able to see the document. diff --git a/src/glean/api_client/models/documentvisibilityoverride.py b/src/glean/api_client/models/documentvisibilityoverride.py index 27fb5add..694f8cd4 100644 --- a/src/glean/api_client/models/documentvisibilityoverride.py +++ b/src/glean/api_client/models/documentvisibilityoverride.py @@ -2,14 +2,15 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class DocumentVisibilityOverrideOverride(str, Enum): +class DocumentVisibilityOverrideOverride(str, Enum, metaclass=utils.OpenEnumMeta): r"""The visibility-override state of the document.""" NONE = "NONE" @@ -30,6 +31,15 @@ class DocumentVisibilityOverride(BaseModel): override: Optional[DocumentVisibilityOverrideOverride] = None r"""The visibility-override state of the document.""" + @field_serializer("override") + def serialize_override(self, value): + if isinstance(value, str): + try: + return models.DocumentVisibilityOverrideOverride(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["docId", "override"]) diff --git a/src/glean/api_client/models/documentvisibilityupdateresult.py b/src/glean/api_client/models/documentvisibilityupdateresult.py index 2781be2a..7d8784b9 100644 --- a/src/glean/api_client/models/documentvisibilityupdateresult.py +++ b/src/glean/api_client/models/documentvisibilityupdateresult.py @@ -2,14 +2,15 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class DocumentVisibilityUpdateResultOverride(str, Enum): +class DocumentVisibilityUpdateResultOverride(str, Enum, metaclass=utils.OpenEnumMeta): r"""The visibility-override state of the document.""" NONE = "NONE" @@ -35,6 +36,15 @@ class DocumentVisibilityUpdateResult(BaseModel): success: Optional[bool] = None r"""Whether this document was successfully set to its desired visibility state.""" + @field_serializer("override") + def serialize_override(self, value): + if isinstance(value, str): + try: + return models.DocumentVisibilityUpdateResultOverride(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["docId", "override", "success"]) diff --git a/src/glean/api_client/models/editcollectionresponse.py b/src/glean/api_client/models/editcollectionresponse.py index 43e051a9..5030396b 100644 --- a/src/glean/api_client/models/editcollectionresponse.py +++ b/src/glean/api_client/models/editcollectionresponse.py @@ -15,14 +15,15 @@ from .userrolespecification import UserRoleSpecification, UserRoleSpecificationTypedDict from datetime import datetime from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict -class EditCollectionResponseErrorCode(str, Enum): +class EditCollectionResponseErrorCode(str, Enum, metaclass=utils.OpenEnumMeta): NAME_EXISTS = "NAME_EXISTS" NOT_FOUND = "NOT_FOUND" COLLECTION_PINNED = "COLLECTION_PINNED" @@ -162,6 +163,15 @@ class EditCollectionResponse(BaseModel): error: Optional[CollectionError] = None + @field_serializer("error_code") + def serialize_error_code(self, value): + if isinstance(value, str): + try: + return models.EditCollectionResponseErrorCode(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/entitiessortorder.py b/src/glean/api_client/models/entitiessortorder.py index 76d80c68..f3e5ae63 100644 --- a/src/glean/api_client/models/entitiessortorder.py +++ b/src/glean/api_client/models/entitiessortorder.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class EntitiesSortOrder(str, Enum): +class EntitiesSortOrder(str, Enum, metaclass=utils.OpenEnumMeta): r"""Different ways of sorting entities""" ENTITY_NAME = "ENTITY_NAME" diff --git a/src/glean/api_client/models/entitytype.py b/src/glean/api_client/models/entitytype.py index 43e53859..af479617 100644 --- a/src/glean/api_client/models/entitytype.py +++ b/src/glean/api_client/models/entitytype.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class EntityType(str, Enum): +class EntityType(str, Enum, metaclass=utils.OpenEnumMeta): r"""The type of entity.""" PERSON = "PERSON" diff --git a/src/glean/api_client/models/eventstrategyname.py b/src/glean/api_client/models/eventstrategyname.py index 5ede7c8c..2fc0a34f 100644 --- a/src/glean/api_client/models/eventstrategyname.py +++ b/src/glean/api_client/models/eventstrategyname.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class EventStrategyName(str, Enum): +class EventStrategyName(str, Enum, metaclass=utils.OpenEnumMeta): r"""The name of method used to surface relevant data for a given calendar event.""" CUSTOMER_CARD = "customerCard" diff --git a/src/glean/api_client/models/exportinfo.py b/src/glean/api_client/models/exportinfo.py index 9a2325f9..44eea991 100644 --- a/src/glean/api_client/models/exportinfo.py +++ b/src/glean/api_client/models/exportinfo.py @@ -4,14 +4,15 @@ from .dlpfindingfilter import DlpFindingFilter, DlpFindingFilterTypedDict from .dlpperson import DlpPerson, DlpPersonTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class ExportInfoStatus(str, Enum): +class ExportInfoStatus(str, Enum, metaclass=utils.OpenEnumMeta): r"""The status of the export""" PENDING = "PENDING" @@ -63,6 +64,15 @@ class ExportInfo(BaseModel): export_size: Annotated[Optional[int], pydantic.Field(alias="exportSize")] = None r"""The size of the exported file in bytes""" + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.ExportInfoStatus(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/facetfiltervalue.py b/src/glean/api_client/models/facetfiltervalue.py index ee889ffb..c7c45af9 100644 --- a/src/glean/api_client/models/facetfiltervalue.py +++ b/src/glean/api_client/models/facetfiltervalue.py @@ -2,14 +2,15 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class RelationType(str, Enum): +class RelationType(str, Enum, metaclass=utils.OpenEnumMeta): # The value is equal to the specified value. EQUALS = "EQUALS" # The value is equal to the specified ID. @@ -45,6 +46,15 @@ class FacetFilterValue(BaseModel): ] = None r"""DEPRECATED - please use relationType instead""" + @field_serializer("relation_type") + def serialize_relation_type(self, value): + if isinstance(value, str): + try: + return models.RelationType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["value", "relationType", "isNegated"]) diff --git a/src/glean/api_client/models/favoriteinfo.py b/src/glean/api_client/models/favoriteinfo.py index 3c88b964..ea11d36b 100644 --- a/src/glean/api_client/models/favoriteinfo.py +++ b/src/glean/api_client/models/favoriteinfo.py @@ -2,9 +2,10 @@ from __future__ import annotations from .ugctype import UgcType +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -33,6 +34,15 @@ class FavoriteInfo(BaseModel): ] = None r"""If the requesting user has favorited this object.""" + @field_serializer("ugc_type") + def serialize_ugc_type(self, value): + if isinstance(value, str): + try: + return models.UgcType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["ugcType", "id", "count", "favoritedByUser"]) diff --git a/src/glean/api_client/models/feedentry.py b/src/glean/api_client/models/feedentry.py index ae5a612b..aaa2eee3 100644 --- a/src/glean/api_client/models/feedentry.py +++ b/src/glean/api_client/models/feedentry.py @@ -20,9 +20,10 @@ from .useractivity import UserActivity, UserActivityTypedDict from .workflowresult import WorkflowResult, WorkflowResultTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -66,7 +67,7 @@ def serialize_model(self, handler): return m -class JustificationType(str, Enum): +class JustificationType(str, Enum, metaclass=utils.OpenEnumMeta): r"""Type of the justification.""" FREQUENTLY_ACCESSED = "FREQUENTLY_ACCESSED" @@ -201,6 +202,15 @@ class FeedEntry(BaseModel): Optional[CountInfo], pydantic.Field(alias="documentVisitorCount") ] = None + @field_serializer("justification_type") + def serialize_justification_type(self, value): + if isinstance(value, str): + try: + return models.JustificationType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/feedresult.py b/src/glean/api_client/models/feedresult.py index f6bec358..062146c7 100644 --- a/src/glean/api_client/models/feedresult.py +++ b/src/glean/api_client/models/feedresult.py @@ -3,14 +3,15 @@ from __future__ import annotations from .feedentry import FeedEntry, FeedEntryTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict -class FeedResultCategory(str, Enum): +class FeedResultCategory(str, Enum, metaclass=utils.OpenEnumMeta): r"""Category of the result, one of the requested categories in incoming request.""" DOCUMENT_SUGGESTION = "DOCUMENT_SUGGESTION" @@ -64,6 +65,15 @@ class FeedResult(BaseModel): rank: Optional[int] = None r"""Rank of the result. Rank is suggested by server. Client side rank may differ.""" + @field_serializer("category") + def serialize_category(self, value): + if isinstance(value, str): + try: + return models.FeedResultCategory(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["secondaryEntries", "rank"]) diff --git a/src/glean/api_client/models/generatedattachment.py b/src/glean/api_client/models/generatedattachment.py index a5a3a950..6041ec08 100644 --- a/src/glean/api_client/models/generatedattachment.py +++ b/src/glean/api_client/models/generatedattachment.py @@ -10,9 +10,10 @@ ) from .person import Person, PersonTypedDict from .structuredlink import StructuredLink, StructuredLinkTypedDict +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -51,6 +52,15 @@ class GeneratedAttachment(BaseModel): content: Optional[List[GeneratedAttachmentContent]] = None + @field_serializer("strategy_name") + def serialize_strategy_name(self, value): + if isinstance(value, str): + try: + return models.EventStrategyName(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/generatedqna.py b/src/glean/api_client/models/generatedqna.py index 04c0536e..c1d59b7a 100644 --- a/src/glean/api_client/models/generatedqna.py +++ b/src/glean/api_client/models/generatedqna.py @@ -3,9 +3,10 @@ from __future__ import annotations from .followupaction import FollowupAction, FollowupActionTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional, TYPE_CHECKING from typing_extensions import Annotated, NotRequired, TypedDict @@ -13,7 +14,7 @@ from .textrange import TextRange, TextRangeTypedDict -class GeneratedQnaStatus(str, Enum): +class GeneratedQnaStatus(str, Enum, metaclass=utils.OpenEnumMeta): r"""Status of backend generating the answer""" COMPUTING = "COMPUTING" @@ -76,6 +77,15 @@ class GeneratedQna(BaseModel): ) r"""An opaque token that represents this particular result in this particular query. To be used for /feedback reporting.""" + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.GeneratedQnaStatus(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/getanswererror.py b/src/glean/api_client/models/getanswererror.py index dc1a13d8..827524e4 100644 --- a/src/glean/api_client/models/getanswererror.py +++ b/src/glean/api_client/models/getanswererror.py @@ -3,14 +3,15 @@ from __future__ import annotations from .person import Person, PersonTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class GetAnswerErrorErrorType(str, Enum): +class GetAnswerErrorErrorType(str, Enum, metaclass=utils.OpenEnumMeta): NO_PERMISSION = "NO_PERMISSION" INVALID_ID = "INVALID_ID" @@ -29,6 +30,15 @@ class GetAnswerError(BaseModel): None ) + @field_serializer("error_type") + def serialize_error_type(self, value): + if isinstance(value, str): + try: + return models.GetAnswerErrorErrorType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["errorType", "answerAuthor"]) diff --git a/src/glean/api_client/models/getdatasourceinstanceconfigurationop.py b/src/glean/api_client/models/getdatasourceinstanceconfigurationop.py new file mode 100644 index 00000000..25a21bd1 --- /dev/null +++ b/src/glean/api_client/models/getdatasourceinstanceconfigurationop.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel +from glean.api_client.utils import FieldMetadata, PathParamMetadata +import pydantic +from typing_extensions import Annotated, TypedDict + + +class GetDatasourceInstanceConfigurationRequestTypedDict(TypedDict): + datasource_id: str + r"""The datasource type identifier (e.g. o365sharepoint)""" + instance_id: str + r"""The datasource instance identifier""" + + +class GetDatasourceInstanceConfigurationRequest(BaseModel): + datasource_id: Annotated[ + str, + pydantic.Field(alias="datasourceId"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""The datasource type identifier (e.g. o365sharepoint)""" + + instance_id: Annotated[ + str, + pydantic.Field(alias="instanceId"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""The datasource instance identifier""" diff --git a/src/glean/api_client/models/gleandataerror.py b/src/glean/api_client/models/gleandataerror.py index 707fe60f..5bacca94 100644 --- a/src/glean/api_client/models/gleandataerror.py +++ b/src/glean/api_client/models/gleandataerror.py @@ -6,10 +6,6 @@ InvalidOperatorValueError, InvalidOperatorValueErrorTypedDict, ) -from .unauthorizeddatasourceinstance import ( - UnauthorizedDatasourceInstance, - UnauthorizedDatasourceInstanceTypedDict, -) from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic from pydantic import model_serializer @@ -27,12 +23,6 @@ class GleanDataErrorTypedDict(TypedDict): error_messages: NotRequired[List[ErrorMessageTypedDict]] federated_search_rate_limit_error: NotRequired[bool] r"""Indicates the federated search results could not be fetched due to rate limiting.""" - unauthorized_datasource_instances: NotRequired[ - List[UnauthorizedDatasourceInstanceTypedDict] - ] - r"""Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth. - - """ class GleanDataError(BaseModel): @@ -61,14 +51,6 @@ class GleanDataError(BaseModel): ] = None r"""Indicates the federated search results could not be fetched due to rate limiting.""" - unauthorized_datasource_instances: Annotated[ - Optional[List[UnauthorizedDatasourceInstance]], - pydantic.Field(alias="unauthorizedDatasourceInstances"), - ] = None - r"""Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth. - - """ - @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -78,7 +60,6 @@ def serialize_model(self, handler): "invalidOperators", "errorMessages", "federatedSearchRateLimitError", - "unauthorizedDatasourceInstances", ] ) serialized = handler(self) diff --git a/src/glean/api_client/models/grantpermission.py b/src/glean/api_client/models/grantpermission.py index 92df0762..70cf7aed 100644 --- a/src/glean/api_client/models/grantpermission.py +++ b/src/glean/api_client/models/grantpermission.py @@ -2,9 +2,10 @@ from __future__ import annotations from .scopetype import ScopeType +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -22,6 +23,15 @@ class GrantPermission(BaseModel): scope_type: Annotated[Optional[ScopeType], pydantic.Field(alias="scopeType")] = None r"""Describes the scope for a ReadPermission, WritePermission, or GrantPermission object""" + @field_serializer("scope_type") + def serialize_scope_type(self, value): + if isinstance(value, str): + try: + return models.ScopeType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["scopeType"]) diff --git a/src/glean/api_client/models/group.py b/src/glean/api_client/models/group.py index 8b846642..1996f007 100644 --- a/src/glean/api_client/models/group.py +++ b/src/glean/api_client/models/group.py @@ -2,9 +2,10 @@ from __future__ import annotations from .grouptype import GroupType +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -42,6 +43,15 @@ class Group(BaseModel): ] = None r"""identifier for greenlist provisioning, aka sciokey""" + @field_serializer("type") + def serialize_type(self, value): + if isinstance(value, str): + try: + return models.GroupType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["name", "datasourceInstance", "provisioningId"]) diff --git a/src/glean/api_client/models/grouptype.py b/src/glean/api_client/models/grouptype.py index 30e949fe..c94336ed 100644 --- a/src/glean/api_client/models/grouptype.py +++ b/src/glean/api_client/models/grouptype.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class GroupType(str, Enum): +class GroupType(str, Enum, metaclass=utils.OpenEnumMeta): r"""The type of user group""" DEPARTMENT = "DEPARTMENT" diff --git a/src/glean/api_client/models/iconconfig.py b/src/glean/api_client/models/iconconfig.py index 97ca9a25..abe3f54e 100644 --- a/src/glean/api_client/models/iconconfig.py +++ b/src/glean/api_client/models/iconconfig.py @@ -2,14 +2,15 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class IconType(str, Enum): +class IconType(str, Enum, metaclass=utils.OpenEnumMeta): COLLECTION = "COLLECTION" CUSTOM = "CUSTOM" DATASOURCE = "DATASOURCE" @@ -67,6 +68,15 @@ class IconConfig(BaseModel): url: Optional[str] = None r"""The URL to an image to be displayed if applicable, e.g. the URL for `iconType.URL` icons.""" + @field_serializer("icon_type") + def serialize_icon_type(self, value): + if isinstance(value, str): + try: + return models.IconType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/inputoptions.py b/src/glean/api_client/models/inputoptions.py index 07eba7dd..f85b7327 100644 --- a/src/glean/api_client/models/inputoptions.py +++ b/src/glean/api_client/models/inputoptions.py @@ -3,21 +3,22 @@ from __future__ import annotations from .timerange import TimeRange, TimeRangeTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict -class DatasourcesType(str, Enum): +class DatasourcesType(str, Enum, metaclass=utils.OpenEnumMeta): r"""The types of datasource for which to run the report/policy.""" ALL = "ALL" CUSTOM = "CUSTOM" -class InputOptionsTimePeriodType(str, Enum): +class InputOptionsTimePeriodType(str, Enum, metaclass=utils.OpenEnumMeta): r"""Type of time period for which to run the report/policy. PAST_DAY is deprecated.""" ALL_TIME = "ALL_TIME" @@ -89,6 +90,24 @@ class InputOptions(BaseModel): ] = None r"""Subset of document IDs to scan. If empty, all documents matching other scope criteria will be scanned.""" + @field_serializer("datasources_type") + def serialize_datasources_type(self, value): + if isinstance(value, str): + try: + return models.DatasourcesType(value) + except ValueError: + return value + return value + + @field_serializer("time_period_type") + def serialize_time_period_type(self, value): + if isinstance(value, str): + try: + return models.InputOptionsTimePeriodType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/inviteinfo.py b/src/glean/api_client/models/inviteinfo.py index 3b68e8a5..98c8577e 100644 --- a/src/glean/api_client/models/inviteinfo.py +++ b/src/glean/api_client/models/inviteinfo.py @@ -43,7 +43,7 @@ class InviteInfo(BaseModel): invite_time: Annotated[ Optional[datetime], pydantic.Field( - deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.", + deprecated="warning: ** DEPRECATED ** - Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use ChannelInviteInfo instead.", alias="inviteTime", ), ] = None @@ -52,7 +52,7 @@ class InviteInfo(BaseModel): reminder_time: Annotated[ Optional[datetime], pydantic.Field( - deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.", + deprecated="warning: ** DEPRECATED ** - Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use ChannelInviteInfo instead.", alias="reminderTime", ), ] = None diff --git a/src/glean/api_client/models/objectdefinition.py b/src/glean/api_client/models/objectdefinition.py index 148c3eee..6f8001ca 100644 --- a/src/glean/api_client/models/objectdefinition.py +++ b/src/glean/api_client/models/objectdefinition.py @@ -4,14 +4,15 @@ from .propertydefinition import PropertyDefinition, PropertyDefinitionTypedDict from .propertygroup import PropertyGroup, PropertyGroupTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict -class DocCategory(str, Enum): +class DocCategory(str, Enum, metaclass=utils.OpenEnumMeta): r"""The document category of this object type.""" UNCATEGORIZED = "UNCATEGORIZED" @@ -76,6 +77,15 @@ class ObjectDefinition(BaseModel): summarizable: Optional[bool] = None r"""Whether or not the object is summarizable""" + @field_serializer("doc_category") + def serialize_doc_category(self, value): + if isinstance(value, str): + try: + return models.DocCategory(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/operatormetadata.py b/src/glean/api_client/models/operatormetadata.py index d03e9506..55fffe77 100644 --- a/src/glean/api_client/models/operatormetadata.py +++ b/src/glean/api_client/models/operatormetadata.py @@ -3,14 +3,15 @@ from __future__ import annotations from .operatorscope import OperatorScope, OperatorScopeTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict -class OperatorType(str, Enum): +class OperatorType(str, Enum, metaclass=utils.OpenEnumMeta): TEXT = "TEXT" DOUBLE = "DOUBLE" DATE = "DATE" @@ -50,6 +51,15 @@ class OperatorMetadata(BaseModel): display_value: Annotated[Optional[str], pydantic.Field(alias="displayValue")] = None r"""Human readable value of the operator that can be shown to the user. Only applies when result is an operator value.""" + @field_serializer("operator_type") + def serialize_operator_type(self, value): + if isinstance(value, str): + try: + return models.OperatorType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/personmetadata.py b/src/glean/api_client/models/personmetadata.py index 113c013c..19252b1b 100644 --- a/src/glean/api_client/models/personmetadata.py +++ b/src/glean/api_client/models/personmetadata.py @@ -11,9 +11,10 @@ from .structuredlocation import StructuredLocation, StructuredLocationTypedDict from datetime import date, datetime from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Dict, List, Optional, TYPE_CHECKING from typing_extensions import Annotated, NotRequired, TypedDict @@ -24,7 +25,7 @@ from .querysuggestionlist import QuerySuggestionList, QuerySuggestionListTypedDict -class PersonMetadataType(str, Enum): +class PersonMetadataType(str, Enum, metaclass=utils.OpenEnumMeta): # The person is a current full-time employee of the company. FULL_TIME = "FULL_TIME" # The person is a current contractor of the company. @@ -300,6 +301,15 @@ class PersonMetadata(BaseModel): is_org_root: Annotated[Optional[bool], pydantic.Field(alias="isOrgRoot")] = None r"""Whether this person is a \"root\" node in their organization's hierarchy.""" + @field_serializer("type") + def serialize_type(self, value): + if isinstance(value, str): + try: + return models.PersonMetadataType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/personteam.py b/src/glean/api_client/models/personteam.py index 9901d3e3..c6a148ca 100644 --- a/src/glean/api_client/models/personteam.py +++ b/src/glean/api_client/models/personteam.py @@ -3,14 +3,15 @@ from __future__ import annotations from datetime import datetime from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class PersonTeamRelationship(str, Enum): +class PersonTeamRelationship(str, Enum, metaclass=utils.OpenEnumMeta): r"""The team member's relationship to the team. This defaults to MEMBER if not set.""" MEMBER = "MEMBER" @@ -53,6 +54,15 @@ class PersonTeam(BaseModel): join_date: Annotated[Optional[datetime], pydantic.Field(alias="joinDate")] = None r"""The team member's start date""" + @field_serializer("relationship") + def serialize_relationship(self, value): + if isinstance(value, str): + try: + return models.PersonTeamRelationship(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/persontoteamrelationship.py b/src/glean/api_client/models/persontoteamrelationship.py index 6cb4d329..44d01449 100644 --- a/src/glean/api_client/models/persontoteamrelationship.py +++ b/src/glean/api_client/models/persontoteamrelationship.py @@ -3,9 +3,10 @@ from __future__ import annotations from datetime import datetime from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional, TYPE_CHECKING from typing_extensions import Annotated, NotRequired, TypedDict @@ -13,7 +14,7 @@ from .person import Person, PersonTypedDict -class PersonToTeamRelationshipRelationship(str, Enum): +class PersonToTeamRelationshipRelationship(str, Enum, metaclass=utils.OpenEnumMeta): r"""The team member's relationship to the team. This defaults to MEMBER if not set.""" MEMBER = "MEMBER" @@ -53,6 +54,15 @@ class PersonToTeamRelationship(BaseModel): join_date: Annotated[Optional[datetime], pydantic.Field(alias="joinDate")] = None r"""The team member's start date""" + @field_serializer("relationship") + def serialize_relationship(self, value): + if isinstance(value, str): + try: + return models.PersonToTeamRelationshipRelationship(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["relationship", "customRelationshipStr", "joinDate"]) diff --git a/src/glean/api_client/models/propertydefinition.py b/src/glean/api_client/models/propertydefinition.py index 8116de2d..2e5775c9 100644 --- a/src/glean/api_client/models/propertydefinition.py +++ b/src/glean/api_client/models/propertydefinition.py @@ -2,14 +2,15 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class PropertyType(str, Enum): +class PropertyType(str, Enum, metaclass=utils.OpenEnumMeta): r"""The type of custom property - this governs the search and faceting behavior. Note that MULTIPICKLIST is not yet supported.""" TEXT = "TEXT" @@ -21,7 +22,7 @@ class PropertyType(str, Enum): MULTIPICKLIST = "MULTIPICKLIST" -class UIOptions(str, Enum): +class UIOptions(str, Enum, metaclass=utils.OpenEnumMeta): NONE = "NONE" SEARCH_RESULT = "SEARCH_RESULT" DOC_HOVERCARD = "DOC_HOVERCARD" @@ -82,6 +83,24 @@ class PropertyDefinition(BaseModel): group: Optional[str] = None r"""The unique identifier of the `PropertyGroup` to which this property belongs.""" + @field_serializer("property_type") + def serialize_property_type(self, value): + if isinstance(value, str): + try: + return models.PropertyType(value) + except ValueError: + return value + return value + + @field_serializer("ui_options") + def serialize_ui_options(self, value): + if isinstance(value, str): + try: + return models.UIOptions(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/quicklink.py b/src/glean/api_client/models/quicklink.py index 0312b05d..9ade67c4 100644 --- a/src/glean/api_client/models/quicklink.py +++ b/src/glean/api_client/models/quicklink.py @@ -3,6 +3,7 @@ from __future__ import annotations from .iconconfig import IconConfig, IconConfigTypedDict from enum import Enum +from glean.api_client import utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic from pydantic import model_serializer @@ -10,7 +11,7 @@ from typing_extensions import Annotated, NotRequired, TypedDict -class Scope(str, Enum): +class Scope(str, Enum, metaclass=utils.OpenEnumMeta): APP_CARD = "APP_CARD" AUTOCOMPLETE_EXACT_MATCH = "AUTOCOMPLETE_EXACT_MATCH" AUTOCOMPLETE_FUZZY_MATCH = "AUTOCOMPLETE_FUZZY_MATCH" diff --git a/src/glean/api_client/models/readpermission.py b/src/glean/api_client/models/readpermission.py index 9ac9f9e2..9c80bb2e 100644 --- a/src/glean/api_client/models/readpermission.py +++ b/src/glean/api_client/models/readpermission.py @@ -2,9 +2,10 @@ from __future__ import annotations from .scopetype import ScopeType +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -22,6 +23,15 @@ class ReadPermission(BaseModel): scope_type: Annotated[Optional[ScopeType], pydantic.Field(alias="scopeType")] = None r"""Describes the scope for a ReadPermission, WritePermission, or GrantPermission object""" + @field_serializer("scope_type") + def serialize_scope_type(self, value): + if isinstance(value, str): + try: + return models.ScopeType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["scopeType"]) diff --git a/src/glean/api_client/models/relateddocuments.py b/src/glean/api_client/models/relateddocuments.py index 034a4c3a..55f46adf 100644 --- a/src/glean/api_client/models/relateddocuments.py +++ b/src/glean/api_client/models/relateddocuments.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional, TYPE_CHECKING from typing_extensions import Annotated, NotRequired, TypedDict @@ -14,7 +15,7 @@ from .searchresult import SearchResult, SearchResultTypedDict -class Relation(str, Enum): +class Relation(str, Enum, metaclass=utils.OpenEnumMeta): r"""How this document relates to the including entity.""" ATTACHMENT = "ATTACHMENT" @@ -72,6 +73,15 @@ class RelatedDocuments(BaseModel): results: Optional[List["SearchResult"]] = None r"""A truncated list of documents associated with this relation. To be used in favor of `documents` because it contains a trackingToken.""" + @field_serializer("relation") + def serialize_relation(self, value): + if isinstance(value, str): + try: + return models.Relation(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/reportstatusresponse.py b/src/glean/api_client/models/reportstatusresponse.py index 2522a82e..58380be4 100644 --- a/src/glean/api_client/models/reportstatusresponse.py +++ b/src/glean/api_client/models/reportstatusresponse.py @@ -2,14 +2,15 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class ReportStatusResponseStatus(str, Enum): +class ReportStatusResponseStatus(str, Enum, metaclass=utils.OpenEnumMeta): PENDING = "PENDING" SUCCESS = "SUCCESS" FAILURE = "FAILURE" @@ -30,6 +31,15 @@ class ReportStatusResponse(BaseModel): start_time: Annotated[Optional[str], pydantic.Field(alias="startTime")] = None r"""The timestamp at which the report's run/scan began.""" + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.ReportStatusResponseStatus(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["status", "startTime"]) diff --git a/src/glean/api_client/models/scopetype.py b/src/glean/api_client/models/scopetype.py index 3f3b0004..e45814ba 100644 --- a/src/glean/api_client/models/scopetype.py +++ b/src/glean/api_client/models/scopetype.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class ScopeType(str, Enum): +class ScopeType(str, Enum, metaclass=utils.OpenEnumMeta): r"""Describes the scope for a ReadPermission, WritePermission, or GrantPermission object""" GLOBAL = "GLOBAL" diff --git a/src/glean/api_client/models/searchrequestoptions.py b/src/glean/api_client/models/searchrequestoptions.py index 9ee1139f..a25a2d04 100644 --- a/src/glean/api_client/models/searchrequestoptions.py +++ b/src/glean/api_client/models/searchrequestoptions.py @@ -7,6 +7,7 @@ from .facetfilterset import FacetFilterSet, FacetFilterSetTypedDict from .restrictionfilters import RestrictionFilters, RestrictionFiltersTypedDict from enum import Enum +from glean.api_client import utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic from pydantic import model_serializer @@ -14,7 +15,7 @@ from typing_extensions import Annotated, NotRequired, TypedDict -class ResponseHint(str, Enum): +class ResponseHint(str, Enum, metaclass=utils.OpenEnumMeta): r"""Hints for the response content.""" # Return result counts for each result set which has non-zero results, even when the request itself is limited to a subset. diff --git a/src/glean/api_client/models/searchresult.py b/src/glean/api_client/models/searchresult.py index c476686e..ceb26500 100644 --- a/src/glean/api_client/models/searchresult.py +++ b/src/glean/api_client/models/searchresult.py @@ -3,9 +3,10 @@ from __future__ import annotations from .clustertypeenum import ClusterTypeEnum from .searchresultprominenceenum import SearchResultProminenceEnum +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional, TYPE_CHECKING from typing_extensions import Annotated, NotRequired, TypedDict @@ -149,6 +150,24 @@ class SearchResult(BaseModel): pins: Optional[List["PinDocument"]] = None r"""A list of pins associated with this search result.""" + @field_serializer("cluster_type") + def serialize_cluster_type(self, value): + if isinstance(value, str): + try: + return models.ClusterTypeEnum(value) + except ValueError: + return value + return value + + @field_serializer("prominence") + def serialize_prominence(self, value): + if isinstance(value, str): + try: + return models.SearchResultProminenceEnum(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/searchresultprominenceenum.py b/src/glean/api_client/models/searchresultprominenceenum.py index ddf2e8f1..27ef471f 100644 --- a/src/glean/api_client/models/searchresultprominenceenum.py +++ b/src/glean/api_client/models/searchresultprominenceenum.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class SearchResultProminenceEnum(str, Enum): +class SearchResultProminenceEnum(str, Enum, metaclass=utils.OpenEnumMeta): r"""The level of visual distinction that should be given to a result.""" # A high-confidence result that should feature prominently on the page. diff --git a/src/glean/api_client/models/searchwarning.py b/src/glean/api_client/models/searchwarning.py index 72c2fb91..062363de 100644 --- a/src/glean/api_client/models/searchwarning.py +++ b/src/glean/api_client/models/searchwarning.py @@ -2,14 +2,15 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict -class WarningType(str, Enum): +class WarningType(str, Enum, metaclass=utils.OpenEnumMeta): r"""The type of the warning.""" LONG_QUERY = "LONG_QUERY" @@ -51,6 +52,15 @@ class SearchWarning(BaseModel): ] = None r"""A list of query terms that were ignored when generating search results, if any. For example, terms containing invalid filters such as \"updated:invalid_date\" will be ignored.""" + @field_serializer("warning_type") + def serialize_warning_type(self, value): + if isinstance(value, str): + try: + return models.WarningType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["lastUsedTerm", "quotesIgnoredQuery", "ignoredTerms"]) diff --git a/src/glean/api_client/models/sectiontype.py b/src/glean/api_client/models/sectiontype.py index 2dbb489e..59fe1bb6 100644 --- a/src/glean/api_client/models/sectiontype.py +++ b/src/glean/api_client/models/sectiontype.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class SectionType(str, Enum): +class SectionType(str, Enum, metaclass=utils.OpenEnumMeta): r"""Type of the section. This defines how the section should be interpreted and rendered in the digest.""" # A standard section for channel-based digests (e.g. from Slack, Teams). diff --git a/src/glean/api_client/models/sensitiveinfotype.py b/src/glean/api_client/models/sensitiveinfotype.py index 69c21122..95dec2f7 100644 --- a/src/glean/api_client/models/sensitiveinfotype.py +++ b/src/glean/api_client/models/sensitiveinfotype.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict, deprecated @@ -12,7 +13,7 @@ @deprecated( "warning: ** DEPRECATED ** - Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated." ) -class SensitiveInfoTypeLikelihoodThreshold(str, Enum): +class SensitiveInfoTypeLikelihoodThreshold(str, Enum, metaclass=utils.OpenEnumMeta): LIKELY = "LIKELY" VERY_LIKELY = "VERY_LIKELY" POSSIBLE = "POSSIBLE" @@ -38,6 +39,15 @@ class SensitiveInfoType(BaseModel): info_type: Annotated[Optional[str], pydantic.Field(alias="infoType")] = None r"""Text representation of an info-type to scan for.""" + @field_serializer("likelihood_threshold") + def serialize_likelihood_threshold(self, value): + if isinstance(value, str): + try: + return models.SensitiveInfoTypeLikelihoodThreshold(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["likelihoodThreshold", "infoType"]) diff --git a/src/glean/api_client/models/shortcuterror.py b/src/glean/api_client/models/shortcuterror.py index bc2d9b7f..ac2407ce 100644 --- a/src/glean/api_client/models/shortcuterror.py +++ b/src/glean/api_client/models/shortcuterror.py @@ -2,14 +2,15 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class ShortcutErrorErrorType(str, Enum): +class ShortcutErrorErrorType(str, Enum, metaclass=utils.OpenEnumMeta): NO_PERMISSION = "NO_PERMISSION" INVALID_ID = "INVALID_ID" EXISTING_SHORTCUT = "EXISTING_SHORTCUT" @@ -25,6 +26,15 @@ class ShortcutError(BaseModel): Optional[ShortcutErrorErrorType], pydantic.Field(alias="errorType") ] = None + @field_serializer("error_type") + def serialize_error_type(self, value): + if isinstance(value, str): + try: + return models.ShortcutErrorErrorType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["errorType"]) diff --git a/src/glean/api_client/models/structuredresult.py b/src/glean/api_client/models/structuredresult.py index ece0abe6..8f1d1e28 100644 --- a/src/glean/api_client/models/structuredresult.py +++ b/src/glean/api_client/models/structuredresult.py @@ -4,9 +4,10 @@ from .appresult import AppResult, AppResultTypedDict from .disambiguation import Disambiguation, DisambiguationTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional, TYPE_CHECKING from typing_extensions import Annotated, NotRequired, TypedDict @@ -30,7 +31,7 @@ from .team import Team, TeamTypedDict -class Prominence(str, Enum): +class Prominence(str, Enum, metaclass=utils.OpenEnumMeta): r"""The level of visual distinction that should be given to a result.""" # A high-confidence result that should feature prominently on the page. @@ -41,7 +42,7 @@ class Prominence(str, Enum): STANDARD = "STANDARD" -class StructuredResultSource(str, Enum): +class StructuredResultSource(str, Enum, metaclass=utils.OpenEnumMeta): r"""Source context for this result. Possible values depend on the result type.""" EXPERT_DETECTION = "EXPERT_DETECTION" @@ -152,6 +153,24 @@ class StructuredResult(BaseModel): source: Optional[StructuredResultSource] = None r"""Source context for this result. Possible values depend on the result type.""" + @field_serializer("prominence") + def serialize_prominence(self, value): + if isinstance(value, str): + try: + return models.Prominence(value) + except ValueError: + return value + return value + + @field_serializer("source") + def serialize_source(self, value): + if isinstance(value, str): + try: + return models.StructuredResultSource(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/team.py b/src/glean/api_client/models/team.py index c688efcd..4abb136d 100644 --- a/src/glean/api_client/models/team.py +++ b/src/glean/api_client/models/team.py @@ -7,9 +7,10 @@ from .teamemail import TeamEmail, TeamEmailTypedDict from datetime import datetime from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Dict, List, Optional, TYPE_CHECKING from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,7 +22,7 @@ ) -class TeamStatus(str, Enum): +class TeamStatus(str, Enum, metaclass=utils.OpenEnumMeta): r"""whether this team is fully processed or there are still unprocessed operations that'll affect it""" PROCESSED = "PROCESSED" @@ -146,6 +147,15 @@ class Team(BaseModel): logging_id: Annotated[Optional[str], pydantic.Field(alias="loggingId")] = None r"""The logging id of the team used in scrubbed logs, client analytics, and metrics.""" + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.TeamStatus(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/textrange.py b/src/glean/api_client/models/textrange.py index 2d665a51..fea3df5e 100644 --- a/src/glean/api_client/models/textrange.py +++ b/src/glean/api_client/models/textrange.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional, TYPE_CHECKING from typing_extensions import Annotated, NotRequired, TypedDict @@ -12,7 +13,7 @@ from .document import Document, DocumentTypedDict -class TextRangeType(str, Enum): +class TextRangeType(str, Enum, metaclass=utils.OpenEnumMeta): BOLD = "BOLD" CITATION = "CITATION" HIGHLIGHT = "HIGHLIGHT" @@ -48,6 +49,15 @@ class TextRange(BaseModel): document: Optional["Document"] = None + @field_serializer("type") + def serialize_type(self, value): + if isinstance(value, str): + try: + return models.TextRangeType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["endIndex", "type", "url", "document"]) diff --git a/src/glean/api_client/models/timerangefilter.py b/src/glean/api_client/models/timerangefilter.py index 92f7896e..49087f7a 100644 --- a/src/glean/api_client/models/timerangefilter.py +++ b/src/glean/api_client/models/timerangefilter.py @@ -3,14 +3,15 @@ from __future__ import annotations from .timerange import TimeRange, TimeRangeTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class TimeRangeFilterTimePeriodType(str, Enum): +class TimeRangeFilterTimePeriodType(str, Enum, metaclass=utils.OpenEnumMeta): r"""The type of time period for which to filter findings.""" PAST_DAY = "PAST_DAY" @@ -36,6 +37,15 @@ class TimeRangeFilter(BaseModel): Optional[TimeRange], pydantic.Field(alias="customTimeRange") ] = None + @field_serializer("time_period_type") + def serialize_time_period_type(self, value): + if isinstance(value, str): + try: + return models.TimeRangeFilterTimePeriodType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["timePeriodType", "customTimeRange"]) diff --git a/src/glean/api_client/models/tool.py b/src/glean/api_client/models/tool.py index 7252330c..6469ec58 100644 --- a/src/glean/api_client/models/tool.py +++ b/src/glean/api_client/models/tool.py @@ -3,14 +3,15 @@ from __future__ import annotations from .toolparameter import ToolParameter, ToolParameterTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Dict, Optional from typing_extensions import Annotated, NotRequired, TypedDict -class ToolType(str, Enum): +class ToolType(str, Enum, metaclass=utils.OpenEnumMeta): r"""Type of tool (READ, WRITE)""" READ = "READ" @@ -46,6 +47,15 @@ class Tool(BaseModel): parameters: Optional[Dict[str, ToolParameter]] = None r"""The parameters for the tool. Each key is the name of the parameter and the value is the parameter object.""" + @field_serializer("type") + def serialize_type(self, value): + if isinstance(value, str): + try: + return models.ToolType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/toolmetadata.py b/src/glean/api_client/models/toolmetadata.py index 10e8f64d..bac0b288 100644 --- a/src/glean/api_client/models/toolmetadata.py +++ b/src/glean/api_client/models/toolmetadata.py @@ -6,21 +6,22 @@ from .personobject import PersonObject, PersonObjectTypedDict from datetime import datetime from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class ToolMetadataType(str, Enum): +class ToolMetadataType(str, Enum, metaclass=utils.OpenEnumMeta): r"""The type of tool.""" RETRIEVAL = "RETRIEVAL" ACTION = "ACTION" -class KnowledgeType(str, Enum): +class KnowledgeType(str, Enum, metaclass=utils.OpenEnumMeta): r"""Indicates the kind of knowledge a tool would access or modify.""" NEUTRAL_KNOWLEDGE = "NEUTRAL_KNOWLEDGE" @@ -28,7 +29,7 @@ class KnowledgeType(str, Enum): WORLD_KNOWLEDGE = "WORLD_KNOWLEDGE" -class WriteActionType(str, Enum): +class WriteActionType(str, Enum, metaclass=utils.OpenEnumMeta): r"""Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action.""" REDIRECT = "REDIRECT" @@ -36,7 +37,7 @@ class WriteActionType(str, Enum): MCP = "MCP" -class AuthType(str, Enum): +class AuthType(str, Enum, metaclass=utils.OpenEnumMeta): r"""The type of authentication being used. Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token. 'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users. @@ -171,6 +172,42 @@ class ToolMetadata(BaseModel): ] = None r"""Whether this action has been fully configured and validated.""" + @field_serializer("type") + def serialize_type(self, value): + if isinstance(value, str): + try: + return models.ToolMetadataType(value) + except ValueError: + return value + return value + + @field_serializer("knowledge_type") + def serialize_knowledge_type(self, value): + if isinstance(value, str): + try: + return models.KnowledgeType(value) + except ValueError: + return value + return value + + @field_serializer("write_action_type") + def serialize_write_action_type(self, value): + if isinstance(value, str): + try: + return models.WriteActionType(value) + except ValueError: + return value + return value + + @field_serializer("auth_type") + def serialize_auth_type(self, value): + if isinstance(value, str): + try: + return models.AuthType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/toolparameter.py b/src/glean/api_client/models/toolparameter.py index 31e41566..a01ddb8e 100644 --- a/src/glean/api_client/models/toolparameter.py +++ b/src/glean/api_client/models/toolparameter.py @@ -2,14 +2,15 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Dict, List, Optional from typing_extensions import Annotated, NotRequired, TypedDict -class ToolParameterType(str, Enum): +class ToolParameterType(str, Enum, metaclass=utils.OpenEnumMeta): r"""Parameter type (string, number, boolean, object, array)""" STRING = "string" @@ -58,6 +59,15 @@ class ToolParameter(BaseModel): properties: Optional[Dict[str, ToolParameter]] = None r"""When type is 'object', this describes the structure of the object.""" + @field_serializer("type") + def serialize_type(self, value): + if isinstance(value, str): + try: + return models.ToolParameterType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/ugctype.py b/src/glean/api_client/models/ugctype.py index 9594a7bf..7ed8033e 100644 --- a/src/glean/api_client/models/ugctype.py +++ b/src/glean/api_client/models/ugctype.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class UgcType(str, Enum): +class UgcType(str, Enum, metaclass=utils.OpenEnumMeta): ANNOUNCEMENTS_TYPE = "ANNOUNCEMENTS_TYPE" ANSWERS_TYPE = "ANSWERS_TYPE" COLLECTIONS_TYPE = "COLLECTIONS_TYPE" diff --git a/src/glean/api_client/models/unauthorizeddatasourceinstance.py b/src/glean/api_client/models/unauthorizeddatasourceinstance.py index bec92224..c4067ecc 100644 --- a/src/glean/api_client/models/unauthorizeddatasourceinstance.py +++ b/src/glean/api_client/models/unauthorizeddatasourceinstance.py @@ -2,9 +2,10 @@ from __future__ import annotations from .authstatus import AuthStatus +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -51,6 +52,15 @@ class UnauthorizedDatasourceInstance(BaseModel): """ + @field_serializer("auth_status") + def serialize_auth_status(self, value): + if isinstance(value, str): + try: + return models.AuthStatus(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/updatedatasourceconfigurationrequest.py b/src/glean/api_client/models/updatedatasourceconfigurationrequest.py new file mode 100644 index 00000000..e1a2c5a3 --- /dev/null +++ b/src/glean/api_client/models/updatedatasourceconfigurationrequest.py @@ -0,0 +1,23 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .datasourceinstanceconfiguration import ( + DatasourceInstanceConfiguration, + DatasourceInstanceConfigurationTypedDict, +) +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class UpdateDatasourceConfigurationRequestTypedDict(TypedDict): + r"""Request to update greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist may be set.""" + + configuration: DatasourceInstanceConfigurationTypedDict + r"""Configuration for a datasource instance""" + + +class UpdateDatasourceConfigurationRequest(BaseModel): + r"""Request to update greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist may be set.""" + + configuration: DatasourceInstanceConfiguration + r"""Configuration for a datasource instance""" diff --git a/src/glean/api_client/models/updatedatasourceinstanceconfigurationop.py b/src/glean/api_client/models/updatedatasourceinstanceconfigurationop.py new file mode 100644 index 00000000..1f77deeb --- /dev/null +++ b/src/glean/api_client/models/updatedatasourceinstanceconfigurationop.py @@ -0,0 +1,42 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .updatedatasourceconfigurationrequest import ( + UpdateDatasourceConfigurationRequest, + UpdateDatasourceConfigurationRequestTypedDict, +) +from glean.api_client.types import BaseModel +from glean.api_client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +import pydantic +from typing_extensions import Annotated, TypedDict + + +class UpdateDatasourceInstanceConfigurationRequestTypedDict(TypedDict): + datasource_id: str + r"""The datasource type identifier (e.g. o365sharepoint)""" + instance_id: str + r"""The datasource instance identifier""" + update_datasource_configuration_request: ( + UpdateDatasourceConfigurationRequestTypedDict + ) + + +class UpdateDatasourceInstanceConfigurationRequest(BaseModel): + datasource_id: Annotated[ + str, + pydantic.Field(alias="datasourceId"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""The datasource type identifier (e.g. o365sharepoint)""" + + instance_id: Annotated[ + str, + pydantic.Field(alias="instanceId"), + FieldMetadata(path=PathParamMetadata(style="simple", explode=False)), + ] + r"""The datasource instance identifier""" + + update_datasource_configuration_request: Annotated[ + UpdateDatasourceConfigurationRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/glean/api_client/models/updatedlpconfigresponse.py b/src/glean/api_client/models/updatedlpconfigresponse.py index d415f88d..46950658 100644 --- a/src/glean/api_client/models/updatedlpconfigresponse.py +++ b/src/glean/api_client/models/updatedlpconfigresponse.py @@ -2,9 +2,10 @@ from __future__ import annotations from .dlpsimpleresult import DlpSimpleResult +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,15 @@ class UpdateDlpConfigResponse(BaseModel): report_id: Annotated[Optional[str], pydantic.Field(alias="reportId")] = None r"""The id of the report that was just created and run.""" + @field_serializer("result") + def serialize_result(self, value): + if isinstance(value, str): + try: + return models.DlpSimpleResult(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["result", "reportId"]) diff --git a/src/glean/api_client/models/updatedlpreportrequest.py b/src/glean/api_client/models/updatedlpreportrequest.py index 63f10962..4f302041 100644 --- a/src/glean/api_client/models/updatedlpreportrequest.py +++ b/src/glean/api_client/models/updatedlpreportrequest.py @@ -4,9 +4,10 @@ from .dlpconfig import DlpConfig, DlpConfigTypedDict from .dlpfrequency import DlpFrequency from .dlpreportstatus import DlpReportStatus +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -42,6 +43,24 @@ class UpdateDlpReportRequest(BaseModel): report_name: Annotated[Optional[str], pydantic.Field(alias="reportName")] = None r"""The new name of the policy if provided.""" + @field_serializer("frequency") + def serialize_frequency(self, value): + if isinstance(value, str): + try: + return models.DlpFrequency(value) + except ValueError: + return value + return value + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.DlpReportStatus(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/updatedlpreportresponse.py b/src/glean/api_client/models/updatedlpreportresponse.py index c65474b8..fd884679 100644 --- a/src/glean/api_client/models/updatedlpreportresponse.py +++ b/src/glean/api_client/models/updatedlpreportresponse.py @@ -2,8 +2,9 @@ from __future__ import annotations from .dlpsimpleresult import DlpSimpleResult +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -15,6 +16,15 @@ class UpdateDlpReportResponseTypedDict(TypedDict): class UpdateDlpReportResponse(BaseModel): result: Optional[DlpSimpleResult] = None + @field_serializer("result") + def serialize_result(self, value): + if isinstance(value, str): + try: + return models.DlpSimpleResult(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["result"]) diff --git a/src/glean/api_client/models/updatetype.py b/src/glean/api_client/models/updatetype.py index 687544d4..6a51a4bb 100644 --- a/src/glean/api_client/models/updatetype.py +++ b/src/glean/api_client/models/updatetype.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class UpdateType(str, Enum): +class UpdateType(str, Enum, metaclass=utils.OpenEnumMeta): r"""Optional type classification for the update.""" # Updates that require user attention or action diff --git a/src/glean/api_client/models/uploadstatusenum.py b/src/glean/api_client/models/uploadstatusenum.py index c7ca19e2..950f6a40 100644 --- a/src/glean/api_client/models/uploadstatusenum.py +++ b/src/glean/api_client/models/uploadstatusenum.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class UploadStatusEnum(str, Enum): +class UploadStatusEnum(str, Enum, metaclass=utils.OpenEnumMeta): r"""Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN""" UPLOADED = "UPLOADED" diff --git a/src/glean/api_client/models/useractivity.py b/src/glean/api_client/models/useractivity.py index 5108bb40..c194604a 100644 --- a/src/glean/api_client/models/useractivity.py +++ b/src/glean/api_client/models/useractivity.py @@ -4,14 +4,15 @@ from .countinfo import CountInfo, CountInfoTypedDict from .person import Person, PersonTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class UserActivityAction(str, Enum): +class UserActivityAction(str, Enum, metaclass=utils.OpenEnumMeta): r"""The action for the activity""" ADD = "ADD" @@ -52,6 +53,15 @@ class UserActivity(BaseModel): Optional[CountInfo], pydantic.Field(alias="aggregateVisitCount") ] = None + @field_serializer("action") + def serialize_action(self, value): + if isinstance(value, str): + try: + return models.UserActivityAction(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["actor", "timestamp", "action", "aggregateVisitCount"]) diff --git a/src/glean/api_client/models/useractivityinsight.py b/src/glean/api_client/models/useractivityinsight.py index 76d15600..9eae4fc5 100644 --- a/src/glean/api_client/models/useractivityinsight.py +++ b/src/glean/api_client/models/useractivityinsight.py @@ -4,14 +4,15 @@ from .countinfo import CountInfo, CountInfoTypedDict from .person import Person, PersonTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict -class ActivityEnum(str, Enum): +class ActivityEnum(str, Enum, metaclass=utils.OpenEnumMeta): r"""Activity e.g. search, home page visit or all.""" ALL = "ALL" @@ -47,6 +48,15 @@ class UserActivityInsight(BaseModel): Optional[CountInfo], pydantic.Field(alias="activeDayCount") ] = None + @field_serializer("activity") + def serialize_activity(self, value): + if isinstance(value, str): + try: + return models.ActivityEnum(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/userrole.py b/src/glean/api_client/models/userrole.py index f4aa28fa..2768603f 100644 --- a/src/glean/api_client/models/userrole.py +++ b/src/glean/api_client/models/userrole.py @@ -2,9 +2,10 @@ from __future__ import annotations from enum import Enum +from glean.api_client import utils -class UserRole(str, Enum): +class UserRole(str, Enum, metaclass=utils.OpenEnumMeta): r"""A user's role with respect to a specific document.""" OWNER = "OWNER" diff --git a/src/glean/api_client/models/userrolespecification.py b/src/glean/api_client/models/userrolespecification.py index b6902a8c..d67f51b8 100644 --- a/src/glean/api_client/models/userrolespecification.py +++ b/src/glean/api_client/models/userrolespecification.py @@ -4,9 +4,10 @@ from .documentspec_union import DocumentSpecUnion, DocumentSpecUnionTypedDict from .group import Group, GroupTypedDict from .userrole import UserRole +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional, TYPE_CHECKING from typing_extensions import Annotated, NotRequired, TypedDict @@ -34,6 +35,15 @@ class UserRoleSpecification(BaseModel): group: Optional[Group] = None + @field_serializer("role") + def serialize_role(self, value): + if isinstance(value, str): + try: + return models.UserRole(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["sourceDocumentSpec", "person", "group"]) diff --git a/src/glean/api_client/models/userstatusresponse.py b/src/glean/api_client/models/userstatusresponse.py index e8fb646f..8131eca9 100644 --- a/src/glean/api_client/models/userstatusresponse.py +++ b/src/glean/api_client/models/userstatusresponse.py @@ -2,9 +2,10 @@ from __future__ import annotations from .uploadstatusenum import UploadStatusEnum +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -38,6 +39,15 @@ class UserStatusResponse(BaseModel): ] = None r"""Time of last successful upload for the user, in ISO 8601 format""" + @field_serializer("upload_status") + def serialize_upload_status(self, value): + if isinstance(value, str): + try: + return models.UploadStatusEnum(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["isActiveUser", "uploadStatus", "lastUploadedAt"]) diff --git a/src/glean/api_client/models/verification.py b/src/glean/api_client/models/verification.py index 4aa8837d..752197e3 100644 --- a/src/glean/api_client/models/verification.py +++ b/src/glean/api_client/models/verification.py @@ -2,8 +2,9 @@ from __future__ import annotations from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional, TYPE_CHECKING from typing_extensions import NotRequired, TypedDict @@ -14,7 +15,7 @@ ) -class State(str, Enum): +class State(str, Enum, metaclass=utils.OpenEnumMeta): r"""The verification state for the document.""" UNVERIFIED = "UNVERIFIED" @@ -34,6 +35,15 @@ class Verification(BaseModel): metadata: Optional["VerificationMetadata"] = None + @field_serializer("state") + def serialize_state(self, value): + if isinstance(value, str): + try: + return models.State(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["metadata"]) diff --git a/src/glean/api_client/models/viewerinfo.py b/src/glean/api_client/models/viewerinfo.py index b27ade10..f707d635 100644 --- a/src/glean/api_client/models/viewerinfo.py +++ b/src/glean/api_client/models/viewerinfo.py @@ -3,9 +3,10 @@ from __future__ import annotations from datetime import datetime from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict, deprecated @@ -13,7 +14,7 @@ @deprecated( "warning: ** DEPRECATED ** - Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use permissions instead." ) -class Role(str, Enum): +class Role(str, Enum, metaclass=utils.OpenEnumMeta): r"""DEPRECATED - use permissions instead. Viewer's role on the specific document.""" ANSWER_MODERATOR = "ANSWER_MODERATOR" @@ -40,6 +41,15 @@ class ViewerInfo(BaseModel): Optional[datetime], pydantic.Field(alias="lastViewedTime") ] = None + @field_serializer("role") + def serialize_role(self, value): + if isinstance(value, str): + try: + return models.Role(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["role", "lastViewedTime"]) diff --git a/src/glean/api_client/models/writeactionparameter.py b/src/glean/api_client/models/writeactionparameter.py index cd9682d9..aff7513d 100644 --- a/src/glean/api_client/models/writeactionparameter.py +++ b/src/glean/api_client/models/writeactionparameter.py @@ -3,14 +3,15 @@ from __future__ import annotations from .possiblevalue import PossibleValue, PossibleValueTypedDict from enum import Enum +from glean.api_client import models, utils from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict -class WriteActionParameterType(str, Enum): +class WriteActionParameterType(str, Enum, metaclass=utils.OpenEnumMeta): r"""The type of the value (e.g., integer, string, boolean, etc.)""" UNKNOWN = "UNKNOWN" @@ -55,6 +56,15 @@ class WriteActionParameter(BaseModel): ] = None r"""Possible values that the parameter can take.""" + @field_serializer("type") + def serialize_type(self, value): + if isinstance(value, str): + try: + return models.WriteActionParameterType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( diff --git a/src/glean/api_client/models/writepermission.py b/src/glean/api_client/models/writepermission.py index 4a9c4635..7cea3a93 100644 --- a/src/glean/api_client/models/writepermission.py +++ b/src/glean/api_client/models/writepermission.py @@ -2,9 +2,10 @@ from __future__ import annotations from .scopetype import ScopeType +from glean.api_client import models from glean.api_client.types import BaseModel, UNSET_SENTINEL import pydantic -from pydantic import model_serializer +from pydantic import field_serializer, model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -37,6 +38,15 @@ class WritePermission(BaseModel): delete: Optional[bool] = None r"""True if user has delete permission for this feature and scope""" + @field_serializer("scope_type") + def serialize_scope_type(self, value): + if isinstance(value, str): + try: + return models.ScopeType(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["scopeType", "create", "update", "delete"]) diff --git a/src/glean/api_client/people.py b/src/glean/api_client/people.py index 984073db..f240b57c 100644 --- a/src/glean/api_client/people.py +++ b/src/glean/api_client/people.py @@ -579,6 +579,9 @@ async def index_async( raise errors.GleanError("Unexpected response received", http_res) + @deprecated( + "warning: ** DEPRECATED ** - Deprecated on 2026-02-03, removal scheduled for 2026-10-15: Endpoint is deprecated." + ) def bulk_index( self, *, @@ -686,6 +689,9 @@ def bulk_index( raise errors.GleanError("Unexpected response received", http_res) + @deprecated( + "warning: ** DEPRECATED ** - Deprecated on 2026-02-03, removal scheduled for 2026-10-15: Endpoint is deprecated." + ) async def bulk_index_async( self, *, diff --git a/src/glean/api_client/sdk.py b/src/glean/api_client/sdk.py index a0a9f4fe..be052164 100644 --- a/src/glean/api_client/sdk.py +++ b/src/glean/api_client/sdk.py @@ -17,6 +17,7 @@ if TYPE_CHECKING: from glean.api_client.authentication import Authentication from glean.api_client.client import Client + from glean.api_client.datasources import Datasources from glean.api_client.governance import Governance from glean.api_client.indexing import Indexing @@ -46,11 +47,14 @@ class Glean(BaseSDK): r"""Manage indexing API tokens.""" indexing: "Indexing" governance: "Governance" + datasources: "Datasources" + r"""Manage datasources.""" _sub_sdk_map = { "client": ("glean.api_client.client", "Client"), "authentication": ("glean.api_client.authentication", "Authentication"), "indexing": ("glean.api_client.indexing", "Indexing"), "governance": ("glean.api_client.governance", "Governance"), + "datasources": ("glean.api_client.datasources", "Datasources"), } def __init__( diff --git a/tests/mockserver/go.mod b/tests/mockserver/go.mod index 38b2d5e8..c37e594c 100644 --- a/tests/mockserver/go.mod +++ b/tests/mockserver/go.mod @@ -6,10 +6,11 @@ require ( github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 github.com/go-pkgz/expirable-cache/v3 v3.0.0 github.com/gorilla/mux v1.8.1 + github.com/stretchr/testify v1.9.0 ) require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/stretchr/testify v1.9.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/tests/mockserver/go.sum b/tests/mockserver/go.sum index fa86a5fc..37327eda 100644 --- a/tests/mockserver/go.sum +++ b/tests/mockserver/go.sum @@ -12,5 +12,7 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/tests/mockserver/internal/handler/generated_handlers.go b/tests/mockserver/internal/handler/generated_handlers.go index 23b23873..4eaa2afa 100644 --- a/tests/mockserver/internal/handler/generated_handlers.go +++ b/tests/mockserver/internal/handler/generated_handlers.go @@ -14,10 +14,12 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * return []*GeneratedHandler{ NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/agents/{agent_id}", pathGetRestAPIV1AgentsAgentID(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/agents/{agent_id}/schemas", pathGetRestAPIV1AgentsAgentIDSchemas(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/configure/datasources/{datasourceId}/instances/{instanceId}", pathGetRestAPIV1ConfigureDatasourcesDatasourceIDInstancesInstanceID(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/governance/data/findings/exports", pathGetRestAPIV1GovernanceDataFindingsExports(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/governance/data/policies", pathGetRestAPIV1GovernanceDataPolicies(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/governance/data/policies/{id}", pathGetRestAPIV1GovernanceDataPoliciesID(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/tools/list", pathGetRestAPIV1ToolsList(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPatch, "/rest/api/v1/configure/datasources/{datasourceId}/instances/{instanceId}", pathPatchRestAPIV1ConfigureDatasourcesDatasourceIDInstancesInstanceID(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/adddatasource", pathPostAPIIndexV1Adddatasource(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/betausers", pathPostAPIIndexV1Betausers(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/bulkindexdocuments", pathPostAPIIndexV1Bulkindexdocuments(dir, rt)), diff --git a/tests/mockserver/internal/handler/pathgetrestapiv1configuredatasourcesdatasourceidinstancesinstanceid.go b/tests/mockserver/internal/handler/pathgetrestapiv1configuredatasourcesdatasourceidinstancesinstanceid.go new file mode 100644 index 00000000..9344b896 --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetrestapiv1configuredatasourcesdatasourceidinstancesinstanceid.go @@ -0,0 +1,68 @@ +// 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 pathGetRestAPIV1ConfigureDatasourcesDatasourceIDInstancesInstanceID(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 "getDatasourceInstanceConfiguration[0]": + dir.HandlerFunc("getDatasourceInstanceConfiguration", testGetDatasourceInstanceConfigurationGetDatasourceInstanceConfiguration0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testGetDatasourceInstanceConfigurationGetDatasourceInstanceConfiguration0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + var respBody *components.DatasourceConfigurationResponse = &components.DatasourceConfigurationResponse{ + Configuration: components.DatasourceInstanceConfiguration{ + Values: map[string]components.ConfigurationValue{ + "key": components.ConfigurationValue{}, + }, + }, + } + 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/pathpatchrestapiv1configuredatasourcesdatasourceidinstancesinstanceid.go b/tests/mockserver/internal/handler/pathpatchrestapiv1configuredatasourcesdatasourceidinstancesinstanceid.go new file mode 100644 index 00000000..40105d8d --- /dev/null +++ b/tests/mockserver/internal/handler/pathpatchrestapiv1configuredatasourcesdatasourceidinstancesinstanceid.go @@ -0,0 +1,71 @@ +// 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 pathPatchRestAPIV1ConfigureDatasourcesDatasourceIDInstancesInstanceID(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 "updateDatasourceInstanceConfiguration[0]": + dir.HandlerFunc("updateDatasourceInstanceConfiguration", testUpdateDatasourceInstanceConfigurationUpdateDatasourceInstanceConfiguration0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testUpdateDatasourceInstanceConfigurationUpdateDatasourceInstanceConfiguration0(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.DatasourceConfigurationResponse = &components.DatasourceConfigurationResponse{ + Configuration: components.DatasourceInstanceConfiguration{ + Values: map[string]components.ConfigurationValue{}, + }, + } + 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/pathpostrestapiv1adminsearch.go b/tests/mockserver/internal/handler/pathpostrestapiv1adminsearch.go index 89975fde..2d6fc137 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1adminsearch.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1adminsearch.go @@ -70,7 +70,7 @@ func testAdminsearchAdminsearch0(w http.ResponseWriter, req *http.Request) { Snippets: []components.SearchResultSnippet{}, }, }, - GleanDataError: &components.GleanDataError{ + ErrorInfo: &components.GleanDataError{ ErrorMessages: []components.ErrorMessage{ components.ErrorMessage{ Source: types.String("gmail"), diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go b/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go index 5c99a0ad..371b9023 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go @@ -56,14 +56,14 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ operations.ResponseBody2{ Collection: &components.Collection{ Name: "", - Description: "motionless whenever paintwork import over cuckoo", + Description: "whole busily jive hawk gee basic minus hence", AddedRoles: []components.UserRoleSpecification{ components.UserRoleSpecification{ Person: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", }, - Role: components.UserRoleOwner, + Role: components.UserRoleAnswerModerator, }, }, RemovedRoles: []components.UserRoleSpecification{ @@ -90,7 +90,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ID: 363711, + ID: 158969, Creator: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -101,7 +101,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, Items: []components.CollectionItem{ components.CollectionItem{ - CollectionID: 570197, + CollectionID: 110375, CreatedBy: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -266,13 +266,13 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ Name: "George Clooney", ObfuscatedID: "abc123", }, - Role: components.UserRoleAnswerModerator, + Role: components.UserRoleEditor, }, }, }, Collection: &components.Collection{ Name: "", - Description: "athwart skateboard newsstand farm bourgeoisie ah how elliptical aha well-to-do", + Description: "wedge colorfully orientate rally", AudienceFilters: []components.FacetFilter{ components.FacetFilter{ FieldName: types.String("type"), @@ -288,7 +288,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ID: 643990, + ID: 131797, Creator: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -300,7 +300,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ Children: []components.Collection{ components.Collection{ Name: "", - Description: "woot purse salty even as advanced", + Description: "outside yippee sidetrack mature regularly mouser inject worth", AudienceFilters: []components.FacetFilter{ components.FacetFilter{ FieldName: types.String("type"), @@ -316,7 +316,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ID: 359978, + ID: 149448, Creator: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -328,7 +328,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ItemType: components.CollectionItemItemTypeURL, + ItemType: components.CollectionItemItemTypeCollection, }, }, }, diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1messages.go b/tests/mockserver/internal/handler/pathpostrestapiv1messages.go index ec30c908..b0950d91 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1messages.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1messages.go @@ -6603,7 +6603,7 @@ func testMessagesMessages0(w http.ResponseWriter, req *http.Request) { }, }, }, - GleanDataError: &components.GleanDataError{ + ErrorInfo: &components.GleanDataError{ ErrorMessages: []components.ErrorMessage{ components.ErrorMessage{ Source: types.String("gmail"), diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1search.go b/tests/mockserver/internal/handler/pathpostrestapiv1search.go index f2fcf477..b0c8dcfb 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1search.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1search.go @@ -70,7 +70,7 @@ func testSearchSearch0(w http.ResponseWriter, req *http.Request) { Snippets: []components.SearchResultSnippet{}, }, }, - GleanDataError: &components.GleanDataError{ + ErrorInfo: &components.GleanDataError{ ErrorMessages: []components.ErrorMessage{ components.ErrorMessage{ Source: types.String("gmail"), diff --git a/tests/mockserver/internal/sdk/models/components/actionsummary.go b/tests/mockserver/internal/sdk/models/components/actionsummary.go index 587431e0..2a1aed7e 100644 --- a/tests/mockserver/internal/sdk/models/components/actionsummary.go +++ b/tests/mockserver/internal/sdk/models/components/actionsummary.go @@ -8,6 +8,26 @@ type ActionSummary struct { ToolID string `json:"tool_id"` // The display name of the action. DisplayName string `json:"display_name"` + // The type of tool - RETRIEVAL for read-only operations, ACTION for operations that modify data. + Type *string `json:"type,omitempty"` + // The authentication type required - OAUTH_USER, OAUTH_ADMIN, API_KEY, BASIC_AUTH, DWD (domain-wide delegation), or NONE. + AuthType *string `json:"auth_type,omitempty"` + // For write actions only - REDIRECT (client renders URL) or EXECUTION (external server call). + WriteActionType *string `json:"write_action_type,omitempty"` + // Whether this action has been fully configured and validated. + IsSetupFinished *bool `json:"is_setup_finished,omitempty"` + // Indicates the kind of knowledge a tool would access or modify. + // Company knowledge: + // - Glean search, and any native tools that derive from it (e.g., expert search, code search) + // - Native federated tools to company data sources (e.g., outlook search) + // World knowledge: + // - Native tools that bring in public content (e.g., web browser) + // - Platform action like bingwebsearch, geminiwebsearch, etc + // Neutral knowledge: + // - Native tools that don't access or modify content via APIs (e.g., file analyst, think) + // - Platform read or write tools (creator has to determine their knowledge implications) + // + DataSource *string `json:"data_source,omitempty"` } func (o *ActionSummary) GetToolID() string { @@ -23,3 +43,38 @@ func (o *ActionSummary) GetDisplayName() string { } return o.DisplayName } + +func (o *ActionSummary) GetType() *string { + if o == nil { + return nil + } + return o.Type +} + +func (o *ActionSummary) GetAuthType() *string { + if o == nil { + return nil + } + return o.AuthType +} + +func (o *ActionSummary) GetWriteActionType() *string { + if o == nil { + return nil + } + return o.WriteActionType +} + +func (o *ActionSummary) GetIsSetupFinished() *bool { + if o == nil { + return nil + } + return o.IsSetupFinished +} + +func (o *ActionSummary) GetDataSource() *string { + if o == nil { + return nil + } + return o.DataSource +} diff --git a/tests/mockserver/internal/sdk/models/components/autocompleteresponse.go b/tests/mockserver/internal/sdk/models/components/autocompleteresponse.go index 7e2ca2ff..b5b93358 100644 --- a/tests/mockserver/internal/sdk/models/components/autocompleteresponse.go +++ b/tests/mockserver/internal/sdk/models/components/autocompleteresponse.go @@ -10,8 +10,8 @@ type AutocompleteResponse struct { SessionInfo *SessionInfo `json:"sessionInfo,omitempty"` Results []AutocompleteResult `json:"results,omitempty"` // Subsections of the results list from which distinct sections should be created. - Groups []AutocompleteResultGroup `json:"groups,omitempty"` - GleanDataError *GleanDataError `json:"errorInfo,omitempty"` + Groups []AutocompleteResultGroup `json:"groups,omitempty"` + ErrorInfo *GleanDataError `json:"errorInfo,omitempty"` // Time in milliseconds the backend took to respond to the request. BackendTimeMillis *int64 `json:"backendTimeMillis,omitempty"` } @@ -51,11 +51,11 @@ func (o *AutocompleteResponse) GetGroups() []AutocompleteResultGroup { return o.Groups } -func (o *AutocompleteResponse) GetGleanDataError() *GleanDataError { +func (o *AutocompleteResponse) GetErrorInfo() *GleanDataError { if o == nil { return nil } - return o.GleanDataError + return o.ErrorInfo } func (o *AutocompleteResponse) GetBackendTimeMillis() *int64 { diff --git a/tests/mockserver/internal/sdk/models/components/chatresponse.go b/tests/mockserver/internal/sdk/models/components/chatresponse.go index 45b9a649..a6f51d28 100644 --- a/tests/mockserver/internal/sdk/models/components/chatresponse.go +++ b/tests/mockserver/internal/sdk/models/components/chatresponse.go @@ -13,9 +13,6 @@ type ChatResponse struct { BackendTimeMillis *int64 `json:"backendTimeMillis,omitempty"` // A token that is used to track the session. ChatSessionTrackingToken *string `json:"chatSessionTrackingToken,omitempty"` - // Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth, aggregated across all tools invoked in this turn. - // - UnauthorizedDatasourceInstances []UnauthorizedDatasourceInstance `json:"unauthorizedDatasourceInstances,omitempty"` } func (o *ChatResponse) GetMessages() []ChatMessage { @@ -52,10 +49,3 @@ func (o *ChatResponse) GetChatSessionTrackingToken() *string { } return o.ChatSessionTrackingToken } - -func (o *ChatResponse) GetUnauthorizedDatasourceInstances() []UnauthorizedDatasourceInstance { - if o == nil { - return nil - } - return o.UnauthorizedDatasourceInstances -} diff --git a/tests/mockserver/internal/sdk/models/components/configurationvalue.go b/tests/mockserver/internal/sdk/models/components/configurationvalue.go new file mode 100644 index 00000000..f6fc2161 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/configurationvalue.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ConfigurationValue - A single configuration value, either a scalar or a list +type ConfigurationValue struct { + // The configuration value as a string. Only one of value or valueList should be populated. + Value *string `json:"value,omitempty"` + // The configuration value as a list of strings. Only one of value or valueList should be populated. + ValueList []string `json:"valueList,omitempty"` +} + +func (o *ConfigurationValue) GetValue() *string { + if o == nil { + return nil + } + return o.Value +} + +func (o *ConfigurationValue) GetValueList() []string { + if o == nil { + return nil + } + return o.ValueList +} diff --git a/tests/mockserver/internal/sdk/models/components/datasourceconfigurationresponse.go b/tests/mockserver/internal/sdk/models/components/datasourceconfigurationresponse.go new file mode 100644 index 00000000..0453f9ea --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/datasourceconfigurationresponse.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DatasourceConfigurationResponse - The greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist are included. +type DatasourceConfigurationResponse struct { + // Configuration for a datasource instance + Configuration DatasourceInstanceConfiguration `json:"configuration"` +} + +func (o *DatasourceConfigurationResponse) GetConfiguration() DatasourceInstanceConfiguration { + if o == nil { + return DatasourceInstanceConfiguration{} + } + return o.Configuration +} diff --git a/tests/mockserver/internal/sdk/models/components/datasourceinstanceconfiguration.go b/tests/mockserver/internal/sdk/models/components/datasourceinstanceconfiguration.go new file mode 100644 index 00000000..695fba51 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/datasourceinstanceconfiguration.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// DatasourceInstanceConfiguration - Configuration for a datasource instance +type DatasourceInstanceConfiguration struct { + // A map from configuration key names to their values + Values map[string]ConfigurationValue `json:"values"` +} + +func (o *DatasourceInstanceConfiguration) GetValues() map[string]ConfigurationValue { + if o == nil { + return map[string]ConfigurationValue{} + } + return o.Values +} diff --git a/tests/mockserver/internal/sdk/models/components/gleandataerror.go b/tests/mockserver/internal/sdk/models/components/gleandataerror.go index b984ddb7..d549ead5 100644 --- a/tests/mockserver/internal/sdk/models/components/gleandataerror.go +++ b/tests/mockserver/internal/sdk/models/components/gleandataerror.go @@ -12,9 +12,6 @@ type GleanDataError struct { ErrorMessages []ErrorMessage `json:"errorMessages,omitempty"` // Indicates the federated search results could not be fetched due to rate limiting. FederatedSearchRateLimitError *bool `json:"federatedSearchRateLimitError,omitempty"` - // Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth. - // - UnauthorizedDatasourceInstances []UnauthorizedDatasourceInstance `json:"unauthorizedDatasourceInstances,omitempty"` } func (o *GleanDataError) GetBadGmailToken() *bool { @@ -51,10 +48,3 @@ func (o *GleanDataError) GetFederatedSearchRateLimitError() *bool { } return o.FederatedSearchRateLimitError } - -func (o *GleanDataError) GetUnauthorizedDatasourceInstances() []UnauthorizedDatasourceInstance { - if o == nil { - return nil - } - return o.UnauthorizedDatasourceInstances -} diff --git a/tests/mockserver/internal/sdk/models/components/inviteinfo.go b/tests/mockserver/internal/sdk/models/components/inviteinfo.go index 84469a16..18cac8b3 100644 --- a/tests/mockserver/internal/sdk/models/components/inviteinfo.go +++ b/tests/mockserver/internal/sdk/models/components/inviteinfo.go @@ -16,11 +16,11 @@ type InviteInfo struct { Inviter *Person `json:"inviter,omitempty"` // The time this person was invited in ISO format (ISO 8601). // - // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + // Deprecated: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use ChannelInviteInfo instead. InviteTime *time.Time `json:"inviteTime,omitempty"` // The time this person was reminded in ISO format (ISO 8601) if a reminder was sent. // - // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + // Deprecated: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use ChannelInviteInfo instead. ReminderTime *time.Time `json:"reminderTime,omitempty"` } diff --git a/tests/mockserver/internal/sdk/models/components/resultsresponse.go b/tests/mockserver/internal/sdk/models/components/resultsresponse.go index 903402c8..6fd3dbe0 100644 --- a/tests/mockserver/internal/sdk/models/components/resultsresponse.go +++ b/tests/mockserver/internal/sdk/models/components/resultsresponse.go @@ -9,7 +9,7 @@ type ResultsResponse struct { Results []SearchResult `json:"results,omitempty"` StructuredResults []StructuredResult `json:"structuredResults,omitempty"` GeneratedQnaResult *GeneratedQna `json:"generatedQnaResult,omitempty"` - GleanDataError *GleanDataError `json:"errorInfo,omitempty"` + ErrorInfo *GleanDataError `json:"errorInfo,omitempty"` // A platform-generated request ID to correlate backend logs. RequestID *string `json:"requestID,omitempty"` // Time in milliseconds the backend took to respond to the request. @@ -51,11 +51,11 @@ func (o *ResultsResponse) GetGeneratedQnaResult() *GeneratedQna { return o.GeneratedQnaResult } -func (o *ResultsResponse) GetGleanDataError() *GleanDataError { +func (o *ResultsResponse) GetErrorInfo() *GleanDataError { if o == nil { return nil } - return o.GleanDataError + return o.ErrorInfo } func (o *ResultsResponse) GetRequestID() *string { diff --git a/tests/mockserver/internal/sdk/models/components/searchresponse.go b/tests/mockserver/internal/sdk/models/components/searchresponse.go index 7da8d59a..a9cdbe0e 100644 --- a/tests/mockserver/internal/sdk/models/components/searchresponse.go +++ b/tests/mockserver/internal/sdk/models/components/searchresponse.go @@ -9,7 +9,7 @@ type SearchResponse struct { Results []SearchResult `json:"results,omitempty"` StructuredResults []StructuredResult `json:"structuredResults,omitempty"` GeneratedQnaResult *GeneratedQna `json:"generatedQnaResult,omitempty"` - GleanDataError *GleanDataError `json:"errorInfo,omitempty"` + ErrorInfo *GleanDataError `json:"errorInfo,omitempty"` // A platform-generated request ID to correlate backend logs. RequestID *string `json:"requestID,omitempty"` // Time in milliseconds the backend took to respond to the request. @@ -66,11 +66,11 @@ func (o *SearchResponse) GetGeneratedQnaResult() *GeneratedQna { return o.GeneratedQnaResult } -func (o *SearchResponse) GetGleanDataError() *GleanDataError { +func (o *SearchResponse) GetErrorInfo() *GleanDataError { if o == nil { return nil } - return o.GleanDataError + return o.ErrorInfo } func (o *SearchResponse) GetRequestID() *string { diff --git a/tests/mockserver/internal/sdk/models/components/updatedatasourceconfigurationrequest.go b/tests/mockserver/internal/sdk/models/components/updatedatasourceconfigurationrequest.go new file mode 100644 index 00000000..07beb967 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/updatedatasourceconfigurationrequest.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// UpdateDatasourceConfigurationRequest - Request to update greenlisted configuration values for a datasource instance. Only keys that are exposed via the public API greenlist may be set. +type UpdateDatasourceConfigurationRequest struct { + // Configuration for a datasource instance + Configuration DatasourceInstanceConfiguration `json:"configuration"` +} + +func (o *UpdateDatasourceConfigurationRequest) GetConfiguration() DatasourceInstanceConfiguration { + if o == nil { + return DatasourceInstanceConfiguration{} + } + return o.Configuration +} diff --git a/tests/mockserver/internal/sdk/models/operations/getdatasourceinstanceconfiguration.go b/tests/mockserver/internal/sdk/models/operations/getdatasourceinstanceconfiguration.go new file mode 100644 index 00000000..515b849f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/getdatasourceinstanceconfiguration.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type GetDatasourceInstanceConfigurationRequest struct { + // The datasource type identifier (e.g. o365sharepoint) + DatasourceID string `pathParam:"style=simple,explode=false,name=datasourceId"` + // The datasource instance identifier + InstanceID string `pathParam:"style=simple,explode=false,name=instanceId"` +} + +func (o *GetDatasourceInstanceConfigurationRequest) GetDatasourceID() string { + if o == nil { + return "" + } + return o.DatasourceID +} + +func (o *GetDatasourceInstanceConfigurationRequest) GetInstanceID() string { + if o == nil { + return "" + } + return o.InstanceID +} + +type GetDatasourceInstanceConfigurationResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + DatasourceConfigurationResponse *components.DatasourceConfigurationResponse +} + +func (o *GetDatasourceInstanceConfigurationResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *GetDatasourceInstanceConfigurationResponse) GetDatasourceConfigurationResponse() *components.DatasourceConfigurationResponse { + if o == nil { + return nil + } + return o.DatasourceConfigurationResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/updatedatasourceinstanceconfiguration.go b/tests/mockserver/internal/sdk/models/operations/updatedatasourceinstanceconfiguration.go new file mode 100644 index 00000000..b8568c63 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/updatedatasourceinstanceconfiguration.go @@ -0,0 +1,56 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type UpdateDatasourceInstanceConfigurationRequest struct { + // The datasource type identifier (e.g. o365sharepoint) + DatasourceID string `pathParam:"style=simple,explode=false,name=datasourceId"` + // The datasource instance identifier + InstanceID string `pathParam:"style=simple,explode=false,name=instanceId"` + Body components.UpdateDatasourceConfigurationRequest `request:"mediaType=application/json"` +} + +func (o *UpdateDatasourceInstanceConfigurationRequest) GetDatasourceID() string { + if o == nil { + return "" + } + return o.DatasourceID +} + +func (o *UpdateDatasourceInstanceConfigurationRequest) GetInstanceID() string { + if o == nil { + return "" + } + return o.InstanceID +} + +func (o *UpdateDatasourceInstanceConfigurationRequest) GetBody() components.UpdateDatasourceConfigurationRequest { + if o == nil { + return components.UpdateDatasourceConfigurationRequest{} + } + return o.Body +} + +type UpdateDatasourceInstanceConfigurationResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // OK + DatasourceConfigurationResponse *components.DatasourceConfigurationResponse +} + +func (o *UpdateDatasourceInstanceConfigurationResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *UpdateDatasourceInstanceConfigurationResponse) GetDatasourceConfigurationResponse() *components.DatasourceConfigurationResponse { + if o == nil { + return nil + } + return o.DatasourceConfigurationResponse +} diff --git a/tests/mockserver/internal/sdk/models/sdkerrors/errorresponse.go b/tests/mockserver/internal/sdk/models/sdkerrors/errorresponse.go new file mode 100644 index 00000000..a3f04453 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/sdkerrors/errorresponse.go @@ -0,0 +1,22 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package sdkerrors + +import ( + "encoding/json" + "mockserver/internal/sdk/models/components" +) + +// ErrorResponse - Error response returned for failed requests +type ErrorResponse struct { + // Client-facing error message describing what went wrong + Message *string `json:"message,omitempty"` + HTTPMeta components.HTTPMetadata `json:"-"` +} + +var _ error = &ErrorResponse{} + +func (e *ErrorResponse) Error() string { + data, _ := json.Marshal(e) + return string(data) +} diff --git a/tests/mockserver/internal/sdk/models/sdkerrors/gleandataerror.go b/tests/mockserver/internal/sdk/models/sdkerrors/gleandataerror.go index 8e203ca2..05af2574 100644 --- a/tests/mockserver/internal/sdk/models/sdkerrors/gleandataerror.go +++ b/tests/mockserver/internal/sdk/models/sdkerrors/gleandataerror.go @@ -16,11 +16,8 @@ type GleanDataError struct { InvalidOperators []components.InvalidOperatorValueError `json:"invalidOperators,omitempty"` ErrorMessages []components.ErrorMessage `json:"errorMessages,omitempty"` // Indicates the federated search results could not be fetched due to rate limiting. - FederatedSearchRateLimitError *bool `json:"federatedSearchRateLimitError,omitempty"` - // Datasource instances that could not be queried because the user has not completed or has expired per-user OAuth. - // - UnauthorizedDatasourceInstances []components.UnauthorizedDatasourceInstance `json:"unauthorizedDatasourceInstances,omitempty"` - HTTPMeta components.HTTPMetadata `json:"-"` + FederatedSearchRateLimitError *bool `json:"federatedSearchRateLimitError,omitempty"` + HTTPMeta components.HTTPMetadata `json:"-"` } var _ error = &GleanDataError{} diff --git a/tests/mockserver/internal/sdk/optionalnullable/optionalnullable.go b/tests/mockserver/internal/sdk/optionalnullable/optionalnullable.go new file mode 100644 index 00000000..bdf1155c --- /dev/null +++ b/tests/mockserver/internal/sdk/optionalnullable/optionalnullable.go @@ -0,0 +1,250 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package optionalnullable + +import ( + "bytes" + "encoding/json" + "reflect" +) + +// OptionalNullable represents a field that can distinguish between three states: +// 1. Set to a value: field is present with a non-nil value +// 2. Set to nil: field is present but explicitly set to null in JSON +// 3. Unset: field is omitted from JSON entirely +// +// This type is designed to work with JSON marshaling/unmarshaling and supports +// the `omitempty` struct tag to properly omit unset fields from JSON output. +// +// Usage: +// +// type User struct { +// Name OptionalNullable[string] `json:"name,omitempty"` +// Age OptionalNullable[int] `json:"age,omitempty"` +// Tags OptionalNullable[[]string] `json:"tags,omitempty"` +// } +// +// // Set to value +// user.Name = FromVal("John") +// +// // Set to value (pointer form) +// name := "John" +// user.Name = From(&name) +// +// // Set to nil (will appear as "name": null in JSON) +// user.Name = From[string](nil) +// +// // Leave unset (will be omitted from JSON with omitempty) +// user := User{} +// +// WARNING: Do NOT use *OptionalNullable[T] as a field type. Always use OptionalNullable[T] directly. +// Using *OptionalNullable[T] will break the omitempty behavior and JSON marshaling. +// +// The type is implemented as a map[bool]*T where: +// - nil map represents unset state +// - Map with true key represents set state (value may be nil) +type OptionalNullable[T any] map[bool]*T + +// From creates a new OptionalNullable with the given value. +// Pass nil to create a OptionalNullable that is set to null. +// Pass a pointer to a value to create a OptionalNullable with that value. +// +// Examples: +// +// hello := "hello" +// From(&hello) // set to "hello" +// From[string](nil) // set to null +func From[T any](value *T) OptionalNullable[T] { + return map[bool]*T{ + true: value, + } +} + +// FromVal creates a new OptionalNullable set to the given value. +// This is a convenience constructor that avoids needing to create +// a temporary variable and take its address. +// +// Examples: +// +// FromVal("hello") // set to "hello" +// FromVal(42) // set to 42 +func FromVal[T any](value T) OptionalNullable[T] { + return map[bool]*T{ + true: &value, + } +} + +// IsNull returns true if the OptionalNullable is explicitly set to nil. +// Returns false if the OptionalNullable is unset or has a value. +// +// Note: This differs from traditional null checks because unset fields +// return false, not true. Use IsSet() to check if a field was provided. +func (n OptionalNullable[T]) IsNull() bool { + v, ok := n[true] + return ok && v == nil +} + +// IsSet returns true if the OptionalNullable has been explicitly set (to either a value or nil). +// Returns false if the OptionalNullable is unset (omitted from JSON). +// +// This is the key method for distinguishing between: +// - Set to nil: IsSet() = true, IsNull() = true +// - Unset: IsSet() = false, IsNull() = false +func (n OptionalNullable[T]) IsSet() bool { + _, ok := n[true] + return ok +} + +// Get returns the internal pointer and whether the field was set. +// +// Return values: +// - (ptr, true): field was set (ptr may be nil if set to null) +// - (nil, false): field was unset/omitted +// +// This method provides direct access to the internal pointer representation. +func (n OptionalNullable[T]) Get() (*T, bool) { + v, ok := n[true] + return v, ok +} + +// GetOrZero returns the value and whether it was set. +// +// Return values: +// - (value, true): field was set to a non-nil value +// - (zero, true): field was explicitly set to nil +// - (zero, false): field was unset/omitted +// +// Examples: +// +// val, ok := nullable.GetOrZero() +// if !ok { +// // Field was unset/omitted +// } else if nullable.IsNull() { +// // Field was explicitly set to null +// } else { +// // Field has a value: val +// } +func (n OptionalNullable[T]) GetOrZero() (T, bool) { + var zero T + + if v, ok := n[true]; ok { + if v == nil { + return zero, true + } + return *v, true + } + return zero, false +} + +// GetUntyped returns the value as interface{} and whether it was set. +// This is useful for reflection-based code that needs to work with the value +// without knowing the specific type T. +// +// Return values: +// - (value, true): field was set to a non-nil value +// - (nil, true): field was explicitly set to nil +// - (nil, false): field was unset/omitted +func (n OptionalNullable[T]) GetUntyped() (interface{}, bool) { + if v, ok := n[true]; ok { + if v == nil { + return nil, true + } + return *v, true + } + return nil, false +} + +// Set sets the OptionalNullable to the given value pointer. +// Pass nil to set the field to null. +// Pass a pointer to a value to set the field to that value. +// +// Examples: +// +// nullable.Set(ptrFrom("hello")) // set to "hello" +// nullable.Set(nil) // set to null +func (n *OptionalNullable[T]) Set(value *T) { + *n = map[bool]*T{ + true: value, + } +} + +// Unset removes the value, making the field unset/omitted. +// After calling Unset(), IsSet() will return false and the field +// will be omitted from JSON output when using omitempty. +func (n *OptionalNullable[T]) Unset() { + *n = map[bool]*T{} +} + +// MarshalJSON implements json.Marshaler. +// +// Behavior: +// - Unset fields: omitted from JSON when struct field has omitempty tag +// - Null fields: serialized as "null" +// - Value fields: serialized as the actual value +// +// The omitempty behavior works because an empty map is considered +// a zero value by Go's JSON package. +func (n OptionalNullable[T]) MarshalJSON() ([]byte, error) { + if n.IsNull() { + return []byte("null"), nil + } + + return json.Marshal(n[true]) +} + +// UnmarshalJSON implements json.Unmarshaler. +// +// Behavior: +// - "null" in JSON: sets the field to null (IsSet=true, IsNull=true) +// - Any other value: sets the field to that value (IsSet=true, IsNull=false) +// - Missing from JSON: field remains unset (IsSet=false, IsNull=false) +func (n *OptionalNullable[T]) UnmarshalJSON(data []byte) error { + if bytes.Equal(data, []byte("null")) { + n.Set(nil) + return nil + } + var v T + if err := json.Unmarshal(data, &v); err != nil { + return err + } + n.Set(&v) + return nil +} + +// NullableInterface defines the interface that all OptionalNullable[T] types implement. +// This interface provides untyped access to optional nullable values for reflection-based code. +type OptionalNullableInterface interface { + GetUntyped() (interface{}, bool) +} + +// AsOptionalNullable attempts to convert a reflect.Value to a OptionalNullableInterface. +// This is a helper function for reflection-based code that needs to check +// if a value implements the optional nullable interface pattern. +// +// Returns: +// - (nullable, true): if the value implements OptionalNullableInterface +// - (nil, false): if the value does not implement OptionalNullableInterface +// +// Example usage: +// +// if nullable, ok := AsOptionalNullable(reflectValue); ok { +// if value, isSet := nullable.GetUntyped(); isSet { +// // Handle the nullable value +// } +// } +func AsOptionalNullable(v reflect.Value) (OptionalNullableInterface, bool) { + // Check if the value can be converted to an interface first + if !v.CanInterface() { + return nil, false + } + + // Check if the underlying value is a nil map (unset nullable) + if v.Kind() == reflect.Map && v.IsNil() { + return nil, false + } + + if nullable, ok := v.Interface().(OptionalNullableInterface); ok { + return nullable, true + } + return nil, false +} diff --git a/tests/mockserver/internal/sdk/optionalnullable/optionalnullable_test.go b/tests/mockserver/internal/sdk/optionalnullable/optionalnullable_test.go new file mode 100644 index 00000000..52fb11f9 --- /dev/null +++ b/tests/mockserver/internal/sdk/optionalnullable/optionalnullable_test.go @@ -0,0 +1,1859 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package optionalnullable + +import ( + "encoding/json" + "reflect" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +// Test helper function to create pointers from values +func ptrFrom[T any](value T) *T { + return &value +} + +// Test helper types for comprehensive testing +type TestStruct struct { + Name string `json:"name"` + Age int `json:"age"` +} + +type TestContainer struct { + StringField OptionalNullable[string] `json:"string_field,omitempty"` + IntField OptionalNullable[int] `json:"int_field,omitempty"` + SliceField OptionalNullable[[]string] `json:"slice_field,omitempty"` + StructField OptionalNullable[TestStruct] `json:"struct_field,omitempty"` +} + +// TestNewNullable tests the From constructor +func TestNewNullable(t *testing.T) { + t.Parallel() + t.Run("with string value", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom("test")) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "test", got) + }) + + t.Run("with nil pointer", func(t *testing.T) { + t.Parallel() + nullable := From[string](nil) + + assert.True(t, nullable.IsSet()) + assert.True(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "", got) // zero value for string + }) + + t.Run("with int value", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom(42)) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, 42, got) + }) + + t.Run("with slice value", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom([]string{"a", "b", "c"})) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, []string{"a", "b", "c"}, got) + }) + + t.Run("with empty slice", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom([]string{})) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, []string{}, got) + }) + + t.Run("with struct value", func(t *testing.T) { + t.Parallel() + val := TestStruct{Name: "John", Age: 30} + nullable := From(&val) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + v, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, val, v) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, TestStruct{Name: "John", Age: 30}, got) + }) +} + +// TestFromVal tests the FromVal constructor +func TestFromVal(t *testing.T) { + t.Parallel() + t.Run("with string value", func(t *testing.T) { + t.Parallel() + nullable := FromVal("hello") + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "hello", got) + }) + + t.Run("with int value", func(t *testing.T) { + t.Parallel() + nullable := FromVal(42) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, 42, got) + }) + + t.Run("with struct value", func(t *testing.T) { + t.Parallel() + val := TestStruct{Name: "John", Age: 30} + nullable := FromVal(val) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, val, got) + }) + + t.Run("with zero value", func(t *testing.T) { + t.Parallel() + nullable := FromVal("") + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "", got) + }) +} + +// TestNewNullableUnset tests the NewNullableUnset constructor +func TestNewNullableUnset(t *testing.T) { + t.Parallel() + t.Run("string type", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[string] + + assert.False(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) // Unset is not null + + got, ok := nullable.GetOrZero() + assert.False(t, ok) + assert.Equal(t, "", got) // zero value for string + }) + + t.Run("int type", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[int] + + assert.False(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) // Unset is not null + + got, ok := nullable.GetOrZero() + assert.False(t, ok) + assert.Equal(t, 0, got) // zero value for int + }) + + t.Run("slice type", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[[]string] + + assert.False(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) // Unset is not null + + got, ok := nullable.GetOrZero() + assert.False(t, ok) + assert.Nil(t, got) // zero value for slice is nil + }) +} + +// TestIsNull tests the IsNull method +func TestIsNull(t *testing.T) { + t.Parallel() + t.Run("with value", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom("test")) + assert.False(t, nullable.IsNull()) + }) + + t.Run("with nil pointer", func(t *testing.T) { + t.Parallel() + nullable := From[string](nil) + assert.True(t, nullable.IsNull()) + }) + + t.Run("unset", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[string] + assert.False(t, nullable.IsNull()) + }) +} + +// TestIsSet tests the IsSet method +func TestIsSet(t *testing.T) { + t.Parallel() + t.Run("with value", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom("test")) + assert.True(t, nullable.IsSet()) + }) + + t.Run("with nil pointer", func(t *testing.T) { + t.Parallel() + nullable := From[string](nil) + assert.True(t, nullable.IsSet()) + }) + + t.Run("unset", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[string] + assert.False(t, nullable.IsSet()) + }) +} + +// TestGet tests the Get method +func TestGet(t *testing.T) { + t.Parallel() + t.Run("with string value", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom("test")) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "test", got) + }) + + t.Run("with nil pointer", func(t *testing.T) { + t.Parallel() + nullable := From[string](nil) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "", got) // zero value + }) + + t.Run("unset", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[string] + + got, ok := nullable.GetOrZero() + assert.False(t, ok) + assert.Equal(t, "", got) // zero value + }) + + t.Run("with slice value", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom([]string{"a", "b"})) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, []string{"a", "b"}, got) + }) + + t.Run("with nil slice pointer", func(t *testing.T) { + t.Parallel() + nullable := From[[]string](nil) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Nil(t, got) // zero value for slice is nil + }) +} + +// TestPointer tests the Pointer method +func TestPointer(t *testing.T) { + t.Parallel() + t.Run("with value", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom("test")) + + ptr, ok := nullable.Get() + assert.True(t, ok) + assert.NotNil(t, ptr) + assert.Equal(t, "test", *ptr) + }) + + t.Run("with nil pointer", func(t *testing.T) { + t.Parallel() + nullable := From[string](nil) + + ptr, ok := nullable.Get() + assert.True(t, ok) + assert.Nil(t, ptr) + }) + + t.Run("unset", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[string] + + ptr, ok := nullable.Get() + assert.False(t, ok) + assert.Nil(t, ptr) + }) +} + +// TestSet tests the Set method +func TestSet(t *testing.T) { + t.Parallel() + t.Run("set string value", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[string] + + // Initially unset + assert.False(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) // Unset is not null + + // Set a value + nullable.Set(ptrFrom("test")) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "test", got) + }) + + t.Run("set int value", func(t *testing.T) { + t.Parallel() + nullable := OptionalNullable[int]{} + + nullable.Set(ptrFrom(42)) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, 42, got) + }) + + t.Run("set slice value", func(t *testing.T) { + t.Parallel() + nullable := OptionalNullable[[]string]{} + + slice := []string{"a", "b"} + nullable.Set(ptrFrom(slice)) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, []string{"a", "b"}, got) + }) + + t.Run("set empty slice", func(t *testing.T) { + t.Parallel() + nullable := OptionalNullable[[]string]{} + + slice := []string{} + nullable.Set(ptrFrom(slice)) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, []string{}, got) + }) + + t.Run("overwrite existing value", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom("original")) + + // Verify original value + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "original", got) + + // Set new value + nullable.Set(ptrFrom("new")) + + got, ok = nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "new", got) + }) +} + +// TestUnset tests the Unset method +func TestUnset(t *testing.T) { + t.Parallel() + t.Run("unset from value", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom("test")) + + // Initially set + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + // Unset + nullable.Unset() + + assert.False(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) // After unset is not null + // Value is now internal to the map implementation + + got, ok := nullable.GetOrZero() + assert.False(t, ok) + assert.Equal(t, "", got) // zero value + }) + + t.Run("unset from nil", func(t *testing.T) { + t.Parallel() + nullable := From[string](nil) + + // Initially set to nil + assert.True(t, nullable.IsSet()) + assert.True(t, nullable.IsNull()) // Set to nil should be null + + // Unset + nullable.Unset() + + assert.False(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) // After unset is not null + }) + + t.Run("unset already unset", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[string] + + // Initially unset + assert.False(t, nullable.IsSet()) + + // Unset again + nullable.Unset() + + assert.False(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) // Empty map is not null + }) +} + +// TestMarshalJSON tests JSON marshaling +func TestMarshalJSON(t *testing.T) { + t.Parallel() + t.Run("marshal string value", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom("test")) + + data, err := json.Marshal(nullable) + require.NoError(t, err) + assert.Equal(t, `"test"`, string(data)) + }) + + t.Run("marshal int value", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom(42)) + + data, err := json.Marshal(nullable) + require.NoError(t, err) + assert.Equal(t, `42`, string(data)) + }) + + t.Run("marshal nil value", func(t *testing.T) { + t.Parallel() + nullable := From[string](nil) + + data, err := json.Marshal(nullable) + require.NoError(t, err) + assert.Equal(t, `null`, string(data)) + }) + + t.Run("marshal slice value", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom([]string{"a", "b", "c"})) + + data, err := json.Marshal(nullable) + require.NoError(t, err) + assert.Equal(t, `["a","b","c"]`, string(data)) + }) + + t.Run("marshal empty slice", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom([]string{})) + + data, err := json.Marshal(nullable) + require.NoError(t, err) + assert.Equal(t, `[]`, string(data)) + }) + + t.Run("marshal struct value", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom(TestStruct{Name: "John", Age: 30})) + + data, err := json.Marshal(nullable) + require.NoError(t, err) + assert.Equal(t, `{"name":"John","age":30}`, string(data)) + }) + + // Note: Unset values are not tested here because the current implementation + // doesn't handle unset fields in marshaling (see TODO in the code) +} + +// TestUnmarshalJSON tests JSON unmarshaling +func TestUnmarshalJSON(t *testing.T) { + t.Parallel() + t.Run("unmarshal string value", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[string] + err := json.Unmarshal([]byte(`"test"`), &nullable) + require.NoError(t, err) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "test", got) + }) + + t.Run("unmarshal int value", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[int] + err := json.Unmarshal([]byte(`42`), &nullable) + require.NoError(t, err) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, 42, got) + }) + + t.Run("unmarshal null value", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[string] + err := json.Unmarshal([]byte(`null`), &nullable) + require.NoError(t, err) + + assert.True(t, nullable.IsSet()) + assert.True(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "", got) // zero value + }) + + t.Run("unmarshal slice value", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[[]string] + err := json.Unmarshal([]byte(`["a","b","c"]`), &nullable) + require.NoError(t, err) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, []string{"a", "b", "c"}, got) + }) + + t.Run("unmarshal empty slice", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[[]string] + err := json.Unmarshal([]byte(`[]`), &nullable) + require.NoError(t, err) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, []string{}, got) + }) + + t.Run("unmarshal struct value", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[TestStruct] + err := json.Unmarshal([]byte(`{"name":"John","age":30}`), &nullable) + require.NoError(t, err) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, TestStruct{Name: "John", Age: 30}, got) + }) + + t.Run("unmarshal invalid JSON", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[string] + err := json.Unmarshal([]byte(`invalid`), &nullable) + assert.Error(t, err) + + // Ensure the nullable remains unset after error + assert.False(t, nullable.IsSet()) + }) + + t.Run("unmarshal invalid JSON for int", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[int] + err := json.Unmarshal([]byte(`"not_a_number"`), &nullable) + assert.Error(t, err) + + // Ensure the nullable remains unset after error + assert.False(t, nullable.IsSet()) + }) + + t.Run("unmarshal malformed JSON", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[TestStruct] + err := json.Unmarshal([]byte(`{invalid json`), &nullable) + assert.Error(t, err) + + // Ensure the nullable remains unset after error + assert.False(t, nullable.IsSet()) + }) +} + +// TestJSONRoundTrip tests marshaling and unmarshaling together +func TestJSONRoundTrip(t *testing.T) { + t.Parallel() + t.Run("string value round trip", func(t *testing.T) { + t.Parallel() + nullable1 := From(ptrFrom("test value")) + + // Marshal + data, err := json.Marshal(nullable1) + require.NoError(t, err) + + // Unmarshal + var nullable2 OptionalNullable[string] + err = json.Unmarshal(data, &nullable2) + require.NoError(t, err) + + // Compare + assert.Equal(t, nullable1.IsSet(), nullable2.IsSet()) + assert.Equal(t, nullable1.IsNull(), nullable2.IsNull()) + + got1, ok1 := nullable1.GetOrZero() + got2, ok2 := nullable2.GetOrZero() + assert.Equal(t, ok1, ok2) + assert.Equal(t, got1, got2) + }) + + t.Run("nil value round trip", func(t *testing.T) { + t.Parallel() + nullable1 := From[string](nil) + + // Marshal + data, err := json.Marshal(nullable1) + require.NoError(t, err) + + // Unmarshal + var nullable2 OptionalNullable[string] + err = json.Unmarshal(data, &nullable2) + require.NoError(t, err) + + // Compare + assert.Equal(t, nullable1.IsSet(), nullable2.IsSet()) + assert.Equal(t, nullable1.IsNull(), nullable2.IsNull()) + + got1, ok1 := nullable1.GetOrZero() + got2, ok2 := nullable2.GetOrZero() + assert.Equal(t, ok1, ok2) + assert.Equal(t, got1, got2) + }) + + t.Run("slice round trip", func(t *testing.T) { + t.Parallel() + nullable1 := From(ptrFrom([]string{"a", "b", "c"})) + + // Marshal + data, err := json.Marshal(nullable1) + require.NoError(t, err) + + // Unmarshal + var nullable2 OptionalNullable[[]string] + err = json.Unmarshal(data, &nullable2) + require.NoError(t, err) + + // Compare + assert.Equal(t, nullable1.IsSet(), nullable2.IsSet()) + assert.Equal(t, nullable1.IsNull(), nullable2.IsNull()) + + got1, ok1 := nullable1.GetOrZero() + got2, ok2 := nullable2.GetOrZero() + assert.Equal(t, ok1, ok2) + assert.Equal(t, got1, got2) + }) +} + +// TestJSONToJSONRoundTrip tests starting with JSON and ensuring we can serialize back to the same JSON +func TestJSONToJSONRoundTrip(t *testing.T) { + t.Parallel() + t.Run("string value JSON round trip", func(t *testing.T) { + t.Parallel() + originalJSON := `"hello world"` + + // Unmarshal from JSON + var nullable OptionalNullable[string] + err := json.Unmarshal([]byte(originalJSON), &nullable) + require.NoError(t, err) + + // Verify state + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "hello world", got) + + // Marshal back to JSON + resultJSON, err := json.Marshal(nullable) + require.NoError(t, err) + assert.Equal(t, originalJSON, string(resultJSON)) + }) + + t.Run("null value JSON round trip", func(t *testing.T) { + t.Parallel() + originalJSON := `null` + + // Unmarshal from JSON + var nullable OptionalNullable[string] + err := json.Unmarshal([]byte(originalJSON), &nullable) + require.NoError(t, err) + + // Verify state + assert.True(t, nullable.IsSet()) + assert.True(t, nullable.IsNull()) + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "", got) // zero value + + // Marshal back to JSON + resultJSON, err := json.Marshal(nullable) + require.NoError(t, err) + assert.Equal(t, originalJSON, string(resultJSON)) + }) + + t.Run("int value JSON round trip", func(t *testing.T) { + t.Parallel() + originalJSON := `42` + + // Unmarshal from JSON + var nullable OptionalNullable[int] + err := json.Unmarshal([]byte(originalJSON), &nullable) + require.NoError(t, err) + + // Verify state + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, 42, got) + + // Marshal back to JSON + resultJSON, err := json.Marshal(nullable) + require.NoError(t, err) + assert.Equal(t, originalJSON, string(resultJSON)) + }) + + t.Run("slice value JSON round trip", func(t *testing.T) { + t.Parallel() + originalJSON := `["a","b","c"]` + + // Unmarshal from JSON + var nullable OptionalNullable[[]string] + err := json.Unmarshal([]byte(originalJSON), &nullable) + require.NoError(t, err) + + // Verify state + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, []string{"a", "b", "c"}, got) + + // Marshal back to JSON + resultJSON, err := json.Marshal(nullable) + require.NoError(t, err) + assert.Equal(t, originalJSON, string(resultJSON)) + }) + + t.Run("empty slice JSON round trip", func(t *testing.T) { + t.Parallel() + originalJSON := `[]` + + // Unmarshal from JSON + var nullable OptionalNullable[[]string] + err := json.Unmarshal([]byte(originalJSON), &nullable) + require.NoError(t, err) + + // Verify state + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, []string{}, got) + + // Marshal back to JSON + resultJSON, err := json.Marshal(nullable) + require.NoError(t, err) + assert.Equal(t, originalJSON, string(resultJSON)) + }) + + t.Run("struct value JSON round trip", func(t *testing.T) { + t.Parallel() + originalJSON := `{"name":"Alice","age":25}` + + // Unmarshal from JSON + var nullable OptionalNullable[TestStruct] + err := json.Unmarshal([]byte(originalJSON), &nullable) + require.NoError(t, err) + + // Verify state + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, TestStruct{Name: "Alice", Age: 25}, got) + + // Marshal back to JSON + resultJSON, err := json.Marshal(nullable) + require.NoError(t, err) + assert.Equal(t, originalJSON, string(resultJSON)) + }) +} + +// TestContainerStates tests comprehensive state detection and serialization with TestContainer +func TestContainerStates(t *testing.T) { + t.Parallel() + t.Run("all fields set to values", func(t *testing.T) { + t.Parallel() + container := TestContainer{ + StringField: From(ptrFrom("hello")), + IntField: From(ptrFrom(42)), + SliceField: From(ptrFrom([]string{"a", "b"})), + StructField: From(ptrFrom(TestStruct{Name: "John", Age: 30})), + } + + // Verify all fields are set and not null + assert.True(t, container.StringField.IsSet()) + assert.False(t, container.StringField.IsNull()) + assert.True(t, container.IntField.IsSet()) + assert.False(t, container.IntField.IsNull()) + assert.True(t, container.SliceField.IsSet()) + assert.False(t, container.SliceField.IsNull()) + assert.True(t, container.StructField.IsSet()) + assert.False(t, container.StructField.IsNull()) + + // Verify values + stringVal, ok := container.StringField.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "hello", stringVal) + + intVal, ok := container.IntField.GetOrZero() + assert.True(t, ok) + assert.Equal(t, 42, intVal) + + sliceVal, ok := container.SliceField.GetOrZero() + assert.True(t, ok) + assert.Equal(t, []string{"a", "b"}, sliceVal) + + structVal, ok := container.StructField.GetOrZero() + assert.True(t, ok) + assert.Equal(t, TestStruct{Name: "John", Age: 30}, structVal) + + // Test JSON serialization + data, err := json.Marshal(container) + require.NoError(t, err) + + var result map[string]interface{} + err = json.Unmarshal(data, &result) + require.NoError(t, err) + + assert.Equal(t, "hello", result["string_field"]) + assert.Equal(t, float64(42), result["int_field"]) // JSON numbers are float64 + assert.Equal(t, []interface{}{"a", "b"}, result["slice_field"]) + structResult := result["struct_field"].(map[string]interface{}) + assert.Equal(t, "John", structResult["name"]) + assert.Equal(t, float64(30), structResult["age"]) + }) + + t.Run("all fields set to nil", func(t *testing.T) { + t.Parallel() + container := TestContainer{ + StringField: From[string](nil), + IntField: From[int](nil), + SliceField: From[[]string](nil), + StructField: From[TestStruct](nil), + } + + // Verify all fields are set but null + assert.True(t, container.StringField.IsSet()) + assert.True(t, container.StringField.IsNull()) + assert.True(t, container.IntField.IsSet()) + assert.True(t, container.IntField.IsNull()) + assert.True(t, container.SliceField.IsSet()) + assert.True(t, container.SliceField.IsNull()) + assert.True(t, container.StructField.IsSet()) + assert.True(t, container.StructField.IsNull()) + + // Verify GetOrZero() behavior for nil values + stringVal, ok := container.StringField.GetOrZero() + assert.True(t, ok) // set to nil still returns true + assert.Equal(t, "", stringVal) // zero value + + intVal, ok := container.IntField.GetOrZero() + assert.True(t, ok) + assert.Equal(t, 0, intVal) // zero value + + sliceVal, ok := container.SliceField.GetOrZero() + assert.True(t, ok) + assert.Nil(t, sliceVal) // zero value for slice is nil + + structVal, ok := container.StructField.GetOrZero() + assert.True(t, ok) + assert.Equal(t, TestStruct{}, structVal) // zero value + + // Test JSON serialization - all should be null + data, err := json.Marshal(container) + require.NoError(t, err) + + var result map[string]interface{} + err = json.Unmarshal(data, &result) + require.NoError(t, err) + + assert.Nil(t, result["string_field"]) + assert.Nil(t, result["int_field"]) + assert.Nil(t, result["slice_field"]) + assert.Nil(t, result["struct_field"]) + }) + + t.Run("all fields unset", func(t *testing.T) { + t.Parallel() + container := TestContainer{} + + // Verify all fields are unset + assert.False(t, container.StringField.IsSet()) + assert.False(t, container.StringField.IsNull()) // unset is not null in new implementation + assert.False(t, container.IntField.IsSet()) + assert.False(t, container.IntField.IsNull()) + assert.False(t, container.SliceField.IsSet()) + assert.False(t, container.SliceField.IsNull()) + assert.False(t, container.StructField.IsSet()) + assert.False(t, container.StructField.IsNull()) + + // Verify GetOrZero() behavior for unset values + stringVal, ok := container.StringField.GetOrZero() + assert.False(t, ok) // unset returns false + assert.Equal(t, "", stringVal) // zero value + + intVal, ok := container.IntField.GetOrZero() + assert.False(t, ok) + assert.Equal(t, 0, intVal) // zero value + + sliceVal, ok := container.SliceField.GetOrZero() + assert.False(t, ok) + assert.Nil(t, sliceVal) // zero value + + structVal, ok := container.StructField.GetOrZero() + assert.False(t, ok) + assert.Equal(t, TestStruct{}, structVal) // zero value + + // Test JSON serialization - unset fields should be omitted due to omitempty + data, err := json.Marshal(container) + require.NoError(t, err) + + var result map[string]interface{} + err = json.Unmarshal(data, &result) + require.NoError(t, err) + + // With omitempty, unset fields should not appear in JSON + assert.NotContains(t, result, "string_field") + assert.NotContains(t, result, "int_field") + assert.NotContains(t, result, "slice_field") + assert.NotContains(t, result, "struct_field") + }) + + t.Run("slice field states: nil vs unset vs empty vs set", func(t *testing.T) { + t.Parallel() + // Test all possible slice states + nilSlice := TestContainer{ + SliceField: From[[]string](nil), // explicitly set to nil + } + unsetSlice := TestContainer{} // unset + emptySlice := TestContainer{ + SliceField: From(ptrFrom([]string{})), // empty slice + } + setSlice := TestContainer{ + SliceField: From(ptrFrom([]string{"a", "b"})), // slice with values + } + + // Verify nil slice + assert.True(t, nilSlice.SliceField.IsSet()) + assert.True(t, nilSlice.SliceField.IsNull()) + val, ok := nilSlice.SliceField.GetOrZero() + assert.True(t, ok) + assert.Nil(t, val) + + // Verify unset slice + assert.False(t, unsetSlice.SliceField.IsSet()) + assert.False(t, unsetSlice.SliceField.IsNull()) // Unset is not null + val, ok = unsetSlice.SliceField.GetOrZero() + assert.False(t, ok) + assert.Nil(t, val) + + // Verify empty slice + assert.True(t, emptySlice.SliceField.IsSet()) + assert.False(t, emptySlice.SliceField.IsNull()) + val, ok = emptySlice.SliceField.GetOrZero() + assert.True(t, ok) + assert.Equal(t, []string{}, val) + + // Verify set slice + assert.True(t, setSlice.SliceField.IsSet()) + assert.False(t, setSlice.SliceField.IsNull()) + val, ok = setSlice.SliceField.GetOrZero() + assert.True(t, ok) + assert.Equal(t, []string{"a", "b"}, val) + + // Test JSON serialization for each state + nilData, err := json.Marshal(nilSlice) + require.NoError(t, err) + assert.Contains(t, string(nilData), `"slice_field":null`) + + unsetData, err := json.Marshal(unsetSlice) + require.NoError(t, err) + assert.NotContains(t, string(unsetData), "slice_field") // omitted due to omitempty + + emptyData, err := json.Marshal(emptySlice) + require.NoError(t, err) + assert.Contains(t, string(emptyData), `"slice_field":[]`) + + setData, err := json.Marshal(setSlice) + require.NoError(t, err) + assert.Contains(t, string(setData), `"slice_field":["a","b"]`) + }) + + t.Run("mixed states container", func(t *testing.T) { + t.Parallel() + container := TestContainer{ + StringField: From(ptrFrom("hello")), // set to value + IntField: From[int](nil), // set to nil + StructField: From(ptrFrom(TestStruct{Name: "Alice", Age: 25})), // set to value + } + + // Verify states + assert.True(t, container.StringField.IsSet()) + assert.False(t, container.StringField.IsNull()) + + assert.True(t, container.IntField.IsSet()) + assert.True(t, container.IntField.IsNull()) + + assert.False(t, container.SliceField.IsSet()) + assert.False(t, container.SliceField.IsNull()) // Unset is not null + + assert.True(t, container.StructField.IsSet()) + assert.False(t, container.StructField.IsNull()) + + // Test JSON serialization + data, err := json.Marshal(container) + require.NoError(t, err) + + var result map[string]interface{} + err = json.Unmarshal(data, &result) + require.NoError(t, err) + + assert.Equal(t, "hello", result["string_field"]) + assert.Nil(t, result["int_field"]) + assert.NotContains(t, result, "slice_field") // unset, so omitted + structResult := result["struct_field"].(map[string]interface{}) + assert.Equal(t, "Alice", structResult["name"]) + assert.Equal(t, float64(25), structResult["age"]) + }) + + t.Run("JSON unmarshaling preserves states", func(t *testing.T) { + t.Parallel() + // JSON with some fields missing, some null, some with values + jsonData := `{ + "string_field": "test", + "int_field": null, + "struct_field": {"name": "Bob", "age": 35} + }` + + var container TestContainer + err := json.Unmarshal([]byte(jsonData), &container) + require.NoError(t, err) + + // string_field: present with value + assert.True(t, container.StringField.IsSet()) + assert.False(t, container.StringField.IsNull()) + stringVal, ok := container.StringField.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "test", stringVal) + + // int_field: present but null + assert.True(t, container.IntField.IsSet()) + assert.True(t, container.IntField.IsNull()) + intVal, ok := container.IntField.GetOrZero() + assert.True(t, ok) + assert.Equal(t, 0, intVal) // zero value + + // slice_field: missing from JSON, should remain unset + assert.False(t, container.SliceField.IsSet()) + assert.False(t, container.SliceField.IsNull()) // Unset is not null + sliceVal, ok := container.SliceField.GetOrZero() + assert.False(t, ok) + assert.Nil(t, sliceVal) + + // struct_field: present with value + assert.True(t, container.StructField.IsSet()) + assert.False(t, container.StructField.IsNull()) + structVal, ok := container.StructField.GetOrZero() + assert.True(t, ok) + assert.Equal(t, TestStruct{Name: "Bob", Age: 35}, structVal) + }) +} + +// TestNilVsUnsetDistinction tests the key feature of distinguishing nil from unset +func TestNilVsUnsetDistinction(t *testing.T) { + t.Parallel() + t.Run("explicit nil vs unset", func(t *testing.T) { + t.Parallel() + // Explicitly set to nil + explicitNil := From[string](nil) + + // Unset + var unset OptionalNullable[string] + + // Both are null, but only one is set + assert.True(t, explicitNil.IsNull()) + assert.True(t, explicitNil.IsSet()) + + assert.False(t, unset.IsNull()) // Unset is not null + assert.False(t, unset.IsSet()) + + // Get behavior differs + got1, ok1 := explicitNil.GetOrZero() + got2, ok2 := unset.GetOrZero() + + assert.True(t, ok1) // explicitly set to nil returns true + assert.False(t, ok2) // unset returns false + assert.Equal(t, "", got1) // both return zero value + assert.Equal(t, "", got2) + + // Get behavior differs + ptr1, ok1 := explicitNil.Get() + ptr2, ok2 := unset.Get() + + assert.True(t, ok1) // explicitly set to nil returns true + assert.False(t, ok2) // unset returns false + assert.Nil(t, ptr1) // both return nil pointer + assert.Nil(t, ptr2) + }) + + t.Run("empty slice vs nil slice vs unset", func(t *testing.T) { + t.Parallel() + // Empty slice + emptyNullable := From(ptrFrom([]string{})) + + // Nil slice + nilNullable := From[[]string](nil) + + // Unset + var unsetNullable OptionalNullable[[]string] + + // All have different characteristics + assert.True(t, emptyNullable.IsSet()) + assert.False(t, emptyNullable.IsNull()) + + assert.True(t, nilNullable.IsSet()) + assert.True(t, nilNullable.IsNull()) + + assert.False(t, unsetNullable.IsSet()) + assert.False(t, unsetNullable.IsNull()) // Unset is not null + + // Get behavior + got1, ok1 := emptyNullable.GetOrZero() + got2, ok2 := nilNullable.GetOrZero() + got3, ok3 := unsetNullable.GetOrZero() + + assert.True(t, ok1) + assert.Equal(t, []string{}, got1) + + assert.True(t, ok2) + assert.Nil(t, got2) + + assert.False(t, ok3) + assert.Nil(t, got3) + }) +} + +// TestJSONOmitEmpty tests behavior with omitempty tag +func TestJSONOmitEmpty(t *testing.T) { + t.Parallel() + t.Run("marshal with omitempty", func(t *testing.T) { + t.Parallel() + // Test container with various nullable states + container := TestContainer{ + StringField: From(ptrFrom("test")), + IntField: From(ptrFrom(42)), + StructField: From[TestStruct](nil), // explicitly nil + } + + data, err := json.Marshal(container) + require.NoError(t, err) + + // Parse back to verify structure + var result map[string]interface{} + err = json.Unmarshal(data, &result) + require.NoError(t, err) + + // Should contain set fields + assert.Contains(t, result, "string_field") + assert.Contains(t, result, "int_field") + assert.Contains(t, result, "struct_field") + + // Should not contain unset field (due to omitempty) + // Note: This depends on how the marshaling handles unset fields + // The current implementation doesn't handle this case properly (see TODO) + }) + + t.Run("unmarshal missing fields", func(t *testing.T) { + t.Parallel() + // JSON with some fields missing + jsonData := `{"string_field": "test", "int_field": null}` + + var container TestContainer + err := json.Unmarshal([]byte(jsonData), &container) + require.NoError(t, err) + + // Present fields should be set + assert.True(t, container.StringField.IsSet()) + assert.False(t, container.StringField.IsNull()) + got, ok := container.StringField.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "test", got) + + // Null field should be set to nil + assert.True(t, container.IntField.IsSet()) + assert.True(t, container.IntField.IsNull()) + + // Missing fields should remain unset + assert.False(t, container.SliceField.IsSet()) + assert.False(t, container.StructField.IsSet()) + }) +} + +// TestEdgeCases tests various edge cases +func TestEdgeCases(t *testing.T) { + t.Parallel() + t.Run("zero values", func(t *testing.T) { + t.Parallel() + // Test with zero values that are not nil + intNullable := From(ptrFrom(0)) + stringNullable := From(ptrFrom("")) + + assert.True(t, intNullable.IsSet()) + assert.False(t, intNullable.IsNull()) + got, ok := intNullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, 0, got) + + assert.True(t, stringNullable.IsSet()) + assert.False(t, stringNullable.IsNull()) + got2, ok2 := stringNullable.GetOrZero() + assert.True(t, ok2) + assert.Equal(t, "", got2) + }) + + t.Run("pointer to pointer", func(t *testing.T) { + t.Parallel() + // Test with pointer to pointer type + inner := "test" + nullable := From(ptrFrom(&inner)) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, &inner, got) + assert.Equal(t, "test", *got) + }) + + t.Run("complex struct", func(t *testing.T) { + t.Parallel() + complexStruct := struct { + Name string + Values []int + Metadata map[string]string + }{ + Name: "complex", + Values: []int{1, 2, 3}, + Metadata: map[string]string{ + "key1": "value1", + "key2": "value2", + }, + } + + nullable := From(ptrFrom(complexStruct)) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, complexStruct, got) + }) +} + +// TestDoublePointers tests comprehensive double pointer scenarios +func TestDoublePointers(t *testing.T) { + t.Parallel() + + t.Run("string double pointer with value", func(t *testing.T) { + t.Parallel() + inner := "hello world" + ptr := &inner + nullable := From(ptrFrom(ptr)) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, ptr, got) + assert.Equal(t, &inner, got) + assert.Equal(t, "hello world", *got) + }) + + t.Run("int double pointer with value", func(t *testing.T) { + t.Parallel() + inner := 42 + ptr := &inner + nullable := From(ptrFrom(ptr)) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, ptr, got) + assert.Equal(t, &inner, got) + assert.Equal(t, 42, *got) + }) + + t.Run("double pointer to nil", func(t *testing.T) { + t.Parallel() + var ptr *string = nil + nullable := From(ptrFrom(ptr)) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, ptr, got) + assert.Nil(t, got) + }) + + t.Run("nil double pointer", func(t *testing.T) { + t.Parallel() + nullable := From[*string](nil) + + assert.True(t, nullable.IsSet()) + assert.True(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Nil(t, got) // zero value for **string is nil + }) + + t.Run("unset double pointer", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[*string] + + assert.False(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.False(t, ok) + assert.Nil(t, got) // zero value for **string is nil + }) + + t.Run("double pointer modification", func(t *testing.T) { + t.Parallel() + inner := "original" + ptr := &inner + nullable := From(ptrFrom(ptr)) + + // Verify original value + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "original", *got) + + // Modify through double pointer + *got = "modified" + assert.Equal(t, "modified", inner) + assert.Equal(t, "modified", *got) + }) + + t.Run("double pointer to struct", func(t *testing.T) { + t.Parallel() + inner := TestStruct{Name: "Alice", Age: 30} + ptr := &inner + nullable := From(ptrFrom(ptr)) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, ptr, got) + assert.Equal(t, TestStruct{Name: "Alice", Age: 30}, *got) + + // Modify through double pointer + (*got).Name = "Bob" + assert.Equal(t, "Bob", inner.Name) + assert.Equal(t, "Bob", (*got).Name) + }) + + t.Run("double pointer to slice", func(t *testing.T) { + t.Parallel() + inner := []string{"a", "b", "c"} + ptr := &inner + nullable := From(ptrFrom(ptr)) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, ptr, got) + assert.Equal(t, []string{"a", "b", "c"}, *got) + + // Modify through double pointer + *got = append(*got, "d") + assert.Equal(t, []string{"a", "b", "c", "d"}, inner) + assert.Equal(t, []string{"a", "b", "c", "d"}, *got) + }) + + t.Run("double pointer to empty slice", func(t *testing.T) { + t.Parallel() + inner := []string{} + ptr := &inner + nullable := From(ptrFrom(ptr)) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, ptr, got) + assert.Equal(t, []string{}, *got) + }) + + t.Run("double pointer to nil slice", func(t *testing.T) { + t.Parallel() + var inner []string = nil + ptr := &inner + nullable := From(ptrFrom(ptr)) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, ptr, got) + assert.Nil(t, *got) + }) + + t.Run("double pointer JSON marshaling", func(t *testing.T) { + t.Parallel() + inner := "json test" + ptr := &inner + nullable := From(ptrFrom(ptr)) + + data, err := json.Marshal(nullable) + require.NoError(t, err) + assert.Equal(t, `"json test"`, string(data)) + }) + + t.Run("double pointer JSON unmarshaling", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[*string] + err := json.Unmarshal([]byte(`"json test"`), &nullable) + require.NoError(t, err) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.NotNil(t, got) + assert.Equal(t, "json test", *got) + }) + + t.Run("double pointer JSON null marshaling", func(t *testing.T) { + t.Parallel() + nullable := From[*string](nil) + + data, err := json.Marshal(nullable) + require.NoError(t, err) + assert.Equal(t, `null`, string(data)) + }) + + t.Run("double pointer JSON null unmarshaling", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[*string] + err := json.Unmarshal([]byte(`null`), &nullable) + require.NoError(t, err) + + assert.True(t, nullable.IsSet()) + assert.True(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Nil(t, got) + }) + + t.Run("double pointer round trip", func(t *testing.T) { + t.Parallel() + inner := "round trip test" + ptr := &inner + nullable1 := From(ptrFrom(ptr)) + + // Marshal + data, err := json.Marshal(nullable1) + require.NoError(t, err) + + // Unmarshal + var nullable2 OptionalNullable[*string] + err = json.Unmarshal(data, &nullable2) + require.NoError(t, err) + + // Compare states + assert.Equal(t, nullable1.IsSet(), nullable2.IsSet()) + assert.Equal(t, nullable1.IsNull(), nullable2.IsNull()) + + got1, ok1 := nullable1.GetOrZero() + got2, ok2 := nullable2.GetOrZero() + assert.Equal(t, ok1, ok2) + + // Values should be equal + assert.Equal(t, *got1, *got2) + }) + + t.Run("triple pointer", func(t *testing.T) { + t.Parallel() + inner := "triple" + ptr1 := &inner + ptr2 := &ptr1 + nullable := From(ptrFrom(ptr2)) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, ptr2, got) + assert.Equal(t, ptr1, *got) + assert.Equal(t, "triple", **got) + }) + + t.Run("double pointer set and unset", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[*string] + + // Initially unset + assert.False(t, nullable.IsSet()) + + // Set to double pointer + inner := "set test" + ptr := &inner + nullable.Set(ptrFrom(ptr)) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "set test", *got) + + // Set to nil + nullable.Set(nil) + + assert.True(t, nullable.IsSet()) + assert.True(t, nullable.IsNull()) + + got, ok = nullable.GetOrZero() + assert.True(t, ok) + assert.Nil(t, got) + + // Unset + nullable.Unset() + + assert.False(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok = nullable.GetOrZero() + assert.False(t, ok) + assert.Nil(t, got) + }) + + t.Run("double pointer Get method", func(t *testing.T) { + t.Parallel() + inner := "get test" + ptr := &inner + nullable := From(ptrFrom(ptr)) + + // Test Get method + gotPtr, ok := nullable.Get() + assert.True(t, ok) + assert.NotNil(t, gotPtr) + assert.Equal(t, ptr, *gotPtr) + assert.Equal(t, "get test", **gotPtr) + + // Test with nil + nilNullable := From[*string](nil) + gotPtr, ok = nilNullable.Get() + assert.True(t, ok) + assert.Nil(t, gotPtr) + + // Test with unset + var unsetNullable OptionalNullable[*string] + gotPtr, ok = unsetNullable.Get() + assert.False(t, ok) + assert.Nil(t, gotPtr) + }) + + t.Run("double pointer zero values", func(t *testing.T) { + t.Parallel() + // Test with zero value string + inner := "" + ptr := &inner + nullable := From(ptrFrom(ptr)) + + assert.True(t, nullable.IsSet()) + assert.False(t, nullable.IsNull()) + + got, ok := nullable.GetOrZero() + assert.True(t, ok) + assert.Equal(t, "", *got) + + // Test with zero value int + innerInt := 0 + ptrInt := &innerInt + nullableInt := From(ptrFrom(ptrInt)) + + assert.True(t, nullableInt.IsSet()) + assert.False(t, nullableInt.IsNull()) + + gotInt, okInt := nullableInt.GetOrZero() + assert.True(t, okInt) + assert.Equal(t, 0, *gotInt) + }) +} + +// TestAsOptionalNullable tests the AsOptionalNullable helper function +func TestAsOptionalNullable(t *testing.T) { + t.Parallel() + + t.Run("with nullable string", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom("test")) + reflectValue := reflect.ValueOf(nullable) + + result, ok := AsOptionalNullable(reflectValue) + assert.True(t, ok) + assert.NotNil(t, result) + + value, isSet := result.GetUntyped() + assert.True(t, isSet) + assert.Equal(t, "test", value) + }) + + t.Run("with nullable int", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom(42)) + reflectValue := reflect.ValueOf(nullable) + + result, ok := AsOptionalNullable(reflectValue) + assert.True(t, ok) + assert.NotNil(t, result) + + value, isSet := result.GetUntyped() + assert.True(t, isSet) + assert.Equal(t, 42, value) + }) + + t.Run("with nullable nil", func(t *testing.T) { + t.Parallel() + nullable := From[string](nil) + reflectValue := reflect.ValueOf(nullable) + + result, ok := AsOptionalNullable(reflectValue) + assert.True(t, ok) + assert.NotNil(t, result) + + value, isSet := result.GetUntyped() + assert.True(t, isSet) + assert.Nil(t, value) + }) + + t.Run("with unset nullable", func(t *testing.T) { + t.Parallel() + var nullable OptionalNullable[string] + reflectValue := reflect.ValueOf(nullable) + + result, ok := AsOptionalNullable(reflectValue) + assert.False(t, ok) + assert.Nil(t, result) + }) + + t.Run("with non-nullable string", func(t *testing.T) { + t.Parallel() + regularString := "not nullable" + reflectValue := reflect.ValueOf(regularString) + + result, ok := AsOptionalNullable(reflectValue) + assert.False(t, ok) + assert.Nil(t, result) + }) + + t.Run("with non-nullable int", func(t *testing.T) { + t.Parallel() + regularInt := 42 + reflectValue := reflect.ValueOf(regularInt) + + result, ok := AsOptionalNullable(reflectValue) + assert.False(t, ok) + assert.Nil(t, result) + }) + + t.Run("with non-nullable map", func(t *testing.T) { + t.Parallel() + regularMap := map[string]int{"key": 42} + reflectValue := reflect.ValueOf(regularMap) + + result, ok := AsOptionalNullable(reflectValue) + assert.False(t, ok) + assert.Nil(t, result) + }) + + t.Run("with non-nullable struct", func(t *testing.T) { + t.Parallel() + regularStruct := TestStruct{Name: "test", Age: 30} + reflectValue := reflect.ValueOf(regularStruct) + + result, ok := AsOptionalNullable(reflectValue) + assert.False(t, ok) + assert.Nil(t, result) + }) + + t.Run("with nullable double pointer", func(t *testing.T) { + t.Parallel() + inner := "test" + ptr := &inner + nullable := From(ptrFrom(ptr)) + reflectValue := reflect.ValueOf(nullable) + + result, ok := AsOptionalNullable(reflectValue) + assert.True(t, ok) + assert.NotNil(t, result) + + value, isSet := result.GetUntyped() + assert.True(t, isSet) + assert.Equal(t, ptr, value) + assert.Equal(t, "test", *value.(*string)) + }) + + t.Run("with nullable slice", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom([]string{"a", "b", "c"})) + reflectValue := reflect.ValueOf(nullable) + + result, ok := AsOptionalNullable(reflectValue) + assert.True(t, ok) + assert.NotNil(t, result) + + value, isSet := result.GetUntyped() + assert.True(t, isSet) + assert.Equal(t, []string{"a", "b", "c"}, value) + }) + + t.Run("with nullable struct", func(t *testing.T) { + t.Parallel() + testStruct := TestStruct{Name: "Alice", Age: 25} + nullable := From(ptrFrom(testStruct)) + reflectValue := reflect.ValueOf(nullable) + + result, ok := AsOptionalNullable(reflectValue) + assert.True(t, ok) + assert.NotNil(t, result) + + value, isSet := result.GetUntyped() + assert.True(t, isSet) + assert.Equal(t, testStruct, value) + }) + + t.Run("with pointer to nullable", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom("test")) + ptrToNullable := &nullable + reflectValue := reflect.ValueOf(ptrToNullable) + + // This should work since the pointer to nullable still contains a nullable + result, ok := AsOptionalNullable(reflectValue) + assert.True(t, ok) + assert.NotNil(t, result) + + value, isSet := result.GetUntyped() + assert.True(t, isSet) + assert.Equal(t, "test", value) + }) + + t.Run("with interface containing nullable", func(t *testing.T) { + t.Parallel() + nullable := From(ptrFrom("test")) + var iface interface{} = nullable + reflectValue := reflect.ValueOf(iface) + + result, ok := AsOptionalNullable(reflectValue) + assert.True(t, ok) + assert.NotNil(t, result) + + value, isSet := result.GetUntyped() + assert.True(t, isSet) + assert.Equal(t, "test", value) + }) +} diff --git a/tests/mockserver/internal/sdk/utils/json.go b/tests/mockserver/internal/sdk/utils/json.go index 84d12928..ddc9f76c 100644 --- a/tests/mockserver/internal/sdk/utils/json.go +++ b/tests/mockserver/internal/sdk/utils/json.go @@ -299,6 +299,10 @@ func marshalValue(v interface{}, tag reflect.StructTag) (json.RawMessage, error) return []byte("null"), nil } + if implementsJSONMarshaler(v) { + return json.Marshal(v) + } + out := map[string]json.RawMessage{} for _, key := range val.MapKeys() { diff --git a/tests/test_datasources.py b/tests/test_datasources.py index 8aaeb530..68d59bc6 100644 --- a/tests/test_datasources.py +++ b/tests/test_datasources.py @@ -56,3 +56,39 @@ def test_datasources_post_api_index_v1_getdatasourceconfig(): res = glean.indexing.datasources.retrieve_config(datasource="") assert res is not None + + +def test_datasources_get_datasource_instance_configuration(): + test_http_client = create_test_http_client("getDatasourceInstanceConfiguration") + + 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.datasources.get_datasource_instance_configuration( + datasource_id="o365sharepoint", instance_id="o365sharepoint_abc123" + ) + assert res is not None + + +def test_datasources_update_datasource_instance_configuration(): + test_http_client = create_test_http_client("updateDatasourceInstanceConfiguration") + + 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.datasources.update_datasource_instance_configuration( + datasource_id="o365sharepoint", + instance_id="o365sharepoint_abc123", + configuration={ + "values": {}, + }, + ) + assert res is not None