diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 40af6bef..ded195f4 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,18 +1,18 @@ lockVersion: 2.0.0 id: 9d90eb9e-33f8-4170-8944-988f4000aad0 management: - docChecksum: f945598f65bd3d18fa64e0f4961a6114 + docChecksum: 977a9a2b50a51bca2e0bd9d559b43f4b docVersion: 0.9.0 - speakeasyVersion: 1.771.0 - generationVersion: 2.893.0 - releaseVersion: 0.12.0 - configChecksum: 8bfe606b275bc5efc3ce7ed037c4056d + speakeasyVersion: 1.784.1 + generationVersion: 2.911.3 + releaseVersion: 0.12.1 + configChecksum: 7b73ab5d36bcb2d2a4fa03e5e988aad3 repoURL: https://github.com/gleanwork/api-client-go.git installationURL: https://github.com/gleanwork/api-client-go persistentEdits: - generation_id: ec30c6c9-b9e2-4c2c-b84b-c672748e1609 - pristine_commit_hash: 275022a01801b24233a6b5525e7a26f607ac4b35 - pristine_tree_hash: cae619579d3cbbd7562a9868b7be6dd0c79c1175 + generation_id: d6f1ce53-b3ad-4833-bfe6-034f7ea89be2 + pristine_commit_hash: ff5f791e8318c0c55c6c23fe1c9c26c7ab6017bc + pristine_tree_hash: 9f8efb7c23177421c59601b2a508d44fe3db9a67 features: go: acceptHeaders: 2.81.2 @@ -37,7 +37,7 @@ features: mockServer: 0.1.4 nameOverrides: 2.81.4 responseFormat: 0.1.2 - retries: 2.84.2 + retries: 2.84.3 sdkHooks: 0.3.0 tests: 0.16.8 unions: 2.87.7 @@ -69,8 +69,8 @@ trackedFiles: pristine_git_object: 9c4d301118236a7c81e8b0fffb6e387ed59361c2 agents.go: id: 148cd435d94c - last_write_checksum: sha1:c5ef6f20a91b0dcdfad42e2a366cc5981993e700 - pristine_git_object: 190fa026af817d70a69f5b4f5d7e796fc566ffd1 + last_write_checksum: sha1:3ca213a46436799bbe44bdd1f951549439fc77e4 + pristine_git_object: 785f0c4c656e79a757688989a57d832d2705f8ca announcements.go: id: 5da39fbc3664 last_write_checksum: sha1:40db85bb384db08da04661a1524793d3f827d903 @@ -281,8 +281,8 @@ trackedFiles: pristine_git_object: 12f0bc5ffe50e66cf06b80dd2e2f14275bbe9aee docs/models/components/allowlistoptions.md: id: 4924799808ef - last_write_checksum: sha1:ae41d58f768fd76be590b5c750b73722b6bcbc6e - pristine_git_object: eec9b7fc0a80d0597cbeaee80958bb3fa911397e + last_write_checksum: sha1:006820eb4bc7b20b7411cca846916c1852060480 + pristine_git_object: d03f820bedc2e8e770bbe6e74ee94d41e7cfd929 docs/models/components/announcement.md: id: a4a18f09edf6 last_write_checksum: sha1:6621449f7170b1c1f3c55921eefd98d66f419c01 @@ -695,6 +695,10 @@ trackedFiles: id: f21a858b0ee3 last_write_checksum: sha1:0373dfb622a7b95e869dfe2b56bff1b332d5af79 pristine_git_object: bdc4d03a63f32cba38f08d3ba0c73198d36ea58c + docs/models/components/createworkflowrequest.md: + id: 83322c7324ff + last_write_checksum: sha1:49d1d33d0c8ec5a5615e60cddd90c5e03ed5c12f + pristine_git_object: 04b9123c49c0f3d491c348954530fd6da4268650 docs/models/components/currentactiveusers.md: id: 94cb04038236 last_write_checksum: sha1:3b520a088a20751fff3ed69bd5b5e37b063f681b @@ -973,8 +977,8 @@ trackedFiles: pristine_git_object: d8c3e9d86351bc0d85513a53148f5714a36fde1f docs/models/components/dlpconfig.md: id: 32b6de891696 - last_write_checksum: sha1:7543e9fc9aa6977b9ddbebfb83150ce7d84303df - pristine_git_object: 79ba2e7ca8ce1a9ba4e7f333659913899ff3725a + last_write_checksum: sha1:e1f9ddce483b49e6683b16b1affc3482492b4d2d + pristine_git_object: 149f104fa28c2e398b387ec2b2f135f051e18e11 docs/models/components/dlpexportfindingsrequest.md: id: f3b2752c4925 last_write_checksum: sha1:61f99751e7e4e0be507f4d528eb5b4dc6568b78e @@ -1285,8 +1289,8 @@ trackedFiles: pristine_git_object: c8e4adbb9259788d825acac24b08c9cd9afca960 docs/models/components/feedrequestcategory.md: id: 801f1c3c64d4 - last_write_checksum: sha1:7234d1dd7f4189e73da49b411c91eb05f8c90704 - pristine_git_object: 6983b14a9f97b02186be2c797bc165db37d8b6ea + last_write_checksum: sha1:f2214a5d0bad008466e1e5fd586f305dbc51d830 + pristine_git_object: e8ebfae36de56bf6cff5f4bb13776745bd4b4ece docs/models/components/feedrequestoptions.md: id: 76c5e4412304 last_write_checksum: sha1:674915ceaa3b9eec9d9543dc9f0e6a85b394174e @@ -1297,12 +1301,12 @@ trackedFiles: pristine_git_object: c053a79c66be5570c7e8dfb13885f5c0c050a574 docs/models/components/feedresult.md: id: c3084f56c0cc - last_write_checksum: sha1:01f5be487240f045c4af61954100a410009b207f - pristine_git_object: 1a407813c5400167e6e0940fa546b008a8a2177d + last_write_checksum: sha1:b5233d7c70106e8c18d14ff9e9afd99bc28f4b62 + pristine_git_object: a3d714f78ae220cd1f1ebda6e5c4ae2d51846208 docs/models/components/feedresultcategory.md: id: 94c0249352b4 - last_write_checksum: sha1:ff549de34c97cd9d83b448d8ba2c7a82fc0a35a1 - pristine_git_object: d5f5dcef3a4c494d631c64982d044b1c5e72642f + last_write_checksum: sha1:c64cab9974961c414809851b518cb78430415a22 + pristine_git_object: ddbeac8787384671c3857b8b9ea3755d93992f5c docs/models/components/fieldscope.md: id: 23caffb85bb7 last_write_checksum: sha1:65cdffa9b7bf28a760c906f49dc7417f37b9e56f @@ -1493,8 +1497,8 @@ trackedFiles: pristine_git_object: 3bc2faeab2b3d059c5ca2d5b65715697fb3d8a89 docs/models/components/grouptype.md: id: e2545abf3697 - last_write_checksum: sha1:c17f6c31eea959ea449a28e7300d50c3967fbc57 - pristine_git_object: 97c6e3ed8770ddf5401d5c40a70f64fe2a6bc497 + last_write_checksum: sha1:316a11503746d8e7f31be225f2d24b5ec87fb89f + pristine_git_object: 03d6f1c5a9622bed4854e2167ee7acc278c08e51 docs/models/components/hidebuiltinfacet.md: id: 9466769b23b0 last_write_checksum: sha1:6e587c2e9352108febf239261b623d2c6a548afa @@ -1621,8 +1625,8 @@ trackedFiles: pristine_git_object: 1bea03f64d1d2cc4ba8bf2f9dc1323ce275348aa docs/models/components/justificationtype.md: id: 5a15880767a5 - last_write_checksum: sha1:23ab2125d00c51ec3572efc6eb836b3b97037679 - pristine_git_object: 75855017609934001dcb5f801641ee4211cc6c9a + last_write_checksum: sha1:f8709efc8fb735c9610b89065f93525593087651 + pristine_git_object: 7a67633629ee641ce79bb6e4df696c26e600a4a5 docs/models/components/knowledgetype.md: id: cf27a7cefa69 last_write_checksum: sha1:f7294d6350e558a0a626ac41241ccbf0facacf10 @@ -1895,6 +1899,10 @@ trackedFiles: id: 13144145289b last_write_checksum: sha1:fbe30049c69433049a64d614fde5fda3c4724d6f pristine_git_object: 9d48703e1b73640c405b8d69c59f392333053671 + docs/models/components/placementreason.md: + id: 4aca343a58b8 + last_write_checksum: sha1:53884c743cf61c80b110a1d4f32d33efc2b79d28 + pristine_git_object: 3a28581375dae69fbba45979f294764aa0b537a0 docs/models/components/possiblevalue.md: id: 77671a7accb8 last_write_checksum: sha1:36b94fefc8bd359225f1c9aa552fbddd507dd17d @@ -2611,6 +2619,14 @@ trackedFiles: id: 9a084af35c0a last_write_checksum: sha1:ed59bffa0db823751cfed5e1b20ab0bbe6eecda6 pristine_git_object: 7b4e4093b11c188c3a5fcbf6005afe4cb126bbe5 + docs/models/operations/createagentrequest.md: + id: ef82cb982427 + last_write_checksum: sha1:93d3173d7d41b5e84128c370cb66e2ba69b438a9 + pristine_git_object: cd1d0e69f3a0e8e44e702e645cf940d9de1bfebc + docs/models/operations/createagentresponse.md: + id: 88fb8b150644 + last_write_checksum: sha1:c5a78f35479e92340d4857c28ea78274a7597908 + pristine_git_object: 7aec6c72ba7acd89a70fbc6b801fb86513eb2fe9 docs/models/operations/createandstreamrunresponse.md: id: b2bfb28fb930 last_write_checksum: sha1:2babff3d08910c0db2cf679e28fc578ec749bd34 @@ -3425,8 +3441,8 @@ trackedFiles: pristine_git_object: 018ef72bf766f3a72131d0539b29ae19162b8c75 docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:fb7b3f61fb0f2e9145a7b1a00a87aa20e3f3bd83 - pristine_git_object: d34e421e21346a68013846a4d03173d11f944a10 + last_write_checksum: sha1:79e6e7f09678b8941a1333aef17f8b06320e70bc + pristine_git_object: e806686f97076d941d5afb7e24532645b418887a docs/sdks/announcements/README.md: id: 3d2e130a217c last_write_checksum: sha1:97d528dc357f375132308cb8343e29e151f0ffa1 @@ -3569,8 +3585,8 @@ trackedFiles: pristine_git_object: 117e015a2b8fce0cb8a931963503e7ab1c7066d5 glean.go: id: f5ed099b8e85 - last_write_checksum: sha1:6caf2ea24108d149dbbfee0df4056224e72b8cf5 - pristine_git_object: 719ad4b1e7c479982a00de86e66950d6c034868b + last_write_checksum: sha1:45b7a89e730c7a1f12aaf9e9dc5d0d238006bc5d + pristine_git_object: 504655cc5130cac735b2186bb8aa6d84804beb8f go.mod: id: c47645c391ad last_write_checksum: sha1:cf65a2c96e303858d4cf70e07d4c44d3f1c1db38 @@ -3789,8 +3805,8 @@ trackedFiles: pristine_git_object: 622e7824b05eb049595b71d99403273594d6d2fc models/components/allowlistoptions.go: id: e21274196fe8 - last_write_checksum: sha1:89b411a5bdcca07a8f7470839f7bc38501066bcf - pristine_git_object: 9e035c195ecdd79c5bcbea9f6ed753add5d01e23 + last_write_checksum: sha1:e0a1e57455066686b7999a307044d07e40d75b16 + pristine_git_object: 02c36f140e515d60920ae1cc45e5189d82ee6d49 models/components/announcement.go: id: f865c8524494 last_write_checksum: sha1:c4bb0b76a5d2dd7f9d372e561ea412f368f2782a @@ -4115,6 +4131,10 @@ trackedFiles: id: 45b1630b4056 last_write_checksum: sha1:6f307a7edbaab3e81914a689b458e32826c4de1f pristine_git_object: cfac0880bbbc9cb1a70908990c4d458b2c64002d + models/components/createworkflowrequest.go: + id: 6280e28878f7 + last_write_checksum: sha1:73b0204c60a21cf06f21fbd88913c56b2cde66f0 + pristine_git_object: 10e8b57eace7f89e2c31dceede4aedb4a43f013b models/components/currentactiveusers.go: id: aa094b46ec70 last_write_checksum: sha1:a5f4ec235cdb4b3a3779fd05bba67c392b0d542b @@ -4353,8 +4373,8 @@ trackedFiles: pristine_git_object: 190fcea33ccc91806cf33275c890968ee4e2d356 models/components/dlpconfig.go: id: 9bb1a2e2cb58 - last_write_checksum: sha1:2afb117e481ecc2695ad4fc518d866094061c546 - pristine_git_object: bf90d9d659178e023aa6f2f5d4e5b33b9542298d + last_write_checksum: sha1:66ddc0128828a9261ab7e28d15421575325afa36 + pristine_git_object: 71d49712e0ef937ef7794d28e0a501b8b9d5f571 models/components/dlpexportfindingsrequest.go: id: 21cae6ace4f8 last_write_checksum: sha1:9684bf724d3374520d980181f5ed67aa0c60d7ae @@ -4577,12 +4597,12 @@ trackedFiles: pristine_git_object: 220dbff76d0d3d12e6bdcb05787a6df030124ca5 models/components/feedentry.go: id: 2826af1aa01a - last_write_checksum: sha1:23cb4c832af30841d0d456764325b90c40d12cfa - pristine_git_object: 4b2b445128f6baf494bd18d5ad5cc1d35eaa175f + last_write_checksum: sha1:a05d56fcecca15dd9a6ca51894e000138cf45810 + pristine_git_object: c1d16a1fc3486d113f6738654d8792325da722ae models/components/feedrequest.go: id: 9f0a682fc981 - last_write_checksum: sha1:514927456d1c2feb6401bb7f4cc5141060684208 - pristine_git_object: 64a43533a5754b097e2f186b84f0bb8d882b7b9a + last_write_checksum: sha1:174903ec956c99c674dae98a7d218f48b132f8f3 + pristine_git_object: 9e80202aa794ac71ad16cddd60f389f1a1154193 models/components/feedrequestoptions.go: id: a56c104c989d last_write_checksum: sha1:7f238a9abb079c78202b1a9f65c87b82420f63ec @@ -4593,8 +4613,8 @@ trackedFiles: pristine_git_object: 60cb4b19cbb9bd29e37128e3110b2bf0a8f80d30 models/components/feedresult.go: id: f017ac6e3ac3 - last_write_checksum: sha1:d8be9a7357790ab4936801113beb02d2f03b5677 - pristine_git_object: 952d93d3bfb149f745bd1a2790518afa7fd2a68d + last_write_checksum: sha1:f25d0ed8d7048aeacdf409554668afc0c90fc9e6 + pristine_git_object: cce71a7501ef27830cc45de95cd6c4b8cacc0da3 models/components/followupaction.go: id: aba266d23418 last_write_checksum: sha1:0a17407e6beba30680e5c38151e426a5ce7aab76 @@ -4753,8 +4773,8 @@ trackedFiles: pristine_git_object: cf6059d775dafd0bb2f869aa144b40f755e427c5 models/components/grouptype.go: id: 989fa4b18ad8 - last_write_checksum: sha1:0a53af36cb9c2097b25355ed9a2eb472274e9e27 - pristine_git_object: b9add44b6a29dbb82e3817f88fbd310cd9724558 + last_write_checksum: sha1:39f11030935082cda79de19f3f578f91e37b9b4f + pristine_git_object: 0b0b9552dd3c16e7f2bcf91cce6dbbb550d09274 models/components/hotword.go: id: c8205d78a94a last_write_checksum: sha1:ff6bd2b85f17c0ab04020fd672b3e765117574a0 @@ -5579,6 +5599,10 @@ trackedFiles: id: 69465c5c3f1b last_write_checksum: sha1:df6a1cca454bdd63f8c538f43b4f686a655df8bc pristine_git_object: 3a38f7824c54db96d44fcc684afe21000820eddc + models/operations/createagent.go: + id: d08a3cb4b14a + last_write_checksum: sha1:046fcabf9502146ac350b22719b121b943645a16 + pristine_git_object: b0737f13f2bb98b1c3c112c00a72d68c6543c7d4 models/operations/createandstreamrun.go: id: 79b0f0117c93 last_write_checksum: sha1:4af4c9ac0ea966cedb4caff240a43c80fe807a29 @@ -6093,8 +6117,8 @@ trackedFiles: pristine_git_object: 4c8759376d549295c1497c47c40a492c82b185c6 retry/config.go: id: 82d673cb0389 - last_write_checksum: sha1:7f7d96b59a18e95bac847ae09c63bbd911ee8432 - pristine_git_object: 5b3dc7c122d8ab08905485342d7474f8f163888d + last_write_checksum: sha1:102d1953fbd7e9f312c4442c71ccca2eaaeaa27d + pristine_git_object: 767002c7898128324d8741ce9c534bd466492169 search.go: id: 4c057402d2bf last_write_checksum: sha1:d6702b0ce551cf4d68ae4c33f0a48925ea6b9e4b @@ -6105,8 +6129,8 @@ trackedFiles: pristine_git_object: e01e64d74275c548227d1230509ec9bc80bcc4ee tests/agents_test.go: id: 8512a40a0375 - last_write_checksum: sha1:bec15931183a94711d06640b18fa8c0b4200766e - pristine_git_object: 8161b4c1c71169444b4c0229c6a2082f503a2a5c + last_write_checksum: sha1:eff748af5a12327c3d486b03afc5ba0ca0768abf + pristine_git_object: 03ff66b1d84e56a59324e559eefbfa692a311078 tests/announcements_test.go: id: 983abc2e09c3 last_write_checksum: sha1:cb5b57a0d61b67a848b2e21a1e4435b8f995a72e @@ -6201,8 +6225,8 @@ trackedFiles: pristine_git_object: 6d9cbca42012c2760de3ecaf4f569c53d32197da tests/messages_test.go: id: 3433c956b7a3 - last_write_checksum: sha1:63e7b1c9a68b43467855286635a88cb166b2bc79 - pristine_git_object: febdc0e8a34b769bfc6dcfe3a9e33053b2267433 + last_write_checksum: sha1:352ecfa3a01795bbe7fad9b0202c4ccaa02448c3 + pristine_git_object: 64ef64fe1c0ccbc223987d87ddddf3d6e2de7799 tests/mockserver/.gitignore: id: 7705eb663274 last_write_checksum: sha1:228e1b05712a973948fd771323a2140a3b355ff4 @@ -6257,8 +6281,8 @@ trackedFiles: pristine_git_object: 929558ef2e1165f7e09da6d0a64f016c90971655 tests/mockserver/internal/handler/generated_handlers.go: id: 61ac4f7cce9e - last_write_checksum: sha1:1efa96a429f9879c5cdb7bd064661b396b568d31 - pristine_git_object: 6400b090e0a8e321f6348ef79d2b14fb83571f7b + last_write_checksum: sha1:c68c837c6af8f55eb8172dbc62ba472d5dde04a8 + pristine_git_object: a8a0a7558361f126dcbf7f995c52b33e660daa37 tests/mockserver/internal/handler/pathdeleterestapiindexcustommetadataschemagroupname.go: id: 979e4583765b last_write_checksum: sha1:b1d4edb259d907c7a88b634bf16f0cf152321693 @@ -6439,6 +6463,10 @@ trackedFiles: id: 3c3d5555c20b last_write_checksum: sha1:8ef1b12ee725ee32fb6a0a1e0e812594df97e06f pristine_git_object: 26fdfdd7e2d2fdffa6ecc736b7a70d6eb1aa5327 + tests/mockserver/internal/handler/pathpostrestapiv1agents.go: + id: b5d188f39094 + last_write_checksum: sha1:b625a3bbaf0748388febcf87d2b92782167c2c63 + pristine_git_object: 6c1367d61758e68e6cb415247e7473355d17c03a tests/mockserver/internal/handler/pathpostrestapiv1autocomplete.go: id: 9830ef01b25b last_write_checksum: sha1:094d64ddc73a91d38e64e3be18690ebb9d4ef3d3 @@ -6789,8 +6817,8 @@ trackedFiles: pristine_git_object: edfaaac094589522ad1ad4094131887b43780c92 tests/mockserver/internal/sdk/models/components/allowlistoptions.go: id: 5dd666458357 - last_write_checksum: sha1:db278a11846646ca8794392f2846087d1fba114f - pristine_git_object: cf238c9e67d94abd0f7de713e0922be55618dc75 + last_write_checksum: sha1:dfd379408d88c7eb8de7c86d2c58e084faaa45bc + pristine_git_object: 05ea9fc7fd13d94c67f49984a1a73648a807689b tests/mockserver/internal/sdk/models/components/announcement.go: id: 657490dccd71 last_write_checksum: sha1:038cda5de3f5d66db97e95c8a838f3c1a14bf265 @@ -7115,6 +7143,10 @@ trackedFiles: id: c5f526844132 last_write_checksum: sha1:aa8fbfc7682edb55f79cd9e241d9795d4c8579ea pristine_git_object: df363e8a9dfca1f872da7b286ab2cf7505b2c127 + tests/mockserver/internal/sdk/models/components/createworkflowrequest.go: + id: 92b0c1ccd3f0 + last_write_checksum: sha1:8febb494a066873172f0229af2880901e5f44ef5 + pristine_git_object: 277dd8b7d18f4aa926904cdf892e3475e6e998a6 tests/mockserver/internal/sdk/models/components/currentactiveusers.go: id: 220e7dbe04c9 last_write_checksum: sha1:4c876d24b835be3c5975308c132a4599bc11a71a @@ -7353,8 +7385,8 @@ trackedFiles: pristine_git_object: a0e605281d1c6bfa56c6ee88f2dfceff7b144e93 tests/mockserver/internal/sdk/models/components/dlpconfig.go: id: dd310c689385 - last_write_checksum: sha1:d7f7202ea98f70853dbe57afbbf046a63a59f8d0 - pristine_git_object: 04c23aebfc11d653007748a5653bfe742e2fe962 + last_write_checksum: sha1:62e4f2e5e4a611f7b3eae8479f5bb3d97831b9cc + pristine_git_object: 23a965fc8709811e91e4f40756137761239f6af7 tests/mockserver/internal/sdk/models/components/dlpexportfindingsrequest.go: id: 5edd4787e726 last_write_checksum: sha1:a6fa9927945d74ba513e8299c8102f5f4545c2ab @@ -7577,12 +7609,12 @@ trackedFiles: pristine_git_object: 04cc3a93272ac70933b0485bee31b335e05ab623 tests/mockserver/internal/sdk/models/components/feedentry.go: id: d25fd66fcf7a - last_write_checksum: sha1:802c3c827ceab5ea012ccb4cfdfb41c059a57533 - pristine_git_object: 1274083a6813ebf47b3f6bf587e397bf12b904ff + last_write_checksum: sha1:9100c7409b5249d0e85ae2cedab9800b0da020d0 + pristine_git_object: 36234aa7db5e3c4da48d59cf7bfbb9e4639afda9 tests/mockserver/internal/sdk/models/components/feedrequest.go: id: b06bc4cef0cf - last_write_checksum: sha1:e3e5205728c55eb2beef947db9c45670f2ef73af - pristine_git_object: 7c94e4641e1f167be444e87014e6f9de15b649f2 + last_write_checksum: sha1:2994c91d016176d20fdb2d47d073cb98d66ac056 + pristine_git_object: 28d6dbf022acdb0c38e137948212965d528bbfd3 tests/mockserver/internal/sdk/models/components/feedrequestoptions.go: id: fd9245fe1bf2 last_write_checksum: sha1:fa30b7fd6ee3e45896d7bbe36e33e7c0cb9000ba @@ -7593,8 +7625,8 @@ trackedFiles: pristine_git_object: 54f9d1a8997983156c84e69f888c59a80d06c2b1 tests/mockserver/internal/sdk/models/components/feedresult.go: id: 47411573e67a - last_write_checksum: sha1:dec3c7bf47204e5399fe5b1863ac96134a1a43ec - pristine_git_object: ddd4f095be90f403aac41127aa170c46c75cebd3 + last_write_checksum: sha1:adf5068767d5a4cbc8f3d4daeff4903bc556405b + pristine_git_object: ec49941ce4c605b8de48dda8e303a3ab067a393b tests/mockserver/internal/sdk/models/components/followupaction.go: id: 38179fec19b1 last_write_checksum: sha1:32a31f7af77a58ce6f3284e8550d01fcf0d3bddd @@ -7753,8 +7785,8 @@ trackedFiles: pristine_git_object: ecd7ddb6777546fb2061ed8d7fe99372430d28e3 tests/mockserver/internal/sdk/models/components/grouptype.go: id: 5537ed02d061 - last_write_checksum: sha1:0346c3bd888fdcfa6bdf470f76f7778f32b240dd - pristine_git_object: 3f25f70bef8fa2da5226a5ab4ab60295240ab984 + last_write_checksum: sha1:ac5c2401137f44b275f47896925b258c730d5a6c + pristine_git_object: be69cc6acc4dd739fa09cc6a3117fcd8ab91b269 tests/mockserver/internal/sdk/models/components/hotword.go: id: 541b48d27f83 last_write_checksum: sha1:7aaa2279ba4032458f14d65c2dbd3def0078920d @@ -8579,6 +8611,10 @@ trackedFiles: id: 89e5236173f5 last_write_checksum: sha1:4ea8a844fedb81791dbff6fd5b45031943c118ed pristine_git_object: 55046755b604159689bf327aa7174a0e080a970e + tests/mockserver/internal/sdk/models/operations/createagent.go: + id: 4338e91202b4 + last_write_checksum: sha1:80daff65223d9d23afb599cb4af805f35c29919b + pristine_git_object: 255e835e82fba8bf4023a2f99c5c2d1af40dd2cf tests/mockserver/internal/sdk/models/operations/createandstreamrun.go: id: e9a974b86a39 last_write_checksum: sha1:ff0bc51a66cdb65f5d36415c82e92377fd0d2cff @@ -9181,8 +9217,8 @@ trackedFiles: pristine_git_object: 8276fc3a8313ccbdb884ac378657dea8e7a24776 tests/summarize_test.go: id: 1b63b0a16e69 - last_write_checksum: sha1:ca6dc11ab46aab547f96cfa948c7d75dc3ef9cbc - pristine_git_object: 82e7014fe632efda0d2f05376b17812f945a5f1a + last_write_checksum: sha1:57e0e71ededadaf304820b3d9946d7339d1c7cff + pristine_git_object: e63dc26349c71d6b3b04c2b1fda24abadcace852 tests/testclient.go: id: 78d36c6e169c last_write_checksum: sha1:507c44e437934fbff8d295201c1327e18bd00df8 @@ -10147,6 +10183,13 @@ examples: application/json: {"status": "MISSING"} "400": application/json: {} + createAgent: + speakeasy-default-create-agent: + requestBody: + application/json: {} + responses: + "200": + application/json: {"workflow": {"author": {"name": "George Clooney", "obfuscatedId": "abc123"}, "lastDraftSavedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}, "lastUpdatedBy": {"name": "George Clooney", "obfuscatedId": "abc123"}}} examplesVersion: 1.0.2 generatedTests: activity: "2025-04-29T16:18:24+01:00" @@ -10306,7 +10349,8 @@ generatedTests: delete_/rest/api/index/custom-metadata/schema/{groupName}: "2026-06-05T17:32:19Z" getDatasourceCredentialStatus: "2026-06-05T17:32:19Z" rotateDatasourceCredentials: "2026-06-05T17:32:19Z" -releaseNotes: "## Go SDK Changes:\n* `Glean.Client.Chat.Create()`: \n * `request.ChatRequest.Messages[].Citations[].SourceDocument.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].Answer` **Changed**\n * `response` **Changed** (Breaking ⚠️)\n* `Glean.Client.Collections.AddItems()`: `response` **Changed** (Breaking ⚠️)\n* `Glean.Chat.GetChatFile()`: **Added**\n* `Glean.Agents.EditAgent()`: **Added**\n* `Glean.Entities.GetPersonPhoto()`: **Added**\n* `Glean.Tools.GetActionPackAuthStatus()`: **Added**\n* `Glean.Tools.AuthorizeActionPack()`: **Added**\n* `Glean.Indexing.CustomMetadata.Upsert()`: **Added**\n* `Glean.Indexing.CustomMetadata.Delete()`: **Added**\n* `Glean.Indexing.CustomMetadata.GetSchema()`: **Added**\n* `Glean.Indexing.CustomMetadata.UpsertSchema()`: **Added**\n* `Glean.Indexing.CustomMetadata.DeleteSchema()`: **Added**\n* `Glean.Troubleshooting.Post/api/index/v1/debug/{datasource}/document/events()`: **Added**\n* `Glean.Datasources.GetDatasourceCredentialStatus()`: **Added**\n* `Glean.Datasources.RotateDatasourceCredentials()`: **Added**\n* `Glean.Client.Activity.Feedback()`: \n * `request.Feedback1.Category` **Changed**\n* `Glean.Client.Announcements.Create()`: \n * `request.CreateAnnouncementRequest.Body.StructuredList[].Document.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].Answer` **Changed**\n * `response` **Changed**\n* `Glean.Client.Announcements.Update()`: \n * `request.UpdateAnnouncementRequest.Body.StructuredList[].Document.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].Answer` **Changed**\n * `response` **Changed**\n* `Glean.Client.Answers.Create()`: \n * `request.CreateAnswerRequest.Data.AddedRoles[].Person.RelatedDocuments[]` **Changed**\n * `response` **Changed**\n* `Glean.Client.Answers.Update()`: \n * `request.EditAnswerRequest.AddedRoles[].Person.RelatedDocuments[]` **Changed**\n * `response` **Changed**\n* `Glean.Client.Answers.Retrieve()`: `response.AnswerResult.Answer` **Changed**\n* `Glean.Client.Answers.List()`: `response.AnswerResults[].Answer` **Changed**\n* `Glean.Client.Chat.Retrieve()`: `response.ChatResult.Chat.CreatedBy.RelatedDocuments[]` **Changed**\n* `Glean.Client.Chat.List()`: `response.ChatResults[].Chat.CreatedBy.RelatedDocuments[]` **Changed**\n* `Glean.Client.Chat.CreateStream()`: \n * `request.ChatRequest.Messages[].Citations[].SourceDocument.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].Answer` **Changed**\n* `Glean.Client.Collections.Create()`: \n * `request.CreateCollectionRequest.AddedRoles[].Person.RelatedDocuments[]` **Changed**\n * `response.union(class (0))` **Changed**\n * `error.ErrorCode.Enum(corruptItem)` **Added**\n* `Glean.Client.Collections.Delete()`: `error.ErrorCode.Enum(corruptItem)` **Added**\n* `Glean.Client.Collections.DeleteItem()`: `response.Collection` **Changed**\n* `Glean.Client.Collections.Update()`: \n * `request.EditCollectionRequest.AddedRoles[].Person.RelatedDocuments[]` **Changed**\n * `response` **Changed**\n * `error.ErrorCode.Enum(corruptItem)` **Added**\n* `Glean.Client.Collections.UpdateItem()`: `response.Collection` **Changed**\n* `Glean.Client.Collections.Retrieve()`: `response` **Changed**\n* `Glean.Client.Collections.List()`: `response.Collections[]` **Changed**\n* `Glean.Client.Documents.Retrieve()`: `response.Documents.Map.union(Document).Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].Answer` **Changed**\n* `Glean.Client.Documents.RetrieveByFacets()`: `response.Documents[].Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].Answer` **Changed**\n* `Glean.Client.Insights.Retrieve()`: \n * `request.InsightsRequest` **Changed**\n * `response` **Changed**\n* `Glean.Client.Messages.Retrieve()`: `response.SearchResponse.Results[].StructuredResults[]` **Changed**\n* `Glean.Client.Pins.Update()`: `response.Attribution.RelatedDocuments[]` **Changed**\n* `Glean.Client.Pins.Retrieve()`: `response.Pin.Attribution.RelatedDocuments[]` **Changed**\n* `Glean.Client.Pins.List()`: `response.Pins[].Attribution.RelatedDocuments[]` **Changed**\n* `Glean.Client.Pins.Create()`: `response.Attribution.RelatedDocuments[]` **Changed**\n* `Glean.Client.Search.QueryAsAdmin()`: \n * `request.SearchRequest.SourceDocument.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].Answer` **Changed**\n * `response.Results[].StructuredResults[]` **Changed**\n* `Glean.Client.Search.Autocomplete()`: `response.Results[].Document.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].Answer` **Changed**\n* `Glean.Client.Search.RetrieveFeed()`: \n * `request.FeedRequest.Categories[]` **Changed**\n * `response.Results[]` **Changed**\n* `Glean.Client.Search.Recommendations()`: \n * `request.RecommendationsRequest.SourceDocument.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].Answer` **Changed**\n * `response.Results[].StructuredResults[]` **Changed**\n* `Glean.Client.Search.Query()`: \n * `request.SearchRequest.SourceDocument.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].Answer` **Changed**\n * `response.Results[].StructuredResults[]` **Changed**\n* `Glean.Client.Entities.List()`: `response.Results[].RelatedDocuments[]` **Changed**\n* `Glean.Client.Entities.ReadPeople()`: `response.Results[].RelatedDocuments[]` **Changed**\n* `Glean.Client.Shortcuts.Create()`: \n * `request.CreateShortcutRequest.Data.AddedRoles[].Person.RelatedDocuments[]` **Changed**\n * `response.Shortcut.AddedRoles[].Person.RelatedDocuments[]` **Changed**\n* `Glean.Client.Shortcuts.Retrieve()`: `response.Shortcut.AddedRoles[].Person.RelatedDocuments[]` **Changed**\n* `Glean.Client.Shortcuts.List()`: `response.Shortcuts[].AddedRoles[].Person.RelatedDocuments[]` **Changed**\n* `Glean.Client.Shortcuts.Update()`: \n * `request.UpdateShortcutRequest.AddedRoles[].Person.RelatedDocuments[]` **Changed**\n * `response.Shortcut.AddedRoles[].Person.RelatedDocuments[]` **Changed**\n* `Glean.Client.Verification.AddReminder()`: `response.Metadata.LastVerifier.RelatedDocuments[]` **Changed**\n* `Glean.Client.Verification.List()`: `response.Documents[].Metadata.LastVerifier.RelatedDocuments[]` **Changed**\n* `Glean.Client.Verification.Verify()`: `response.Metadata.LastVerifier.RelatedDocuments[]` **Changed**\n" + createAgent: "2026-06-23T02:51:02Z" +releaseNotes: "## Go SDK Changes:\n* `Glean.Agents.CreateAgent()`: **Added**\n* `Glean.Client.Announcements.Create()`: \n * `request.CreateAnnouncementRequest.Body.StructuredList[].Document.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].CustomEntity.Roles[].Group.Type.Enum(collectionAudience)` **Added**\n * `response.Body.StructuredList[].Document.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].CustomEntity.Roles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Announcements.Update()`: \n * `request.UpdateAnnouncementRequest.Body.StructuredList[].Document.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].CustomEntity.Roles[].Group.Type.Enum(collectionAudience)` **Added**\n * `response.Body.StructuredList[].Document.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].CustomEntity.Roles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Answers.Create()`: \n * `request.CreateAnswerRequest.Data.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n * `response.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Answers.Update()`: \n * `request.EditAnswerRequest.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n * `response.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Answers.Retrieve()`: `response.AnswerResult.Answer.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Answers.List()`: `response.AnswerResults[].Answer.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Chat.Create()`: \n * `request.ChatRequest.Messages[].Citations[].SourceDocument.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].CustomEntity.Roles[].Group.Type.Enum(collectionAudience)` **Added**\n * `response.Messages[].Citations[].SourceDocument.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].CustomEntity.Roles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Chat.Retrieve()`: `response.ChatResult.Chat.CreatedBy.RelatedDocuments[].QuerySuggestion.Ranges[].Document.Metadata.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Chat.List()`: `response.ChatResults[].Chat.CreatedBy.RelatedDocuments[].QuerySuggestion.Ranges[].Document.Metadata.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Chat.CreateStream()`: \n * `request.ChatRequest.Messages[].Citations[].SourceDocument.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].CustomEntity.Roles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Collections.AddItems()`: `response.Collection.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Collections.Create()`: \n * `request.CreateCollectionRequest.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n * `response.union(class (0)).Collection.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Collections.DeleteItem()`: `response.Collection.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Collections.Update()`: \n * `request.EditCollectionRequest.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n * `response.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Collections.UpdateItem()`: `response.Collection.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Collections.Retrieve()`: `response.Collection.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Collections.List()`: `response.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Documents.Retrieve()`: `response.Documents.Map.union(Document).Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].CustomEntity.Roles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Documents.RetrieveByFacets()`: `response.Documents[].Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].CustomEntity.Roles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Insights.Retrieve()`: `response.GleanAssist.ActivityInsights[].User.RelatedDocuments[].QuerySuggestion.Ranges[].Document.Metadata.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Messages.Retrieve()`: `response.SearchResponse.Results[].StructuredResults[].Document.Metadata.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Pins.Update()`: `response.Attribution.RelatedDocuments[].QuerySuggestion.Ranges[].Document.Metadata.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Pins.Retrieve()`: `response.Pin.Attribution.RelatedDocuments[].QuerySuggestion.Ranges[].Document.Metadata.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Pins.List()`: `response.Pins[].Attribution.RelatedDocuments[].QuerySuggestion.Ranges[].Document.Metadata.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Pins.Create()`: `response.Attribution.RelatedDocuments[].QuerySuggestion.Ranges[].Document.Metadata.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Search.QueryAsAdmin()`: \n * `request.SearchRequest.SourceDocument.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].CustomEntity.Roles[].Group.Type.Enum(collectionAudience)` **Added**\n * `response.Results[].StructuredResults[].Document.Metadata.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Search.Autocomplete()`: `response.Results[].Document.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].CustomEntity.Roles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Search.RetrieveFeed()`: \n * `request.FeedRequest.Categories[].Enum(cardStackPromo)` **Added**\n * `response.Results[]` **Changed**\n* `Glean.Client.Search.Recommendations()`: \n * `request.RecommendationsRequest.SourceDocument.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].CustomEntity.Roles[].Group.Type.Enum(collectionAudience)` **Added**\n * `response.Results[].StructuredResults[].Document.Metadata.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Search.Query()`: \n * `request.SearchRequest.SourceDocument.Metadata.Author.RelatedDocuments[].Results[].StructuredResults[].CustomEntity.Roles[].Group.Type.Enum(collectionAudience)` **Added**\n * `response.Results[].StructuredResults[].Document.Metadata.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Entities.List()`: `response.Results[].RelatedDocuments[].QuerySuggestion.Ranges[].Document.Metadata.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Entities.ReadPeople()`: `response.Results[].RelatedDocuments[].QuerySuggestion.Ranges[].Document.Metadata.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Shortcuts.Create()`: \n * `request.CreateShortcutRequest.Data.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n * `response.Shortcut.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Shortcuts.Retrieve()`: `response.Shortcut.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Shortcuts.List()`: `response.Shortcuts[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Shortcuts.Update()`: \n * `request.UpdateShortcutRequest.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n * `response.Shortcut.AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Verification.AddReminder()`: `response.Metadata.LastVerifier.RelatedDocuments[].QuerySuggestion.Ranges[].Document.Metadata.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Verification.List()`: `response.Documents[].Metadata.LastVerifier.RelatedDocuments[].QuerySuggestion.Ranges[].Document.Metadata.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Verification.Verify()`: `response.Metadata.LastVerifier.RelatedDocuments[].QuerySuggestion.Ranges[].Document.Metadata.Collections[].AddedRoles[].Group.Type.Enum(collectionAudience)` **Added**\n* `Glean.Client.Governance.Data.Policies.Retrieve()`: `response.Report.Config.AllowlistOptions.Regexes` **Added**\n* `Glean.Client.Governance.Data.Policies.Update()`: \n * `request.UpdateDlpReportRequest.Config.AllowlistOptions.Regexes` **Added**\n* `Glean.Client.Governance.Data.Policies.List()`: `response.Reports[].Config.AllowlistOptions.Regexes` **Added**\n* `Glean.Client.Governance.Data.Policies.Create()`: \n * `request.Request.Config.AllowlistOptions.Regexes` **Added**\n * `response.Report.Config.AllowlistOptions.Regexes` **Added**\n* `Glean.Client.Governance.Data.Reports.Create()`: \n * `request.Request.Config.AllowlistOptions.Regexes` **Added**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 4c1d680f..a4fb3513 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true go: - version: 0.12.0 + version: 0.12.1 additionalDependencies: {} allowUnknownFieldsInWeakUnions: false baseErrorName: GleanError diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index 78ed030c..1fa98296 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: 8041c7f73ed7b1a8bb52c21b4736355b3d3ac705 + x-source-commit-sha: 5cabe6ea65ff670dd105e738873200dae517130d 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: bcfb45a263878a9d08bcb4117a44e970b498dc10 + x-open-api-commit-sha: 1c1e8c8c20a6992e48ba29d8e6c8c090735e74ea x-speakeasy-name: 'Glean API' servers: - url: https://{instance}-be.glean.com @@ -910,6 +910,40 @@ paths: description: Internal server error. security: - APIToken: [] + /rest/api/v1/agents: + post: + tags: + - Agents + summary: Create an agent + description: Create an agent. + operationId: createAgent + x-visibility: Preview + parameters: + - $ref: "#/components/parameters/locale" + - $ref: "#/components/parameters/timezoneOffset" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateWorkflowRequest" + responses: + "200": + description: Success + content: + application/json: + schema: + $ref: "#/components/schemas/CreateWorkflowResponse" + "400": + description: Bad request + "401": + description: Not Authorized + "403": + description: Forbidden + "500": + description: Internal server error + security: + - APIToken: [] /rest/api/v1/agents/{agent_id}: get: tags: @@ -1107,7 +1141,7 @@ paths: text/event-stream: schema: type: string - description: The server will send a stream of events in server-sent events (SSE) format. + description: The server will send a stream of events in server-sent events (SSE) format. If execution fails after the stream has started, the stream may terminate with an error message in a normal `message` event. example: | id: 1 event: message @@ -4675,6 +4709,8 @@ components: APIToken: scheme: bearer type: http + description: >- + HTTP bearer token. Accepts a Glean-issued API token, an OAuth access token from the Glean OAuth Authorization Server (including Dynamic Client Registration clients), or an OAuth access token issued by an external identity provider. External-IdP OAuth tokens must also include the `X-Glean-Auth-Type: OAUTH` request header. OAuth is supported on the Client API only; the Indexing API requires a Glean-issued token. schemas: ActivityEventParams: properties: @@ -6019,6 +6055,8 @@ components: GroupType: type: string description: The type of user group + x-enumDescriptions: + COLLECTION_AUDIENCE: Refers to any viewers of the Collection. enum: - DEPARTMENT - ALL @@ -6028,6 +6066,9 @@ components: - LOCATION - REGION - EXTERNAL_GROUP + - COLLECTION_AUDIENCE + x-speakeasy-enum-descriptions: + COLLECTION_AUDIENCE: Refers to any viewers of the Collection. Group: required: - type @@ -8990,6 +9031,80 @@ components: items: type: string description: IDs of files to delete. + WorkflowDraftableProperties: + properties: + name: + type: string + description: The name of the workflow. + WorkflowMutableProperties: + type: object + allOf: + - $ref: "#/components/schemas/WorkflowDraftableProperties" + - type: object + CreateWorkflowRequest: + allOf: + - $ref: "#/components/schemas/WorkflowMutableProperties" + - type: object + properties: + transient: + type: boolean + description: Used to create a transient workflow. + parentWorkflowId: + type: string + description: id of the parent workflow for transient workflows + WorkflowMetadata: + allOf: + - type: object + properties: + author: + $ref: "#/components/schemas/Person" + createTimestamp: + type: integer + description: Server Unix timestamp of the creation time. + lastUpdateTimestamp: + type: integer + description: Server Unix timestamp of the last update time. + lastDraftSavedAt: + type: integer + description: Server Unix timestamp of the last time the draft was saved. + lastDraftSavedBy: + description: The person who last saved the draft. + $ref: "#/components/schemas/Person" + lastDraftGitAuthorId: + type: string + description: ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API. + lastUpdatedBy: + $ref: "#/components/schemas/Person" + AttributionProperties: {} + Workflow: + allOf: + - $ref: "#/components/schemas/PermissionedObject" + - $ref: "#/components/schemas/WorkflowMutableProperties" + - $ref: "#/components/schemas/WorkflowMetadata" + - $ref: "#/components/schemas/AttributionProperties" + - type: object + properties: + id: + type: string + description: The ID of the workflow. + verified: + type: boolean + readOnly: true + description: When present, indicates this workflow is admin-verified. Set via the dedicated admin settings endpoint, not by regular edits. + showOrganizationAsAuthor: + type: boolean + readOnly: true + description: When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. + WorkflowResult: + type: object + required: + - workflow + properties: + workflow: + $ref: "#/components/schemas/Workflow" + CreateWorkflowResponse: + allOf: + - $ref: "#/components/schemas/WorkflowResult" Agent: title: Agent type: object @@ -9042,16 +9157,6 @@ components: message: type: string description: Client-facing error message describing what went wrong - WorkflowDraftableProperties: - properties: - name: - type: string - description: The name of the workflow. - WorkflowMutableProperties: - type: object - allOf: - - $ref: "#/components/schemas/WorkflowDraftableProperties" - - type: object EditWorkflowRequest: allOf: - $ref: "#/components/schemas/WorkflowMutableProperties" @@ -11002,6 +11107,7 @@ components: - MID_DAY_CATCH_UP - QUERY_SUGGESTION - COWORK_CUJ_PROMO + - CARD_STACK_PROMO - WEEKLY_MEETINGS - FOLLOW_UP - MILESTONE_TIMELINE_CHECK @@ -11310,7 +11416,6 @@ components: description: A list of removed user roles for the Workflow. items: $ref: "#/components/schemas/UserRoleSpecification" - AttributionProperties: {} PromptTemplate: allOf: - $ref: "#/components/schemas/PromptTemplateMutableProperties" @@ -11386,55 +11491,6 @@ components: runCount: $ref: "#/components/schemas/CountInfo" description: This tracks how many times this prompt template was run. If user runs a prompt template after modifying the original one, it still counts as a run for the original template. - WorkflowMetadata: - allOf: - - type: object - properties: - author: - $ref: "#/components/schemas/Person" - createTimestamp: - type: integer - description: Server Unix timestamp of the creation time. - lastUpdateTimestamp: - type: integer - description: Server Unix timestamp of the last update time. - lastDraftSavedAt: - type: integer - description: Server Unix timestamp of the last time the draft was saved. - lastDraftSavedBy: - description: The person who last saved the draft. - $ref: "#/components/schemas/Person" - lastDraftGitAuthorId: - type: string - description: ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API. - lastUpdatedBy: - $ref: "#/components/schemas/Person" - Workflow: - allOf: - - $ref: "#/components/schemas/PermissionedObject" - - $ref: "#/components/schemas/WorkflowMutableProperties" - - $ref: "#/components/schemas/WorkflowMetadata" - - $ref: "#/components/schemas/AttributionProperties" - - type: object - properties: - id: - type: string - description: The ID of the workflow. - verified: - type: boolean - readOnly: true - description: When present, indicates this workflow is admin-verified. Set via the dedicated admin settings endpoint, not by regular edits. - showOrganizationAsAuthor: - type: boolean - readOnly: true - description: When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. - WorkflowResult: - type: object - required: - - workflow - properties: - workflow: - $ref: "#/components/schemas/Workflow" UserActivity: properties: actor: @@ -11531,6 +11587,7 @@ components: - MID_DAY_CATCH_UP - QUERY_SUGGESTION - COWORK_CUJ_PROMO + - CARD_STACK_PROMO - WEEKLY_MEETINGS - FOLLOW_UP - MILESTONE_TIMELINE_CHECK @@ -11619,6 +11676,7 @@ components: - MID_DAY_CATCH_UP - QUERY_SUGGESTION - COWORK_CUJ_PROMO + - CARD_STACK_PROMO - WEEKLY_MEETINGS - FOLLOW_UP - MILESTONE_TIMELINE_CHECK @@ -11639,6 +11697,12 @@ components: rank: type: integer description: Rank of the result. Rank is suggested by server. Client side rank may differ. + placementReason: + type: string + enum: + - ORGANIC + - PROMO + description: Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. FeedResponse: required: - serverTimestamp @@ -14289,7 +14353,12 @@ components: items: type: string description: list of words and phrases to consider as whitelisted content - description: Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. + regexes: + type: array + items: + type: string + description: list of regular expressions whose matches are considered whitelisted content + description: Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. DlpConfig: properties: version: diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index c443717e..d4701547 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -164556,3 +164556,19 @@ workflows: type: simple x-speakeasy-test-group: Datasources x-speakeasy-test-rebuild: true + - workflowId: createAgent + steps: + - stepId: test + operationId: createAgent + requestBody: + contentType: application/json + payload: {} + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"workflow":{"author":{"name":"George Clooney","obfuscatedId":"abc123"},"lastDraftSavedBy":{"name":"George Clooney","obfuscatedId":"abc123"},"lastUpdatedBy":{"name":"George Clooney","obfuscatedId":"abc123"}}} + type: simple + x-speakeasy-test-group: Agents + x-speakeasy-test-rebuild: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index b0be39a0..1879d0f2 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.771.0 +speakeasyVersion: 1.784.1 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:847b1f126f78c86bb63c1c27b6053ba6a9afe8855aab3e82d1f7f71501a5e840 - sourceBlobDigest: sha256:b685acc261c79f1c7579b236eaff1ea63982eb1f4be4c318bd6c9a24998c6132 + sourceRevisionDigest: sha256:d6e66a03b77e15d15caad2fd708bc6a772038f94ab7e6d5945fbba61f40fc67f + sourceBlobDigest: sha256:edc538d75ab134724bd0a6ddcebe89bb81a3bf451446b861e9fe502d52764762 tags: - latest petstore-oas: @@ -17,10 +17,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:847b1f126f78c86bb63c1c27b6053ba6a9afe8855aab3e82d1f7f71501a5e840 - sourceBlobDigest: sha256:b685acc261c79f1c7579b236eaff1ea63982eb1f4be4c318bd6c9a24998c6132 + sourceRevisionDigest: sha256:d6e66a03b77e15d15caad2fd708bc6a772038f94ab7e6d5945fbba61f40fc67f + sourceBlobDigest: sha256:edc538d75ab134724bd0a6ddcebe89bb81a3bf451446b861e9fe502d52764762 codeSamplesNamespace: glean-api-specs-go-code-samples - codeSamplesRevisionDigest: sha256:9c87d2c95297f7aa73d9f22134a150ee0302e95b81b5a1b0a0daa08049af59a2 + codeSamplesRevisionDigest: sha256:be74c082657fbea40f18b707ef4a7d6d829b1c10ac2d8854c553726572f8ad4c petstore: source: petstore-oas sourceNamespace: petstore-oas diff --git a/README.md b/README.md index 0571b653..69bbb908 100644 --- a/README.md +++ b/README.md @@ -253,6 +253,7 @@ For more information on obtaining the appropriate token type, please contact you ### [Agents](docs/sdks/agents/README.md) +* [CreateAgent](docs/sdks/agents/README.md#createagent) - Create an agent * [EditAgent](docs/sdks/agents/README.md#editagent) - Edit an agent ### [Authentication](docs/sdks/authentication/README.md) diff --git a/RELEASES.md b/RELEASES.md index 487a6f1e..d2b96e48 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -738,4 +738,14 @@ Based on: ### Generated - [go v0.12.0] . ### Releases -- [Go v0.12.0] https://github.com/gleanwork/api-client-go/releases/tag/v0.12.0 - . \ No newline at end of file +- [Go v0.12.0] https://github.com/gleanwork/api-client-go/releases/tag/v0.12.0 - . + +## 2026-06-23 02:47:51 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.784.1 (2.911.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.12.1] . +### Releases +- [Go v0.12.1] https://github.com/gleanwork/api-client-go/releases/tag/v0.12.1 - . \ No newline at end of file diff --git a/agents.go b/agents.go index 190fa026..785f0c4c 100644 --- a/agents.go +++ b/agents.go @@ -14,6 +14,7 @@ import ( "github.com/gleanwork/api-client-go/models/operations" "github.com/gleanwork/api-client-go/retry" "net/http" + "net/url" ) type Agents struct { @@ -30,6 +31,237 @@ func newAgents(rootSDK *Glean, sdkConfig config.SDKConfiguration, hooks *hooks.H } } +// CreateAgent - Create an agent +// Create an agent. +func (s *Agents) CreateAgent(ctx context.Context, createWorkflowRequest components.CreateWorkflowRequest, locale *string, timezoneOffset *int64, opts ...operations.Option) (*operations.CreateAgentResponse, error) { + request := operations.CreateAgentRequest{ + Locale: locale, + TimezoneOffset: timezoneOffset, + CreateWorkflowRequest: createWorkflowRequest, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/rest/api/v1/agents") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "createAgent", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "CreateWorkflowRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateQueryParams(ctx, req, request, nil, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"4XX", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.CreateAgentResponse{ + HTTPMeta: components.HTTPMetadata{ + Request: req, + Response: httpRes, + }, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out components.WorkflowResult + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.WorkflowResult = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 401: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode == 500: + fallthrough + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + // EditAgent - Edit an agent // Creates a draft or publishes an [agent](https://developers.glean.com/agents/agents-api). Use `isDraft=true` to save a draft, or `isDraft=false` (or omit) to publish immediately. Only draft and publish modes are supported. func (s *Agents) EditAgent(ctx context.Context, agentID string, editWorkflowRequest components.EditWorkflowRequest, locale *string, timezoneOffset *int64, opts ...operations.Option) (*operations.EditAgentResponse, error) { diff --git a/docs/models/components/allowlistoptions.md b/docs/models/components/allowlistoptions.md index eec9b7fc..d03f820b 100644 --- a/docs/models/components/allowlistoptions.md +++ b/docs/models/components/allowlistoptions.md @@ -1,10 +1,11 @@ # AllowlistOptions -Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. +Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `Terms` | []`string` | :heavy_minus_sign: | list of words and phrases to consider as whitelisted content | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `Terms` | []`string` | :heavy_minus_sign: | list of words and phrases to consider as whitelisted content | +| `Regexes` | []`string` | :heavy_minus_sign: | list of regular expressions whose matches are considered whitelisted content | \ No newline at end of file diff --git a/docs/models/components/createworkflowrequest.md b/docs/models/components/createworkflowrequest.md new file mode 100644 index 00000000..04b9123c --- /dev/null +++ b/docs/models/components/createworkflowrequest.md @@ -0,0 +1,10 @@ +# CreateWorkflowRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `Name` | `*string` | :heavy_minus_sign: | The name of the workflow. | +| `Transient` | `*bool` | :heavy_minus_sign: | Used to create a transient workflow. | +| `ParentWorkflowID` | `*string` | :heavy_minus_sign: | id of the parent workflow for transient workflows | \ No newline at end of file diff --git a/docs/models/components/dlpconfig.md b/docs/models/components/dlpconfig.md index 79ba2e7c..149f104f 100644 --- a/docs/models/components/dlpconfig.md +++ b/docs/models/components/dlpconfig.md @@ -5,18 +5,18 @@ Detailed configuration of what documents and sensitive content will be scanned. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Version` | `*int64` | :heavy_minus_sign: | Synonymous with report/policy id. | -| ~~`SensitiveInfoTypes`~~ | [][components.SensitiveInfoType](../../models/components/sensitiveinfotype.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use sensitiveContentOptions instead.

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

