diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index fbbde1d1..cbb86e27 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: 379d9fd3275f5f9782fa0b945862dee2 + docChecksum: 33958fda4f2b946f46f0593aac3a619d docVersion: 0.9.0 - speakeasyVersion: 1.789.0 - generationVersion: 2.916.2 - releaseVersion: 0.13.2 - configChecksum: 17587fb8ea315ba0196713710aea0ea1 + speakeasyVersion: 1.789.2 + generationVersion: 2.916.4 + releaseVersion: 0.13.3 + configChecksum: d8c5dbc61d50c91087ddac380658b2a3 repoURL: https://github.com/gleanwork/api-client-go.git installationURL: https://github.com/gleanwork/api-client-go persistentEdits: - generation_id: ff4dfd65-609d-4ef2-ab20-502a8dcd0d6c - pristine_commit_hash: 923b8ed419625189638979c951775673a1026df1 - pristine_tree_hash: 6f9472a4c5bf9279ee12c81129c155bf36df719e + generation_id: 301d40aa-b90e-41af-9218-fb049a9c791c + pristine_commit_hash: 1c29a1de06c6e288407e955d5c99d20d99f92db9 + pristine_tree_hash: ed54f2a158557d2898fb704c6fd2c794de48031c features: go: acceptHeaders: 2.81.2 @@ -160,6 +160,10 @@ trackedFiles: id: 3d737d8dc6a4 last_write_checksum: sha1:f08995ec185a334e2656979101dbbbac3977ff18 pristine_git_object: 0f8322bc458032eaa2780a042fb6a9a3b0d83171 + docs/models/components/actionpreview.md: + id: e3728831f2b8 + last_write_checksum: sha1:1a9567b9958941072dba04004e1318221db10114 + pristine_git_object: 4b0b455066797c4544ac66b4795475dfa093ba00 docs/models/components/actionsummary.md: id: f9f286d7b5c6 last_write_checksum: sha1:4772a941c6ff48ac882f8af37ba75ba3992f23c8 @@ -344,6 +348,10 @@ trackedFiles: id: 5216c0c69301 last_write_checksum: sha1:3f85a72d07eb7c128c6adfe1990fa82432a0cf7e pristine_git_object: 86d78b34291fb3da9030cc8bc8b9c02a757dc162 + docs/models/components/authcontext.md: + id: b70197f88906 + last_write_checksum: sha1:3cdcbc03062675a2188a730fbbda041d2cc5c9d9 + pristine_git_object: 6868df0e0adf3a1b604ff9305a0035bfc86c674b docs/models/components/author.md: id: 11fd94ac06ba last_write_checksum: sha1:def709421c5bc7c1b71fc1c72fd74509508c5f61 @@ -502,8 +510,8 @@ trackedFiles: pristine_git_object: 92ada0464db3a2c9c8f77c596549e9b0d0d3c263 docs/models/components/chatmessagefragment.md: id: 3a80e2474b95 - last_write_checksum: sha1:4b786bb225b283f2897298f5d0de0b0792376e51 - pristine_git_object: d682d07f210a92c2d23072049bf510e4a2ee9d4b + last_write_checksum: sha1:8859974562717e36c74e7a8aacf96c318bc0906f + pristine_git_object: 628af271a2e8812683f1223eecf12ff517a1c9f6 docs/models/components/chatmetadata.md: id: a42b157a4213 last_write_checksum: sha1:d2c1df032c03fc56c206fc869b2660eef6426fc8 @@ -1480,6 +1488,10 @@ trackedFiles: id: 8d9a22466ab1 last_write_checksum: sha1:32354745f7ca84bdb98e23bf5cd85cb96945074a pristine_git_object: d1201e614f9790095ac51ed4674009bfe6e9d491 + docs/models/components/grantscope.md: + id: 0d0b176baab4 + last_write_checksum: sha1:5294f92d97c93e8d48e8551c6149b5c1e492bfb8 + pristine_git_object: ca03f5961a9c18d9d77757fb4dfba6c4226c051a docs/models/components/granttype.md: id: 1a146e9c1f2d last_write_checksum: sha1:e9cb692a4ac84135bcd8f7bff7b400a74e5c0ac7 @@ -1674,8 +1686,8 @@ trackedFiles: pristine_git_object: 04ea1a396d9d50b1c60303b084a6d33eeee238fe docs/models/components/listentitiesrequest.md: id: 14b0c19d6101 - last_write_checksum: sha1:84c8decff1ce84b1a999efbd36bfcb01df845d68 - pristine_git_object: f20e7a9fa5cfe539943a87252278526c023a97f7 + last_write_checksum: sha1:f2c878417faf07d6c93b9adecae85c7fe3c61b16 + pristine_git_object: dc1134f9cc4f8ee3cff2f66bc71afcd9d47e7946 docs/models/components/listentitiesrequestentitytype.md: id: 7bdb8c6a428b last_write_checksum: sha1:4dd1e8af4737a096b0c583a8d2eb1d483d454968 @@ -1684,6 +1696,10 @@ trackedFiles: id: 21bfc7677cd1 last_write_checksum: sha1:d738c42f9b5fe21cc849a445d4c7d582afdc92bb pristine_git_object: 89c73fc15f09212c20462e32191c86af4f1eb18f + docs/models/components/listentitiesrequestrequesttype.md: + id: 525b9b1bbcfe + last_write_checksum: sha1:9d4dc11b0e25856be3e0deb0b5b3b162f7060402 + pristine_git_object: 799258057f07a27570e730046293cece238a048a docs/models/components/listentitiesresponse.md: id: b020a859dedd last_write_checksum: sha1:cf7c394b83e53bbb43ab228b5fedba409127f4dc @@ -1986,8 +2002,8 @@ trackedFiles: pristine_git_object: c981629e5512e639d0937e2f6cf6b716e33f262d docs/models/components/platformsearchrequest.md: id: 8636ff30ae76 - last_write_checksum: sha1:6348a0be4681f2b4d0ebeffd6df8c98bc2f1b8eb - pristine_git_object: b083d5700281c47d9e744fddc3058c5287e42ef8 + last_write_checksum: sha1:bdb75d026c04c3b32bbe671f3f61352f92024a3c + pristine_git_object: fdcd6d3347697966babbf72117c33a936749264b docs/models/components/platformsearchresponse.md: id: d398b8139176 last_write_checksum: sha1:8e60e11bbdf3cb4c64446551d422cffba1d47238 @@ -2120,10 +2136,6 @@ trackedFiles: id: 4cfbbf163074 last_write_checksum: sha1:d7d3d4f58f4bf3aecca13e10df74936c74093b8e pristine_git_object: 506441fb6c11f615f11c6c81b39573694b2d1a59 - docs/models/components/requesttype.md: - id: 34795596de2e - last_write_checksum: sha1:1e66a1e4786f2f032d89eb3224c63f9dca8785b5 - pristine_git_object: 5c68aac1e81f292ec53e46eb98c09b83fa1bce2a docs/models/components/responsehint.md: id: 0c0dcd1950d9 last_write_checksum: sha1:330c6809ecc42f31e1f3883d2d546db581a6896a @@ -2252,6 +2264,22 @@ trackedFiles: id: 3ba132562e0e last_write_checksum: sha1:2a02cbbc195aebc4b3d12a7b43bf08a1fd9bfa7c pristine_git_object: ef923c91e56d919712ac748f029e562e3edef0c7 + docs/models/components/servertoolrequest.md: + id: 95bee62b6f75 + last_write_checksum: sha1:42801dc86e80f2874a9b2dfe406f4c69608254af + pristine_git_object: db175e32a5e845918aacbe065dc4f10438625760 + docs/models/components/servertoolrequestrequesttype.md: + id: bcc968a16a2d + last_write_checksum: sha1:5cf37e2350cb10776abf3d245e05d2a689e2a385 + pristine_git_object: e353ba843d3ba5e0874eb29f1e6461204a02b0b8 + docs/models/components/servertoolresponse.md: + id: b6819298a903 + last_write_checksum: sha1:1ef3acf09cd286995e905a754cf40cc53dfad145 + pristine_git_object: c6c5a75d92b419c9225214f1f9f990a8bc1a9627 + docs/models/components/servertoolresponserequesttype.md: + id: 6321435ecc96 + last_write_checksum: sha1:41fc3e77085d8467d8f3ab3354cd32df0d78273b + pristine_git_object: 051ad2a55864cef3c6e95959b446364d74f5b807 docs/models/components/sessioninfo.md: id: e292498adc48 last_write_checksum: sha1:3e35a26fa026e554c6adc825a626cf2d1c2d86a0 @@ -3694,8 +3722,8 @@ trackedFiles: pristine_git_object: 25868a2b44bc7c3a03edc5d212895ef4be3e2326 docs/sdks/search/README.md: id: 5c534716244c - last_write_checksum: sha1:9a943fba5858cce8cb9119b5ad2d2f9ab1c2af17 - pristine_git_object: 5c2e0e0cb27415789b2a4084576cd18cf658b7d0 + last_write_checksum: sha1:2ff02ecfda4f97e039b24254528a20800148f39f + pristine_git_object: 2487f2f798a866383f669952a76f999c869d4927 docs/sdks/tools/README.md: id: 044286549bac last_write_checksum: sha1:496baa99aee4567d5338f6bf39dbca987ea67684 @@ -3722,8 +3750,8 @@ trackedFiles: pristine_git_object: a3cb3e5448f3fdcfad77ed2a4ba47ae848d5cd5d glean.go: id: f5ed099b8e85 - last_write_checksum: sha1:7e824fe912706baa5943a6276670a6be8a6c5108 - pristine_git_object: bf6b4cb5c767be1a1ae6196b217605bb5f5f1c11 + last_write_checksum: sha1:dce5f3a64b81b878278dd1c24c9913042379433d + pristine_git_object: 4842a872e30637d4adc5bc344128ef0c67b37ef4 go.mod: id: c47645c391ad last_write_checksum: sha1:cf65a2c96e303858d4cf70e07d4c44d3f1c1db38 @@ -3860,6 +3888,10 @@ trackedFiles: id: 7b64228b08d4 last_write_checksum: sha1:3d7fc9bd25575aa13270179abf6a2416884dc4f7 pristine_git_object: 59ba7c899919974802ab72f5ff6e8100c5048a9c + models/components/actionpreview.go: + id: 3b2b9374e3a4 + last_write_checksum: sha1:da19e0fb02f86d9c8ddf890f1db90bf96259cba0 + pristine_git_object: 63e8d0b3078f8e22b6f8837a2d34491bbba27d9b models/components/actionsummary.go: id: 6e681273cd50 last_write_checksum: sha1:a9bf8f8d3beaf8f30dc9742dd8c5881f7a8a9277 @@ -3988,6 +4020,10 @@ trackedFiles: id: 345de3c51342 last_write_checksum: sha1:3c84d57ecfd714ca1cda1c839083e5ed33c6c69d pristine_git_object: 47be47e2a68090e2e866c891a29a088309ab46fa + models/components/authcontext.go: + id: 58afb225ee1b + last_write_checksum: sha1:06f93194d27453d50943ef59f17f16f15ca45852 + pristine_git_object: e50831b6d364653969f61e8c0520046bec598f2d models/components/authorizeactionpackrequest.go: id: f6494e4bf973 last_write_checksum: sha1:e40c8e9c6f933d34daf87358307d887cbb874763 @@ -4114,8 +4150,8 @@ trackedFiles: pristine_git_object: cb73fb2f22e26699d87853f3bf5b0ad174198e92 models/components/chatmessagefragment.go: id: 8b451ad53a7d - last_write_checksum: sha1:0d8fbc173b3d0e0ca97ded6593a7e966af939fa1 - pristine_git_object: e4b8667ecf5d89da9b02b74322e251c7f2db56d2 + last_write_checksum: sha1:0f5cde5f3d94ee71a89daeecbe9428a01f6122ce + pristine_git_object: 70992ba96a93361e90247155469f75626542605d models/components/chatmetadata.go: id: 6dc153d433ee last_write_checksum: sha1:4e113342074df7215023e788297815eca2e9f48e @@ -5054,8 +5090,8 @@ trackedFiles: pristine_git_object: 75dcc9a2f99569c6da8f2229ac019db60d44a91e models/components/listentitiesrequest.go: id: a3855f82737f - last_write_checksum: sha1:ef4a25a0546c0ce0cd46e85aeb986187bb8dc067 - pristine_git_object: 21a548039798a35449d5abb1c569721ac0880d50 + last_write_checksum: sha1:7fa387b754abb11b8c29a5b758be000bde80a5db + pristine_git_object: 0354050e2ecec82398128ad8d7e7cae08326157a models/components/listentitiesresponse.go: id: 1a8d2dcc2a32 last_write_checksum: sha1:887006723b2e3f8a694d81b8ab76aef7bc8de02b @@ -5496,6 +5532,14 @@ trackedFiles: id: 4fab3c62aa96 last_write_checksum: sha1:9dd626f7d81c634bd7589d6e22b7de3edff8eaf6 pristine_git_object: c88a2fb6e23612ad4444374fc18bc48d88d427d5 + models/components/servertoolrequest.go: + id: e4801d9923ae + last_write_checksum: sha1:b01b836cef197200a8fa9dcbdd98370ba9b7b566 + pristine_git_object: c1015ac9fcd139f35ddb1f0a1c3522750d127303 + models/components/servertoolresponse.go: + id: 87a5b4b61cc5 + last_write_checksum: sha1:e95269a590220f58111ebfa09a547619e2b113c1 + pristine_git_object: 50f633612e733a0f1dfe29691752effe23feee5a models/components/sessioninfo.go: id: eceeb71ccb8f last_write_checksum: sha1:8aa12e13cbfc1e5685c46295b22f59156388dc32 @@ -6802,8 +6846,8 @@ trackedFiles: pristine_git_object: ab9263d43404e8e6f07af222a3e785aca2fbf35f tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go: id: 3fb93a419933 - last_write_checksum: sha1:f9f4c718408bddadbdf826194f07970bb111e57e - pristine_git_object: 5c99a0ada5302c8f64c0e5da5683fa8bd9e9975d + last_write_checksum: sha1:14b4a1d98dd55ce2b487ae1aaab4a7dece08df25 + pristine_git_object: 371b90231fcd7bd77fd6d9566156605af1712d9a tests/mockserver/internal/handler/pathpostrestapiv1createshortcut.go: id: 8d9d3abb0c34 last_write_checksum: sha1:2f9468a50936c4cb0fb2101d97c1425cb36ba2d4 @@ -7044,6 +7088,10 @@ trackedFiles: id: ad34672435c4 last_write_checksum: sha1:578df01f6d9f140122c63b6b9b2b01cda1ad6280 pristine_git_object: b5d719827a698757158580e277482bb8a7a00238 + tests/mockserver/internal/sdk/models/components/actionpreview.go: + id: b59786e4fa6d + last_write_checksum: sha1:89544c34cccc3a130fc95b1981eacb57a9c2772a + pristine_git_object: facf42ad976803e2f4299f89902efc5ec3bd8bef tests/mockserver/internal/sdk/models/components/actionsummary.go: id: f7930cfbea89 last_write_checksum: sha1:32cfaf32c20b96fe223b11c6150435d39c9be8da @@ -7172,6 +7220,10 @@ trackedFiles: id: 450c27df20a3 last_write_checksum: sha1:e9e386e4a0c3ea918f1a2b332f91a129d77ac307 pristine_git_object: 483958ea708faa6e36081ef83b4c528441313815 + tests/mockserver/internal/sdk/models/components/authcontext.go: + id: 563a8dbb8e8c + last_write_checksum: sha1:72fc3805afb81247d0f04899dcec35e9e3710803 + pristine_git_object: 1b2c97ab3035a7f4dc344a387243d9152a5f409a tests/mockserver/internal/sdk/models/components/authorizeactionpackrequest.go: id: 6aa135032c9b last_write_checksum: sha1:4c85e9cc50180f07d2857be440bae9f465f5f468 @@ -7298,8 +7350,8 @@ trackedFiles: pristine_git_object: ba07ad7ae4afd9e658815a526e41aefbb9f854f0 tests/mockserver/internal/sdk/models/components/chatmessagefragment.go: id: 8d14e05d6934 - last_write_checksum: sha1:1834d9a43544e8cca44d147a1e2f99e120fb09ae - pristine_git_object: 4a0507c9eec0ef8e77fe81e62b063f85250c3704 + last_write_checksum: sha1:d41f5568b67d2f41291d7fc880ef28fad6d59a72 + pristine_git_object: 632727b0852cefdc9b6ce1267faeddd4b164a1d0 tests/mockserver/internal/sdk/models/components/chatmetadata.go: id: 53881e1500d3 last_write_checksum: sha1:2069155b9191362259f87a10f5eb7426b3bad1b8 @@ -8238,8 +8290,8 @@ trackedFiles: pristine_git_object: 25f297b597a1dfa563907db00601e89cd55c39f1 tests/mockserver/internal/sdk/models/components/listentitiesrequest.go: id: 1dbbb5c24982 - last_write_checksum: sha1:c181794849c1e7b456fb3ed65c7714c84ebfe2d2 - pristine_git_object: 339c8ffc83e3566eedfa5189bd9c3a37c274b795 + last_write_checksum: sha1:4af794e5bfaa93d0b8894e83a4ed66089ccc906a + pristine_git_object: a742d389e6e500312fef3867a228df6a28bb1b13 tests/mockserver/internal/sdk/models/components/listentitiesresponse.go: id: 55ea0386c2bc last_write_checksum: sha1:a8a1457db48b2ff8d44cc065f02c66d69cff2ad5 @@ -8680,6 +8732,14 @@ trackedFiles: id: b02d63c8519a last_write_checksum: sha1:20f1d2089955876f297f6effc3667f6ae84c5108 pristine_git_object: 207653771e5bb2ae5982853962b6318d8c83229f + tests/mockserver/internal/sdk/models/components/servertoolrequest.go: + id: 574fa6f36078 + last_write_checksum: sha1:6690ff38d976f82a1c585d4c9ab3cebfd1ad2828 + pristine_git_object: 3bf8c6b39892210207a22b82d84673f88b5659c1 + tests/mockserver/internal/sdk/models/components/servertoolresponse.go: + id: 621e6633f5d6 + last_write_checksum: sha1:4b508f1f965688a2066e0c4f61c03a9d736516e6 + pristine_git_object: f4b84c3b0ec23c99703c36f92065a4071d389743 tests/mockserver/internal/sdk/models/components/sessioninfo.go: id: 23183e4b8fb8 last_write_checksum: sha1:d0a7c3cb679745701743e6ec68c15cf72b3e0a2f @@ -9670,12 +9730,12 @@ trackedFiles: pristine_git_object: f0fcf2fb0b2aa857ee87a3109c647440c7df9517 tests/search_test.go: id: 2ec51916e3e4 - last_write_checksum: sha1:3cfede950dd9db37735193755314009b943cf93f - pristine_git_object: b6153fd279d3c84d23821741f08c9a8ff8775779 + last_write_checksum: sha1:75e97d28b0ad3c777774ab5cc211fc0c97394968 + pristine_git_object: 245e79dbdefc57ffcf8d2282e3f80bd581fdcda2 tests/summarize_test.go: id: 1b63b0a16e69 - last_write_checksum: sha1:54ed5721c789cf4b6d8553b71879ccef27eacd5d - pristine_git_object: 107b1ac2dbab92914d7254a8ee111b0fa92df127 + last_write_checksum: sha1:4e661ba3ca605bf350ae9afbecb86a268efed456 + pristine_git_object: 4474f69b10e0c4f6741ed3eca7df59f18a9038b7 tests/testclient.go: id: 78d36c6e169c last_write_checksum: sha1:507c44e437934fbff8d295201c1327e18bd00df8 @@ -10698,7 +10758,7 @@ examples: platform-search: speakeasy-default-platform-search: requestBody: - application/json: {"query": "quarterly planning 2026", "page_size": 10, "datasources": ["confluence", "google_drive"], "datasource_instances": ["slack_acme", "slack_eu"], "filters": [{"field": "type", "values": ["spreadsheet", "presentation"]}]} + application/json: {"query": "quarterly planning 2026", "page_size": 10, "datasources": ["confluence", "google_drive"], "filters": [{"field": "type", "values": ["spreadsheet", "presentation"]}]} responses: "200": application/json: {"results": [], "has_more": false, "next_cursor": "", "request_id": ""} @@ -10891,7 +10951,7 @@ generatedTests: platform-search: "2026-07-02T17:50:54Z" getToolServerAuthStatus: "2026-07-08T02:15:48Z" authorizeToolServer: "2026-07-08T02:15:48Z" -releaseNotes: "## Go SDK Changes:\n* `Glean.Client.Tools.RetrieveToolServerAuthStatus()`: **Added**\n* `Glean.Client.Tools.AuthorizeToolServer()`: **Added**\n* `Glean.Client.Search.RetrieveFeed()`: \n * `request.FeedRequest.Categories[].Enum(adminHealthCenter)` **Added**\n * `response.Results[]` **Changed**\n" +releaseNotes: "## Go SDK Changes:\n* `Glean.Client.Chat.Create()`: \n * `request.ChatRequest.Messages[].Fragments[]` **Changed**\n * `response.Messages[].Fragments[]` **Changed**\n* `Glean.Client.Chat.Retrieve()`: `response.ChatResult.Chat.Messages[].Fragments[]` **Changed**\n* `Glean.Client.Chat.CreateStream()`: \n * `request.ChatRequest.Messages[].Fragments[]` **Changed**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 6f9c3f70..9bb0da5b 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true go: - version: 0.13.2 + version: 0.13.3 additionalDependencies: {} allowUnknownFieldsInWeakUnions: false baseErrorName: GleanError diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index 8a9c80a4..a1f493a7 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -2,8 +2,8 @@ openapi: 3.0.0 info: version: "0.9.0" title: Glean API - x-source-commit-sha: 07b3632b09de332d35eeedd6280e30a1edf95243 - x-open-api-commit-sha: 4bc8dc442566ab2952b8e3c7a86fafff9c042aa9 + x-source-commit-sha: 270b693d49bac2f68e751b2345bac0c267741119 + x-open-api-commit-sha: 592aec2b4913505edb8161645eaf9a72b5286f20 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. @@ -5533,12 +5533,21 @@ components: additionalProperties: false required: - query + example: + query: quarterly planning 2026 + datasources: + - confluence + - google_drive + filters: + - field: type + values: + - spreadsheet + - presentation properties: query: type: string description: | The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`. - example: quarterly planning 2026 page_size: type: integer minimum: 1 @@ -5556,18 +5565,12 @@ components: type: string description: | Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`. - example: - - confluence - - google_drive datasource_instances: type: array items: type: string description: | Restrict results to specific datasource instances. Values are datasource instance identifiers returned by `GET /api/search/filters`. Requests must not specify both `datasources` and `datasource_instances`. - example: - - slack_acme - - slack_eu filters: type: array items: @@ -9713,6 +9716,127 @@ components: additionalProperties: $ref: '#/components/schemas/WriteActionParameter' description: Parameters supported by the tool. + ServerToolBase: + type: object + properties: + requestType: + type: string + enum: + - EXECUTION + - AUTHENTICATION_SUGGESTION + - VOTE_SUGGESTION + description: The type of request made to the user. + x-enumDescriptions: + EXECUTION: Request for approving execution of the tool. + AUTHENTICATION_SUGGESTION: Request for authenticating to a tool, provided as a (tool) suggestion. + VOTE_SUGGESTION: Suggestion to vote for enabling an available-but-not-enabled tool. + x-speakeasy-enum-descriptions: + EXECUTION: Request for approving execution of the tool. + AUTHENTICATION_SUGGESTION: Request for authenticating to a tool, provided as a (tool) suggestion. + VOTE_SUGGESTION: Suggestion to vote for enabling an available-but-not-enabled tool. + requestId: + type: string + description: Unique identifier for this request. + required: + - toolType + - requestType + - requestId + x-visibility: Preview + x-glean-experimental: + id: 4e3ee791-45e0-4125-845f-4b7701aa983c + introduced: "2026-07-02" + ActionPreview: + properties: + markdown: + type: string + description: Markdown preview describing what the action will do. + description: + type: string + description: Short summary of what this specific tool invocation will do. + description: Preview information for an action being executed. + ServerToolRequest: + allOf: + - $ref: '#/components/schemas/ServerToolBase' + - type: object + properties: + toolDisplayName: + type: string + description: Human-readable display name for the tool. + serverId: + type: string + description: | + Unique identifier of the tool server. Use with GET /tool-servers/{serverId}/auth + to resolve display information and authentication status. + toolCta: + type: string + description: Custom call-to-action (CTA) verb for the approval button (e.g., "Create", "Update", "Send"). + actionPreview: + $ref: '#/components/schemas/ActionPreview' + description: Preview information for this tool request. + required: + - toolName + x-visibility: Preview + x-glean-experimental: + id: 8544e887-4569-4b14-bde0-d1be9e90dbc3 + introduced: "2026-07-02" + AuthContext: + type: object + properties: + serverId: + type: string + description: ID of the MCP server (populated when toolType is MCP). + description: | + Context for authentication responses, containing identifiers for the entity being authenticated. + x-visibility: Preview + x-glean-experimental: + id: a7c1d3e5-9f42-4b8a-b6e0-2d4f8a1c3e5b + introduced: "2026-07-09" + ServerToolResponse: + allOf: + - $ref: '#/components/schemas/ServerToolBase' + - type: object + properties: + isGranted: + type: boolean + description: Whether tool request is granted (indicates approval for execution, or completion for auth). + grantScope: + type: string + enum: + - CURRENT_REQUEST + - CURRENT_SESSION + - ALWAYS + description: | + Scope of the approval grant. Only applicable when isGranted is true and requestType is EXECUTION. + default: CURRENT_REQUEST + x-enumDescriptions: + CURRENT_REQUEST: Approve only the current tool request. Future tool execution requests still require approval. + CURRENT_SESSION: Approve the current tool request and auto-approve all future same tool requests in this chat session. + ALWAYS: Approve the current tool request and auto-approve all future same tool requests across all chat sessions. + x-speakeasy-enum-descriptions: + CURRENT_REQUEST: Approve only the current tool request. Future tool execution requests still require approval. + CURRENT_SESSION: Approve the current tool request and auto-approve all future same tool requests in this chat session. + ALWAYS: Approve the current tool request and auto-approve all future same tool requests across all chat sessions. + authContext: + $ref: '#/components/schemas/AuthContext' + description: Context for AUTHENTICATION_SUGGESTION responses. Required when requestType is AUTHENTICATION_SUGGESTION. + description: | + Response to a server tool request. The applicable fields depend on requestType: + + For EXECUTION requests: + - isGranted: whether tool execution is approved + - reason: optional explanation + + For AUTHENTICATION_SUGGESTION requests: + - isGranted: whether auth completed successfully (true=connected, false=skipped) + - authContext: contains serverId or actionPackId for identifying the authenticated entity + - reason: optional explanation for skip + + For VOTE_SUGGESTION requests: + - voted: whether the user voted for this tool + x-visibility: Preview + x-glean-experimental: + id: 3eae3ee7-2c06-4027-be14-98260a3ce608 + introduced: "2026-07-02" ChatMessageFragment: allOf: - $ref: '#/components/schemas/Result' @@ -9732,6 +9856,12 @@ components: citation: $ref: '#/components/schemas/ChatMessageCitation' description: Inline citation. + serverToolRequest: + $ref: '#/components/schemas/ServerToolRequest' + description: request to run a tool on server. + serverToolResponse: + $ref: '#/components/schemas/ServerToolResponse' + description: response corresponding to the server tool request. description: Represents a part of a ChatMessage that originates from a single action/tool. It is designed to support rich data formats beyond simple text, allowing for a more dynamic and interactive chat experience. Each fragment can include various types of content, such as text, search queries, action information, and more. Also, each ChatMessageFragment should only have one of structuredResults, querySuggestion, writeAction, followupAction, agentRecommendation, followupRoutingSuggestion or file. ChatMessage: properties: diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index 2530e646..ffba480f 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -164657,9 +164657,6 @@ workflows: requestBody: contentType: application/json payload: - datasource_instances: - - slack_acme - - slack_eu datasources: - confluence - google_drive diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 6531eef3..b21e544d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.789.0 +speakeasyVersion: 1.789.2 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:eaebe7be5b8f0f68b1331b223088ad140bf7caa28b87534a807a902b82f0e715 - sourceBlobDigest: sha256:fdd2d2ee23d11786186f25ae9270c19355398694eb3aedbfe02e7687c9e8c2e3 + sourceRevisionDigest: sha256:145236c33451e6e87cf1507a4d8829678b0df02af59afc9341330627e33ed760 + sourceBlobDigest: sha256:862b1370a65d146eac83f86c6fbd2d787f04ea93c2cf28259af5ded934f9fb3b tags: - latest petstore-oas: @@ -17,10 +17,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:eaebe7be5b8f0f68b1331b223088ad140bf7caa28b87534a807a902b82f0e715 - sourceBlobDigest: sha256:fdd2d2ee23d11786186f25ae9270c19355398694eb3aedbfe02e7687c9e8c2e3 + sourceRevisionDigest: sha256:145236c33451e6e87cf1507a4d8829678b0df02af59afc9341330627e33ed760 + sourceBlobDigest: sha256:862b1370a65d146eac83f86c6fbd2d787f04ea93c2cf28259af5ded934f9fb3b codeSamplesNamespace: glean-api-specs-go-code-samples - codeSamplesRevisionDigest: sha256:e33e590a1c2fd20f43edf50e39adc6217f26e1627bcc7a06f4907c77a120c261 + codeSamplesRevisionDigest: sha256:90941ca05c5c8e8a7acfa165b3674411f1c712692e4e071afecb72791b282a07 petstore: source: petstore-oas sourceNamespace: petstore-oas diff --git a/RELEASES.md b/RELEASES.md index fc3daaeb..ee34ffff 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -788,4 +788,14 @@ Based on: ### Generated - [go v0.13.2] . ### Releases -- [Go v0.13.2] https://github.com/gleanwork/api-client-go/releases/tag/v0.13.2 - . \ No newline at end of file +- [Go v0.13.2] https://github.com/gleanwork/api-client-go/releases/tag/v0.13.2 - . + +## 2026-07-10 16:28:59 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.789.2 (2.916.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.13.3] . +### Releases +- [Go v0.13.3] https://github.com/gleanwork/api-client-go/releases/tag/v0.13.3 - . \ No newline at end of file diff --git a/docs/models/components/actionpreview.md b/docs/models/components/actionpreview.md new file mode 100644 index 00000000..4b0b4550 --- /dev/null +++ b/docs/models/components/actionpreview.md @@ -0,0 +1,11 @@ +# ActionPreview + +Preview information for an action being executed. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `Markdown` | `*string` | :heavy_minus_sign: | Markdown preview describing what the action will do. | +| `Description` | `*string` | :heavy_minus_sign: | Short summary of what this specific tool invocation will do. | \ No newline at end of file diff --git a/docs/models/components/authcontext.md b/docs/models/components/authcontext.md new file mode 100644 index 00000000..6868df0e --- /dev/null +++ b/docs/models/components/authcontext.md @@ -0,0 +1,11 @@ +# AuthContext + +Context for authentication responses, containing identifiers for the entity being authenticated. + + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `ServerID` | `*string` | :heavy_minus_sign: | ID of the MCP server (populated when toolType is MCP). | \ No newline at end of file diff --git a/docs/models/components/chatmessagefragment.md b/docs/models/components/chatmessagefragment.md index d682d07f..628af271 100644 --- a/docs/models/components/chatmessagefragment.md +++ b/docs/models/components/chatmessagefragment.md @@ -5,12 +5,14 @@ Represents a part of a ChatMessage that originates from a single action/tool. It ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `StructuredResults` | [][components.StructuredResult](../../models/components/structuredresult.md) | :heavy_minus_sign: | An array of entities in the work graph retrieved via a data request. | | -| `TrackingToken` | `*string` | :heavy_minus_sign: | An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. | | -| `Text` | `*string` | :heavy_minus_sign: | N/A | | -| `QuerySuggestion` | [*components.QuerySuggestion](../../models/components/querysuggestion.md) | :heavy_minus_sign: | N/A | {
"query": "app:github type:pull author:mortimer",
"label": "Mortimer's PRs",
"datasource": "github"
} | -| `File` | [*components.ChatFile](../../models/components/chatfile.md) | :heavy_minus_sign: | Structure for file uploaded by a user for Chat. | | -| `Action` | [*components.ToolInfo](../../models/components/toolinfo.md) | :heavy_minus_sign: | N/A | | -| `Citation` | [*components.ChatMessageCitation](../../models/components/chatmessagecitation.md) | :heavy_minus_sign: | Information about the source for a ChatMessage. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `StructuredResults` | [][components.StructuredResult](../../models/components/structuredresult.md) | :heavy_minus_sign: | An array of entities in the work graph retrieved via a data request. | | +| `TrackingToken` | `*string` | :heavy_minus_sign: | An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. | | +| `Text` | `*string` | :heavy_minus_sign: | N/A | | +| `QuerySuggestion` | [*components.QuerySuggestion](../../models/components/querysuggestion.md) | :heavy_minus_sign: | N/A | {
"query": "app:github type:pull author:mortimer",
"label": "Mortimer's PRs",
"datasource": "github"
} | +| `File` | [*components.ChatFile](../../models/components/chatfile.md) | :heavy_minus_sign: | Structure for file uploaded by a user for Chat. | | +| `Action` | [*components.ToolInfo](../../models/components/toolinfo.md) | :heavy_minus_sign: | N/A | | +| `Citation` | [*components.ChatMessageCitation](../../models/components/chatmessagecitation.md) | :heavy_minus_sign: | Information about the source for a ChatMessage. | | +| `ServerToolRequest` | [*components.ServerToolRequest](../../models/components/servertoolrequest.md) | :heavy_minus_sign: | N/A | | +| `ServerToolResponse` | [*components.ServerToolResponse](../../models/components/servertoolresponse.md) | :heavy_minus_sign: | Response to a server tool request. The applicable fields depend on requestType:

For EXECUTION requests:
- isGranted: whether tool execution is approved
- reason: optional explanation

For AUTHENTICATION_SUGGESTION requests:
- isGranted: whether auth completed successfully (true=connected, false=skipped)
- authContext: contains serverId or actionPackId for identifying the authenticated entity
- reason: optional explanation for skip

For VOTE_SUGGESTION requests:
- voted: whether the user voted for this tool
| | \ No newline at end of file diff --git a/docs/models/components/grantscope.md b/docs/models/components/grantscope.md new file mode 100644 index 00000000..ca03f596 --- /dev/null +++ b/docs/models/components/grantscope.md @@ -0,0 +1,26 @@ +# GrantScope + +Scope of the approval grant. Only applicable when isGranted is true and requestType is EXECUTION. + + +## Example Usage + +```go +import ( + "github.com/gleanwork/api-client-go/models/components" +) + +value := components.GrantScopeCurrentRequest + +// Open enum: custom values can be created with a direct type cast +custom := components.GrantScope("custom_value") +``` + + +## Values + +| Name | Value | +| -------------------------- | -------------------------- | +| `GrantScopeCurrentRequest` | CURRENT_REQUEST | +| `GrantScopeCurrentSession` | CURRENT_SESSION | +| `GrantScopeAlways` | ALWAYS | \ No newline at end of file diff --git a/docs/models/components/listentitiesrequest.md b/docs/models/components/listentitiesrequest.md index f20e7a9f..dc1134f9 100644 --- a/docs/models/components/listentitiesrequest.md +++ b/docs/models/components/listentitiesrequest.md @@ -14,4 +14,4 @@ | `PageSize` | `*int64` | :heavy_minus_sign: | Hint to the server about how many results to send back. Server may return less. | 100 | | `Cursor` | `*string` | :heavy_minus_sign: | Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. | | | `Source` | `*string` | :heavy_minus_sign: | A string denoting the search surface from which the endpoint is called. | | -| `RequestType` | [*components.RequestType](../../models/components/requesttype.md) | :heavy_minus_sign: | The type of request being made. | | \ No newline at end of file +| `RequestType` | [*components.ListEntitiesRequestRequestType](../../models/components/listentitiesrequestrequesttype.md) | :heavy_minus_sign: | The type of request being made. | | \ No newline at end of file diff --git a/docs/models/components/listentitiesrequestrequesttype.md b/docs/models/components/listentitiesrequestrequesttype.md new file mode 100644 index 00000000..79925805 --- /dev/null +++ b/docs/models/components/listentitiesrequestrequesttype.md @@ -0,0 +1,21 @@ +# ListEntitiesRequestRequestType + +The type of request being made. + +## Example Usage + +```go +import ( + "github.com/gleanwork/api-client-go/models/components" +) + +value := components.ListEntitiesRequestRequestTypeStandard +``` + + +## Values + +| Name | Value | +| --------------------------------------------- | --------------------------------------------- | +| `ListEntitiesRequestRequestTypeStandard` | STANDARD | +| `ListEntitiesRequestRequestTypeFullDirectory` | FULL_DIRECTORY | \ No newline at end of file diff --git a/docs/models/components/platformsearchrequest.md b/docs/models/components/platformsearchrequest.md index b083d570..fdcd6d33 100644 --- a/docs/models/components/platformsearchrequest.md +++ b/docs/models/components/platformsearchrequest.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Query` | `string` | :heavy_check_mark: | The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`.
| quarterly planning 2026 | -| `PageSize` | `*int64` | :heavy_minus_sign: | Number of results to return per page. | | -| `Cursor` | `*string` | :heavy_minus_sign: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request.
| | -| `Datasources` | []`string` | :heavy_minus_sign: | Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`.
| [
"confluence",
"google_drive"
] | -| `DatasourceInstances` | []`string` | :heavy_minus_sign: | Restrict results to specific datasource instances. Values are datasource instance identifiers returned by `GET /api/search/filters`. Requests must not specify both `datasources` and `datasource_instances`.
| [
"slack_acme",
"slack_eu"
] | -| `Filters` | [][components.PlatformFilter](../../models/components/platformfilter.md) | :heavy_minus_sign: | Structured filters applied to search results. Equality operators OR multiple values within a filter. Multiple filters are AND'd together, including range filters on the same field. Filters are AND'd with any inline operators in `query`. Note that conflicting constraints on the same field (e.g., `type:document` in the query and `type: spreadsheet` in a filter) produce an empty result set.
| | -| `TimeRange` | [*components.PlatformTimeRange](../../models/components/platformtimerange.md) | :heavy_minus_sign: | Filter results to those last updated within this range. | | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Query` | `string` | :heavy_check_mark: | The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`.
| +| `PageSize` | `*int64` | :heavy_minus_sign: | Number of results to return per page. | +| `Cursor` | `*string` | :heavy_minus_sign: | Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request.
| +| `Datasources` | []`string` | :heavy_minus_sign: | Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`.
| +| `DatasourceInstances` | []`string` | :heavy_minus_sign: | Restrict results to specific datasource instances. Values are datasource instance identifiers returned by `GET /api/search/filters`. Requests must not specify both `datasources` and `datasource_instances`.
| +| `Filters` | [][components.PlatformFilter](../../models/components/platformfilter.md) | :heavy_minus_sign: | Structured filters applied to search results. Equality operators OR multiple values within a filter. Multiple filters are AND'd together, including range filters on the same field. Filters are AND'd with any inline operators in `query`. Note that conflicting constraints on the same field (e.g., `type:document` in the query and `type: spreadsheet` in a filter) produce an empty result set.
| +| `TimeRange` | [*components.PlatformTimeRange](../../models/components/platformtimerange.md) | :heavy_minus_sign: | Filter results to those last updated within this range. | \ No newline at end of file diff --git a/docs/models/components/requesttype.md b/docs/models/components/requesttype.md deleted file mode 100644 index 5c68aac1..00000000 --- a/docs/models/components/requesttype.md +++ /dev/null @@ -1,21 +0,0 @@ -# RequestType - -The type of request being made. - -## Example Usage - -```go -import ( - "github.com/gleanwork/api-client-go/models/components" -) - -value := components.RequestTypeStandard -``` - - -## Values - -| Name | Value | -| -------------------------- | -------------------------- | -| `RequestTypeStandard` | STANDARD | -| `RequestTypeFullDirectory` | FULL_DIRECTORY | \ No newline at end of file diff --git a/docs/models/components/servertoolrequest.md b/docs/models/components/servertoolrequest.md new file mode 100644 index 00000000..db175e32 --- /dev/null +++ b/docs/models/components/servertoolrequest.md @@ -0,0 +1,13 @@ +# ServerToolRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `RequestType` | [components.ServerToolRequestRequestType](../../models/components/servertoolrequestrequesttype.md) | :heavy_check_mark: | The type of request made to the user. | +| `RequestID` | `string` | :heavy_check_mark: | Unique identifier for this request. | +| `ToolDisplayName` | `*string` | :heavy_minus_sign: | Human-readable display name for the tool. | +| `ServerID` | `*string` | :heavy_minus_sign: | Unique identifier of the tool server. Use with GET /tool-servers/{serverId}/auth
to resolve display information and authentication status.
| +| `ToolCta` | `*string` | :heavy_minus_sign: | Custom call-to-action (CTA) verb for the approval button (e.g., "Create", "Update", "Send"). | +| `ActionPreview` | [*components.ActionPreview](../../models/components/actionpreview.md) | :heavy_minus_sign: | Preview information for an action being executed. | \ No newline at end of file diff --git a/docs/models/components/servertoolrequestrequesttype.md b/docs/models/components/servertoolrequestrequesttype.md new file mode 100644 index 00000000..e353ba84 --- /dev/null +++ b/docs/models/components/servertoolrequestrequesttype.md @@ -0,0 +1,25 @@ +# ServerToolRequestRequestType + +The type of request made to the user. + +## Example Usage + +```go +import ( + "github.com/gleanwork/api-client-go/models/components" +) + +value := components.ServerToolRequestRequestTypeExecution + +// Open enum: custom values can be created with a direct type cast +custom := components.ServerToolRequestRequestType("custom_value") +``` + + +## Values + +| Name | Value | +| ------------------------------------------------------ | ------------------------------------------------------ | +| `ServerToolRequestRequestTypeExecution` | EXECUTION | +| `ServerToolRequestRequestTypeAuthenticationSuggestion` | AUTHENTICATION_SUGGESTION | +| `ServerToolRequestRequestTypeVoteSuggestion` | VOTE_SUGGESTION | \ No newline at end of file diff --git a/docs/models/components/servertoolresponse.md b/docs/models/components/servertoolresponse.md new file mode 100644 index 00000000..c6c5a75d --- /dev/null +++ b/docs/models/components/servertoolresponse.md @@ -0,0 +1,27 @@ +# ServerToolResponse + +Response to a server tool request. The applicable fields depend on requestType: + +For EXECUTION requests: +- isGranted: whether tool execution is approved +- reason: optional explanation + +For AUTHENTICATION_SUGGESTION requests: +- isGranted: whether auth completed successfully (true=connected, false=skipped) +- authContext: contains serverId or actionPackId for identifying the authenticated entity +- reason: optional explanation for skip + +For VOTE_SUGGESTION requests: +- voted: whether the user voted for this tool + + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `RequestType` | [components.ServerToolResponseRequestType](../../models/components/servertoolresponserequesttype.md) | :heavy_check_mark: | The type of request made to the user. | +| `RequestID` | `string` | :heavy_check_mark: | Unique identifier for this request. | +| `IsGranted` | `*bool` | :heavy_minus_sign: | Whether tool request is granted (indicates approval for execution, or completion for auth). | +| `GrantScope` | [*components.GrantScope](../../models/components/grantscope.md) | :heavy_minus_sign: | Scope of the approval grant. Only applicable when isGranted is true and requestType is EXECUTION.
| +| `AuthContext` | [*components.AuthContext](../../models/components/authcontext.md) | :heavy_minus_sign: | Context for authentication responses, containing identifiers for the entity being authenticated.
| \ No newline at end of file diff --git a/docs/models/components/servertoolresponserequesttype.md b/docs/models/components/servertoolresponserequesttype.md new file mode 100644 index 00000000..051ad2a5 --- /dev/null +++ b/docs/models/components/servertoolresponserequesttype.md @@ -0,0 +1,25 @@ +# ServerToolResponseRequestType + +The type of request made to the user. + +## Example Usage + +```go +import ( + "github.com/gleanwork/api-client-go/models/components" +) + +value := components.ServerToolResponseRequestTypeExecution + +// Open enum: custom values can be created with a direct type cast +custom := components.ServerToolResponseRequestType("custom_value") +``` + + +## Values + +| Name | Value | +| ------------------------------------------------------- | ------------------------------------------------------- | +| `ServerToolResponseRequestTypeExecution` | EXECUTION | +| `ServerToolResponseRequestTypeAuthenticationSuggestion` | AUTHENTICATION_SUGGESTION | +| `ServerToolResponseRequestTypeVoteSuggestion` | VOTE_SUGGESTION | \ No newline at end of file diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 5c2e0e0c..2487f2f7 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -38,10 +38,6 @@ func main() { "confluence", "google_drive", }, - DatasourceInstances: []string{ - "slack_acme", - "slack_eu", - }, Filters: []components.PlatformFilter{ components.PlatformFilter{ Field: "type", diff --git a/glean.go b/glean.go index bf6b4cb5..4842a872 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.916.2 +// Generated from OpenAPI doc version 0.9.0 and generator version 2.916.4 import ( "context" @@ -161,9 +161,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.13.2", + SDKVersion: "0.13.3", sdkConfiguration: config.SDKConfiguration{ - UserAgent: "speakeasy-sdk/go 0.13.2 2.916.2 0.9.0 github.com/gleanwork/api-client-go", + UserAgent: "speakeasy-sdk/go 0.13.3 2.916.4 0.9.0 github.com/gleanwork/api-client-go", ServerList: ServerList, ServerVariables: []map[string]string{ { diff --git a/models/components/actionpreview.go b/models/components/actionpreview.go new file mode 100644 index 00000000..63e8d0b3 --- /dev/null +++ b/models/components/actionpreview.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ActionPreview - Preview information for an action being executed. +type ActionPreview struct { + // Markdown preview describing what the action will do. + Markdown *string `json:"markdown,omitempty"` + // Short summary of what this specific tool invocation will do. + Description *string `json:"description,omitempty"` +} + +func (a *ActionPreview) GetMarkdown() *string { + if a == nil { + return nil + } + return a.Markdown +} + +func (a *ActionPreview) GetDescription() *string { + if a == nil { + return nil + } + return a.Description +} diff --git a/models/components/authcontext.go b/models/components/authcontext.go new file mode 100644 index 00000000..e50831b6 --- /dev/null +++ b/models/components/authcontext.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// AuthContext - Context for authentication responses, containing identifiers for the entity being authenticated. +type AuthContext struct { + // ID of the MCP server (populated when toolType is MCP). + ServerID *string `json:"serverId,omitempty"` +} + +func (a *AuthContext) GetServerID() *string { + if a == nil { + return nil + } + return a.ServerID +} diff --git a/models/components/chatmessagefragment.go b/models/components/chatmessagefragment.go index e4b8667e..70992ba9 100644 --- a/models/components/chatmessagefragment.go +++ b/models/components/chatmessagefragment.go @@ -14,7 +14,23 @@ type ChatMessageFragment struct { File *ChatFile `json:"file,omitempty"` Action *ToolInfo `json:"action,omitempty"` // Information about the source for a ChatMessage. - Citation *ChatMessageCitation `json:"citation,omitempty"` + Citation *ChatMessageCitation `json:"citation,omitempty"` + ServerToolRequest *ServerToolRequest `json:"serverToolRequest,omitempty"` + // Response to a server tool request. The applicable fields depend on requestType: + // + // For EXECUTION requests: + // - isGranted: whether tool execution is approved + // - reason: optional explanation + // + // For AUTHENTICATION_SUGGESTION requests: + // - isGranted: whether auth completed successfully (true=connected, false=skipped) + // - authContext: contains serverId or actionPackId for identifying the authenticated entity + // - reason: optional explanation for skip + // + // For VOTE_SUGGESTION requests: + // - voted: whether the user voted for this tool + // + ServerToolResponse *ServerToolResponse `json:"serverToolResponse,omitempty"` } func (c *ChatMessageFragment) GetStructuredResults() []StructuredResult { @@ -65,3 +81,17 @@ func (c *ChatMessageFragment) GetCitation() *ChatMessageCitation { } return c.Citation } + +func (c *ChatMessageFragment) GetServerToolRequest() *ServerToolRequest { + if c == nil { + return nil + } + return c.ServerToolRequest +} + +func (c *ChatMessageFragment) GetServerToolResponse() *ServerToolResponse { + if c == nil { + return nil + } + return c.ServerToolResponse +} diff --git a/models/components/listentitiesrequest.go b/models/components/listentitiesrequest.go index 21a54803..0354050e 100644 --- a/models/components/listentitiesrequest.go +++ b/models/components/listentitiesrequest.go @@ -84,20 +84,20 @@ func (e *ListEntitiesRequestIncludeField) UnmarshalJSON(data []byte) error { } } -// RequestType - The type of request being made. -type RequestType string +// ListEntitiesRequestRequestType - The type of request being made. +type ListEntitiesRequestRequestType string const ( - // RequestTypeStandard Used by default for all requests and satisfies all standard use cases for list requests. Limited to 10000 entities. - RequestTypeStandard RequestType = "STANDARD" - // RequestTypeFullDirectory Used exclusively to return a comprehensive list of all people entities in the organization, typically for audit like purposes. The recommended approach is to sort by FIRST_NAME or LAST_NAME, and use pagination for large organizations. - RequestTypeFullDirectory RequestType = "FULL_DIRECTORY" + // ListEntitiesRequestRequestTypeStandard Used by default for all requests and satisfies all standard use cases for list requests. Limited to 10000 entities. + ListEntitiesRequestRequestTypeStandard ListEntitiesRequestRequestType = "STANDARD" + // ListEntitiesRequestRequestTypeFullDirectory Used exclusively to return a comprehensive list of all people entities in the organization, typically for audit like purposes. The recommended approach is to sort by FIRST_NAME or LAST_NAME, and use pagination for large organizations. + ListEntitiesRequestRequestTypeFullDirectory ListEntitiesRequestRequestType = "FULL_DIRECTORY" ) -func (e RequestType) ToPointer() *RequestType { +func (e ListEntitiesRequestRequestType) ToPointer() *ListEntitiesRequestRequestType { return &e } -func (e *RequestType) UnmarshalJSON(data []byte) error { +func (e *ListEntitiesRequestRequestType) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err @@ -106,10 +106,10 @@ func (e *RequestType) UnmarshalJSON(data []byte) error { case "STANDARD": fallthrough case "FULL_DIRECTORY": - *e = RequestType(v) + *e = ListEntitiesRequestRequestType(v) return nil default: - return fmt.Errorf("invalid value for RequestType: %v", v) + return fmt.Errorf("invalid value for ListEntitiesRequestRequestType: %v", v) } } @@ -131,7 +131,7 @@ type ListEntitiesRequest struct { // A string denoting the search surface from which the endpoint is called. Source *string `json:"source,omitempty"` // The type of request being made. - RequestType *RequestType `default:"STANDARD" json:"requestType"` + RequestType *ListEntitiesRequestRequestType `default:"STANDARD" json:"requestType"` } func (l ListEntitiesRequest) MarshalJSON() ([]byte, error) { @@ -208,7 +208,7 @@ func (l *ListEntitiesRequest) GetSource() *string { return l.Source } -func (l *ListEntitiesRequest) GetRequestType() *RequestType { +func (l *ListEntitiesRequest) GetRequestType() *ListEntitiesRequestRequestType { if l == nil { return nil } diff --git a/models/components/servertoolrequest.go b/models/components/servertoolrequest.go new file mode 100644 index 00000000..c1015ac9 --- /dev/null +++ b/models/components/servertoolrequest.go @@ -0,0 +1,89 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ServerToolRequestRequestType - The type of request made to the user. +type ServerToolRequestRequestType string + +const ( + // ServerToolRequestRequestTypeExecution Request for approving execution of the tool. + ServerToolRequestRequestTypeExecution ServerToolRequestRequestType = "EXECUTION" + // ServerToolRequestRequestTypeAuthenticationSuggestion Request for authenticating to a tool, provided as a (tool) suggestion. + ServerToolRequestRequestTypeAuthenticationSuggestion ServerToolRequestRequestType = "AUTHENTICATION_SUGGESTION" + // ServerToolRequestRequestTypeVoteSuggestion Suggestion to vote for enabling an available-but-not-enabled tool. + ServerToolRequestRequestTypeVoteSuggestion ServerToolRequestRequestType = "VOTE_SUGGESTION" +) + +func (e ServerToolRequestRequestType) ToPointer() *ServerToolRequestRequestType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *ServerToolRequestRequestType) IsExact() bool { + if e != nil { + switch *e { + case "EXECUTION", "AUTHENTICATION_SUGGESTION", "VOTE_SUGGESTION": + return true + } + } + return false +} + +type ServerToolRequest struct { + // The type of request made to the user. + RequestType ServerToolRequestRequestType `json:"requestType"` + // Unique identifier for this request. + RequestID string `json:"requestId"` + // Human-readable display name for the tool. + ToolDisplayName *string `json:"toolDisplayName,omitempty"` + // Unique identifier of the tool server. Use with GET /tool-servers/{serverId}/auth + // to resolve display information and authentication status. + // + ServerID *string `json:"serverId,omitempty"` + // Custom call-to-action (CTA) verb for the approval button (e.g., "Create", "Update", "Send"). + ToolCta *string `json:"toolCta,omitempty"` + // Preview information for an action being executed. + ActionPreview *ActionPreview `json:"actionPreview,omitempty"` +} + +func (s *ServerToolRequest) GetRequestType() ServerToolRequestRequestType { + if s == nil { + return ServerToolRequestRequestType("") + } + return s.RequestType +} + +func (s *ServerToolRequest) GetRequestID() string { + if s == nil { + return "" + } + return s.RequestID +} + +func (s *ServerToolRequest) GetToolDisplayName() *string { + if s == nil { + return nil + } + return s.ToolDisplayName +} + +func (s *ServerToolRequest) GetServerID() *string { + if s == nil { + return nil + } + return s.ServerID +} + +func (s *ServerToolRequest) GetToolCta() *string { + if s == nil { + return nil + } + return s.ToolCta +} + +func (s *ServerToolRequest) GetActionPreview() *ActionPreview { + if s == nil { + return nil + } + return s.ActionPreview +} diff --git a/models/components/servertoolresponse.go b/models/components/servertoolresponse.go new file mode 100644 index 00000000..50f63361 --- /dev/null +++ b/models/components/servertoolresponse.go @@ -0,0 +1,135 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "github.com/gleanwork/api-client-go/internal/utils" +) + +// ServerToolResponseRequestType - The type of request made to the user. +type ServerToolResponseRequestType string + +const ( + // ServerToolResponseRequestTypeExecution Request for approving execution of the tool. + ServerToolResponseRequestTypeExecution ServerToolResponseRequestType = "EXECUTION" + // ServerToolResponseRequestTypeAuthenticationSuggestion Request for authenticating to a tool, provided as a (tool) suggestion. + ServerToolResponseRequestTypeAuthenticationSuggestion ServerToolResponseRequestType = "AUTHENTICATION_SUGGESTION" + // ServerToolResponseRequestTypeVoteSuggestion Suggestion to vote for enabling an available-but-not-enabled tool. + ServerToolResponseRequestTypeVoteSuggestion ServerToolResponseRequestType = "VOTE_SUGGESTION" +) + +func (e ServerToolResponseRequestType) ToPointer() *ServerToolResponseRequestType { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *ServerToolResponseRequestType) IsExact() bool { + if e != nil { + switch *e { + case "EXECUTION", "AUTHENTICATION_SUGGESTION", "VOTE_SUGGESTION": + return true + } + } + return false +} + +// GrantScope - Scope of the approval grant. Only applicable when isGranted is true and requestType is EXECUTION. +type GrantScope string + +const ( + // GrantScopeCurrentRequest Approve only the current tool request. Future tool execution requests still require approval. + GrantScopeCurrentRequest GrantScope = "CURRENT_REQUEST" + // GrantScopeCurrentSession Approve the current tool request and auto-approve all future same tool requests in this chat session. + GrantScopeCurrentSession GrantScope = "CURRENT_SESSION" + // GrantScopeAlways Approve the current tool request and auto-approve all future same tool requests across all chat sessions. + GrantScopeAlways GrantScope = "ALWAYS" +) + +func (e GrantScope) ToPointer() *GrantScope { + return &e +} + +// IsExact returns true if the value matches a known enum value, false otherwise. +func (e *GrantScope) IsExact() bool { + if e != nil { + switch *e { + case "CURRENT_REQUEST", "CURRENT_SESSION", "ALWAYS": + return true + } + } + return false +} + +// ServerToolResponse - Response to a server tool request. The applicable fields depend on requestType: +// +// For EXECUTION requests: +// - isGranted: whether tool execution is approved +// - reason: optional explanation +// +// For AUTHENTICATION_SUGGESTION requests: +// - isGranted: whether auth completed successfully (true=connected, false=skipped) +// - authContext: contains serverId or actionPackId for identifying the authenticated entity +// - reason: optional explanation for skip +// +// For VOTE_SUGGESTION requests: +// - voted: whether the user voted for this tool +type ServerToolResponse struct { + // The type of request made to the user. + RequestType ServerToolResponseRequestType `json:"requestType"` + // Unique identifier for this request. + RequestID string `json:"requestId"` + // Whether tool request is granted (indicates approval for execution, or completion for auth). + IsGranted *bool `json:"isGranted,omitempty"` + // Scope of the approval grant. Only applicable when isGranted is true and requestType is EXECUTION. + // + GrantScope *GrantScope `default:"CURRENT_REQUEST" json:"grantScope"` + // Context for authentication responses, containing identifiers for the entity being authenticated. + // + AuthContext *AuthContext `json:"authContext,omitempty"` +} + +func (s ServerToolResponse) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *ServerToolResponse) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { + return err + } + return nil +} + +func (s *ServerToolResponse) GetRequestType() ServerToolResponseRequestType { + if s == nil { + return ServerToolResponseRequestType("") + } + return s.RequestType +} + +func (s *ServerToolResponse) GetRequestID() string { + if s == nil { + return "" + } + return s.RequestID +} + +func (s *ServerToolResponse) GetIsGranted() *bool { + if s == nil { + return nil + } + return s.IsGranted +} + +func (s *ServerToolResponse) GetGrantScope() *GrantScope { + if s == nil { + return nil + } + return s.GrantScope +} + +func (s *ServerToolResponse) GetAuthContext() *AuthContext { + if s == nil { + return nil + } + return s.AuthContext +} diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go b/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go index 5c99a0ad..371b9023 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go @@ -56,14 +56,14 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ operations.ResponseBody2{ Collection: &components.Collection{ Name: "", - Description: "motionless whenever paintwork import over cuckoo", + Description: "whole busily jive hawk gee basic minus hence", AddedRoles: []components.UserRoleSpecification{ components.UserRoleSpecification{ Person: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", }, - Role: components.UserRoleOwner, + Role: components.UserRoleAnswerModerator, }, }, RemovedRoles: []components.UserRoleSpecification{ @@ -90,7 +90,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ID: 363711, + ID: 158969, Creator: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -101,7 +101,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, Items: []components.CollectionItem{ components.CollectionItem{ - CollectionID: 570197, + CollectionID: 110375, CreatedBy: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -266,13 +266,13 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ Name: "George Clooney", ObfuscatedID: "abc123", }, - Role: components.UserRoleAnswerModerator, + Role: components.UserRoleEditor, }, }, }, Collection: &components.Collection{ Name: "", - Description: "athwart skateboard newsstand farm bourgeoisie ah how elliptical aha well-to-do", + Description: "wedge colorfully orientate rally", AudienceFilters: []components.FacetFilter{ components.FacetFilter{ FieldName: types.String("type"), @@ -288,7 +288,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ID: 643990, + ID: 131797, Creator: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -300,7 +300,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ Children: []components.Collection{ components.Collection{ Name: "", - Description: "woot purse salty even as advanced", + Description: "outside yippee sidetrack mature regularly mouser inject worth", AudienceFilters: []components.FacetFilter{ components.FacetFilter{ FieldName: types.String("type"), @@ -316,7 +316,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ID: 359978, + ID: 149448, Creator: &components.Person{ Name: "George Clooney", ObfuscatedID: "abc123", @@ -328,7 +328,7 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ }, }, }, - ItemType: components.CollectionItemItemTypeURL, + ItemType: components.CollectionItemItemTypeCollection, }, }, }, diff --git a/tests/mockserver/internal/sdk/models/components/actionpreview.go b/tests/mockserver/internal/sdk/models/components/actionpreview.go new file mode 100644 index 00000000..facf42ad --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/actionpreview.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// ActionPreview - Preview information for an action being executed. +type ActionPreview struct { + // Markdown preview describing what the action will do. + Markdown *string `json:"markdown,omitempty"` + // Short summary of what this specific tool invocation will do. + Description *string `json:"description,omitempty"` +} + +func (o *ActionPreview) GetMarkdown() *string { + if o == nil { + return nil + } + return o.Markdown +} + +func (o *ActionPreview) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} diff --git a/tests/mockserver/internal/sdk/models/components/authcontext.go b/tests/mockserver/internal/sdk/models/components/authcontext.go new file mode 100644 index 00000000..1b2c97ab --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/authcontext.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// AuthContext - Context for authentication responses, containing identifiers for the entity being authenticated. +type AuthContext struct { + // ID of the MCP server (populated when toolType is MCP). + ServerID *string `json:"serverId,omitempty"` +} + +func (o *AuthContext) GetServerID() *string { + if o == nil { + return nil + } + return o.ServerID +} diff --git a/tests/mockserver/internal/sdk/models/components/chatmessagefragment.go b/tests/mockserver/internal/sdk/models/components/chatmessagefragment.go index 4a0507c9..632727b0 100644 --- a/tests/mockserver/internal/sdk/models/components/chatmessagefragment.go +++ b/tests/mockserver/internal/sdk/models/components/chatmessagefragment.go @@ -14,7 +14,23 @@ type ChatMessageFragment struct { File *ChatFile `json:"file,omitempty"` Action *ToolInfo `json:"action,omitempty"` // Information about the source for a ChatMessage. - Citation *ChatMessageCitation `json:"citation,omitempty"` + Citation *ChatMessageCitation `json:"citation,omitempty"` + ServerToolRequest *ServerToolRequest `json:"serverToolRequest,omitempty"` + // Response to a server tool request. The applicable fields depend on requestType: + // + // For EXECUTION requests: + // - isGranted: whether tool execution is approved + // - reason: optional explanation + // + // For AUTHENTICATION_SUGGESTION requests: + // - isGranted: whether auth completed successfully (true=connected, false=skipped) + // - authContext: contains serverId or actionPackId for identifying the authenticated entity + // - reason: optional explanation for skip + // + // For VOTE_SUGGESTION requests: + // - voted: whether the user voted for this tool + // + ServerToolResponse *ServerToolResponse `json:"serverToolResponse,omitempty"` } func (o *ChatMessageFragment) GetStructuredResults() []StructuredResult { @@ -65,3 +81,17 @@ func (o *ChatMessageFragment) GetCitation() *ChatMessageCitation { } return o.Citation } + +func (o *ChatMessageFragment) GetServerToolRequest() *ServerToolRequest { + if o == nil { + return nil + } + return o.ServerToolRequest +} + +func (o *ChatMessageFragment) GetServerToolResponse() *ServerToolResponse { + if o == nil { + return nil + } + return o.ServerToolResponse +} diff --git a/tests/mockserver/internal/sdk/models/components/listentitiesrequest.go b/tests/mockserver/internal/sdk/models/components/listentitiesrequest.go index 339c8ffc..a742d389 100644 --- a/tests/mockserver/internal/sdk/models/components/listentitiesrequest.go +++ b/tests/mockserver/internal/sdk/models/components/listentitiesrequest.go @@ -84,18 +84,18 @@ func (e *ListEntitiesRequestIncludeField) UnmarshalJSON(data []byte) error { } } -// RequestType - The type of request being made. -type RequestType string +// ListEntitiesRequestRequestType - The type of request being made. +type ListEntitiesRequestRequestType string const ( - RequestTypeStandard RequestType = "STANDARD" - RequestTypeFullDirectory RequestType = "FULL_DIRECTORY" + ListEntitiesRequestRequestTypeStandard ListEntitiesRequestRequestType = "STANDARD" + ListEntitiesRequestRequestTypeFullDirectory ListEntitiesRequestRequestType = "FULL_DIRECTORY" ) -func (e RequestType) ToPointer() *RequestType { +func (e ListEntitiesRequestRequestType) ToPointer() *ListEntitiesRequestRequestType { return &e } -func (e *RequestType) UnmarshalJSON(data []byte) error { +func (e *ListEntitiesRequestRequestType) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err @@ -104,10 +104,10 @@ func (e *RequestType) UnmarshalJSON(data []byte) error { case "STANDARD": fallthrough case "FULL_DIRECTORY": - *e = RequestType(v) + *e = ListEntitiesRequestRequestType(v) return nil default: - return fmt.Errorf("invalid value for RequestType: %v", v) + return fmt.Errorf("invalid value for ListEntitiesRequestRequestType: %v", v) } } @@ -129,7 +129,7 @@ type ListEntitiesRequest struct { // A string denoting the search surface from which the endpoint is called. Source *string `json:"source,omitempty"` // The type of request being made. - RequestType *RequestType `default:"STANDARD" json:"requestType"` + RequestType *ListEntitiesRequestRequestType `default:"STANDARD" json:"requestType"` } func (l ListEntitiesRequest) MarshalJSON() ([]byte, error) { @@ -206,7 +206,7 @@ func (o *ListEntitiesRequest) GetSource() *string { return o.Source } -func (o *ListEntitiesRequest) GetRequestType() *RequestType { +func (o *ListEntitiesRequest) GetRequestType() *ListEntitiesRequestRequestType { if o == nil { return nil } diff --git a/tests/mockserver/internal/sdk/models/components/servertoolrequest.go b/tests/mockserver/internal/sdk/models/components/servertoolrequest.go new file mode 100644 index 00000000..3bf8c6b3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/servertoolrequest.go @@ -0,0 +1,97 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// ServerToolRequestRequestType - The type of request made to the user. +type ServerToolRequestRequestType string + +const ( + ServerToolRequestRequestTypeExecution ServerToolRequestRequestType = "EXECUTION" + ServerToolRequestRequestTypeAuthenticationSuggestion ServerToolRequestRequestType = "AUTHENTICATION_SUGGESTION" + ServerToolRequestRequestTypeVoteSuggestion ServerToolRequestRequestType = "VOTE_SUGGESTION" +) + +func (e ServerToolRequestRequestType) ToPointer() *ServerToolRequestRequestType { + return &e +} +func (e *ServerToolRequestRequestType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "EXECUTION": + fallthrough + case "AUTHENTICATION_SUGGESTION": + fallthrough + case "VOTE_SUGGESTION": + *e = ServerToolRequestRequestType(v) + return nil + default: + return fmt.Errorf("invalid value for ServerToolRequestRequestType: %v", v) + } +} + +type ServerToolRequest struct { + // The type of request made to the user. + RequestType ServerToolRequestRequestType `json:"requestType"` + // Unique identifier for this request. + RequestID string `json:"requestId"` + // Human-readable display name for the tool. + ToolDisplayName *string `json:"toolDisplayName,omitempty"` + // Unique identifier of the tool server. Use with GET /tool-servers/{serverId}/auth + // to resolve display information and authentication status. + // + ServerID *string `json:"serverId,omitempty"` + // Custom call-to-action (CTA) verb for the approval button (e.g., "Create", "Update", "Send"). + ToolCta *string `json:"toolCta,omitempty"` + // Preview information for an action being executed. + ActionPreview *ActionPreview `json:"actionPreview,omitempty"` +} + +func (o *ServerToolRequest) GetRequestType() ServerToolRequestRequestType { + if o == nil { + return ServerToolRequestRequestType("") + } + return o.RequestType +} + +func (o *ServerToolRequest) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} + +func (o *ServerToolRequest) GetToolDisplayName() *string { + if o == nil { + return nil + } + return o.ToolDisplayName +} + +func (o *ServerToolRequest) GetServerID() *string { + if o == nil { + return nil + } + return o.ServerID +} + +func (o *ServerToolRequest) GetToolCta() *string { + if o == nil { + return nil + } + return o.ToolCta +} + +func (o *ServerToolRequest) GetActionPreview() *ActionPreview { + if o == nil { + return nil + } + return o.ActionPreview +} diff --git a/tests/mockserver/internal/sdk/models/components/servertoolresponse.go b/tests/mockserver/internal/sdk/models/components/servertoolresponse.go new file mode 100644 index 00000000..f4b84c3b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/servertoolresponse.go @@ -0,0 +1,143 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" + "mockserver/internal/sdk/utils" +) + +// ServerToolResponseRequestType - The type of request made to the user. +type ServerToolResponseRequestType string + +const ( + ServerToolResponseRequestTypeExecution ServerToolResponseRequestType = "EXECUTION" + ServerToolResponseRequestTypeAuthenticationSuggestion ServerToolResponseRequestType = "AUTHENTICATION_SUGGESTION" + ServerToolResponseRequestTypeVoteSuggestion ServerToolResponseRequestType = "VOTE_SUGGESTION" +) + +func (e ServerToolResponseRequestType) ToPointer() *ServerToolResponseRequestType { + return &e +} +func (e *ServerToolResponseRequestType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "EXECUTION": + fallthrough + case "AUTHENTICATION_SUGGESTION": + fallthrough + case "VOTE_SUGGESTION": + *e = ServerToolResponseRequestType(v) + return nil + default: + return fmt.Errorf("invalid value for ServerToolResponseRequestType: %v", v) + } +} + +// GrantScope - Scope of the approval grant. Only applicable when isGranted is true and requestType is EXECUTION. +type GrantScope string + +const ( + GrantScopeCurrentRequest GrantScope = "CURRENT_REQUEST" + GrantScopeCurrentSession GrantScope = "CURRENT_SESSION" + GrantScopeAlways GrantScope = "ALWAYS" +) + +func (e GrantScope) ToPointer() *GrantScope { + return &e +} +func (e *GrantScope) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "CURRENT_REQUEST": + fallthrough + case "CURRENT_SESSION": + fallthrough + case "ALWAYS": + *e = GrantScope(v) + return nil + default: + return fmt.Errorf("invalid value for GrantScope: %v", v) + } +} + +// ServerToolResponse - Response to a server tool request. The applicable fields depend on requestType: +// +// For EXECUTION requests: +// - isGranted: whether tool execution is approved +// - reason: optional explanation +// +// For AUTHENTICATION_SUGGESTION requests: +// - isGranted: whether auth completed successfully (true=connected, false=skipped) +// - authContext: contains serverId or actionPackId for identifying the authenticated entity +// - reason: optional explanation for skip +// +// For VOTE_SUGGESTION requests: +// - voted: whether the user voted for this tool +type ServerToolResponse struct { + // The type of request made to the user. + RequestType ServerToolResponseRequestType `json:"requestType"` + // Unique identifier for this request. + RequestID string `json:"requestId"` + // Whether tool request is granted (indicates approval for execution, or completion for auth). + IsGranted *bool `json:"isGranted,omitempty"` + // Scope of the approval grant. Only applicable when isGranted is true and requestType is EXECUTION. + // + GrantScope *GrantScope `default:"CURRENT_REQUEST" json:"grantScope"` + // Context for authentication responses, containing identifiers for the entity being authenticated. + // + AuthContext *AuthContext `json:"authContext,omitempty"` +} + +func (s ServerToolResponse) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *ServerToolResponse) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, []string{"requestType", "requestId"}); err != nil { + return err + } + return nil +} + +func (o *ServerToolResponse) GetRequestType() ServerToolResponseRequestType { + if o == nil { + return ServerToolResponseRequestType("") + } + return o.RequestType +} + +func (o *ServerToolResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} + +func (o *ServerToolResponse) GetIsGranted() *bool { + if o == nil { + return nil + } + return o.IsGranted +} + +func (o *ServerToolResponse) GetGrantScope() *GrantScope { + if o == nil { + return nil + } + return o.GrantScope +} + +func (o *ServerToolResponse) GetAuthContext() *AuthContext { + if o == nil { + return nil + } + return o.AuthContext +} diff --git a/tests/search_test.go b/tests/search_test.go index b6153fd2..245e79db 100644 --- a/tests/search_test.go +++ b/tests/search_test.go @@ -2089,10 +2089,6 @@ func TestSearch_PlatformSearch(t *testing.T) { "confluence", "google_drive", }, - DatasourceInstances: []string{ - "slack_acme", - "slack_eu", - }, Filters: []components.PlatformFilter{ components.PlatformFilter{ Field: "type", diff --git a/tests/summarize_test.go b/tests/summarize_test.go index 107b1ac2..4474f69b 100644 --- a/tests/summarize_test.go +++ b/tests/summarize_test.go @@ -25,15 +25,16 @@ func TestSummarize_Summarize(t *testing.T) { res, err := s.Client.Documents.Summarize(ctx, components.SummarizeRequest{ DocumentSpecs: []components.DocumentSpecUnion{ - components.CreateDocumentSpecUnionDocumentSpec2( - components.DocumentSpec2{ - ID: "", + components.CreateDocumentSpecUnionDocumentSpec3( + components.DocumentSpec3{ + UgcType: components.DocumentSpecUgcType1Answers, + ContentID: 123467, }, ), components.CreateDocumentSpecUnionDocumentSpec3( components.DocumentSpec3{ - UgcType: components.DocumentSpecUgcType1Chats, - ContentID: 667054, + UgcType: components.DocumentSpecUgcType1Answers, + ContentID: 123467, }, ), },