DEPRECATED - use `sensitiveContentOptions` instead. | +| `InputOptions` | [*components.InputOptions](../../models/components/inputoptions.md) | :heavy_minus_sign: | Controls which data-sources and what time-range to include in scans. | +| ~~`ExternalSharingOptions`~~ | [*components.ExternalSharingOptions](../../models/components/externalsharingoptions.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Use broadSharingOptions instead. | +| `BroadSharingOptions` | [*components.SharingOptions](../../models/components/sharingoptions.md) | :heavy_minus_sign: | Controls how "shared" a document must be to get picked for scans. | +| `SensitiveContentOptions` | [*components.SensitiveContentOptions](../../models/components/sensitivecontentoptions.md) | :heavy_minus_sign: | Options for defining sensitive content within scanned documents. | +| `ReportName` | `*string` | :heavy_minus_sign: | N/A | +| `Frequency` | `*string` | :heavy_minus_sign: | Interval between scans. | +| `CreatedBy` | [*components.DlpPerson](../../models/components/dlpperson.md) | :heavy_minus_sign: | Details about the person who created this report/policy. | +| `CreatedAt` | `*string` | :heavy_minus_sign: | Timestamp at which this configuration was created. | +| `RedactQuote` | `*bool` | :heavy_minus_sign: | redact quote in findings of the report | +| `AutoHideDocs` | `*bool` | :heavy_minus_sign: | auto hide documents with findings in the report | +| `AllowlistOptions` | [*components.AllowlistOptions](../../models/components/allowlistoptions.md) | :heavy_minus_sign: | Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. | \ No newline at end of file diff --git a/docs/models/components/feedrequestcategory.md b/docs/models/components/feedrequestcategory.md index 6983b14a..e8ebfae3 100644 --- a/docs/models/components/feedrequestcategory.md +++ b/docs/models/components/feedrequestcategory.md @@ -47,6 +47,7 @@ value := components.FeedRequestCategoryDocumentSuggestion | `FeedRequestCategoryMidDayCatchUp` | MID_DAY_CATCH_UP | | `FeedRequestCategoryQuerySuggestion` | QUERY_SUGGESTION | | `FeedRequestCategoryCoworkCujPromo` | COWORK_CUJ_PROMO | +| `FeedRequestCategoryCardStackPromo` | CARD_STACK_PROMO | | `FeedRequestCategoryWeeklyMeetings` | WEEKLY_MEETINGS | | `FeedRequestCategoryFollowUp` | FOLLOW_UP | | `FeedRequestCategoryMilestoneTimelineCheck` | MILESTONE_TIMELINE_CHECK | diff --git a/docs/models/components/feedresult.md b/docs/models/components/feedresult.md index 1a407813..a3d714f7 100644 --- a/docs/models/components/feedresult.md +++ b/docs/models/components/feedresult.md @@ -3,9 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `Category` | [components.FeedResultCategory](../../models/components/feedresultcategory.md) | :heavy_check_mark: | Category of the result, one of the requested categories in incoming request. | -| `PrimaryEntry` | [components.FeedEntry](../../models/components/feedentry.md) | :heavy_check_mark: | N/A | -| `SecondaryEntries` | [][components.FeedEntry](../../models/components/feedentry.md) | :heavy_minus_sign: | Secondary entries for the result e.g. suggested docs for the calendar, carousel. | -| `Rank` | `*int64` | :heavy_minus_sign: | Rank of the result. Rank is suggested by server. Client side rank may differ. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Category` | [components.FeedResultCategory](../../models/components/feedresultcategory.md) | :heavy_check_mark: | Category of the result, one of the requested categories in incoming request. | +| `PrimaryEntry` | [components.FeedEntry](../../models/components/feedentry.md) | :heavy_check_mark: | N/A | +| `SecondaryEntries` | [][components.FeedEntry](../../models/components/feedentry.md) | :heavy_minus_sign: | Secondary entries for the result e.g. suggested docs for the calendar, carousel. | +| `Rank` | `*int64` | :heavy_minus_sign: | Rank of the result. Rank is suggested by server. Client side rank may differ. | +| `PlacementReason` | [*components.PlacementReason](../../models/components/placementreason.md) | :heavy_minus_sign: | Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. | \ No newline at end of file diff --git a/docs/models/components/feedresultcategory.md b/docs/models/components/feedresultcategory.md index d5f5dcef..ddbeac87 100644 --- a/docs/models/components/feedresultcategory.md +++ b/docs/models/components/feedresultcategory.md @@ -52,6 +52,7 @@ custom := components.FeedResultCategory("custom_value") | `FeedResultCategoryMidDayCatchUp` | MID_DAY_CATCH_UP | | `FeedResultCategoryQuerySuggestion` | QUERY_SUGGESTION | | `FeedResultCategoryCoworkCujPromo` | COWORK_CUJ_PROMO | +| `FeedResultCategoryCardStackPromo` | CARD_STACK_PROMO | | `FeedResultCategoryWeeklyMeetings` | WEEKLY_MEETINGS | | `FeedResultCategoryFollowUp` | FOLLOW_UP | | `FeedResultCategoryMilestoneTimelineCheck` | MILESTONE_TIMELINE_CHECK | diff --git a/docs/models/components/grouptype.md b/docs/models/components/grouptype.md index 97c6e3ed..03d6f1c5 100644 --- a/docs/models/components/grouptype.md +++ b/docs/models/components/grouptype.md @@ -18,13 +18,14 @@ custom := components.GroupType("custom_value") ## Values -| Name | Value | -| ------------------------ | ------------------------ | -| `GroupTypeDepartment` | DEPARTMENT | -| `GroupTypeAll` | ALL | -| `GroupTypeTeam` | TEAM | -| `GroupTypeJobTitle` | JOB_TITLE | -| `GroupTypeRoleType` | ROLE_TYPE | -| `GroupTypeLocation` | LOCATION | -| `GroupTypeRegion` | REGION | -| `GroupTypeExternalGroup` | EXTERNAL_GROUP | \ No newline at end of file +| Name | Value | +| ----------------------------- | ----------------------------- | +| `GroupTypeDepartment` | DEPARTMENT | +| `GroupTypeAll` | ALL | +| `GroupTypeTeam` | TEAM | +| `GroupTypeJobTitle` | JOB_TITLE | +| `GroupTypeRoleType` | ROLE_TYPE | +| `GroupTypeLocation` | LOCATION | +| `GroupTypeRegion` | REGION | +| `GroupTypeExternalGroup` | EXTERNAL_GROUP | +| `GroupTypeCollectionAudience` | COLLECTION_AUDIENCE | \ No newline at end of file diff --git a/docs/models/components/justificationtype.md b/docs/models/components/justificationtype.md index 75855017..7a676336 100644 --- a/docs/models/components/justificationtype.md +++ b/docs/models/components/justificationtype.md @@ -65,6 +65,7 @@ custom := components.JustificationType("custom_value") | `JustificationTypeMidDayCatchUp` | MID_DAY_CATCH_UP | | `JustificationTypeQuerySuggestion` | QUERY_SUGGESTION | | `JustificationTypeCoworkCujPromo` | COWORK_CUJ_PROMO | +| `JustificationTypeCardStackPromo` | CARD_STACK_PROMO | | `JustificationTypeWeeklyMeetings` | WEEKLY_MEETINGS | | `JustificationTypeFollowUp` | FOLLOW_UP | | `JustificationTypeMilestoneTimelineCheck` | MILESTONE_TIMELINE_CHECK | diff --git a/docs/models/components/placementreason.md b/docs/models/components/placementreason.md new file mode 100644 index 00000000..3a285813 --- /dev/null +++ b/docs/models/components/placementreason.md @@ -0,0 +1,24 @@ +# PlacementReason + +Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. + +## Example Usage + +```go +import ( + "github.com/gleanwork/api-client-go/models/components" +) + +value := components.PlacementReasonOrganic + +// Open enum: custom values can be created with a direct type cast +custom := components.PlacementReason("custom_value") +``` + + +## Values + +| Name | Value | +| ------------------------ | ------------------------ | +| `PlacementReasonOrganic` | ORGANIC | +| `PlacementReasonPromo` | PROMO | \ No newline at end of file diff --git a/docs/models/operations/createagentrequest.md b/docs/models/operations/createagentrequest.md new file mode 100644 index 00000000..cd1d0e69 --- /dev/null +++ b/docs/models/operations/createagentrequest.md @@ -0,0 +1,10 @@ +# CreateAgentRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Locale` | `*string` | :heavy_minus_sign: | The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. | +| `TimezoneOffset` | `*int64` | :heavy_minus_sign: | The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. | +| `CreateWorkflowRequest` | [components.CreateWorkflowRequest](../../models/components/createworkflowrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createagentresponse.md b/docs/models/operations/createagentresponse.md new file mode 100644 index 00000000..7aec6c72 --- /dev/null +++ b/docs/models/operations/createagentresponse.md @@ -0,0 +1,9 @@ +# CreateAgentResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `HTTPMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | +| `WorkflowResult` | [*components.WorkflowResult](../../models/components/workflowresult.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index d34e421e..e806686f 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -4,8 +4,64 @@ ### Available Operations +* [CreateAgent](#createagent) - Create an agent * [EditAgent](#editagent) - Edit an agent +## CreateAgent + +Create an agent. + +### Example Usage + + +```go +package main + +import( + "context" + "os" + apiclientgo "github.com/gleanwork/api-client-go" + "github.com/gleanwork/api-client-go/models/components" + "log" +) + +func main() { + ctx := context.Background() + + s := apiclientgo.New( + apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")), + ) + + res, err := s.Agents.CreateAgent(ctx, components.CreateWorkflowRequest{}, nil, nil) + if err != nil { + log.Fatal(err) + } + if res.WorkflowResult != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `createWorkflowRequest` | [components.CreateWorkflowRequest](../../models/components/createworkflowrequest.md) | :heavy_check_mark: | N/A | +| `locale` | `*string` | :heavy_minus_sign: | The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. | +| `timezoneOffset` | `*int64` | :heavy_minus_sign: | The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. | +| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | + +### Response + +**[*operations.CreateAgentResponse](../../models/operations/createagentresponse.md), error** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| apierrors.APIError | 4XX, 5XX | \*/\* | + ## EditAgent Creates a draft or publishes an [agent](https://developers.glean.com/agents/agents-api). Use `isDraft=true` to save a draft, or `isDraft=false` (or omit) to publish immediately. Only draft and publish modes are supported. diff --git a/glean.go b/glean.go index 719ad4b1..504655cc 100644 --- a/glean.go +++ b/glean.go @@ -2,7 +2,7 @@ package apiclientgo -// Generated from OpenAPI doc version 0.9.0 and generator version 2.893.0 +// Generated from OpenAPI doc version 0.9.0 and generator version 2.911.3 import ( "context" @@ -166,9 +166,9 @@ func WithTimeout(timeout time.Duration) SDKOption { // New creates a new instance of the SDK with the provided options func New(opts ...SDKOption) *Glean { sdk := &Glean{ - SDKVersion: "0.12.0", + SDKVersion: "0.12.1", sdkConfiguration: config.SDKConfiguration{ - UserAgent: "speakeasy-sdk/go 0.12.0 2.893.0 0.9.0 github.com/gleanwork/api-client-go", + UserAgent: "speakeasy-sdk/go 0.12.1 2.911.3 0.9.0 github.com/gleanwork/api-client-go", ServerList: ServerList, ServerVariables: []map[string]string{ { diff --git a/models/components/allowlistoptions.go b/models/components/allowlistoptions.go index 9e035c19..02c36f14 100644 --- a/models/components/allowlistoptions.go +++ b/models/components/allowlistoptions.go @@ -2,10 +2,12 @@ package components -// AllowlistOptions - Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. +// AllowlistOptions - Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. type AllowlistOptions struct { // list of words and phrases to consider as whitelisted content Terms []string `json:"terms,omitempty"` + // list of regular expressions whose matches are considered whitelisted content + Regexes []string `json:"regexes,omitempty"` } func (a *AllowlistOptions) GetTerms() []string { @@ -14,3 +16,10 @@ func (a *AllowlistOptions) GetTerms() []string { } return a.Terms } + +func (a *AllowlistOptions) GetRegexes() []string { + if a == nil { + return nil + } + return a.Regexes +} diff --git a/models/components/createworkflowrequest.go b/models/components/createworkflowrequest.go new file mode 100644 index 00000000..10e8b57e --- /dev/null +++ b/models/components/createworkflowrequest.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CreateWorkflowRequest struct { + // The name of the workflow. + Name *string `json:"name,omitempty"` + // Used to create a transient workflow. + Transient *bool `json:"transient,omitempty"` + // id of the parent workflow for transient workflows + ParentWorkflowID *string `json:"parentWorkflowId,omitempty"` +} + +func (c *CreateWorkflowRequest) GetName() *string { + if c == nil { + return nil + } + return c.Name +} + +func (c *CreateWorkflowRequest) GetTransient() *bool { + if c == nil { + return nil + } + return c.Transient +} + +func (c *CreateWorkflowRequest) GetParentWorkflowID() *string { + if c == nil { + return nil + } + return c.ParentWorkflowID +} diff --git a/models/components/dlpconfig.go b/models/components/dlpconfig.go index bf90d9d6..71d49712 100644 --- a/models/components/dlpconfig.go +++ b/models/components/dlpconfig.go @@ -29,7 +29,7 @@ type DlpConfig struct { RedactQuote *bool `json:"redactQuote,omitempty"` // auto hide documents with findings in the report AutoHideDocs *bool `json:"autoHideDocs,omitempty"` - // Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. + // Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. AllowlistOptions *AllowlistOptions `json:"allowlistOptions,omitempty"` } diff --git a/models/components/feedentry.go b/models/components/feedentry.go index 4b2b4451..c1d16a1f 100644 --- a/models/components/feedentry.go +++ b/models/components/feedentry.go @@ -101,6 +101,7 @@ const ( JustificationTypeMidDayCatchUp JustificationType = "MID_DAY_CATCH_UP" JustificationTypeQuerySuggestion JustificationType = "QUERY_SUGGESTION" JustificationTypeCoworkCujPromo JustificationType = "COWORK_CUJ_PROMO" + JustificationTypeCardStackPromo JustificationType = "CARD_STACK_PROMO" JustificationTypeWeeklyMeetings JustificationType = "WEEKLY_MEETINGS" JustificationTypeFollowUp JustificationType = "FOLLOW_UP" JustificationTypeMilestoneTimelineCheck JustificationType = "MILESTONE_TIMELINE_CHECK" @@ -120,7 +121,7 @@ func (e JustificationType) ToPointer() *JustificationType { func (e *JustificationType) IsExact() bool { if e != nil { switch *e { - case "FREQUENTLY_ACCESSED", "RECENTLY_ACCESSED", "TRENDING_DOCUMENT", "VERIFICATION_REMINDER", "SUGGESTED_DOCUMENT", "EMPTY_STATE_SUGGESTION", "FRECENCY_SCORED", "SERVER_GENERATED", "USE_CASE", "UPDATE_SINCE_LAST_VIEW", "RECENTLY_STARTED", "EVENT", "USER_MENTION", "ANNOUNCEMENT", "EXTERNAL_ANNOUNCEMENT", "POPULARITY_BASED_TRENDING", "COMPANY_RESOURCE", "EVENT_DOCUMENT_FROM_CONTENT", "EVENT_DOCUMENT_FROM_SEARCH", "VISIT_AFFINITY_SCORED", "SUGGESTED_APP", "SUGGESTED_PERSON", "ACTIVITY_HIGHLIGHT", "SAVED_SEARCH", "SUGGESTED_CHANNEL", "PEOPLE_CELEBRATIONS", "SOCIAL_LINK", "ZERO_STATE_CHAT_SUGGESTION", "ZERO_STATE_CHAT_TOOL_SUGGESTION", "ZERO_STATE_PROMPT_TEMPLATE_SUGGESTION", "ZERO_STATE_STATIC_WORKFLOW_SUGGESTION", "ZERO_STATE_AGENT_SUGGESTION", "PERSONALIZED_CHAT_SUGGESTION", "DAILY_DIGEST", "TASK", "PLAN_MY_DAY", "END_MY_DAY", "STARTER_KIT_EXTENSION", "STARTER_KIT_ORG_CHART", "STARTER_KIT_ADD_DOC", "MEETING_RECAP", "ACTIVE_DISCUSSION", "MID_DAY_CATCH_UP", "QUERY_SUGGESTION", "COWORK_CUJ_PROMO", "WEEKLY_MEETINGS", "FOLLOW_UP", "MILESTONE_TIMELINE_CHECK", "PROJECT_DISCUSSION_DIGEST", "PROJECT_FOCUS_BLOCK", "PROJECT_NEXT_STEP", "DEMO_CARD", "OOO_PLANNER", "OOO_CATCH_UP": + case "FREQUENTLY_ACCESSED", "RECENTLY_ACCESSED", "TRENDING_DOCUMENT", "VERIFICATION_REMINDER", "SUGGESTED_DOCUMENT", "EMPTY_STATE_SUGGESTION", "FRECENCY_SCORED", "SERVER_GENERATED", "USE_CASE", "UPDATE_SINCE_LAST_VIEW", "RECENTLY_STARTED", "EVENT", "USER_MENTION", "ANNOUNCEMENT", "EXTERNAL_ANNOUNCEMENT", "POPULARITY_BASED_TRENDING", "COMPANY_RESOURCE", "EVENT_DOCUMENT_FROM_CONTENT", "EVENT_DOCUMENT_FROM_SEARCH", "VISIT_AFFINITY_SCORED", "SUGGESTED_APP", "SUGGESTED_PERSON", "ACTIVITY_HIGHLIGHT", "SAVED_SEARCH", "SUGGESTED_CHANNEL", "PEOPLE_CELEBRATIONS", "SOCIAL_LINK", "ZERO_STATE_CHAT_SUGGESTION", "ZERO_STATE_CHAT_TOOL_SUGGESTION", "ZERO_STATE_PROMPT_TEMPLATE_SUGGESTION", "ZERO_STATE_STATIC_WORKFLOW_SUGGESTION", "ZERO_STATE_AGENT_SUGGESTION", "PERSONALIZED_CHAT_SUGGESTION", "DAILY_DIGEST", "TASK", "PLAN_MY_DAY", "END_MY_DAY", "STARTER_KIT_EXTENSION", "STARTER_KIT_ORG_CHART", "STARTER_KIT_ADD_DOC", "MEETING_RECAP", "ACTIVE_DISCUSSION", "MID_DAY_CATCH_UP", "QUERY_SUGGESTION", "COWORK_CUJ_PROMO", "CARD_STACK_PROMO", "WEEKLY_MEETINGS", "FOLLOW_UP", "MILESTONE_TIMELINE_CHECK", "PROJECT_DISCUSSION_DIGEST", "PROJECT_FOCUS_BLOCK", "PROJECT_NEXT_STEP", "DEMO_CARD", "OOO_PLANNER", "OOO_CATCH_UP": return true } } diff --git a/models/components/feedrequest.go b/models/components/feedrequest.go index 64a43533..9e80202a 100644 --- a/models/components/feedrequest.go +++ b/models/components/feedrequest.go @@ -42,6 +42,7 @@ const ( FeedRequestCategoryMidDayCatchUp FeedRequestCategory = "MID_DAY_CATCH_UP" FeedRequestCategoryQuerySuggestion FeedRequestCategory = "QUERY_SUGGESTION" FeedRequestCategoryCoworkCujPromo FeedRequestCategory = "COWORK_CUJ_PROMO" + FeedRequestCategoryCardStackPromo FeedRequestCategory = "CARD_STACK_PROMO" FeedRequestCategoryWeeklyMeetings FeedRequestCategory = "WEEKLY_MEETINGS" FeedRequestCategoryFollowUp FeedRequestCategory = "FOLLOW_UP" FeedRequestCategoryMilestoneTimelineCheck FeedRequestCategory = "MILESTONE_TIMELINE_CHECK" @@ -126,6 +127,8 @@ func (e *FeedRequestCategory) UnmarshalJSON(data []byte) error { fallthrough case "COWORK_CUJ_PROMO": fallthrough + case "CARD_STACK_PROMO": + fallthrough case "WEEKLY_MEETINGS": fallthrough case "FOLLOW_UP": diff --git a/models/components/feedresult.go b/models/components/feedresult.go index 952d93d3..cce71a75 100644 --- a/models/components/feedresult.go +++ b/models/components/feedresult.go @@ -38,6 +38,7 @@ const ( FeedResultCategoryMidDayCatchUp FeedResultCategory = "MID_DAY_CATCH_UP" FeedResultCategoryQuerySuggestion FeedResultCategory = "QUERY_SUGGESTION" FeedResultCategoryCoworkCujPromo FeedResultCategory = "COWORK_CUJ_PROMO" + FeedResultCategoryCardStackPromo FeedResultCategory = "CARD_STACK_PROMO" FeedResultCategoryWeeklyMeetings FeedResultCategory = "WEEKLY_MEETINGS" FeedResultCategoryFollowUp FeedResultCategory = "FOLLOW_UP" FeedResultCategoryMilestoneTimelineCheck FeedResultCategory = "MILESTONE_TIMELINE_CHECK" @@ -57,7 +58,30 @@ func (e FeedResultCategory) ToPointer() *FeedResultCategory { func (e *FeedResultCategory) IsExact() bool { if e != nil { switch *e { - case "DOCUMENT_SUGGESTION", "DOCUMENT_SUGGESTION_SCENARIO", "TRENDING_DOCUMENT", "USE_CASE", "VERIFICATION_REMINDER", "EVENT", "ANNOUNCEMENT", "MENTION", "DATASOURCE_AFFINITY", "RECENT", "COMPANY_RESOURCE", "EXPERIMENTAL", "PEOPLE_CELEBRATIONS", "SOCIAL_LINK", "EXTERNAL_TASKS", "DISPLAYABLE_LIST", "ZERO_STATE_CHAT_SUGGESTION", "ZERO_STATE_CHAT_TOOL_SUGGESTION", "ZERO_STATE_WORKFLOW_CREATED_BY_ME", "ZERO_STATE_WORKFLOW_FAVORITES", "ZERO_STATE_WORKFLOW_POPULAR", "ZERO_STATE_WORKFLOW_RECENT", "ZERO_STATE_WORKFLOW_SUGGESTION", "PERSONALIZED_CHAT_SUGGESTION", "DAILY_DIGEST", "TASK", "PLAN_MY_DAY", "END_MY_DAY", "STARTER_KIT", "MID_DAY_CATCH_UP", "QUERY_SUGGESTION", "COWORK_CUJ_PROMO", "WEEKLY_MEETINGS", "FOLLOW_UP", "MILESTONE_TIMELINE_CHECK", "PROJECT_DISCUSSION_DIGEST", "PROJECT_FOCUS_BLOCK", "PROJECT_NEXT_STEP", "DEMO_CARD", "OOO_PLANNER", "OOO_CATCH_UP": + case "DOCUMENT_SUGGESTION", "DOCUMENT_SUGGESTION_SCENARIO", "TRENDING_DOCUMENT", "USE_CASE", "VERIFICATION_REMINDER", "EVENT", "ANNOUNCEMENT", "MENTION", "DATASOURCE_AFFINITY", "RECENT", "COMPANY_RESOURCE", "EXPERIMENTAL", "PEOPLE_CELEBRATIONS", "SOCIAL_LINK", "EXTERNAL_TASKS", "DISPLAYABLE_LIST", "ZERO_STATE_CHAT_SUGGESTION", "ZERO_STATE_CHAT_TOOL_SUGGESTION", "ZERO_STATE_WORKFLOW_CREATED_BY_ME", "ZERO_STATE_WORKFLOW_FAVORITES", "ZERO_STATE_WORKFLOW_POPULAR", "ZERO_STATE_WORKFLOW_RECENT", "ZERO_STATE_WORKFLOW_SUGGESTION", "PERSONALIZED_CHAT_SUGGESTION", "DAILY_DIGEST", "TASK", "PLAN_MY_DAY", "END_MY_DAY", "STARTER_KIT", "MID_DAY_CATCH_UP", "QUERY_SUGGESTION", "COWORK_CUJ_PROMO", "CARD_STACK_PROMO", "WEEKLY_MEETINGS", "FOLLOW_UP", "MILESTONE_TIMELINE_CHECK", "PROJECT_DISCUSSION_DIGEST", "PROJECT_FOCUS_BLOCK", "PROJECT_NEXT_STEP", "DEMO_CARD", "OOO_PLANNER", "OOO_CATCH_UP": + return true + } + } + return false +} + +// PlacementReason - Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. +type PlacementReason string + +const ( + PlacementReasonOrganic PlacementReason = "ORGANIC" + PlacementReasonPromo PlacementReason = "PROMO" +) + +func (e PlacementReason) ToPointer() *PlacementReason { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *PlacementReason) IsExact() bool { + if e != nil { + switch *e { + case "ORGANIC", "PROMO": return true } } @@ -72,6 +96,8 @@ type FeedResult struct { SecondaryEntries []FeedEntry `json:"secondaryEntries,omitempty"` // Rank of the result. Rank is suggested by server. Client side rank may differ. Rank *int64 `json:"rank,omitempty"` + // Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. + PlacementReason *PlacementReason `json:"placementReason,omitempty"` } func (f *FeedResult) GetCategory() FeedResultCategory { @@ -101,3 +127,10 @@ func (f *FeedResult) GetRank() *int64 { } return f.Rank } + +func (f *FeedResult) GetPlacementReason() *PlacementReason { + if f == nil { + return nil + } + return f.PlacementReason +} diff --git a/models/components/grouptype.go b/models/components/grouptype.go index b9add44b..0b0b9552 100644 --- a/models/components/grouptype.go +++ b/models/components/grouptype.go @@ -14,6 +14,8 @@ const ( GroupTypeLocation GroupType = "LOCATION" GroupTypeRegion GroupType = "REGION" GroupTypeExternalGroup GroupType = "EXTERNAL_GROUP" + // GroupTypeCollectionAudience Refers to any viewers of the Collection. + GroupTypeCollectionAudience GroupType = "COLLECTION_AUDIENCE" ) func (e GroupType) ToPointer() *GroupType { @@ -24,7 +26,7 @@ func (e GroupType) ToPointer() *GroupType { func (e *GroupType) IsExact() bool { if e != nil { switch *e { - case "DEPARTMENT", "ALL", "TEAM", "JOB_TITLE", "ROLE_TYPE", "LOCATION", "REGION", "EXTERNAL_GROUP": + case "DEPARTMENT", "ALL", "TEAM", "JOB_TITLE", "ROLE_TYPE", "LOCATION", "REGION", "EXTERNAL_GROUP", "COLLECTION_AUDIENCE": return true } } diff --git a/models/operations/createagent.go b/models/operations/createagent.go new file mode 100644 index 00000000..b0737f13 --- /dev/null +++ b/models/operations/createagent.go @@ -0,0 +1,56 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/gleanwork/api-client-go/models/components" +) + +type CreateAgentRequest struct { + // The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. + Locale *string `queryParam:"style=form,explode=true,name=locale"` + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `queryParam:"style=form,explode=true,name=timezoneOffset"` + CreateWorkflowRequest components.CreateWorkflowRequest `request:"mediaType=application/json"` +} + +func (c *CreateAgentRequest) GetLocale() *string { + if c == nil { + return nil + } + return c.Locale +} + +func (c *CreateAgentRequest) GetTimezoneOffset() *int64 { + if c == nil { + return nil + } + return c.TimezoneOffset +} + +func (c *CreateAgentRequest) GetCreateWorkflowRequest() components.CreateWorkflowRequest { + if c == nil { + return components.CreateWorkflowRequest{} + } + return c.CreateWorkflowRequest +} + +type CreateAgentResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Success + WorkflowResult *components.WorkflowResult +} + +func (c *CreateAgentResponse) GetHTTPMeta() components.HTTPMetadata { + if c == nil { + return components.HTTPMetadata{} + } + return c.HTTPMeta +} + +func (c *CreateAgentResponse) GetWorkflowResult() *components.WorkflowResult { + if c == nil { + return nil + } + return c.WorkflowResult +} diff --git a/retry/config.go b/retry/config.go index 5b3dc7c1..767002c7 100644 --- a/retry/config.go +++ b/retry/config.go @@ -98,6 +98,14 @@ func retryIntervalFromResponse(res *http.Response) time.Duration { return 0 } + retryAfterMsVal := res.Header.Get("retry-after-ms") + if retryAfterMsVal != "" { + parsedMs, err := strconv.ParseInt(retryAfterMsVal, 10, 64) + if err == nil && parsedMs >= 0 { + return time.Duration(parsedMs) * time.Millisecond + } + } + retryVal := res.Header.Get("retry-after") if retryVal == "" { return 0 diff --git a/tests/agents_test.go b/tests/agents_test.go index 8161b4c1..03ff66b1 100644 --- a/tests/agents_test.go +++ b/tests/agents_test.go @@ -6,6 +6,7 @@ import ( "context" apiclientgo "github.com/gleanwork/api-client-go" "github.com/gleanwork/api-client-go/internal/utils" + "github.com/gleanwork/api-client-go/models/components" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "testing" @@ -68,3 +69,20 @@ func TestAgents_CreateAndStreamRun(t *testing.T) { func TestAgents_CreateAndWaitRun(t *testing.T) { t.Skip("incomplete test found please make sure to address the following errors: [`workflow step createAndWaitRun.test referencing operation createAndWaitRun is missing required request body`]") } + +func TestAgents_CreateAgent(t *testing.T) { + ctx := context.Background() + + testHTTPClient := createTestHTTPClient("createAgent") + + s := apiclientgo.New( + apiclientgo.WithServerURL(utils.GetEnv("TEST_SERVER_URL", "http://localhost:18080")), + apiclientgo.WithClient(testHTTPClient), + apiclientgo.WithSecurity(utils.GetEnv("GLEAN_API_TOKEN", "value")), + ) + + res, err := s.Agents.CreateAgent(ctx, components.CreateWorkflowRequest{}, nil, nil) + require.NoError(t, err) + assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) + +} diff --git a/tests/messages_test.go b/tests/messages_test.go index febdc0e8..64ef64fe 100644 --- a/tests/messages_test.go +++ b/tests/messages_test.go @@ -27,7 +27,7 @@ func TestMessages_Messages(t *testing.T) { IDType: components.IDTypeConversationID, ID: "", TimestampMillis: apiclientgo.Pointer[int64](558834), - Datasource: components.DatasourceGchat, + Datasource: components.DatasourceFacebookworkplace, }, nil) require.NoError(t, err) assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) diff --git a/tests/mockserver/internal/handler/generated_handlers.go b/tests/mockserver/internal/handler/generated_handlers.go index 6400b090..a8a0a755 100644 --- a/tests/mockserver/internal/handler/generated_handlers.go +++ b/tests/mockserver/internal/handler/generated_handlers.go @@ -57,6 +57,7 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/addcollectionitems", pathPostRestAPIV1Addcollectionitems(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/addverificationreminder", pathPostRestAPIV1Addverificationreminder(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/adminsearch", pathPostRestAPIV1Adminsearch(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/agents", pathPostRestAPIV1Agents(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/autocomplete", pathPostRestAPIV1Autocomplete(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/chat", pathPostRestAPIV1Chat(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/checkdatasourceauth", pathPostRestAPIV1Checkdatasourceauth(dir, rt)), diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1agents.go b/tests/mockserver/internal/handler/pathpostrestapiv1agents.go new file mode 100644 index 00000000..6c1367d6 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostrestapiv1agents.go @@ -0,0 +1,82 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIV1Agents(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "createAgent[0]": + dir.HandlerFunc("createAgent", testCreateAgentCreateAgent0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testCreateAgentCreateAgent0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + var respBody *components.WorkflowResult = &components.WorkflowResult{ + Workflow: components.Workflow{ + Author: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + LastDraftSavedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + LastUpdatedBy: &components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, + }, + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/tests/mockserver/internal/sdk/models/components/allowlistoptions.go b/tests/mockserver/internal/sdk/models/components/allowlistoptions.go index cf238c9e..05ea9fc7 100644 --- a/tests/mockserver/internal/sdk/models/components/allowlistoptions.go +++ b/tests/mockserver/internal/sdk/models/components/allowlistoptions.go @@ -2,10 +2,12 @@ package components -// AllowlistOptions - Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. +// AllowlistOptions - Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. type AllowlistOptions struct { // list of words and phrases to consider as whitelisted content Terms []string `json:"terms,omitempty"` + // list of regular expressions whose matches are considered whitelisted content + Regexes []string `json:"regexes,omitempty"` } func (o *AllowlistOptions) GetTerms() []string { @@ -14,3 +16,10 @@ func (o *AllowlistOptions) GetTerms() []string { } return o.Terms } + +func (o *AllowlistOptions) GetRegexes() []string { + if o == nil { + return nil + } + return o.Regexes +} diff --git a/tests/mockserver/internal/sdk/models/components/createworkflowrequest.go b/tests/mockserver/internal/sdk/models/components/createworkflowrequest.go new file mode 100644 index 00000000..277dd8b7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/createworkflowrequest.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type CreateWorkflowRequest struct { + // The name of the workflow. + Name *string `json:"name,omitempty"` + // Used to create a transient workflow. + Transient *bool `json:"transient,omitempty"` + // id of the parent workflow for transient workflows + ParentWorkflowID *string `json:"parentWorkflowId,omitempty"` +} + +func (o *CreateWorkflowRequest) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *CreateWorkflowRequest) GetTransient() *bool { + if o == nil { + return nil + } + return o.Transient +} + +func (o *CreateWorkflowRequest) GetParentWorkflowID() *string { + if o == nil { + return nil + } + return o.ParentWorkflowID +} diff --git a/tests/mockserver/internal/sdk/models/components/dlpconfig.go b/tests/mockserver/internal/sdk/models/components/dlpconfig.go index 04c23aeb..23a965fc 100644 --- a/tests/mockserver/internal/sdk/models/components/dlpconfig.go +++ b/tests/mockserver/internal/sdk/models/components/dlpconfig.go @@ -29,7 +29,7 @@ type DlpConfig struct { RedactQuote *bool `json:"redactQuote,omitempty"` // auto hide documents with findings in the report AutoHideDocs *bool `json:"autoHideDocs,omitempty"` - // Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. + // Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation. AllowlistOptions *AllowlistOptions `json:"allowlistOptions,omitempty"` } diff --git a/tests/mockserver/internal/sdk/models/components/feedentry.go b/tests/mockserver/internal/sdk/models/components/feedentry.go index 1274083a..36234aa7 100644 --- a/tests/mockserver/internal/sdk/models/components/feedentry.go +++ b/tests/mockserver/internal/sdk/models/components/feedentry.go @@ -101,6 +101,7 @@ const ( JustificationTypeMidDayCatchUp JustificationType = "MID_DAY_CATCH_UP" JustificationTypeQuerySuggestion JustificationType = "QUERY_SUGGESTION" JustificationTypeCoworkCujPromo JustificationType = "COWORK_CUJ_PROMO" + JustificationTypeCardStackPromo JustificationType = "CARD_STACK_PROMO" JustificationTypeWeeklyMeetings JustificationType = "WEEKLY_MEETINGS" JustificationTypeFollowUp JustificationType = "FOLLOW_UP" JustificationTypeMilestoneTimelineCheck JustificationType = "MILESTONE_TIMELINE_CHECK" @@ -211,6 +212,8 @@ func (e *JustificationType) UnmarshalJSON(data []byte) error { fallthrough case "COWORK_CUJ_PROMO": fallthrough + case "CARD_STACK_PROMO": + fallthrough case "WEEKLY_MEETINGS": fallthrough case "FOLLOW_UP": diff --git a/tests/mockserver/internal/sdk/models/components/feedrequest.go b/tests/mockserver/internal/sdk/models/components/feedrequest.go index 7c94e464..28d6dbf0 100644 --- a/tests/mockserver/internal/sdk/models/components/feedrequest.go +++ b/tests/mockserver/internal/sdk/models/components/feedrequest.go @@ -42,6 +42,7 @@ const ( FeedRequestCategoryMidDayCatchUp FeedRequestCategory = "MID_DAY_CATCH_UP" FeedRequestCategoryQuerySuggestion FeedRequestCategory = "QUERY_SUGGESTION" FeedRequestCategoryCoworkCujPromo FeedRequestCategory = "COWORK_CUJ_PROMO" + FeedRequestCategoryCardStackPromo FeedRequestCategory = "CARD_STACK_PROMO" FeedRequestCategoryWeeklyMeetings FeedRequestCategory = "WEEKLY_MEETINGS" FeedRequestCategoryFollowUp FeedRequestCategory = "FOLLOW_UP" FeedRequestCategoryMilestoneTimelineCheck FeedRequestCategory = "MILESTONE_TIMELINE_CHECK" @@ -126,6 +127,8 @@ func (e *FeedRequestCategory) UnmarshalJSON(data []byte) error { fallthrough case "COWORK_CUJ_PROMO": fallthrough + case "CARD_STACK_PROMO": + fallthrough case "WEEKLY_MEETINGS": fallthrough case "FOLLOW_UP": diff --git a/tests/mockserver/internal/sdk/models/components/feedresult.go b/tests/mockserver/internal/sdk/models/components/feedresult.go index ddd4f095..ec49941c 100644 --- a/tests/mockserver/internal/sdk/models/components/feedresult.go +++ b/tests/mockserver/internal/sdk/models/components/feedresult.go @@ -43,6 +43,7 @@ const ( FeedResultCategoryMidDayCatchUp FeedResultCategory = "MID_DAY_CATCH_UP" FeedResultCategoryQuerySuggestion FeedResultCategory = "QUERY_SUGGESTION" FeedResultCategoryCoworkCujPromo FeedResultCategory = "COWORK_CUJ_PROMO" + FeedResultCategoryCardStackPromo FeedResultCategory = "CARD_STACK_PROMO" FeedResultCategoryWeeklyMeetings FeedResultCategory = "WEEKLY_MEETINGS" FeedResultCategoryFollowUp FeedResultCategory = "FOLLOW_UP" FeedResultCategoryMilestoneTimelineCheck FeedResultCategory = "MILESTONE_TIMELINE_CHECK" @@ -127,6 +128,8 @@ func (e *FeedResultCategory) UnmarshalJSON(data []byte) error { fallthrough case "COWORK_CUJ_PROMO": fallthrough + case "CARD_STACK_PROMO": + fallthrough case "WEEKLY_MEETINGS": fallthrough case "FOLLOW_UP": @@ -151,6 +154,33 @@ func (e *FeedResultCategory) UnmarshalJSON(data []byte) error { } } +// PlacementReason - Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. +type PlacementReason string + +const ( + PlacementReasonOrganic PlacementReason = "ORGANIC" + PlacementReasonPromo PlacementReason = "PROMO" +) + +func (e PlacementReason) ToPointer() *PlacementReason { + return &e +} +func (e *PlacementReason) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ORGANIC": + fallthrough + case "PROMO": + *e = PlacementReason(v) + return nil + default: + return fmt.Errorf("invalid value for PlacementReason: %v", v) + } +} + type FeedResult struct { // Category of the result, one of the requested categories in incoming request. Category FeedResultCategory `json:"category"` @@ -159,6 +189,8 @@ type FeedResult struct { SecondaryEntries []FeedEntry `json:"secondaryEntries,omitempty"` // Rank of the result. Rank is suggested by server. Client side rank may differ. Rank *int64 `json:"rank,omitempty"` + // Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. + PlacementReason *PlacementReason `json:"placementReason,omitempty"` } func (o *FeedResult) GetCategory() FeedResultCategory { @@ -188,3 +220,10 @@ func (o *FeedResult) GetRank() *int64 { } return o.Rank } + +func (o *FeedResult) GetPlacementReason() *PlacementReason { + if o == nil { + return nil + } + return o.PlacementReason +} diff --git a/tests/mockserver/internal/sdk/models/components/grouptype.go b/tests/mockserver/internal/sdk/models/components/grouptype.go index 3f25f70b..be69cc6a 100644 --- a/tests/mockserver/internal/sdk/models/components/grouptype.go +++ b/tests/mockserver/internal/sdk/models/components/grouptype.go @@ -11,14 +11,15 @@ import ( type GroupType string const ( - GroupTypeDepartment GroupType = "DEPARTMENT" - GroupTypeAll GroupType = "ALL" - GroupTypeTeam GroupType = "TEAM" - GroupTypeJobTitle GroupType = "JOB_TITLE" - GroupTypeRoleType GroupType = "ROLE_TYPE" - GroupTypeLocation GroupType = "LOCATION" - GroupTypeRegion GroupType = "REGION" - GroupTypeExternalGroup GroupType = "EXTERNAL_GROUP" + GroupTypeDepartment GroupType = "DEPARTMENT" + GroupTypeAll GroupType = "ALL" + GroupTypeTeam GroupType = "TEAM" + GroupTypeJobTitle GroupType = "JOB_TITLE" + GroupTypeRoleType GroupType = "ROLE_TYPE" + GroupTypeLocation GroupType = "LOCATION" + GroupTypeRegion GroupType = "REGION" + GroupTypeExternalGroup GroupType = "EXTERNAL_GROUP" + GroupTypeCollectionAudience GroupType = "COLLECTION_AUDIENCE" ) func (e GroupType) ToPointer() *GroupType { @@ -45,6 +46,8 @@ func (e *GroupType) UnmarshalJSON(data []byte) error { case "REGION": fallthrough case "EXTERNAL_GROUP": + fallthrough + case "COLLECTION_AUDIENCE": *e = GroupType(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/operations/createagent.go b/tests/mockserver/internal/sdk/models/operations/createagent.go new file mode 100644 index 00000000..255e835e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/createagent.go @@ -0,0 +1,56 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type CreateAgentRequest struct { + // The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. + Locale *string `queryParam:"style=form,explode=true,name=locale"` + // The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. + TimezoneOffset *int64 `queryParam:"style=form,explode=true,name=timezoneOffset"` + Body components.CreateWorkflowRequest `request:"mediaType=application/json"` +} + +func (o *CreateAgentRequest) GetLocale() *string { + if o == nil { + return nil + } + return o.Locale +} + +func (o *CreateAgentRequest) GetTimezoneOffset() *int64 { + if o == nil { + return nil + } + return o.TimezoneOffset +} + +func (o *CreateAgentRequest) GetBody() components.CreateWorkflowRequest { + if o == nil { + return components.CreateWorkflowRequest{} + } + return o.Body +} + +type CreateAgentResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Success + WorkflowResult *components.WorkflowResult +} + +func (o *CreateAgentResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *CreateAgentResponse) GetWorkflowResult() *components.WorkflowResult { + if o == nil { + return nil + } + return o.WorkflowResult +} diff --git a/tests/summarize_test.go b/tests/summarize_test.go index 82e7014f..e63dc263 100644 --- a/tests/summarize_test.go +++ b/tests/summarize_test.go @@ -25,14 +25,14 @@ func TestSummarize_Summarize(t *testing.T) { res, err := s.Client.Documents.Summarize(ctx, components.SummarizeRequest{ DocumentSpecs: []components.DocumentSpecUnion{ - components.CreateDocumentSpecUnionDocumentSpec2( - components.DocumentSpec2{ - ID: "", + components.CreateDocumentSpecUnionDocumentSpec1( + components.DocumentSpec1{ + URL: "https://intelligent-lyre.net", }, ), - components.CreateDocumentSpecUnionDocumentSpec2( - components.DocumentSpec2{ - ID: "", + components.CreateDocumentSpecUnionDocumentSpec1( + components.DocumentSpec1{ + URL: "https://intelligent-lyre.net", }, ), },