From aa30172179df98bdb29e90801ba012e768cc97fa Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 16 Jul 2026 02:19:43 +0000 Subject: [PATCH 1/2] ## Typescript SDK Changes: * `glean.skills.list()`: **Added** * `glean.skills.retrieve()`: **Added** * `glean.indexing.datasources.submit()`: **Added** * `glean.client.chat.create()`: * `request.chatRequest.messages[].fragments[].action.metadata.actionTypeSource` **Added** * `response.messages[].fragments[].action.metadata.actionTypeSource` **Added** * `glean.client.chat.retrieve()`: `response.chatResult.chat.messages[].fragments[].action.metadata.actionTypeSource` **Added** * `glean.client.chat.createStream()`: * `request.chatRequest.messages[].fragments[].action.metadata.actionTypeSource` **Added** * `glean.client.agents.create()`: `response.workflow.webhookUrl` **Added** * `glean.client.search.retrieveFeed()`: `response.results[].primaryEntry.workflow.workflow.webhookUrl` **Added** * `glean.client.governance.data.findings.create()`: * `request.filter.severity.enum(falsePositive)` **Added** * `response.filter.severity.enum(falsePositive)` **Added** * `glean.client.governance.data.findings.list()`: `response.exports[].filter.severity.enum(falsePositive)` **Added** --- .speakeasy/gen.lock | 345 +++++++++++++++--- .speakeasy/gen.yaml | 2 +- .speakeasy/glean-merged-spec.yaml | 337 ++++++++++++++++- .speakeasy/tests.arazzo.yaml | 56 +++ .speakeasy/workflow.lock | 12 +- README.md | 20 +- RELEASES.md | 12 +- docs/models/components/actiontypesource.md | 27 ++ docs/models/components/dlpfindingfilter.md | 26 +- docs/models/components/dlpseverity.md | 4 +- docs/models/components/platformskill.md | 38 ++ .../components/platformskillgetresponse.md | 32 ++ docs/models/components/platformskillorigin.md | 17 + .../components/platformskillslistresponse.md | 39 ++ .../platformskillsourceprovenance.md | 20 + docs/models/components/platformskillstatus.md | 19 + .../components/platformskillsyncstatus.md | 19 + docs/models/components/toolmetadata.md | 41 ++- docs/models/components/workflow.md | 29 +- .../operations/platformskillsgetrequest.md | 17 + .../operations/platformskillslistrequest.md | 16 + ...ubmissionsdatasourceinstancetyperequest.md | 21 ++ ...bmissionsdatasourceinstancetyperesponse.md | 19 + docs/sdks/indexingdatasources/README.md | 102 +++++- docs/sdks/skills/README.md | 209 +++++++++++ examples/package-lock.json | 2 +- jsr.json | 2 +- package-lock.json | 4 +- package.json | 2 +- src/__tests__/indexingdatasources.test.ts | 33 ++ src/__tests__/messages.test.ts | 2 +- .../internal/handler/generated_handlers.go | 3 + .../internal/handler/pathgetapiskills.go | 69 ++++ .../handler/pathgetapiskillsskillid.go | 80 ++++ ...iindexsubmissionsdatasourceinstancetype.go | 70 ++++ .../sdk/models/components/dlpfindingfilter.go | 2 +- .../sdk/models/components/dlpseverity.go | 13 +- .../sdk/models/components/platformskill.go | 121 ++++++ .../components/platformskillgetresponse.go | 24 ++ .../models/components/platformskillorigin.go | 33 ++ .../components/platformskillslistresponse.go | 43 +++ .../platformskillsourceprovenance.go | 77 ++++ .../models/components/platformskillstatus.go | 39 ++ .../components/platformskillsyncstatus.go | 39 ++ .../sdk/models/components/toolmetadata.go | 57 +++ .../sdk/models/components/workflow.go | 10 + .../models/operations/platformskillsget.go | 40 ++ .../models/operations/platformskillslist.go | 49 +++ ...iindexsubmissionsdatasourceinstancetype.go | 69 ++++ src/__tests__/skills.test.ts | 34 ++ src/__tests__/summarize.test.ts | 3 +- src/funcs/indexingDatasourcesSubmit.ts | 215 +++++++++++ src/funcs/skillsList.ts | 193 ++++++++++ src/funcs/skillsRetrieve.ts | 189 ++++++++++ src/lib/config.ts | 6 +- src/models/components/dlpfindingfilter.ts | 2 +- src/models/components/dlpseverity.ts | 5 +- src/models/components/index.ts | 7 + src/models/components/platformskill.ts | 98 +++++ .../components/platformskillgetresponse.ts | 38 ++ src/models/components/platformskillorigin.ts | 23 ++ .../components/platformskillslistresponse.ts | 51 +++ .../platformskillsourceprovenance.ts | 67 ++++ src/models/components/platformskillstatus.ts | 28 ++ .../components/platformskillsyncstatus.ts | 28 ++ src/models/components/toolmetadata.ts | 61 ++++ src/models/components/workflow.ts | 7 + src/models/operations/index.ts | 3 + src/models/operations/platformskillsget.ts | 35 ++ src/models/operations/platformskillslist.ts | 41 +++ ...iindexsubmissionsdatasourceinstancetype.ts | 92 +++++ src/react-query/index.ts | 3 + src/react-query/indexingDatasourcesSubmit.ts | 118 ++++++ src/react-query/skillsList.core.ts | 75 ++++ src/react-query/skillsList.ts | 134 +++++++ src/react-query/skillsRetrieve.core.ts | 69 ++++ src/react-query/skillsRetrieve.ts | 129 +++++++ src/sdk/indexingdatasources.ts | 25 ++ src/sdk/sdk.ts | 6 + src/sdk/skills.ts | 48 +++ 80 files changed, 4041 insertions(+), 154 deletions(-) create mode 100644 docs/models/components/actiontypesource.md create mode 100644 docs/models/components/platformskill.md create mode 100644 docs/models/components/platformskillgetresponse.md create mode 100644 docs/models/components/platformskillorigin.md create mode 100644 docs/models/components/platformskillslistresponse.md create mode 100644 docs/models/components/platformskillsourceprovenance.md create mode 100644 docs/models/components/platformskillstatus.md create mode 100644 docs/models/components/platformskillsyncstatus.md create mode 100644 docs/models/operations/platformskillsgetrequest.md create mode 100644 docs/models/operations/platformskillslistrequest.md create mode 100644 docs/models/operations/postrestapiindexsubmissionsdatasourceinstancetyperequest.md create mode 100644 docs/models/operations/postrestapiindexsubmissionsdatasourceinstancetyperesponse.md create mode 100644 docs/sdks/skills/README.md create mode 100644 src/__tests__/indexingdatasources.test.ts create mode 100644 src/__tests__/mockserver/internal/handler/pathgetapiskills.go create mode 100644 src/__tests__/mockserver/internal/handler/pathgetapiskillsskillid.go create mode 100644 src/__tests__/mockserver/internal/handler/pathpostrestapiindexsubmissionsdatasourceinstancetype.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformskill.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformskillgetresponse.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformskillorigin.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformskillslistresponse.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformskillsourceprovenance.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformskillstatus.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformskillsyncstatus.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/operations/platformskillsget.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/operations/platformskillslist.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/operations/postrestapiindexsubmissionsdatasourceinstancetype.go create mode 100644 src/__tests__/skills.test.ts create mode 100644 src/funcs/indexingDatasourcesSubmit.ts create mode 100644 src/funcs/skillsList.ts create mode 100644 src/funcs/skillsRetrieve.ts create mode 100644 src/models/components/platformskill.ts create mode 100644 src/models/components/platformskillgetresponse.ts create mode 100644 src/models/components/platformskillorigin.ts create mode 100644 src/models/components/platformskillslistresponse.ts create mode 100644 src/models/components/platformskillsourceprovenance.ts create mode 100644 src/models/components/platformskillstatus.ts create mode 100644 src/models/components/platformskillsyncstatus.ts create mode 100644 src/models/operations/platformskillsget.ts create mode 100644 src/models/operations/platformskillslist.ts create mode 100644 src/models/operations/postrestapiindexsubmissionsdatasourceinstancetype.ts create mode 100644 src/react-query/indexingDatasourcesSubmit.ts create mode 100644 src/react-query/skillsList.core.ts create mode 100644 src/react-query/skillsList.ts create mode 100644 src/react-query/skillsRetrieve.core.ts create mode 100644 src/react-query/skillsRetrieve.ts create mode 100644 src/sdk/skills.ts diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index d4797aa0..2c881c28 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,24 +1,24 @@ lockVersion: 2.0.0 id: 664aaca5-a41f-4434-8f2a-642dba92fe68 management: - docChecksum: 33958fda4f2b946f46f0593aac3a619d + docChecksum: c53b2fffba05406ed7b912a200f3886e docVersion: 0.9.0 - speakeasyVersion: 1.789.2 - generationVersion: 2.916.4 - releaseVersion: 0.17.3 - configChecksum: ceee23da0b77c78087da10f0482d460b + speakeasyVersion: 1.790.2 + generationVersion: 2.918.3 + releaseVersion: 0.18.0 + configChecksum: c46e4d263981bd07c6768121df37be5c repoURL: https://github.com/gleanwork/api-client-typescript.git installationURL: https://github.com/gleanwork/api-client-typescript published: true persistentEdits: - generation_id: bca12c17-b37a-4623-8cfa-8c16b8e7b105 - pristine_commit_hash: 25a6b7be93cadf51cef11dcf921d6e6f9309fa05 - pristine_tree_hash: 66a52f40c31e803cfa2280c47bebbf1198ed1770 + generation_id: 27c3718b-e393-441f-bc1c-6e2416064e07 + pristine_commit_hash: 37e74025232b26eff079a70e69e3e5df1605520b + pristine_tree_hash: 25afa784d344657e18dbc4c9b84ba387e34eca37 features: typescript: acceptHeaders: 2.81.2 additionalDependencies: 0.1.0 - additionalProperties: 0.1.3 + additionalProperties: 0.1.4 constsAndDefaults: 0.1.14 core: 3.31.4 defaultEnabledRetries: 0.1.0 @@ -38,7 +38,7 @@ features: mockServer: 0.1.4 nameOverrides: 2.81.4 nullables: 0.1.1 - reactQueryHooks: 0.2.4 + reactQueryHooks: 0.3.0 responseFormat: 0.3.0 retries: 2.83.1 sdkHooks: 0.4.0 @@ -106,6 +106,10 @@ trackedFiles: id: f9f286d7b5c6 last_write_checksum: sha1:7fe4c8bda926832bf790916fc4b4ac6268a23d66 pristine_git_object: 0d14dd6829e09b0e4cba2fce647a052c2e0d551d + docs/models/components/actiontypesource.md: + id: 5a875e42f006 + last_write_checksum: sha1:2c4b06e3885ab43d3447f3dfbcd346f29d82af72 + pristine_git_object: 79973f1c82029ad59ab9a7f30f047d3770ddb375 docs/models/components/activity.md: id: a2d8273e4214 last_write_checksum: sha1:c60b11a27a8ae6f368638c29439e21b6d87828ce @@ -932,8 +936,8 @@ trackedFiles: pristine_git_object: 5e601d2ddaae8180387036050252e9a98139a1a4 docs/models/components/dlpfindingfilter.md: id: ad24e16401ed - last_write_checksum: sha1:58cb27ee030df953afab5c9754634a6ad5dcbee3 - pristine_git_object: 6272258aaa85151f14d0bdced547598a634ce132 + last_write_checksum: sha1:abd8b850c6f3d0a75c361fab5d05984fb530f8cd + pristine_git_object: a1f03d8181c78dc105a066cc188d979edaa5666e docs/models/components/dlpfrequency.md: id: 05f0009c75ed last_write_checksum: sha1:cf72c879dd082cfc70351423899bf9b1cda71242 @@ -964,8 +968,8 @@ trackedFiles: pristine_git_object: 5bb4b2246efa281b4986a0ca5497e5679d321d67 docs/models/components/dlpseverity.md: id: d67a8f061250 - last_write_checksum: sha1:844375f11fb1b290dc110f322634c89162c5adeb - pristine_git_object: 725614b495045de2dc580a2937a816578d8a7e6c + last_write_checksum: sha1:53facb08fe387f1a48317ee62bd0a30a6478cdcd + pristine_git_object: f77a0967dff80a596d867959f45f8cd11b1c013a docs/models/components/dlpsimpleresult.md: id: c7731038836f last_write_checksum: sha1:ba58c84e3cfcc8d69783b509a7b0ac24d2b53174 @@ -1942,6 +1946,34 @@ trackedFiles: id: d398b8139176 last_write_checksum: sha1:e87b453fc43313b7275d35a14db9f3a0292f45a4 pristine_git_object: 404fa57a35d0fa2d12fc8c923ddac48e5ede9667 + docs/models/components/platformskill.md: + id: 0085679a1f14 + last_write_checksum: sha1:fc27bcaf60d14961e709f8c017c67a792ed2aba8 + pristine_git_object: 2dcbec60361ffb3adf6a9fad93bc3b94b2a13221 + docs/models/components/platformskillgetresponse.md: + id: bc5043e8f6f7 + last_write_checksum: sha1:f8892bf1ee203e952a667673d864ce3defc64715 + pristine_git_object: f351362d91b60243f4573c491bcf6f8f531f3eb7 + docs/models/components/platformskillorigin.md: + id: 9dc751dc212a + last_write_checksum: sha1:d7f89e1e10da33e9d6af6983b324f49bcc876cfb + pristine_git_object: 89cb7ecfca1f3f0fe1c5e54a88ee219faa1875fc + docs/models/components/platformskillslistresponse.md: + id: 58b27e4bea7e + last_write_checksum: sha1:1c20dd9e1d26aefc91f80f9a8e1770beced531d9 + pristine_git_object: b4f6fedd39e34887f548bc7784f67317062909d4 + docs/models/components/platformskillsourceprovenance.md: + id: 29fe97f47f93 + last_write_checksum: sha1:c46c23275c9848fec5d5da755e1a52148f99da65 + pristine_git_object: b593b3040b32719fa0562c9ab4791b6f8640092f + docs/models/components/platformskillstatus.md: + id: 3342d36796ac + last_write_checksum: sha1:f298d1146869a6f7861af5022216e6e9ef3d1e81 + pristine_git_object: 5d552f7d73774acf99ca8023ed296464420b5f0e + docs/models/components/platformskillsyncstatus.md: + id: b4dfbecbfcf6 + last_write_checksum: sha1:83277f661926e6cf54883ebf380591dd144fc4f0 + pristine_git_object: 52ad9e9017bf515f7efb7ecd0a9485571c4feaf1 docs/models/components/platformtimerange.md: id: d2e589bb488c last_write_checksum: sha1:b16b0fb45a16cafd4942fc70075e8ba92d0b9386 @@ -2376,8 +2408,8 @@ trackedFiles: pristine_git_object: c18bd70e3cea544587589120059dd81f661b99a9 docs/models/components/toolmetadata.md: id: e8ce3b56fbdc - last_write_checksum: sha1:3bc2c9f3b8fadcf8f54e8f3f3e89390386940112 - pristine_git_object: 8db965e129c3314959431a622d3bcdd50d8e4586 + last_write_checksum: sha1:a3509b5d26b0508b8e324d0125b2528af8696588 + pristine_git_object: 94a16f97223aaa93f213cd9390b871a1165bcf23 docs/models/components/toolmetadatatype.md: id: 45942314082a last_write_checksum: sha1:fc372cbeb54818244460f3ba08fc2ab0f0e69cb6 @@ -2588,8 +2620,8 @@ trackedFiles: pristine_git_object: 75a9a2fc450ca79729b1d5aad252e42516bca831 docs/models/components/workflow.md: id: f569d478b233 - last_write_checksum: sha1:54ab1ad3409a8363bc78af1b5e206a5235baafd5 - pristine_git_object: 69a5b96905af6c327fa4ec5a98e52eb24e3f758d + last_write_checksum: sha1:f2c30685c90a717a69a01eec080872f9647c1aee + pristine_git_object: 2c90265ebea06a12c06a9140912c19542a7aaad5 docs/models/components/workflowfeedbackinfo.md: id: fc6ea7558326 last_write_checksum: sha1:795d944df8cbe9624517695160161e3b01fa3839 @@ -2946,6 +2978,14 @@ trackedFiles: id: 58d615b7c78f last_write_checksum: sha1:f72548f52835bd70987fa96727569f7fd5d32f9f pristine_git_object: 86d0551865da2973d4bc49c26a9ae3fab6829f85 + docs/models/operations/platformskillsgetrequest.md: + id: 6e77031ea696 + last_write_checksum: sha1:77b912d1988027c6569d81359278fe1ce453b9e2 + pristine_git_object: 9e4d8cee63af8a2ff90a3bb1579be91720170191 + docs/models/operations/platformskillslistrequest.md: + id: 2e304cbf2212 + last_write_checksum: sha1:91ee0f4ef89ff4d3634615a9d2ee6daa1db63c20 + pristine_git_object: 6a07bb06bb7902990b6031e194b30e73a289d62a docs/models/operations/postapiindexv1debugdatasourcedocumenteventsrequest.md: id: 13205d748dcd last_write_checksum: sha1:a4343ef66a0c237e1eada5f9fe0ca897db13a0a2 @@ -2966,6 +3006,14 @@ trackedFiles: id: 0249628450ea last_write_checksum: sha1:9c9539b6105a81073226d805850cd6ef7480a6ee pristine_git_object: 0e03be63166e25319231ad8df464771b5dcb57af + docs/models/operations/postrestapiindexsubmissionsdatasourceinstancetyperequest.md: + id: 0237c1fecb7c + last_write_checksum: sha1:43d553d98e6d3205a6f9107042c067f5362219fc + pristine_git_object: c9b26c18c94766a6cd7fa237ae828215fd362f3b + docs/models/operations/postrestapiindexsubmissionsdatasourceinstancetyperesponse.md: + id: eb51e79f4b3a + last_write_checksum: sha1:eca9807c643356f3d3bd439c1e4d2732fad91e4e + pristine_git_object: 56a4858d8263be7fff2cbbf90f34d8899c178be3 docs/models/operations/putrestapiindexcustommetadataschemagroupnamerequest.md: id: 3d7cd86e06cc last_write_checksum: sha1:070ab5997aae198ff19b851e426a599d7b4b4c6c @@ -3096,8 +3144,8 @@ trackedFiles: pristine_git_object: 6186bc627a228e8ddffdeb45e12a5046a6a86606 docs/sdks/indexingdatasources/README.md: id: aa113bda8cbc - last_write_checksum: sha1:97b261ff5dfcb12fcb82c52df6b7f0672770697c - pristine_git_object: dfb88bff594b1241a6f7fa9fe1d6dc1cee7f1d8a + last_write_checksum: sha1:f6867684b93f45436b04954736a2f5d5a69acd77 + pristine_git_object: 516c28d0ffadd770f0b547e331e7b948b4e1bc45 docs/sdks/indexingdocuments/README.md: id: 7ca38da53414 last_write_checksum: sha1:a4af54ae0be6fb9545811305051e76d163522046 @@ -3138,6 +3186,10 @@ trackedFiles: id: 5c534716244c last_write_checksum: sha1:8a3c41c736e3ce7dfd9b0f5d733beed5f7446648 pristine_git_object: 233dcbff8035e0284a82067af91f627201db89df + docs/sdks/skills/README.md: + id: 3a14a5c90791 + last_write_checksum: sha1:e47b646f5585cca139b327da7e892102f468263b + pristine_git_object: 9d12a7e5f49dc47352e4abcc9a5a5bafe94fa5e8 docs/sdks/tools/README.md: id: 044286549bac last_write_checksum: sha1:15085522c8371637004ea441fe579e3ab1f0b47b @@ -3176,12 +3228,12 @@ trackedFiles: pristine_git_object: 5a2797590d4be351d62915017d5b2a0f853537c8 jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:29bee120baea5f4cec8750e18851255bb91b26d0 - pristine_git_object: 46c99d73c4de09443131fcead0e0c89f2ab2df1c + last_write_checksum: sha1:72760fce1a4a085f0fbd440fdb19b7426f08458b + pristine_git_object: 8b5402c972521a31c3633c162fce20667eb7be6b package.json: id: 7030d0b2f71b - last_write_checksum: sha1:9f8c2067f0b5cf9f70f0f34671b64db143a81be8 - pristine_git_object: 9b387e1c7de105beaed38d17e160a0f6bd696f30 + last_write_checksum: sha1:ee6482e9f26c8796220e8a867e0f3ce54c38ab62 + pristine_git_object: 6f0ccb839633e10f694dc84929d8d22e274f1803 src/__tests__/activities.test.ts: id: 65fa859b8f59 last_write_checksum: sha1:756bc40095f4495bbf62739b8218bb4a559a24f2 @@ -3278,6 +3330,10 @@ trackedFiles: id: 986f5102cbdd last_write_checksum: sha1:6b75b40742ae8d2a00b5bd6607101158e25f911e pristine_git_object: 41ae45bd7d536940d1f20bc84fd055f882f7db35 + src/__tests__/indexingdatasources.test.ts: + id: c775ecfeae09 + last_write_checksum: sha1:790cd86a3fdc2b9a5e4221327c148d591ebf8a6e + pristine_git_object: 8ff948eac4e5a2ff2e1aa4edc01a680c5e3df0f3 src/__tests__/indexingdocuments.test.ts: id: 2f58c12547ae last_write_checksum: sha1:225d84e6e291edac2c34288cfc108ca4d44a473d @@ -3292,8 +3348,8 @@ trackedFiles: pristine_git_object: d252821b825c62856886e3ab9287181d7ef7f9de src/__tests__/messages.test.ts: id: 39e293f09219 - last_write_checksum: sha1:d71d67d8ed6743e623401b4101f70705c2eb5172 - pristine_git_object: a4785e3180745bef1ba299e2191e9c49bec1da88 + last_write_checksum: sha1:614ea7fd801e89ad1a53d01b4b5129e9501e54b2 + pristine_git_object: 12904134bbdc280929babb05d7977adda65fc58c src/__tests__/mockserver/.gitignore: id: 4a7fc421b6b6 last_write_checksum: sha1:228e1b05712a973948fd771323a2140a3b355ff4 @@ -3348,8 +3404,8 @@ trackedFiles: pristine_git_object: af3a6d136d837850b34ed893a8faf800ea114721 src/__tests__/mockserver/internal/handler/generated_handlers.go: id: e6f590a8ce11 - last_write_checksum: sha1:00f15028ea6d680d0a826975bc93d6e4b3c2b2f6 - pristine_git_object: e2e2fdc55bb8561e1c8e80b9ddd28a805195a2cb + last_write_checksum: sha1:ff7c309656f68f38c7fb13c7f1844110219bd071 + pristine_git_object: e1deb1c3a187dc7e98aaa61a38867e8f07e1325b src/__tests__/mockserver/internal/handler/pathdeleterestapiindexcustommetadataschemagroupname.go: id: ef047f0e0f32 last_write_checksum: sha1:187ff16d05efa1c937632f61dd3f49e49691d5ff @@ -3366,6 +3422,14 @@ trackedFiles: id: e095cf890e73 last_write_checksum: sha1:dec4b7dbf683ac9ab16c749e9e2bf7d1f29b0046 pristine_git_object: 4acc6c497e6435bb7c095577f9a0db82043ac61f + src/__tests__/mockserver/internal/handler/pathgetapiskills.go: + id: 7a35981bf5e0 + last_write_checksum: sha1:1d7ab0e5d4f9b9b75b257b9e4e2a59b96f9cfe50 + pristine_git_object: 77c87bf10db80a152b4029cc64cbdf7642478a98 + src/__tests__/mockserver/internal/handler/pathgetapiskillsskillid.go: + id: 1eef14b2fbcb + last_write_checksum: sha1:b78324bee0a003a8b4a6a776190121546fc5ee12 + pristine_git_object: 84afc7c545c639be8a4307469a64b4f67d4f156e src/__tests__/mockserver/internal/handler/pathgetrestapiindexcustommetadataschemagroupname.go: id: 68f9bc7ddc35 last_write_checksum: sha1:4fe0018044e99586f72be23534b463468e194ba2 @@ -3534,6 +3598,10 @@ trackedFiles: id: 53fb32000093 last_write_checksum: sha1:81fd212ba125c73b475a1f479e7555e441369ab5 pristine_git_object: 9baa62914befd9597996b2c8ad6fe1f93f93440f + src/__tests__/mockserver/internal/handler/pathpostrestapiindexsubmissionsdatasourceinstancetype.go: + id: 410f5ff99a6d + last_write_checksum: sha1:71db746b9c36c16fcc088c2fe953b5f73ca232e8 + pristine_git_object: 00ed72f1c54e63c11ffb4fc429582f7383450ef7 src/__tests__/mockserver/internal/handler/pathpostrestapiv1actionsactionpackactionpackidauth.go: id: 4444898143aa last_write_checksum: sha1:9e82e0bfdaf137d17892ede8109c01e32ea218f3 @@ -4504,8 +4572,8 @@ trackedFiles: pristine_git_object: eea148e985e951e4c6a00dcc923fdc01a96c11ce src/__tests__/mockserver/internal/sdk/models/components/dlpfindingfilter.go: id: 368bb339689f - last_write_checksum: sha1:ce38723ef22e20b551e295038497d994d068977b - pristine_git_object: e7bea35f8bf3e543d0d54b650d61652fe6b1f7ac + last_write_checksum: sha1:f313ef819f8f12b71d727ed820c163571c3add86 + pristine_git_object: 6f02c3c0bf19fa0bbf198cf24abfb5cd0b11c3fc src/__tests__/mockserver/internal/sdk/models/components/dlpfrequency.go: id: e53f67aa87fc last_write_checksum: sha1:e86f60e85931f9a7e1796bbb363b08b8b61aa168 @@ -4536,8 +4604,8 @@ trackedFiles: pristine_git_object: ce1e2b6fd8b498bc9a95bf55acdb9d8002f130b2 src/__tests__/mockserver/internal/sdk/models/components/dlpseverity.go: id: 4325c6154c22 - last_write_checksum: sha1:e4a766ea0be95f362b6a0441fecbdce8d441ef3c - pristine_git_object: 9cd4a398b9ab5f38627f918de98bbe7e8b519002 + last_write_checksum: sha1:787321824d9963ef7614db42babffadcf573658c + pristine_git_object: cdd0fcba89985bc344c4c9e8c25ebb3853ab15b0 src/__tests__/mockserver/internal/sdk/models/components/dlpsimpleresult.go: id: 671938b9fb7d last_write_checksum: sha1:047e3bf8215b6ab63766045a6f09bad45c58503f @@ -5274,6 +5342,34 @@ trackedFiles: id: 609dccefec94 last_write_checksum: sha1:8a87c40e6ec0ea1471bb5702ee6d9c9b7c60d7c8 pristine_git_object: 95bffd73a040f0b46fd8961c78a364f65be25416 + src/__tests__/mockserver/internal/sdk/models/components/platformskill.go: + id: 9348b7a0ba5c + last_write_checksum: sha1:6a7d58754e05d3de8095415bd6d34b98800a849f + pristine_git_object: b7d510d4a92676348b12506824fc217cbdf7ec0e + src/__tests__/mockserver/internal/sdk/models/components/platformskillgetresponse.go: + id: ce9faaafa240 + last_write_checksum: sha1:592a5dd5d7ec0d3dad4d65470039296b6b99ba2d + pristine_git_object: e470cbc23e4ce6dc3e97ca95c538cedae4c0384a + src/__tests__/mockserver/internal/sdk/models/components/platformskillorigin.go: + id: 028d9e74ac5d + last_write_checksum: sha1:b2bba455acf61820e88c7e6512a271802835d43c + pristine_git_object: 91d4d1afe5091865d1895d29a52cc475bc92a795 + src/__tests__/mockserver/internal/sdk/models/components/platformskillslistresponse.go: + id: ea644abdd909 + last_write_checksum: sha1:e1eb355015d35871464b551e1c7c8d182cec8dba + pristine_git_object: 7bf1e0b4fa8c2c1ff1d0fdd1847d9a21b77e39b9 + src/__tests__/mockserver/internal/sdk/models/components/platformskillsourceprovenance.go: + id: "312434003494" + last_write_checksum: sha1:e18be9872b74b1962988eba65c1a8084a559d301 + pristine_git_object: 64b5f70f9b0828287e4ca09b5fea02341ea12aab + src/__tests__/mockserver/internal/sdk/models/components/platformskillstatus.go: + id: 180ceed8be9b + last_write_checksum: sha1:d74d70098e9e768d5a67deb91038d39eef253616 + pristine_git_object: 8176be88a1481bec24f8fe8a8bcce1cb1f8f2215 + src/__tests__/mockserver/internal/sdk/models/components/platformskillsyncstatus.go: + id: bc07f04da2f3 + last_write_checksum: sha1:e2dbfb1023f704f09d4d25e60abdac8c710e2c56 + pristine_git_object: 1d30df91449dcb75231c193ad5857d2c0b801f8a src/__tests__/mockserver/internal/sdk/models/components/platformtimerange.go: id: b8e92c9af7ab last_write_checksum: sha1:4e21c170201779eccc4d8c31ddbd56673895e674 @@ -5612,8 +5708,8 @@ trackedFiles: pristine_git_object: 10427b2194460749821b4c73cfeadffea9c437a2 src/__tests__/mockserver/internal/sdk/models/components/toolmetadata.go: id: b83a619f6030 - last_write_checksum: sha1:34930f11f6c97b9bc30e120a0d78b070067db6a6 - pristine_git_object: 440a10f01a7c06171d08c87b90b456ebb34fb3e9 + last_write_checksum: sha1:4464d7ab28f611a8eb3b5585c826dc921a234e74 + pristine_git_object: 18410420e40a4a977bdf181973e237c1ed6912ba src/__tests__/mockserver/internal/sdk/models/components/toolparameter.go: id: 836d1d622155 last_write_checksum: sha1:e5b5526fd431bf150740e5358dce60af44bb1ee1 @@ -5780,8 +5876,8 @@ trackedFiles: pristine_git_object: ab085e1d24d7f77e85752a48e99bdefa2d24cf06 src/__tests__/mockserver/internal/sdk/models/components/workflow.go: id: 5e219f988156 - last_write_checksum: sha1:d214d74687abf3fc908104d2e69a09836ff7a61b - pristine_git_object: 0e2f4ff7d531a7970a68163b9e648b0a774a235a + last_write_checksum: sha1:cbc10b0c53b9ac5f96aec1a404e5a6bccd0388b5 + pristine_git_object: bc7b85cc334ea6d1d5ed2c5a7e6966c19d24d620 src/__tests__/mockserver/internal/sdk/models/components/workflowfeedbackinfo.go: id: a6741a468f55 last_write_checksum: sha1:548de17295a3909e1252eb5bb16d6c29442c7abb @@ -6130,6 +6226,14 @@ trackedFiles: id: 8d5d0787d271 last_write_checksum: sha1:99dd76e44d3d48fb22d7582ecea439e2505ca224 pristine_git_object: 20b4d8b2efb5bc9a67f3e927fe3d3f919bf85897 + src/__tests__/mockserver/internal/sdk/models/operations/platformskillsget.go: + id: 7cf3c9da1e9e + last_write_checksum: sha1:43b482282e4f3e624fb01ee72666fee30e9c383f + pristine_git_object: 6fc2f6f0210cd505660309adfdba9cdc79141243 + src/__tests__/mockserver/internal/sdk/models/operations/platformskillslist.go: + id: 8531b738e2ad + last_write_checksum: sha1:cc94474c35afd9c2df50305439cdd30081780b9d + pristine_git_object: 4e0bdef118db95cf31b410e1cf8801061ada2343 src/__tests__/mockserver/internal/sdk/models/operations/postapiindexv1adddatasource.go: id: 4e5c790cee10 last_write_checksum: sha1:883a8812b033023bad4b6b01e7717970bbd2c3ba @@ -6282,6 +6386,10 @@ trackedFiles: id: 4c89a2b4e7b2 last_write_checksum: sha1:a17e4d5a13a3c04c94e4930157e61d59628cdbeb pristine_git_object: 1703f360d9d3f10981b8e6bb582cceabb30b8c0e + src/__tests__/mockserver/internal/sdk/models/operations/postrestapiindexsubmissionsdatasourceinstancetype.go: + id: 717d961cad3d + last_write_checksum: sha1:6898f4928da84da36b4b9d585fde46fcfa75b925 + pristine_git_object: 6cee45a3578f1830f71155bf258980f89944369d src/__tests__/mockserver/internal/sdk/models/operations/postrestapiv1toolscall.go: id: c3b422158228 last_write_checksum: sha1:825d6925f4d29c04c46b9d5a29d9324ba9da615b @@ -6470,10 +6578,14 @@ trackedFiles: id: 97f2005515d0 last_write_checksum: sha1:ddd72ab0c544d9bdc041891b5d6c85921c1f4a5b pristine_git_object: e36f1fde9af40fca3a6eee03a93a8c9c43e424bd + src/__tests__/skills.test.ts: + id: 3fa6e540c659 + last_write_checksum: sha1:d155ce50eaa3b48339821d9f432059d02822ff2e + pristine_git_object: 9ee0b856bf64da2bd7ca97432e01265be7712316 src/__tests__/summarize.test.ts: id: 3105d6ebc7eb - last_write_checksum: sha1:bb2dba46f1d4304d8236c52e0355a53081ab6119 - pristine_git_object: bb5e2b02fd92c4bc218d0a791e8786a14448f109 + last_write_checksum: sha1:dfb185c744196a1c04135d609d44ccdaa541d5d4 + pristine_git_object: a1e80406504d94388ad5335968a981e0cc471443 src/__tests__/testclient.ts: id: f142c080bff8 last_write_checksum: sha1:3a38647391f52221c009a9273eebf90793b3d430 @@ -6902,6 +7014,10 @@ trackedFiles: id: e7e43c11015b last_write_checksum: sha1:9c0a4c7df8d4ff6d5a00491a4495ebbe8188d060 pristine_git_object: 3ef7952dd9112fd9437520ac06db33b84d84e8cf + src/funcs/indexingDatasourcesSubmit.ts: + id: fdcdfc496303 + last_write_checksum: sha1:a8f3dd578274b05a0668855a438cb1e16043df49 + pristine_git_object: f7918721c7d4fd752c77a9f5825227f9d8a753a6 src/funcs/indexingDocumentsAddOrUpdate.ts: id: fd3adfe1735e last_write_checksum: sha1:4057e0db8aada5a87869269cc4c2166905606b3e @@ -7042,6 +7158,14 @@ trackedFiles: id: cc6075d2a5d0 last_write_checksum: sha1:2b013dc9368701f9b40ca2cd755094fcd72aba45 pristine_git_object: ad23061a8f21ce08b627a6ab903b462441bc1116 + src/funcs/skillsList.ts: + id: a643d8a0c73b + last_write_checksum: sha1:23440e1a5e404eff9b9392156cded3df9f38146a + pristine_git_object: 099d6983f978b48c4cf376a9e931d4742c8da7b2 + src/funcs/skillsRetrieve.ts: + id: 7bff1ef0523e + last_write_checksum: sha1:bde130c314937ad66a558488943ad485d9389c81 + pristine_git_object: f942a2894ee0886f9396f0951112e2e58a6bd9cb src/hooks/hooks.ts: id: a2463fc6f69b last_write_checksum: sha1:6e42a763f6217572cc59f8799af55dd21d961be9 @@ -7064,8 +7188,8 @@ trackedFiles: pristine_git_object: 42d9739ab67c2fec0689f83777ffa5e1f875e5d5 src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:cd016a878ec09f9911255d937e2a532760ad3077 - pristine_git_object: e49a687706fb518da0b4be82d27e37838b777bf3 + last_write_checksum: sha1:276575dd29a8415a68ee733d6e57e664d062bd77 + pristine_git_object: 38e32efbe941758e1756a7265f3dcc4493446941 src/lib/encodings.ts: id: 3bd8ead98afd last_write_checksum: sha1:a74725064d06b6994b95873c037975d2f2e63467 @@ -7804,8 +7928,8 @@ trackedFiles: pristine_git_object: 67cd9665fe59ca10c58342db9cd33854e992372a src/models/components/dlpfindingfilter.ts: id: 7f32717f7231 - last_write_checksum: sha1:60f8821d3c02e81e6d28026c53956b24d36ef282 - pristine_git_object: 771a1aa029b1b7352f0f72f5f10377c2ddf05c78 + last_write_checksum: sha1:f4e2a8526622d27a71a69b7193a2375517c702b1 + pristine_git_object: 3be1768cf46f8e2f1020c41025c547193258326e src/models/components/dlpfrequency.ts: id: 9404b4b9c2b1 last_write_checksum: sha1:e2dc4edbf7e0c33bb4f3cddcb5f41dff1d5c8e47 @@ -7836,8 +7960,8 @@ trackedFiles: pristine_git_object: d22ad0ad9d2b872326266b534b3e53e193167985 src/models/components/dlpseverity.ts: id: 29e48bf14720 - last_write_checksum: sha1:3239679d9537c4203c32af43bb142abea0ca2163 - pristine_git_object: ddb616bb18aa2e0995348e0556a1d3e5ed63b205 + last_write_checksum: sha1:c123800ad74320084f3cb5863e2c1e0dda2aea79 + pristine_git_object: 7b0cc5aaf8e8094356b7eec670cf5d3925894310 src/models/components/dlpsimpleresult.ts: id: bd444ff86b3c last_write_checksum: sha1:f9fb3f3b472f67da93bdcd6f61a7779af212e7a1 @@ -8212,8 +8336,8 @@ trackedFiles: pristine_git_object: c1b51fb164e5fddc23f344a60899933a91902f4c src/models/components/index.ts: id: 0aa842dce54d - last_write_checksum: sha1:d956d73b7097e50a226e45b8addb6dbbbc8e53a9 - pristine_git_object: 7e39bf7d431ffe6c3ab65dd658d31e8f4615f13e + last_write_checksum: sha1:2d7a63f8b49295b0222bbdfb7c5f329ea011c64c + pristine_git_object: a62c5237046b722322b45b2c7f1ed6b696cb6110 src/models/components/indexdocumentrequest.ts: id: deb13e2cdc65 last_write_checksum: sha1:33e2093c7fcdd3c90ef45c48e7b79c4cb2aea6e5 @@ -8574,6 +8698,34 @@ trackedFiles: id: a12b46a101c0 last_write_checksum: sha1:55664d86976b98357e67d15dc592c37be042f3c2 pristine_git_object: e26c0612c799afdf42ca17bbb685881e6c07a101 + src/models/components/platformskill.ts: + id: d34696ea810b + last_write_checksum: sha1:ace2a7de3be1bdd74889516f88ce49f5635775a4 + pristine_git_object: 4d1a1f40b145c5c9cf0a6f000f13adc599fd54f8 + src/models/components/platformskillgetresponse.ts: + id: b9dd0e54b6c6 + last_write_checksum: sha1:05d286bf771305eba6e0c6781f268f075b4dc31b + pristine_git_object: 26177c0f925782064a24ea2d7fc5f7cecaeef328 + src/models/components/platformskillorigin.ts: + id: 5f9163750617 + last_write_checksum: sha1:571c0e1d66e8a5e33e0a795dbd1132f4d7053207 + pristine_git_object: a2cd7a5fc25d7893a2e2b75fc053f06f616b6c36 + src/models/components/platformskillslistresponse.ts: + id: 0b4832ec4dc7 + last_write_checksum: sha1:7e207da3be46ace0accddc3b705466cf973cc939 + pristine_git_object: 584e18493e4723f9727bfc550c886598e4d7d2d1 + src/models/components/platformskillsourceprovenance.ts: + id: d205a4ca5eab + last_write_checksum: sha1:77e843a2a61af9b80ab43e0a5fa25e4a52e69709 + pristine_git_object: be0b13f624932ec5a21afe70d4a490bc7e414c6e + src/models/components/platformskillstatus.ts: + id: 3239e840356d + last_write_checksum: sha1:db01ab90569ebc193bd92c2e07ee90a00e68cc0e + pristine_git_object: 43aaae8cca26fecd3dfbc03a7029777ec2d6b26a + src/models/components/platformskillsyncstatus.ts: + id: 474e34580f2d + last_write_checksum: sha1:5b5383fea1d9cc953c97e366214c75a0baf97268 + pristine_git_object: 2efda9b8a2656f343a15314dd77bfbd1c10636e1 src/models/components/platformtimerange.ts: id: fb9ab6343c3a last_write_checksum: sha1:5816eda5ae4c626e40a45ad8f94a2409bc885d49 @@ -8912,8 +9064,8 @@ trackedFiles: pristine_git_object: 794fbf76b160d3a78fc308eba6ad1c983c6685d7 src/models/components/toolmetadata.ts: id: fdf3bdc60c23 - last_write_checksum: sha1:d3ff0040b2a619ecf83df98a9497fe7b235898d6 - pristine_git_object: 4fb9511c82ec42bbfd8745e2cb2ab79e66767448 + last_write_checksum: sha1:add829851c8345a1b2f6814a5597f7528bab4f34 + pristine_git_object: 7f4802a6f7d6b9e313cf3ceede05b5889db9c97d src/models/components/toolparameter.ts: id: 8104b99f27c9 last_write_checksum: sha1:6d2d885c65ca160c446664630c1a18488ff1faba @@ -9080,8 +9232,8 @@ trackedFiles: pristine_git_object: 9d64537081a91b70b1cf84ed5c6f1495b900205f src/models/components/workflow.ts: id: 76b9ea763f34 - last_write_checksum: sha1:7568efc7b7d028e6f9f458b1636161901e82b513 - pristine_git_object: 2b33053f9aeabd553ad4430b668700b1cf17b4de + last_write_checksum: sha1:a18b05cfc943849f38cfe54397f414edc5c1397e + pristine_git_object: 7c829d0c2810c3a84f1a0217e6fda74e62a082cd src/models/components/workflowfeedbackinfo.ts: id: 6abe14060730 last_write_checksum: sha1:19474bf9cfaccdafcf9aded8c27cbaf084830a09 @@ -9372,8 +9524,8 @@ trackedFiles: pristine_git_object: ddf76652b5d27d602a300b5909b728b59be4ad73 src/models/operations/index.ts: id: 0d9ffaf774d2 - last_write_checksum: sha1:eb38833bba483438a754cf3c4f9bde1be5cfe51d - pristine_git_object: 00caa4b04d57c7835e9f8aa4e79d1eea79c4e2a5 + last_write_checksum: sha1:75756753c3676e7d88fd8558edf97e09d6ff2f81 + pristine_git_object: b6fa7452fb56d675f52cd8dba40df047df145d63 src/models/operations/insights.ts: id: 7bef0edaab32 last_write_checksum: sha1:37db16bc7603defd715210dfd8c12de88bde8b72 @@ -9434,6 +9586,14 @@ trackedFiles: id: c025879102b3 last_write_checksum: sha1:65d7361ac886e2c8f3200c6cc3141daf78ba1eac pristine_git_object: 69bd1349edebd305537e0ec66afbe70db4e9aa14 + src/models/operations/platformskillsget.ts: + id: 24dc86e69e49 + last_write_checksum: sha1:4979b3fb3b38b0b13a40a1fb548fa73d3f36bc48 + pristine_git_object: c3d2123ed894d2bdbeee10060566018e320c36cb + src/models/operations/platformskillslist.ts: + id: 909cbd063812 + last_write_checksum: sha1:f4ff7c3e2ae74219bdc8df3f9efd1d6a9db5d1fe + pristine_git_object: e081d77940f8b67ed533e1a8e7bceb9e0f83c80c src/models/operations/postapiindexv1debugdatasourcedocument.ts: id: 03753664a7e3 last_write_checksum: sha1:1fc8451990ad08329b62b2915f227f575e7e4b0b @@ -9454,6 +9614,10 @@ trackedFiles: id: 0e040c9b84d6 last_write_checksum: sha1:0a89cfaca19da01ebf44e524bc0981f64856b3d1 pristine_git_object: c9e96613ea6ee1cdc6ab891a3a2ade5e775dc772 + src/models/operations/postrestapiindexsubmissionsdatasourceinstancetype.ts: + id: 85b9298a2d8c + last_write_checksum: sha1:c10d16b8d20d55aa252bf392a64bf3663a133a31 + pristine_git_object: 2788dcf11af05d42fea98518305e32a131930658 src/models/operations/putrestapiindexcustommetadataschemagroupname.ts: id: f942032aea10 last_write_checksum: sha1:58d155f7a52760be75bac45d1787417432aaf9c9 @@ -9964,8 +10128,8 @@ trackedFiles: pristine_git_object: 7ea1d5c56f074fe08998790eed62e014c840891b src/react-query/index.ts: id: 9e975471aa65 - last_write_checksum: sha1:f1bb81fe81124fd2745365a4935321633020ffcf - pristine_git_object: b8610dc067e62e80f6b22bf039feaac1bb348b73 + last_write_checksum: sha1:9f4ef939f97a8354c495fba0c9b33e587b250ae1 + pristine_git_object: 705c7e69f6fc2a602666e2119e3bfce87688fd07 src/react-query/indexingAuthenticationRotateToken.ts: id: e56c0845e38e last_write_checksum: sha1:035d7baae9a7fd7c32f69211cfe85b0f6ccbbf8c @@ -10006,6 +10170,10 @@ trackedFiles: id: 2489df44fcbb last_write_checksum: sha1:307bfc9fb3fc1c9d1363450d1ca56fda2d87bef3 pristine_git_object: 741b9a7d756861b5152993de2af8367ac0c6a014 + src/react-query/indexingDatasourcesSubmit.ts: + id: 2975f214d3b7 + last_write_checksum: sha1:370c227e80a780f688201cf64091508c17d66083 + pristine_git_object: 0a90b0eb93addd3e41e62deb76601f8cab9210c2 src/react-query/indexingDocumentsAddOrUpdate.ts: id: 7ceefad02f9e last_write_checksum: sha1:a8eaa67485fb2c9dbc2a679c654e0ef7e004955b @@ -10146,6 +10314,22 @@ trackedFiles: id: a67629da8040 last_write_checksum: sha1:5ce8b5811af2d6dd5bc95afd2e9358c16d7c7a99 pristine_git_object: bc4f7e63f7066516b637ad801275acd0fa53c9e0 + src/react-query/skillsList.core.ts: + id: e91168fc9e6b + last_write_checksum: sha1:e4718db715009eeb0164e2f028c9c8aea98b9a3b + pristine_git_object: 9134b7a24fabb2357cd6f921dc5da320d49c01a6 + src/react-query/skillsList.ts: + id: 3377edb65dda + last_write_checksum: sha1:9b5acfb883b415945c36788173ba43df30c1ca3d + pristine_git_object: b911a654408806c59ae24bf8aef2d8c7ad301557 + src/react-query/skillsRetrieve.core.ts: + id: b293a018b942 + last_write_checksum: sha1:2b87aaf09b4dd7b921cc1d117fb497520bdeb799 + pristine_git_object: 3c4f811c987d2c6ca64f9466d9fcb90094f1d431 + src/react-query/skillsRetrieve.ts: + id: 8bd7927c56aa + last_write_checksum: sha1:fbb324daffbfc4dfe43b66bb93bb4f21173546c7 + pristine_git_object: c3b68b1393a78bf26c9a230da61af23abd4305d6 src/sdk/activity.ts: id: 87dddbbca815 last_write_checksum: sha1:1b66eb529dcde53e002e35ac6fd6e6e7e56be73e @@ -10240,8 +10424,8 @@ trackedFiles: pristine_git_object: 0fe476042259a76d18450783519c84c5b58c7409 src/sdk/indexingdatasources.ts: id: e3e6d8319bd2 - last_write_checksum: sha1:fb9dc4686004600e4ac32a4cae1769cfb1b7aa91 - pristine_git_object: ed9fa1fb7c258f36b2b0cf3137096d4a46c39376 + last_write_checksum: sha1:18808fe708602c98ca200f222b5823057c82fc01 + pristine_git_object: 7c732198bce2df08fec12603724d1131b1e49132 src/sdk/indexingdocuments.ts: id: 430887b7bad8 last_write_checksum: sha1:def0f16e316c12bfe44a771fab2d197a035a59dd @@ -10280,12 +10464,16 @@ trackedFiles: pristine_git_object: b13d325fd129a1e93b8f78617fc401a58f14364c src/sdk/sdk.ts: id: 784571af2f69 - last_write_checksum: sha1:7ecc6578d93f9fa841c0a9e77cd23639a66214b3 - pristine_git_object: 65e63fcc09b34e4978dd2a1441d4f17713087724 + last_write_checksum: sha1:3a33ea0f35139239417eeee74519f287bb51bb0f + pristine_git_object: 2cca83bdec91898235f72cc7138b1ebebbdc1956 src/sdk/search.ts: id: b88871d87236 last_write_checksum: sha1:7aa823227d511aea3f70dd460e70b7478c6daf1f pristine_git_object: d8b2b8c62743cb5b2e9d524fe24884ac23681858 + src/sdk/skills.ts: + id: 847667a72f83 + last_write_checksum: sha1:7022e33fc87f658aa54ae271827bfb802867406a + pristine_git_object: 93d42981784538b55a3b4254f7630f22bb09d45f src/sdk/tools.ts: id: f997ccdd9dd9 last_write_checksum: sha1:803cc691fc4535aba26609bc73553dcef9edda58 @@ -11346,6 +11534,42 @@ examples: responses: "200": application/json: {"authorizationUrl": "https://shocked-casket.name/"} + platform-skills-list: + speakeasy-default-platform-skills-list: + responses: + "200": + application/json: {"skills": [], "has_more": true, "next_cursor": "", "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-skills-get: + speakeasy-default-platform-skills-get: + parameters: + path: + skill_id: "" + responses: + "200": + application/json: {"skill": {"id": "", "display_name": "Chad_Herzog", "description": "whenever up aha controvert", "latest_version": 151495, "latest_minor_version": 170771, "status": "DISABLED", "origin": "CUSTOM", "owner": {"name": ""}, "created_at": "2024-12-25T16:41:00.099Z", "updated_at": "2026-12-07T21:59:59.375Z"}, "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + post_/rest/api/index/submissions/{datasourceInstance}/{type}: + speakeasy-default-post-/rest/api/index/submissions/{datasource-instance}/{type}: + parameters: + path: + datasourceInstance: "" + type: "" + requestBody: + application/json: {"key": "", "key1": "", "key2": ""} + responses: + "202": + application/json: {"requestId": ""} + "400": + application/json: {"error": ""} + "500": + application/json: {"error": ""} examplesVersion: 1.0.2 generatedTests: activity: "2025-05-05T15:08:35-05:00" @@ -11513,7 +11737,10 @@ generatedTests: platform-search: "2026-07-02T17:51:23Z" getToolServerAuthStatus: "2026-07-08T02:25:28Z" authorizeToolServer: "2026-07-08T02:25:28Z" -releaseNotes: "## Typescript 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" + platform-skills-list: "2026-07-16T02:15:31Z" + platform-skills-get: "2026-07-16T02:15:31Z" + post_/rest/api/index/submissions/{datasourceInstance}/{type}: "2026-07-16T02:15:32Z" +releaseNotes: "## Typescript SDK Changes:\n* `glean.skills.list()`: **Added**\n* `glean.skills.retrieve()`: **Added**\n* `glean.indexing.datasources.submit()`: **Added**\n* `glean.client.chat.create()`: \n * `request.chatRequest.messages[].fragments[].action.metadata.actionTypeSource` **Added**\n * `response.messages[].fragments[].action.metadata.actionTypeSource` **Added**\n* `glean.client.chat.retrieve()`: `response.chatResult.chat.messages[].fragments[].action.metadata.actionTypeSource` **Added**\n* `glean.client.chat.createStream()`: \n * `request.chatRequest.messages[].fragments[].action.metadata.actionTypeSource` **Added**\n* `glean.client.agents.create()`: `response.workflow.webhookUrl` **Added**\n* `glean.client.search.retrieveFeed()`: `response.results[].primaryEntry.workflow.workflow.webhookUrl` **Added**\n* `glean.client.governance.data.findings.create()`: \n * `request.filter.severity.enum(falsePositive)` **Added**\n * `response.filter.severity.enum(falsePositive)` **Added**\n* `glean.client.governance.data.findings.list()`: `response.exports[].filter.severity.enum(falsePositive)` **Added**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 91028514..ad1a9116 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -35,7 +35,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true typescript: - version: 0.17.3 + version: 0.18.0 acceptHeaderEnum: true additionalDependencies: dependencies: {} diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index a1f493a7..eb4353ae 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: 270b693d49bac2f68e751b2345bac0c267741119 - x-open-api-commit-sha: 592aec2b4913505edb8161645eaf9a72b5286f20 + x-source-commit-sha: f37c86758b48508a200310099e289104539cfd93 + x-open-api-commit-sha: cbe77b40a16634a330c878a665dca3b819014410 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. @@ -250,6 +250,108 @@ paths: x-speakeasy-name-override: createRun security: - APIToken: [] + /api/skills: + get: + tags: + - Skills + summary: List skills + description: | + List skills available to the authenticated user. + operationId: platform-skills-list + x-visibility: Public + x-glean-experimental: + id: 3eb65937-03a3-472b-9a00-be713f302b5f + introduced: "2026-06-23" + parameters: + - in: query + name: page_size + description: Maximum number of skills to return. + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + - in: query + name: cursor + description: Opaque pagination cursor from a previous response. + required: false + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillsListResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: list + security: + - APIToken: [] + /api/skills/{skill_id}: + get: + tags: + - Skills + summary: Retrieve skill + description: | + Retrieve metadata for a skill available to the authenticated user. + operationId: platform-skills-get + x-visibility: Public + x-glean-experimental: + id: 8f8d1c92-a484-4769-9903-200613dc8a72 + introduced: "2026-06-23" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillGetResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: retrieve + security: + - APIToken: [] /api/search: post: tags: @@ -4177,6 +4279,69 @@ paths: x-beta: true x-speakeasy-group: indexing.documents x-speakeasy-name-override: debugEvents + /rest/api/index/submissions/{datasourceInstance}/{type}: + post: + summary: Submit datasource data + description: Validates and asynchronously processes a datasource-specific submission. + tags: + - Datasources + security: + - APIToken: [] + requestBody: + content: + application/json: + schema: + type: object + additionalProperties: true + required: true + x-exportParamName: SubmissionRequest + responses: + "202": + description: Accepted + content: + application/json: + schema: + type: object + properties: + requestId: + type: string + required: + - requestId + "400": + $ref: '#/components/responses/BadRequestError' + "401": + $ref: '#/components/responses/UnauthorizedError' + "404": + $ref: '#/components/responses/NotFoundError' + "405": + description: Method Not Allowed + "413": + description: Payload Too Large + "500": + $ref: '#/components/responses/InternalServerError' + "503": + description: Service Unavailable + x-speakeasy-name-override: submit + x-speakeasy-group: indexing.datasources + servers: + - url: https://{instance}-be.glean.com + variables: + instance: + default: instance-name + description: The instance name (typically the email domain without the TLD) that determines the deployment backend. + parameters: + - name: datasourceInstance + in: path + description: Datasource instance that should process the submission + required: true + schema: + type: string + - name: type + in: path + description: Submission type registered for the datasource + required: true + schema: + type: string /rest/api/index/document/{docId}/custom-metadata/{groupName}: put: summary: Add or update custom metadata @@ -5479,6 +5644,138 @@ components: request_id: type: string description: Platform-generated request ID for support correlation. + PlatformSkillStatus: + type: string + enum: + - DRAFT + - ENABLED + - DISABLED + description: Current skill status. + PlatformSkillOrigin: + type: string + enum: + - CUSTOM + description: Source category for the skill. + PlatformSkillSyncStatus: + type: string + enum: + - UP_TO_DATE + - UPDATE_AVAILABLE + - SYNC_FAILED + description: Current external-source sync status. + PlatformSkillSourceProvenance: + type: object + properties: + source_url: + type: string + description: URL of the external source the skill was imported from. + commit_sha: + type: string + description: Source commit SHA for the imported skill. + imported_at: + type: string + format: date-time + description: Time the skill was imported. + last_synced_at: + type: string + format: date-time + description: Time the skill was last synced from its source. + sync_status: + $ref: "#/components/schemas/PlatformSkillSyncStatus" + sync_error: + type: string + description: Human-readable sync failure reason, present only when sync_status is SYNC_FAILED. + PlatformPersonReference: + type: object + description: A lightweight reference to a person, used where a payload merely points at someone. + required: + - name + properties: + id: + type: string + description: Opaque Glean person ID. + name: + type: string + description: Display name. + PlatformSkill: + type: object + required: + - id + - display_name + - description + - latest_version + - latest_minor_version + - status + - origin + - owner + - created_at + - updated_at + properties: + id: + type: string + description: Glean skill ID. + display_name: + type: string + description: Human-readable skill name. + description: + type: string + description: Human-readable skill description. + latest_version: + type: integer + description: Latest major version number for the skill. + latest_minor_version: + type: integer + description: Latest minor version number for the skill. + status: + $ref: "#/components/schemas/PlatformSkillStatus" + origin: + $ref: "#/components/schemas/PlatformSkillOrigin" + source_provenance: + $ref: "#/components/schemas/PlatformSkillSourceProvenance" + owner: + $ref: "#/components/schemas/PlatformPersonReference" + created_at: + type: string + format: date-time + description: Time the skill was created. + updated_at: + type: string + format: date-time + description: Time the skill was last updated. + PlatformSkillsListResponse: + type: object + required: + - skills + - has_more + - next_cursor + - request_id + properties: + skills: + type: array + description: Skills available to the user. + items: + $ref: "#/components/schemas/PlatformSkill" + has_more: + type: boolean + description: Whether additional results are available. + next_cursor: + type: string + nullable: true + description: Cursor for the next page, or null when no more results are available. + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformSkillGetResponse: + type: object + required: + - skill + - request_id + properties: + skill: + $ref: "#/components/schemas/PlatformSkill" + request_id: + type: string + description: Platform-generated request ID for support correlation. PlatformFilterOperator: type: string description: Supported filter operator. @@ -5579,18 +5876,6 @@ components: Structured filters applied to search results. Equality operators OR multiple values within a filter. Multiple filters are AND'd together, including range filters on the same field. Filters are AND'd with any inline operators in `query`. Note that conflicting constraints on the same field (e.g., `type:document` in the query and `type: spreadsheet` in a filter) produce an empty result set. time_range: $ref: "#/components/schemas/PlatformTimeRange" - PlatformPersonReference: - type: object - description: A lightweight reference to a person, used where a payload merely points at someone. - required: - - name - properties: - id: - type: string - description: Opaque Glean person ID. - name: - type: string - description: Display name. PlatformResult: type: object required: @@ -9635,6 +9920,22 @@ components: - EXECUTION - MCP description: Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action. + actionTypeSource: + type: string + enum: + - MCP_ANNOTATION + - ADMIN_OVERRIDE + - NONE + - NATIVE_TOOL_DEFINITION + description: | + Analytics-only signal (product snapshot) describing WHERE the action's + read/write determination came from. Complementary to the effective + read/write value (the tool's ToolType, which drives HITL): the value says + read-or-write, this says how confident that is. MCP_ANNOTATION = from the + tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + NONE = no usable hint (the effective value then defaults to write); + NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + Does not affect runtime behavior. authType: type: string enum: @@ -10223,6 +10524,11 @@ components: type: boolean description: When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. readOnly: true + webhookUrl: + type: string + description: | + For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL (.../webhooks/custom/) minted for the agent. Empty for other trigger types. + readOnly: true WorkflowResult: type: object properties: @@ -15753,7 +16059,8 @@ components: - LOW - MEDIUM - HIGH - description: Severity levels for DLP findings and analyses. + - FALSE_POSITIVE + description: Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses that concluded every flagged entity is a detector false positive. x-include-enum-class-prefix: true DlpIssueStatus: type: string diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index b1ff6863..336b3b4e 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -164747,3 +164747,59 @@ workflows: type: simple x-speakeasy-test-group: tools x-speakeasy-test-rebuild: true + - workflowId: platform-skills-list + steps: + - stepId: test + operationId: platform-skills-list + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"skills":[],"has_more":true,"next_cursor":"","request_id":""} + type: simple + x-speakeasy-test-group: skills + x-speakeasy-test-rebuild: true + - workflowId: platform-skills-get + steps: + - stepId: test + operationId: platform-skills-get + parameters: + - name: skill_id + in: path + value: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"skill":{"id":"","display_name":"Chad_Herzog","description":"whenever up aha controvert","latest_version":151495,"latest_minor_version":170771,"status":"DISABLED","origin":"CUSTOM","owner":{"name":""},"created_at":"2024-12-25T16:41:00.099Z","updated_at":"2026-12-07T21:59:59.375Z"},"request_id":""} + type: simple + x-speakeasy-test-group: skills + x-speakeasy-test-rebuild: true + - workflowId: post_/rest/api/index/submissions/{datasourceInstance}/{type} + steps: + - stepId: test + operationId: post_/rest/api/index/submissions/{datasourceInstance}/{type} + parameters: + - name: datasourceInstance + in: path + value: + - name: type + in: path + value: + requestBody: + contentType: application/json + payload: + key: + key1: + key2: + successCriteria: + - condition: $statusCode == 202 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"requestId":""} + type: simple + x-speakeasy-test-group: indexing_datasources + x-speakeasy-test-rebuild: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index ca951a32..5186a1ae 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.789.2 +speakeasyVersion: 1.790.2 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:145236c33451e6e87cf1507a4d8829678b0df02af59afc9341330627e33ed760 - sourceBlobDigest: sha256:862b1370a65d146eac83f86c6fbd2d787f04ea93c2cf28259af5ded934f9fb3b + sourceRevisionDigest: sha256:0a1bfbdfc88a777698ef06cafd48f1f6dea4ce40fc5e495db6938f90d237e56f + sourceBlobDigest: sha256:5254e13425ad18d1bc9886e097624ce1a87093afd80f2d9593da313c53f59be7 tags: - latest Glean Client API: @@ -17,10 +17,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:145236c33451e6e87cf1507a4d8829678b0df02af59afc9341330627e33ed760 - sourceBlobDigest: sha256:862b1370a65d146eac83f86c6fbd2d787f04ea93c2cf28259af5ded934f9fb3b + sourceRevisionDigest: sha256:0a1bfbdfc88a777698ef06cafd48f1f6dea4ce40fc5e495db6938f90d237e56f + sourceBlobDigest: sha256:5254e13425ad18d1bc9886e097624ce1a87093afd80f2d9593da313c53f59be7 codeSamplesNamespace: glean-api-specs-typescript-code-samples - codeSamplesRevisionDigest: sha256:3926e0a4287d60c4246139ee2a719a81878de8c9e8716c7c1f962b062706e5aa + codeSamplesRevisionDigest: sha256:6da7ac22e04c71fab87ff806fe8eac8c5cc840fe74bda4bf566daf40658cb25a workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 17a81aaa..8727e875 100644 --- a/README.md +++ b/README.md @@ -439,6 +439,7 @@ For more information on obtaining the appropriate token type, please contact you * [add](docs/sdks/indexingdatasources/README.md#add) - Add or update datasource * [retrieveConfig](docs/sdks/indexingdatasources/README.md#retrieveconfig) - Get datasource config +* [submit](docs/sdks/indexingdatasources/README.md#submit) - Submit datasource data ### [Indexing.Documents](docs/sdks/indexingdocuments/README.md) @@ -494,6 +495,11 @@ For more information on obtaining the appropriate token type, please contact you * [query](docs/sdks/search/README.md#query) - Search +### [Skills](docs/sdks/skills/README.md) + +* [list](docs/sdks/skills/README.md#list) - List skills +* [retrieve](docs/sdks/skills/README.md#retrieve) - Retrieve skill + @@ -612,6 +618,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`indexingCustomMetadataUpsertSchema`](docs/sdks/custommetadata/README.md#upsertschema) - Create or update metadata schema - [`indexingDatasourcesAdd`](docs/sdks/indexingdatasources/README.md#add) - Add or update datasource - [`indexingDatasourcesRetrieveConfig`](docs/sdks/indexingdatasources/README.md#retrieveconfig) - Get datasource config +- [`indexingDatasourcesSubmit`](docs/sdks/indexingdatasources/README.md#submit) - Submit datasource data - [`indexingDatasourceStatus`](docs/sdks/datasource/README.md#status) - Beta: Get datasource status - [`indexingDocumentsAddOrUpdate`](docs/sdks/indexingdocuments/README.md#addorupdate) - Index document @@ -649,6 +656,8 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`indexingShortcutsBulkIndex`](docs/sdks/indexingshortcuts/README.md#bulkindex) - Bulk index external shortcuts - [`indexingShortcutsUpload`](docs/sdks/indexingshortcuts/README.md#upload) - Upload shortcuts - [`searchQuery`](docs/sdks/search/README.md#query) - Search +- [`skillsList`](docs/sdks/skills/README.md#list) - List skills +- [`skillsRetrieve`](docs/sdks/skills/README.md#retrieve) - Retrieve skill - ~~[`clientAnswersList`](docs/sdks/answers/README.md#list)~~ - List Answers :warning: **Deprecated** - ~~[`indexingDocumentsCount`](docs/sdks/indexingdocuments/README.md#count)~~ - Get document count :warning: **Deprecated** - ~~[`indexingDocumentsStatus`](docs/sdks/indexingdocuments/README.md#status)~~ - Get document upload and indexing status :warning: **Deprecated** @@ -780,6 +789,7 @@ To learn about this feature and how to get started, check - [`useIndexingCustomMetadataUpsertSchemaMutation`](docs/sdks/custommetadata/README.md#upsertschema) - Create or update metadata schema - [`useIndexingDatasourcesAddMutation`](docs/sdks/indexingdatasources/README.md#add) - Add or update datasource - [`useIndexingDatasourcesRetrieveConfigMutation`](docs/sdks/indexingdatasources/README.md#retrieveconfig) - Get datasource config +- [`useIndexingDatasourcesSubmitMutation`](docs/sdks/indexingdatasources/README.md#submit) - Submit datasource data - [`useIndexingDatasourceStatusMutation`](docs/sdks/datasource/README.md#status) - Beta: Get datasource status - [`useIndexingDocumentsAddOrUpdateMutation`](docs/sdks/indexingdocuments/README.md#addorupdate) - Index document @@ -817,6 +827,8 @@ To learn about this feature and how to get started, check - [`useIndexingShortcutsBulkIndexMutation`](docs/sdks/indexingshortcuts/README.md#bulkindex) - Bulk index external shortcuts - [`useIndexingShortcutsUploadMutation`](docs/sdks/indexingshortcuts/README.md#upload) - Upload shortcuts - [`useSearchQueryMutation`](docs/sdks/search/README.md#query) - Search +- [`useSkillsList`](docs/sdks/skills/README.md#list) - List skills +- [`useSkillsRetrieve`](docs/sdks/skills/README.md#retrieve) - Retrieve skill - ~~[`useClientAnswersListMutation`](docs/sdks/answers/README.md#list)~~ - List Answers :warning: **Deprecated** - ~~[`useIndexingDocumentsCountMutation`](docs/sdks/indexingdocuments/README.md#count)~~ - Get document count :warning: **Deprecated** - ~~[`useIndexingDocumentsStatusMutation`](docs/sdks/indexingdocuments/README.md#status)~~ - Get document upload and indexing status :warning: **Deprecated** @@ -1061,11 +1073,13 @@ const glean = new Glean({ }); async function run() { - const result = await glean.indexing.customMetadata.upsert( + const result = await glean.indexing.datasources.submit( { - customMetadata: [], + "key": "", + "key1": "", + "key2": "", }, - "", + "", "", { serverURL: "https://instance-name-be.glean.com", diff --git a/RELEASES.md b/RELEASES.md index 916acaf5..7c4090ff 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -828,4 +828,14 @@ Based on: ### Generated - [typescript v0.17.3] . ### Releases -- [NPM v0.17.3] https://www.npmjs.com/package/@gleanwork/api-client/v/0.17.3 - . \ No newline at end of file +- [NPM v0.17.3] https://www.npmjs.com/package/@gleanwork/api-client/v/0.17.3 - . + +## 2026-07-16 02:11:55 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.790.2 (2.918.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.18.0] . +### Releases +- [NPM v0.18.0] https://www.npmjs.com/package/@gleanwork/api-client/v/0.18.0 - . \ No newline at end of file diff --git a/docs/models/components/actiontypesource.md b/docs/models/components/actiontypesource.md new file mode 100644 index 00000000..79973f1c --- /dev/null +++ b/docs/models/components/actiontypesource.md @@ -0,0 +1,27 @@ +# ActionTypeSource + +Analytics-only signal (product snapshot) describing WHERE the action's +read/write determination came from. Complementary to the effective +read/write value (the tool's ToolType, which drives HITL): the value says +read-or-write, this says how confident that is. MCP_ANNOTATION = from the +tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; +NONE = no usable hint (the effective value then defaults to write); +NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). +Does not affect runtime behavior. + + +## Example Usage + +```typescript +import { ActionTypeSource } from "@gleanwork/api-client/models/components"; + +let value: ActionTypeSource = "NONE"; + +// Open enum: unrecognized values are captured as Unrecognized +``` + +## Values + +```typescript +"MCP_ANNOTATION" | "ADMIN_OVERRIDE" | "NONE" | "NATIVE_TOOL_DEFINITION" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/components/dlpfindingfilter.md b/docs/models/components/dlpfindingfilter.md index 6272258a..a1f03d81 100644 --- a/docs/models/components/dlpfindingfilter.md +++ b/docs/models/components/dlpfindingfilter.md @@ -10,16 +10,16 @@ let value: DlpFindingFilter = {}; ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `infoType` | *string* | :heavy_minus_sign: | N/A | -| `regexId` | *string* | :heavy_minus_sign: | N/A | -| `reportId` | *string* | :heavy_minus_sign: | N/A | -| `datasource` | *string* | :heavy_minus_sign: | N/A | -| `visibility` | *string* | :heavy_minus_sign: | N/A | -| `documentIds` | *string*[] | :heavy_minus_sign: | N/A | -| `severity` | [components.DlpSeverity](../../models/components/dlpseverity.md) | :heavy_minus_sign: | Severity levels for DLP findings and analyses. | -| `documentSeverity` | [components.DlpSeverity](../../models/components/dlpseverity.md)[] | :heavy_minus_sign: | N/A | -| `statuses` | [components.DlpIssueStatus](../../models/components/dlpissuestatus.md)[] | :heavy_minus_sign: | N/A | -| `timeRange` | [components.TimeRangeFilter](../../models/components/timerangefilter.md) | :heavy_minus_sign: | N/A | -| `archived` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `infoType` | *string* | :heavy_minus_sign: | N/A | +| `regexId` | *string* | :heavy_minus_sign: | N/A | +| `reportId` | *string* | :heavy_minus_sign: | N/A | +| `datasource` | *string* | :heavy_minus_sign: | N/A | +| `visibility` | *string* | :heavy_minus_sign: | N/A | +| `documentIds` | *string*[] | :heavy_minus_sign: | N/A | +| `severity` | [components.DlpSeverity](../../models/components/dlpseverity.md) | :heavy_minus_sign: | Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses that concluded every flagged entity is a detector false positive. | +| `documentSeverity` | [components.DlpSeverity](../../models/components/dlpseverity.md)[] | :heavy_minus_sign: | N/A | +| `statuses` | [components.DlpIssueStatus](../../models/components/dlpissuestatus.md)[] | :heavy_minus_sign: | N/A | +| `timeRange` | [components.TimeRangeFilter](../../models/components/timerangefilter.md) | :heavy_minus_sign: | N/A | +| `archived` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/dlpseverity.md b/docs/models/components/dlpseverity.md index 725614b4..f77a0967 100644 --- a/docs/models/components/dlpseverity.md +++ b/docs/models/components/dlpseverity.md @@ -1,6 +1,6 @@ # DlpSeverity -Severity levels for DLP findings and analyses. +Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses that concluded every flagged entity is a detector false positive. ## Example Usage @@ -15,5 +15,5 @@ let value: DlpSeverity = "MEDIUM"; ## Values ```typescript -"UNSPECIFIED" | "LOW" | "MEDIUM" | "HIGH" | Unrecognized +"UNSPECIFIED" | "LOW" | "MEDIUM" | "HIGH" | "FALSE_POSITIVE" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/components/platformskill.md b/docs/models/components/platformskill.md new file mode 100644 index 00000000..2dcbec60 --- /dev/null +++ b/docs/models/components/platformskill.md @@ -0,0 +1,38 @@ +# PlatformSkill + +## Example Usage + +```typescript +import { PlatformSkill } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkill = { + id: "", + display_name: "Jerome_Kutch", + description: "afore joyously insidious daily bog coop haze meh pointless", + latest_version: 325433, + latest_minor_version: 984891, + status: "DRAFT", + origin: "CUSTOM", + owner: { + name: "", + }, + created_at: new Date("2024-01-07T19:53:38.172Z"), + updated_at: new Date("2026-08-25T04:34:11.776Z"), +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Glean skill ID. | +| `displayName` | *string* | :heavy_check_mark: | Human-readable skill name. | +| `description` | *string* | :heavy_check_mark: | Human-readable skill description. | +| `latestVersion` | *number* | :heavy_check_mark: | Latest major version number for the skill. | +| `latestMinorVersion` | *number* | :heavy_check_mark: | Latest minor version number for the skill. | +| `status` | [components.PlatformSkillStatus](../../models/components/platformskillstatus.md) | :heavy_check_mark: | Current skill status. | +| `origin` | [components.PlatformSkillOrigin](../../models/components/platformskillorigin.md) | :heavy_check_mark: | Source category for the skill. | +| `sourceProvenance` | [components.PlatformSkillSourceProvenance](../../models/components/platformskillsourceprovenance.md) | :heavy_minus_sign: | N/A | +| `owner` | [components.PlatformPersonReference](../../models/components/platformpersonreference.md) | :heavy_check_mark: | A lightweight reference to a person, used where a payload merely points at someone. | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Time the skill was created. | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Time the skill was last updated. | \ No newline at end of file diff --git a/docs/models/components/platformskillgetresponse.md b/docs/models/components/platformskillgetresponse.md new file mode 100644 index 00000000..f351362d --- /dev/null +++ b/docs/models/components/platformskillgetresponse.md @@ -0,0 +1,32 @@ +# PlatformSkillGetResponse + +## Example Usage + +```typescript +import { PlatformSkillGetResponse } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillGetResponse = { + skill: { + id: "", + display_name: "Eulah.Leffler", + description: "enhance toward flustered about", + latest_version: 281887, + latest_minor_version: 994194, + status: "ENABLED", + origin: "CUSTOM", + owner: { + name: "", + }, + created_at: new Date("2024-03-25T20:06:30.258Z"), + updated_at: new Date("2026-12-28T01:22:47.168Z"), + }, + request_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `skill` | [components.PlatformSkill](../../models/components/platformskill.md) | :heavy_check_mark: | N/A | +| `requestId` | *string* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/platformskillorigin.md b/docs/models/components/platformskillorigin.md new file mode 100644 index 00000000..89cb7ecf --- /dev/null +++ b/docs/models/components/platformskillorigin.md @@ -0,0 +1,17 @@ +# PlatformSkillOrigin + +Source category for the skill. + +## Example Usage + +```typescript +import { PlatformSkillOrigin } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillOrigin = "CUSTOM"; +``` + +## Values + +```typescript +"CUSTOM" +``` \ No newline at end of file diff --git a/docs/models/components/platformskillslistresponse.md b/docs/models/components/platformskillslistresponse.md new file mode 100644 index 00000000..b4f6fedd --- /dev/null +++ b/docs/models/components/platformskillslistresponse.md @@ -0,0 +1,39 @@ +# PlatformSkillsListResponse + +## Example Usage + +```typescript +import { PlatformSkillsListResponse } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillsListResponse = { + skills: [ + { + id: "", + display_name: "Kameron36", + description: + "sedately scowl other yearningly aggravating anti heavily extract", + latest_version: 33039, + latest_minor_version: 380295, + status: "DRAFT", + origin: "CUSTOM", + owner: { + name: "", + }, + created_at: new Date("2024-11-30T20:43:59.162Z"), + updated_at: new Date("2024-07-06T04:25:41.450Z"), + }, + ], + has_more: true, + next_cursor: "", + request_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `skills` | [components.PlatformSkill](../../models/components/platformskill.md)[] | :heavy_check_mark: | Skills available to the user. | +| `hasMore` | *boolean* | :heavy_check_mark: | Whether additional results are available. | +| `nextCursor` | *string* | :heavy_check_mark: | Cursor for the next page, or null when no more results are available. | +| `requestId` | *string* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/platformskillsourceprovenance.md b/docs/models/components/platformskillsourceprovenance.md new file mode 100644 index 00000000..b593b304 --- /dev/null +++ b/docs/models/components/platformskillsourceprovenance.md @@ -0,0 +1,20 @@ +# PlatformSkillSourceProvenance + +## Example Usage + +```typescript +import { PlatformSkillSourceProvenance } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillSourceProvenance = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `sourceUrl` | *string* | :heavy_minus_sign: | URL of the external source the skill was imported from. | +| `commitSha` | *string* | :heavy_minus_sign: | Source commit SHA for the imported skill. | +| `importedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time the skill was imported. | +| `lastSyncedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time the skill was last synced from its source. | +| `syncStatus` | [components.PlatformSkillSyncStatus](../../models/components/platformskillsyncstatus.md) | :heavy_minus_sign: | Current external-source sync status. | +| `syncError` | *string* | :heavy_minus_sign: | Human-readable sync failure reason, present only when sync_status is SYNC_FAILED. | \ No newline at end of file diff --git a/docs/models/components/platformskillstatus.md b/docs/models/components/platformskillstatus.md new file mode 100644 index 00000000..5d552f7d --- /dev/null +++ b/docs/models/components/platformskillstatus.md @@ -0,0 +1,19 @@ +# PlatformSkillStatus + +Current skill status. + +## Example Usage + +```typescript +import { PlatformSkillStatus } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillStatus = "DISABLED"; + +// Open enum: unrecognized values are captured as Unrecognized +``` + +## Values + +```typescript +"DRAFT" | "ENABLED" | "DISABLED" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/components/platformskillsyncstatus.md b/docs/models/components/platformskillsyncstatus.md new file mode 100644 index 00000000..52ad9e90 --- /dev/null +++ b/docs/models/components/platformskillsyncstatus.md @@ -0,0 +1,19 @@ +# PlatformSkillSyncStatus + +Current external-source sync status. + +## Example Usage + +```typescript +import { PlatformSkillSyncStatus } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillSyncStatus = "SYNC_FAILED"; + +// Open enum: unrecognized values are captured as Unrecognized +``` + +## Values + +```typescript +"UP_TO_DATE" | "UPDATE_AVAILABLE" | "SYNC_FAILED" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/components/toolmetadata.md b/docs/models/components/toolmetadata.md index 8db965e1..94a16f97 100644 --- a/docs/models/components/toolmetadata.md +++ b/docs/models/components/toolmetadata.md @@ -18,23 +18,24 @@ let value: ToolMetadata = { ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.ToolMetadataType](../../models/components/toolmetadatatype.md) | :heavy_check_mark: | The type of tool. | | -| `name` | *string* | :heavy_check_mark: | Unique identifier for the tool. Name should be understandable by the LLM, and will be used to invoke a tool. | | -| `displayName` | *string* | :heavy_check_mark: | Human understandable name of the tool. Max 50 characters. | | -| `toolId` | *string* | :heavy_minus_sign: | An opaque id which is unique identifier for the tool. | | -| `displayDescription` | *string* | :heavy_check_mark: | Description of the tool meant for a human. | | -| `logoUrl` | *string* | :heavy_minus_sign: | URL used to fetch the logo. | | -| `objectName` | *string* | :heavy_minus_sign: | Name of the generated object. This will be used to indicate to the end user what the generated object contains. | [
"HR ticket",
"Email",
"Chat message"
] | -| `knowledgeType` | [components.KnowledgeType](../../models/components/knowledgetype.md) | :heavy_minus_sign: | Indicates the kind of knowledge a tool would access or modify. | | -| `createdBy` | [components.PersonObject](../../models/components/personobject.md) | :heavy_minus_sign: | N/A | | -| `lastUpdatedBy` | [components.PersonObject](../../models/components/personobject.md) | :heavy_minus_sign: | N/A | | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The time the tool was created in ISO format (ISO 8601) | | -| `lastUpdatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The time the tool was last updated in ISO format (ISO 8601) | | -| `writeActionType` | [components.WriteActionType](../../models/components/writeactiontype.md) | :heavy_minus_sign: | Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action. | | -| `authType` | [components.AuthType](../../models/components/authtype.md) | :heavy_minus_sign: | The type of authentication being used.
Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token.
'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users.
'OAUTH_USER' uses individual user tokens for external API calls.
'DWD' refers to domain wide delegation.
| | -| `auth` | [components.AuthConfig](../../models/components/authconfig.md) | :heavy_minus_sign: | Config for tool's authentication method. | | -| `permissions` | [components.ObjectPermissions](../../models/components/objectpermissions.md) | :heavy_minus_sign: | N/A | | -| `usageInstructions` | *string* | :heavy_minus_sign: | Usage instructions for the LLM to use this action. | | -| `isSetupFinished` | *boolean* | :heavy_minus_sign: | Whether this action has been fully configured and validated. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [components.ToolMetadataType](../../models/components/toolmetadatatype.md) | :heavy_check_mark: | The type of tool. | | +| `name` | *string* | :heavy_check_mark: | Unique identifier for the tool. Name should be understandable by the LLM, and will be used to invoke a tool. | | +| `displayName` | *string* | :heavy_check_mark: | Human understandable name of the tool. Max 50 characters. | | +| `toolId` | *string* | :heavy_minus_sign: | An opaque id which is unique identifier for the tool. | | +| `displayDescription` | *string* | :heavy_check_mark: | Description of the tool meant for a human. | | +| `logoUrl` | *string* | :heavy_minus_sign: | URL used to fetch the logo. | | +| `objectName` | *string* | :heavy_minus_sign: | Name of the generated object. This will be used to indicate to the end user what the generated object contains. | [
"HR ticket",
"Email",
"Chat message"
] | +| `knowledgeType` | [components.KnowledgeType](../../models/components/knowledgetype.md) | :heavy_minus_sign: | Indicates the kind of knowledge a tool would access or modify. | | +| `createdBy` | [components.PersonObject](../../models/components/personobject.md) | :heavy_minus_sign: | N/A | | +| `lastUpdatedBy` | [components.PersonObject](../../models/components/personobject.md) | :heavy_minus_sign: | N/A | | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The time the tool was created in ISO format (ISO 8601) | | +| `lastUpdatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The time the tool was last updated in ISO format (ISO 8601) | | +| `writeActionType` | [components.WriteActionType](../../models/components/writeactiontype.md) | :heavy_minus_sign: | Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action. | | +| `actionTypeSource` | [components.ActionTypeSource](../../models/components/actiontypesource.md) | :heavy_minus_sign: | Analytics-only signal (product snapshot) describing WHERE the action's
read/write determination came from. Complementary to the effective
read/write value (the tool's ToolType, which drives HITL): the value says
read-or-write, this says how confident that is. MCP_ANNOTATION = from the
tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it;
NONE = no usable hint (the effective value then defaults to write);
NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived).
Does not affect runtime behavior.
| | +| `authType` | [components.AuthType](../../models/components/authtype.md) | :heavy_minus_sign: | The type of authentication being used.
Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token.
'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users.
'OAUTH_USER' uses individual user tokens for external API calls.
'DWD' refers to domain wide delegation.
| | +| `auth` | [components.AuthConfig](../../models/components/authconfig.md) | :heavy_minus_sign: | Config for tool's authentication method. | | +| `permissions` | [components.ObjectPermissions](../../models/components/objectpermissions.md) | :heavy_minus_sign: | N/A | | +| `usageInstructions` | *string* | :heavy_minus_sign: | Usage instructions for the LLM to use this action. | | +| `isSetupFinished` | *boolean* | :heavy_minus_sign: | Whether this action has been fully configured and validated. | | \ No newline at end of file diff --git a/docs/models/components/workflow.md b/docs/models/components/workflow.md index 69a5b969..2c90265e 100644 --- a/docs/models/components/workflow.md +++ b/docs/models/components/workflow.md @@ -23,17 +23,18 @@ let value: Workflow = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| `name` | *string* | :heavy_minus_sign: | The name of the workflow. | | -| `author` | [components.Person](../../models/components/person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | -| `createTimestamp` | *number* | :heavy_minus_sign: | Server Unix timestamp of the creation time. | | -| `lastUpdateTimestamp` | *number* | :heavy_minus_sign: | Server Unix timestamp of the last update time. | | -| `lastDraftSavedAt` | *number* | :heavy_minus_sign: | Server Unix timestamp of the last time the draft was saved. | | -| `lastDraftSavedBy` | [components.Person](../../models/components/person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | -| `lastDraftGitAuthorId` | *string* | :heavy_minus_sign: | 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` | [components.Person](../../models/components/person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | -| `permissions` | [components.ObjectPermissions](../../models/components/objectpermissions.md) | :heavy_minus_sign: | N/A | | -| `id` | *string* | :heavy_minus_sign: | The ID of the workflow. | | -| `verified` | *boolean* | :heavy_minus_sign: | When present, indicates this workflow is admin-verified. Set via the dedicated admin settings endpoint, not by regular edits. | | -| `showOrganizationAsAuthor` | *boolean* | :heavy_minus_sign: | When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_minus_sign: | The name of the workflow. | | +| `author` | [components.Person](../../models/components/person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | +| `createTimestamp` | *number* | :heavy_minus_sign: | Server Unix timestamp of the creation time. | | +| `lastUpdateTimestamp` | *number* | :heavy_minus_sign: | Server Unix timestamp of the last update time. | | +| `lastDraftSavedAt` | *number* | :heavy_minus_sign: | Server Unix timestamp of the last time the draft was saved. | | +| `lastDraftSavedBy` | [components.Person](../../models/components/person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | +| `lastDraftGitAuthorId` | *string* | :heavy_minus_sign: | 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` | [components.Person](../../models/components/person.md) | :heavy_minus_sign: | N/A | {
"name": "George Clooney",
"obfuscatedId": "abc123"
} | +| `permissions` | [components.ObjectPermissions](../../models/components/objectpermissions.md) | :heavy_minus_sign: | N/A | | +| `id` | *string* | :heavy_minus_sign: | The ID of the workflow. | | +| `verified` | *boolean* | :heavy_minus_sign: | When present, indicates this workflow is admin-verified. Set via the dedicated admin settings endpoint, not by regular edits. | | +| `showOrganizationAsAuthor` | *boolean* | :heavy_minus_sign: | When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. | | +| `webhookUrl` | *string* | :heavy_minus_sign: | For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL (.../webhooks/custom/) minted for the agent. Empty for other trigger types.
| | \ No newline at end of file diff --git a/docs/models/operations/platformskillsgetrequest.md b/docs/models/operations/platformskillsgetrequest.md new file mode 100644 index 00000000..9e4d8cee --- /dev/null +++ b/docs/models/operations/platformskillsgetrequest.md @@ -0,0 +1,17 @@ +# PlatformSkillsGetRequest + +## Example Usage + +```typescript +import { PlatformSkillsGetRequest } from "@gleanwork/api-client/models/operations"; + +let value: PlatformSkillsGetRequest = { + skill_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `skillId` | *string* | :heavy_check_mark: | Glean skill ID. | \ No newline at end of file diff --git a/docs/models/operations/platformskillslistrequest.md b/docs/models/operations/platformskillslistrequest.md new file mode 100644 index 00000000..6a07bb06 --- /dev/null +++ b/docs/models/operations/platformskillslistrequest.md @@ -0,0 +1,16 @@ +# PlatformSkillsListRequest + +## Example Usage + +```typescript +import { PlatformSkillsListRequest } from "@gleanwork/api-client/models/operations"; + +let value: PlatformSkillsListRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `pageSize` | *number* | :heavy_minus_sign: | Maximum number of skills to return. | +| `cursor` | *string* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. | \ No newline at end of file diff --git a/docs/models/operations/postrestapiindexsubmissionsdatasourceinstancetyperequest.md b/docs/models/operations/postrestapiindexsubmissionsdatasourceinstancetyperequest.md new file mode 100644 index 00000000..c9b26c18 --- /dev/null +++ b/docs/models/operations/postrestapiindexsubmissionsdatasourceinstancetyperequest.md @@ -0,0 +1,21 @@ +# PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest + +## Example Usage + +```typescript +import { PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest } from "@gleanwork/api-client/models/operations"; + +let value: PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest = { + datasourceInstance: "", + type: "", + requestBody: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `datasourceInstance` | *string* | :heavy_check_mark: | Datasource instance that should process the submission | +| `type` | *string* | :heavy_check_mark: | Submission type registered for the datasource | +| `requestBody` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/postrestapiindexsubmissionsdatasourceinstancetyperesponse.md b/docs/models/operations/postrestapiindexsubmissionsdatasourceinstancetyperesponse.md new file mode 100644 index 00000000..56a4858d --- /dev/null +++ b/docs/models/operations/postrestapiindexsubmissionsdatasourceinstancetyperesponse.md @@ -0,0 +1,19 @@ +# PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse + +Accepted + +## Example Usage + +```typescript +import { PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse } from "@gleanwork/api-client/models/operations"; + +let value: PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse = { + requestId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `requestId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/indexingdatasources/README.md b/docs/sdks/indexingdatasources/README.md index dfb88bff..516c28d0 100644 --- a/docs/sdks/indexingdatasources/README.md +++ b/docs/sdks/indexingdatasources/README.md @@ -6,6 +6,7 @@ * [add](#add) - Add or update datasource * [retrieveConfig](#retrieveconfig) - Get datasource config +* [submit](#submit) - Submit datasource data ## add @@ -207,4 +208,103 @@ import { | Error Type | Status Code | Content Type | | ----------------- | ----------------- | ----------------- | -| errors.GleanError | 4XX, 5XX | \*/\* | \ No newline at end of file +| errors.GleanError | 4XX, 5XX | \*/\* | + +## submit + +Validates and asynchronously processes a datasource-specific submission. + +### Example Usage + + +```typescript +import { Glean } from "@gleanwork/api-client"; + +const glean = new Glean({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const result = await glean.indexing.datasources.submit({ + "key": "", + "key1": "", + "key2": "", + }, "", ""); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { indexingDatasourcesSubmit } from "@gleanwork/api-client/funcs/indexingDatasourcesSubmit.js"; + +// Use `GleanCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const glean = new GleanCore({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const res = await indexingDatasourcesSubmit(glean, { + "key": "", + "key1": "", + "key2": "", + }, "", ""); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("indexingDatasourcesSubmit failed:", res.error); + } +} + +run(); +``` + +### React hooks and utilities + +This method can be used in React components through the following hooks and +associated utilities. + +> Check out [this guide][hook-guide] for information about each of the utilities +> below and how to get started using React hooks. + +[hook-guide]: ../../../REACT_QUERY.md + +```tsx +import { + // Mutation hook for triggering the API call. + useIndexingDatasourcesSubmitMutation +} from "@gleanwork/api-client/react-query/indexingDatasourcesSubmit.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `datasourceInstance` | *string* | :heavy_check_mark: | Datasource instance that should process the submission | +| `type` | *string* | :heavy_check_mark: | Submission type registered for the datasource | +| `requestBody` | Record | :heavy_check_mark: | N/A | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| `options.serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | + +### Response + +**Promise\<[operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse](../../models/operations/postrestapiindexsubmissionsdatasourceinstancetyperesponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------ | ------------------------ | ------------------------ | +| errors.ErrorInfoResponse | 400, 401, 404 | application/json | +| errors.ErrorInfoResponse | 500 | application/json | +| errors.GleanError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/skills/README.md b/docs/sdks/skills/README.md new file mode 100644 index 00000000..9d12a7e5 --- /dev/null +++ b/docs/sdks/skills/README.md @@ -0,0 +1,209 @@ +# Skills + +## Overview + +### Available Operations + +* [list](#list) - List skills +* [retrieve](#retrieve) - Retrieve skill + +## list + +List skills available to the authenticated user. + + +### Example Usage + + +```typescript +import { Glean } from "@gleanwork/api-client"; + +const glean = new Glean({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const result = await glean.skills.list(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { skillsList } from "@gleanwork/api-client/funcs/skillsList.js"; + +// Use `GleanCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const glean = new GleanCore({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const res = await skillsList(glean); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("skillsList failed:", res.error); + } +} + +run(); +``` + +### React hooks and utilities + +This method can be used in React components through the following hooks and +associated utilities. + +> Check out [this guide][hook-guide] for information about each of the utilities +> below and how to get started using React hooks. + +[hook-guide]: ../../../REACT_QUERY.md + +```tsx +import { + // Query hooks for fetching data. + useSkillsList, + useSkillsListSuspense, + + // Utility for prefetching data during server-side rendering and in React + // Server Components that will be immediately available to client components + // using the hooks. + prefetchSkillsList, + + // Utilities to invalidate the query cache for this query in response to + // mutations and other user actions. + invalidateSkillsList, + invalidateAllSkillsList, +} from "@gleanwork/api-client/react-query/skillsList.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `pageSize` | *number* | :heavy_minus_sign: | Maximum number of skills to return. | +| `cursor` | *string* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.PlatformSkillsListResponse](../../models/components/platformskillslistresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 500, 503 | application/problem+json | +| errors.GleanError | 4XX, 5XX | \*/\* | + +## retrieve + +Retrieve metadata for a skill available to the authenticated user. + + +### Example Usage + + +```typescript +import { Glean } from "@gleanwork/api-client"; + +const glean = new Glean({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const result = await glean.skills.retrieve(""); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { skillsRetrieve } from "@gleanwork/api-client/funcs/skillsRetrieve.js"; + +// Use `GleanCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const glean = new GleanCore({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const res = await skillsRetrieve(glean, ""); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("skillsRetrieve failed:", res.error); + } +} + +run(); +``` + +### React hooks and utilities + +This method can be used in React components through the following hooks and +associated utilities. + +> Check out [this guide][hook-guide] for information about each of the utilities +> below and how to get started using React hooks. + +[hook-guide]: ../../../REACT_QUERY.md + +```tsx +import { + // Query hooks for fetching data. + useSkillsRetrieve, + useSkillsRetrieveSuspense, + + // Utility for prefetching data during server-side rendering and in React + // Server Components that will be immediately available to client components + // using the hooks. + prefetchSkillsRetrieve, + + // Utilities to invalidate the query cache for this query in response to + // mutations and other user actions. + invalidateSkillsRetrieve, + invalidateAllSkillsRetrieve, +} from "@gleanwork/api-client/react-query/skillsRetrieve.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `skillId` | *string* | :heavy_check_mark: | Glean skill ID. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.PlatformSkillGetResponse](../../models/components/platformskillgetresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 500, 503 | application/problem+json | +| errors.GleanError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/examples/package-lock.json b/examples/package-lock.json index 97c22fca..17896732 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -18,7 +18,7 @@ }, "..": { "name": "@gleanwork/api-client", - "version": "0.17.3", + "version": "0.18.0", "dependencies": { "zod": "^3.25.0 || ^4.0.0" }, diff --git a/jsr.json b/jsr.json index 46c99d73..8b5402c9 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@gleanwork/api-client", - "version": "0.17.3", + "version": "0.18.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 5b7347e0..016a169a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gleanwork/api-client", - "version": "0.17.3", + "version": "0.18.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@gleanwork/api-client", - "version": "0.17.3", + "version": "0.18.0", "dependencies": { "zod": "^3.25.0 || ^4.0.0" }, diff --git a/package.json b/package.json index 9b387e1c..6f0ccb83 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gleanwork/api-client", - "version": "0.17.3", + "version": "0.18.0", "author": "Speakeasy", "tshy": { "sourceDialects": [ diff --git a/src/__tests__/indexingdatasources.test.ts b/src/__tests__/indexingdatasources.test.ts new file mode 100644 index 00000000..8ff948ea --- /dev/null +++ b/src/__tests__/indexingdatasources.test.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c775ecfeae09 + */ + +import { expect, test } from "vitest"; +import { Glean } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Indexing Datasources Post /Rest/api/index/submissions/{datasource Instance}/{type}", async () => { + const testHttpClient = createTestHTTPClient( + "post_/rest/api/index/submissions/{datasourceInstance}/{type}", + ); + + const glean = new Glean({ + httpClient: testHttpClient, + apiToken: process.env["GLEAN_API_TOKEN"] ?? "value", + }); + + const result = await glean.indexing.datasources.submit( + { + "key": "", + "key1": "", + "key2": "", + }, + "", + "", + { + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + }, + ); + expect(result).toBeDefined(); +}); diff --git a/src/__tests__/messages.test.ts b/src/__tests__/messages.test.ts index a4785e31..12904134 100644 --- a/src/__tests__/messages.test.ts +++ b/src/__tests__/messages.test.ts @@ -20,7 +20,7 @@ test("Messages Messages", async () => { idType: "CONVERSATION_ID", id: "", timestampMillis: 558834, - datasource: "SLACK", + datasource: "MICROSOFTTEAMS", }); expect(result).toBeDefined(); }); diff --git a/src/__tests__/mockserver/internal/handler/generated_handlers.go b/src/__tests__/mockserver/internal/handler/generated_handlers.go index e2e2fdc5..e1deb1c3 100644 --- a/src/__tests__/mockserver/internal/handler/generated_handlers.go +++ b/src/__tests__/mockserver/internal/handler/generated_handlers.go @@ -17,6 +17,8 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodDelete, "/rest/api/index/document/{docId}/custom-metadata/{groupName}", pathDeleteRestAPIIndexDocumentDocIDCustomMetadataGroupName(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/agents/{agent_id}", pathGetAPIAgentsAgentID(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/agents/{agent_id}/schemas", pathGetAPIAgentsAgentIDSchemas(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/api/skills", pathGetAPISkills(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/api/skills/{skill_id}", pathGetAPISkillsSkillID(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/index/custom-metadata/schema/{groupName}", pathGetRestAPIIndexCustomMetadataSchemaGroupName(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/actions/actionpack/{actionPackId}/auth", pathGetRestAPIV1ActionsActionpackActionPackIDAuth(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/agents/{agent_id}", pathGetRestAPIV1AgentsAgentID(dir, rt)), @@ -59,6 +61,7 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/rotatetoken", pathPostAPIIndexV1Rotatetoken(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/index/v1/updatepermissions", pathPostAPIIndexV1Updatepermissions(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/search", pathPostAPISearch(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/index/submissions/{datasourceInstance}/{type}", pathPostRestAPIIndexSubmissionsDatasourceInstanceType(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/actions/actionpack/{actionPackId}/auth", pathPostRestAPIV1ActionsActionpackActionPackIDAuth(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/activity", pathPostRestAPIV1Activity(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/addcollectionitems", pathPostRestAPIV1Addcollectionitems(dir, rt)), diff --git a/src/__tests__/mockserver/internal/handler/pathgetapiskills.go b/src/__tests__/mockserver/internal/handler/pathgetapiskills.go new file mode 100644 index 00000000..77c87bf1 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetapiskills.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 7a35981bf5e0 + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetAPISkills(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "platform-skills-list[0]": + dir.HandlerFunc("platform-skills-list", testPlatformSkillsListPlatformSkillsList0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformSkillsListPlatformSkillsList0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + var respBody *components.PlatformSkillsListResponse = &components.PlatformSkillsListResponse{ + Skills: []components.PlatformSkill{}, + HasMore: true, + NextCursor: types.String(""), + RequestID: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetapiskillsskillid.go b/src/__tests__/mockserver/internal/handler/pathgetapiskillsskillid.go new file mode 100644 index 00000000..84afc7c5 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetapiskillsskillid.go @@ -0,0 +1,80 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 1eef14b2fbcb + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetAPISkillsSkillID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "platform-skills-get[0]": + dir.HandlerFunc("platform-skills-get", testPlatformSkillsGetPlatformSkillsGet0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformSkillsGetPlatformSkillsGet0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + var respBody *components.PlatformSkillGetResponse = &components.PlatformSkillGetResponse{ + Skill: components.PlatformSkill{ + ID: "", + DisplayName: "Chad_Herzog", + Description: "whenever up aha controvert", + LatestVersion: 151495, + LatestMinorVersion: 170771, + Status: components.PlatformSkillStatusDisabled, + Origin: components.PlatformSkillOriginCustom, + Owner: components.PlatformPersonReference{ + Name: "", + }, + CreatedAt: types.MustTimeFromString("2024-12-25T16:41:00.099Z"), + UpdatedAt: types.MustTimeFromString("2026-12-07T21:59:59.375Z"), + }, + RequestID: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostrestapiindexsubmissionsdatasourceinstancetype.go b/src/__tests__/mockserver/internal/handler/pathpostrestapiindexsubmissionsdatasourceinstancetype.go new file mode 100644 index 00000000..00ed72f1 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostrestapiindexsubmissionsdatasourceinstancetype.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 410f5ff99a6d + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/operations" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostRestAPIIndexSubmissionsDatasourceInstanceType(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 "post_/rest/api/index/submissions/{datasourceInstance}/{type}[0]": + dir.HandlerFunc("post_/rest/api/index/submissions/{datasourceInstance}/{type}", testPostRestAPIIndexSubmissionsDatasourceInstanceTypePostRestAPIIndexSubmissionsDatasourceInstanceType0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPostRestAPIIndexSubmissionsDatasourceInstanceTypePostRestAPIIndexSubmissionsDatasourceInstanceType0(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 *operations.PostRestAPIIndexSubmissionsDatasourceInstanceTypeResponseBody = &operations.PostRestAPIIndexSubmissionsDatasourceInstanceTypeResponseBody{ + RequestID: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusAccepted) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/dlpfindingfilter.go b/src/__tests__/mockserver/internal/sdk/models/components/dlpfindingfilter.go index e7bea35f..6f02c3c0 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/dlpfindingfilter.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/dlpfindingfilter.go @@ -10,7 +10,7 @@ type DlpFindingFilter struct { Datasource *string `json:"datasource,omitempty"` Visibility *string `json:"visibility,omitempty"` DocumentIds []string `json:"documentIds,omitempty"` - // Severity levels for DLP findings and analyses. + // Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses that concluded every flagged entity is a detector false positive. Severity *DlpSeverity `json:"severity,omitempty"` DocumentSeverity []DlpSeverity `json:"documentSeverity,omitempty"` Statuses []DlpIssueStatus `json:"statuses,omitempty"` diff --git a/src/__tests__/mockserver/internal/sdk/models/components/dlpseverity.go b/src/__tests__/mockserver/internal/sdk/models/components/dlpseverity.go index 9cd4a398..cdd0fcba 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/dlpseverity.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/dlpseverity.go @@ -8,14 +8,15 @@ import ( "fmt" ) -// DlpSeverity - Severity levels for DLP findings and analyses. +// DlpSeverity - Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses that concluded every flagged entity is a detector false positive. type DlpSeverity string const ( - DlpSeverityUnspecified DlpSeverity = "UNSPECIFIED" - DlpSeverityLow DlpSeverity = "LOW" - DlpSeverityMedium DlpSeverity = "MEDIUM" - DlpSeverityHigh DlpSeverity = "HIGH" + DlpSeverityUnspecified DlpSeverity = "UNSPECIFIED" + DlpSeverityLow DlpSeverity = "LOW" + DlpSeverityMedium DlpSeverity = "MEDIUM" + DlpSeverityHigh DlpSeverity = "HIGH" + DlpSeverityFalsePositive DlpSeverity = "FALSE_POSITIVE" ) func (e DlpSeverity) ToPointer() *DlpSeverity { @@ -34,6 +35,8 @@ func (e *DlpSeverity) UnmarshalJSON(data []byte) error { case "MEDIUM": fallthrough case "HIGH": + fallthrough + case "FALSE_POSITIVE": *e = DlpSeverity(v) return nil default: diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskill.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskill.go new file mode 100644 index 00000000..b7d510d4 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskill.go @@ -0,0 +1,121 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 9348b7a0ba5c + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type PlatformSkill struct { + // Glean skill ID. + ID string `json:"id"` + // Human-readable skill name. + DisplayName string `json:"display_name"` + // Human-readable skill description. + Description string `json:"description"` + // Latest major version number for the skill. + LatestVersion int64 `json:"latest_version"` + // Latest minor version number for the skill. + LatestMinorVersion int64 `json:"latest_minor_version"` + // Current skill status. + Status PlatformSkillStatus `json:"status"` + // Source category for the skill. + Origin PlatformSkillOrigin `json:"origin"` + SourceProvenance *PlatformSkillSourceProvenance `json:"source_provenance,omitempty"` + // A lightweight reference to a person, used where a payload merely points at someone. + Owner PlatformPersonReference `json:"owner"` + // Time the skill was created. + CreatedAt time.Time `json:"created_at"` + // Time the skill was last updated. + UpdatedAt time.Time `json:"updated_at"` +} + +func (p PlatformSkill) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformSkill) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"id", "display_name", "description", "latest_version", "latest_minor_version", "status", "origin", "owner", "created_at", "updated_at"}); err != nil { + return err + } + return nil +} + +func (o *PlatformSkill) GetID() string { + if o == nil { + return "" + } + return o.ID +} + +func (o *PlatformSkill) GetDisplayName() string { + if o == nil { + return "" + } + return o.DisplayName +} + +func (o *PlatformSkill) GetDescription() string { + if o == nil { + return "" + } + return o.Description +} + +func (o *PlatformSkill) GetLatestVersion() int64 { + if o == nil { + return 0 + } + return o.LatestVersion +} + +func (o *PlatformSkill) GetLatestMinorVersion() int64 { + if o == nil { + return 0 + } + return o.LatestMinorVersion +} + +func (o *PlatformSkill) GetStatus() PlatformSkillStatus { + if o == nil { + return PlatformSkillStatus("") + } + return o.Status +} + +func (o *PlatformSkill) GetOrigin() PlatformSkillOrigin { + if o == nil { + return PlatformSkillOrigin("") + } + return o.Origin +} + +func (o *PlatformSkill) GetSourceProvenance() *PlatformSkillSourceProvenance { + if o == nil { + return nil + } + return o.SourceProvenance +} + +func (o *PlatformSkill) GetOwner() PlatformPersonReference { + if o == nil { + return PlatformPersonReference{} + } + return o.Owner +} + +func (o *PlatformSkill) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *PlatformSkill) GetUpdatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.UpdatedAt +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillgetresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillgetresponse.go new file mode 100644 index 00000000..e470cbc2 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillgetresponse.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: ce9faaafa240 + +package components + +type PlatformSkillGetResponse struct { + Skill PlatformSkill `json:"skill"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformSkillGetResponse) GetSkill() PlatformSkill { + if o == nil { + return PlatformSkill{} + } + return o.Skill +} + +func (o *PlatformSkillGetResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillorigin.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillorigin.go new file mode 100644 index 00000000..91d4d1af --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillorigin.go @@ -0,0 +1,33 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 028d9e74ac5d + +package components + +import ( + "encoding/json" + "fmt" +) + +// PlatformSkillOrigin - Source category for the skill. +type PlatformSkillOrigin string + +const ( + PlatformSkillOriginCustom PlatformSkillOrigin = "CUSTOM" +) + +func (e PlatformSkillOrigin) ToPointer() *PlatformSkillOrigin { + return &e +} +func (e *PlatformSkillOrigin) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "CUSTOM": + *e = PlatformSkillOrigin(v) + return nil + default: + return fmt.Errorf("invalid value for PlatformSkillOrigin: %v", v) + } +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillslistresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillslistresponse.go new file mode 100644 index 00000000..7bf1e0b4 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillslistresponse.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: ea644abdd909 + +package components + +type PlatformSkillsListResponse struct { + // Skills available to the user. + Skills []PlatformSkill `json:"skills"` + // Whether additional results are available. + HasMore bool `json:"has_more"` + // Cursor for the next page, or null when no more results are available. + NextCursor *string `json:"next_cursor"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformSkillsListResponse) GetSkills() []PlatformSkill { + if o == nil { + return []PlatformSkill{} + } + return o.Skills +} + +func (o *PlatformSkillsListResponse) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *PlatformSkillsListResponse) GetNextCursor() *string { + if o == nil { + return nil + } + return o.NextCursor +} + +func (o *PlatformSkillsListResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillsourceprovenance.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillsourceprovenance.go new file mode 100644 index 00000000..64b5f70f --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillsourceprovenance.go @@ -0,0 +1,77 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 312434003494 + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type PlatformSkillSourceProvenance struct { + // URL of the external source the skill was imported from. + SourceURL *string `json:"source_url,omitempty"` + // Source commit SHA for the imported skill. + CommitSha *string `json:"commit_sha,omitempty"` + // Time the skill was imported. + ImportedAt *time.Time `json:"imported_at,omitempty"` + // Time the skill was last synced from its source. + LastSyncedAt *time.Time `json:"last_synced_at,omitempty"` + // Current external-source sync status. + SyncStatus *PlatformSkillSyncStatus `json:"sync_status,omitempty"` + // Human-readable sync failure reason, present only when sync_status is SYNC_FAILED. + SyncError *string `json:"sync_error,omitempty"` +} + +func (p PlatformSkillSourceProvenance) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformSkillSourceProvenance) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, nil); err != nil { + return err + } + return nil +} + +func (o *PlatformSkillSourceProvenance) GetSourceURL() *string { + if o == nil { + return nil + } + return o.SourceURL +} + +func (o *PlatformSkillSourceProvenance) GetCommitSha() *string { + if o == nil { + return nil + } + return o.CommitSha +} + +func (o *PlatformSkillSourceProvenance) GetImportedAt() *time.Time { + if o == nil { + return nil + } + return o.ImportedAt +} + +func (o *PlatformSkillSourceProvenance) GetLastSyncedAt() *time.Time { + if o == nil { + return nil + } + return o.LastSyncedAt +} + +func (o *PlatformSkillSourceProvenance) GetSyncStatus() *PlatformSkillSyncStatus { + if o == nil { + return nil + } + return o.SyncStatus +} + +func (o *PlatformSkillSourceProvenance) GetSyncError() *string { + if o == nil { + return nil + } + return o.SyncError +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillstatus.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillstatus.go new file mode 100644 index 00000000..8176be88 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillstatus.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 180ceed8be9b + +package components + +import ( + "encoding/json" + "fmt" +) + +// PlatformSkillStatus - Current skill status. +type PlatformSkillStatus string + +const ( + PlatformSkillStatusDraft PlatformSkillStatus = "DRAFT" + PlatformSkillStatusEnabled PlatformSkillStatus = "ENABLED" + PlatformSkillStatusDisabled PlatformSkillStatus = "DISABLED" +) + +func (e PlatformSkillStatus) ToPointer() *PlatformSkillStatus { + return &e +} +func (e *PlatformSkillStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "DRAFT": + fallthrough + case "ENABLED": + fallthrough + case "DISABLED": + *e = PlatformSkillStatus(v) + return nil + default: + return fmt.Errorf("invalid value for PlatformSkillStatus: %v", v) + } +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillsyncstatus.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillsyncstatus.go new file mode 100644 index 00000000..1d30df91 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillsyncstatus.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: bc07f04da2f3 + +package components + +import ( + "encoding/json" + "fmt" +) + +// PlatformSkillSyncStatus - Current external-source sync status. +type PlatformSkillSyncStatus string + +const ( + PlatformSkillSyncStatusUpToDate PlatformSkillSyncStatus = "UP_TO_DATE" + PlatformSkillSyncStatusUpdateAvailable PlatformSkillSyncStatus = "UPDATE_AVAILABLE" + PlatformSkillSyncStatusSyncFailed PlatformSkillSyncStatus = "SYNC_FAILED" +) + +func (e PlatformSkillSyncStatus) ToPointer() *PlatformSkillSyncStatus { + return &e +} +func (e *PlatformSkillSyncStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "UP_TO_DATE": + fallthrough + case "UPDATE_AVAILABLE": + fallthrough + case "SYNC_FAILED": + *e = PlatformSkillSyncStatus(v) + return nil + default: + return fmt.Errorf("invalid value for PlatformSkillSyncStatus: %v", v) + } +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/toolmetadata.go b/src/__tests__/mockserver/internal/sdk/models/components/toolmetadata.go index 440a10f0..18410420 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/toolmetadata.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/toolmetadata.go @@ -97,6 +97,46 @@ func (e *WriteActionType) UnmarshalJSON(data []byte) error { } } +// ActionTypeSource - Analytics-only signal (product snapshot) describing WHERE the action's +// read/write determination came from. Complementary to the effective +// read/write value (the tool's ToolType, which drives HITL): the value says +// read-or-write, this says how confident that is. MCP_ANNOTATION = from the +// tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; +// NONE = no usable hint (the effective value then defaults to write); +// NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). +// Does not affect runtime behavior. +type ActionTypeSource string + +const ( + ActionTypeSourceMcpAnnotation ActionTypeSource = "MCP_ANNOTATION" + ActionTypeSourceAdminOverride ActionTypeSource = "ADMIN_OVERRIDE" + ActionTypeSourceNone ActionTypeSource = "NONE" + ActionTypeSourceNativeToolDefinition ActionTypeSource = "NATIVE_TOOL_DEFINITION" +) + +func (e ActionTypeSource) ToPointer() *ActionTypeSource { + return &e +} +func (e *ActionTypeSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "MCP_ANNOTATION": + fallthrough + case "ADMIN_OVERRIDE": + fallthrough + case "NONE": + fallthrough + case "NATIVE_TOOL_DEFINITION": + *e = ActionTypeSource(v) + return nil + default: + return fmt.Errorf("invalid value for ActionTypeSource: %v", v) + } +} + // AuthType - The type of authentication being used. // Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token. // 'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users. @@ -166,6 +206,16 @@ type ToolMetadata struct { LastUpdatedAt *time.Time `json:"lastUpdatedAt,omitempty"` // Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action. WriteActionType *WriteActionType `json:"writeActionType,omitempty"` + // Analytics-only signal (product snapshot) describing WHERE the action's + // read/write determination came from. Complementary to the effective + // read/write value (the tool's ToolType, which drives HITL): the value says + // read-or-write, this says how confident that is. MCP_ANNOTATION = from the + // tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + // NONE = no usable hint (the effective value then defaults to write); + // NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + // Does not affect runtime behavior. + // + ActionTypeSource *ActionTypeSource `json:"actionTypeSource,omitempty"` // The type of authentication being used. // Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token. // 'OAUTH_ADMIN' utilizes an admin token for external API calls on behalf all users. @@ -284,6 +334,13 @@ func (o *ToolMetadata) GetWriteActionType() *WriteActionType { return o.WriteActionType } +func (o *ToolMetadata) GetActionTypeSource() *ActionTypeSource { + if o == nil { + return nil + } + return o.ActionTypeSource +} + func (o *ToolMetadata) GetAuthType() *AuthType { if o == nil { return nil diff --git a/src/__tests__/mockserver/internal/sdk/models/components/workflow.go b/src/__tests__/mockserver/internal/sdk/models/components/workflow.go index 0e2f4ff7..bc7b85cc 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/workflow.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/workflow.go @@ -24,6 +24,9 @@ type Workflow struct { Verified *bool `json:"verified,omitempty"` // When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. ShowOrganizationAsAuthor *bool `json:"showOrganizationAsAuthor,omitempty"` + // For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL (.../webhooks/custom/) minted for the agent. Empty for other trigger types. + // + WebhookURL *string `json:"webhookUrl,omitempty"` } func (o *Workflow) GetName() *string { @@ -109,3 +112,10 @@ func (o *Workflow) GetShowOrganizationAsAuthor() *bool { } return o.ShowOrganizationAsAuthor } + +func (o *Workflow) GetWebhookURL() *string { + if o == nil { + return nil + } + return o.WebhookURL +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsget.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsget.go new file mode 100644 index 00000000..6fc2f6f0 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsget.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 7cf3c9da1e9e + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformSkillsGetRequest struct { + // Glean skill ID. + SkillID string `pathParam:"style=simple,explode=false,name=skill_id"` +} + +func (o *PlatformSkillsGetRequest) GetSkillID() string { + if o == nil { + return "" + } + return o.SkillID +} + +type PlatformSkillsGetResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformSkillGetResponse *components.PlatformSkillGetResponse +} + +func (o *PlatformSkillsGetResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformSkillsGetResponse) GetPlatformSkillGetResponse() *components.PlatformSkillGetResponse { + if o == nil { + return nil + } + return o.PlatformSkillGetResponse +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformskillslist.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillslist.go new file mode 100644 index 00000000..4e0bdef1 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillslist.go @@ -0,0 +1,49 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 8531b738e2ad + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformSkillsListRequest struct { + // Maximum number of skills to return. + PageSize *int64 `queryParam:"style=form,explode=true,name=page_size"` + // Opaque pagination cursor from a previous response. + Cursor *string `queryParam:"style=form,explode=true,name=cursor"` +} + +func (o *PlatformSkillsListRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *PlatformSkillsListRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +type PlatformSkillsListResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformSkillsListResponse *components.PlatformSkillsListResponse +} + +func (o *PlatformSkillsListResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformSkillsListResponse) GetPlatformSkillsListResponse() *components.PlatformSkillsListResponse { + if o == nil { + return nil + } + return o.PlatformSkillsListResponse +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/postrestapiindexsubmissionsdatasourceinstancetype.go b/src/__tests__/mockserver/internal/sdk/models/operations/postrestapiindexsubmissionsdatasourceinstancetype.go new file mode 100644 index 00000000..6cee45a3 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/postrestapiindexsubmissionsdatasourceinstancetype.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 717d961cad3d + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PostRestAPIIndexSubmissionsDatasourceInstanceTypeRequest struct { + // Datasource instance that should process the submission + DatasourceInstance string `pathParam:"style=simple,explode=false,name=datasourceInstance"` + // Submission type registered for the datasource + Type string `pathParam:"style=simple,explode=false,name=type"` + Body map[string]any `request:"mediaType=application/json"` +} + +func (o *PostRestAPIIndexSubmissionsDatasourceInstanceTypeRequest) GetDatasourceInstance() string { + if o == nil { + return "" + } + return o.DatasourceInstance +} + +func (o *PostRestAPIIndexSubmissionsDatasourceInstanceTypeRequest) GetType() string { + if o == nil { + return "" + } + return o.Type +} + +func (o *PostRestAPIIndexSubmissionsDatasourceInstanceTypeRequest) GetBody() map[string]any { + if o == nil { + return map[string]any{} + } + return o.Body +} + +// PostRestAPIIndexSubmissionsDatasourceInstanceTypeResponseBody - Accepted +type PostRestAPIIndexSubmissionsDatasourceInstanceTypeResponseBody struct { + RequestID string `json:"requestId"` +} + +func (o *PostRestAPIIndexSubmissionsDatasourceInstanceTypeResponseBody) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} + +type PostRestAPIIndexSubmissionsDatasourceInstanceTypeResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Accepted + Object *PostRestAPIIndexSubmissionsDatasourceInstanceTypeResponseBody +} + +func (o *PostRestAPIIndexSubmissionsDatasourceInstanceTypeResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PostRestAPIIndexSubmissionsDatasourceInstanceTypeResponse) GetObject() *PostRestAPIIndexSubmissionsDatasourceInstanceTypeResponseBody { + if o == nil { + return nil + } + return o.Object +} diff --git a/src/__tests__/skills.test.ts b/src/__tests__/skills.test.ts new file mode 100644 index 00000000..9ee0b856 --- /dev/null +++ b/src/__tests__/skills.test.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3fa6e540c659 + */ + +import { expect, test } from "vitest"; +import { Glean } from "../index.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Skills Platform Skills List", async () => { + const testHttpClient = createTestHTTPClient("platform-skills-list"); + + const glean = new Glean({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: testHttpClient, + apiToken: process.env["GLEAN_API_TOKEN"] ?? "value", + }); + + const result = await glean.skills.list(); + expect(result).toBeDefined(); +}); + +test("Skills Platform Skills Get", async () => { + const testHttpClient = createTestHTTPClient("platform-skills-get"); + + const glean = new Glean({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: testHttpClient, + apiToken: process.env["GLEAN_API_TOKEN"] ?? "value", + }); + + const result = await glean.skills.retrieve(""); + expect(result).toBeDefined(); +}); diff --git a/src/__tests__/summarize.test.ts b/src/__tests__/summarize.test.ts index bb5e2b02..a1e80406 100644 --- a/src/__tests__/summarize.test.ts +++ b/src/__tests__/summarize.test.ts @@ -19,7 +19,8 @@ test("Summarize Summarize", async () => { const result = await glean.client.documents.summarize({ documentSpecs: [ { - url: "https://dim-glider.com/", + ugcType: "ARTIFACTS", + ugcId: "", }, { id: "", diff --git a/src/funcs/indexingDatasourcesSubmit.ts b/src/funcs/indexingDatasourcesSubmit.ts new file mode 100644 index 00000000..f7918721 --- /dev/null +++ b/src/funcs/indexingDatasourcesSubmit.ts @@ -0,0 +1,215 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fdcdfc496303 + */ + +import { GleanCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { PostRestApiIndexSubmissionsDatasourceInstanceTypeServerList } from "../models/operations/postrestapiindexsubmissionsdatasourceinstancetype.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Submit datasource data + * + * @remarks + * Validates and asynchronously processes a datasource-specific submission. + */ +export function indexingDatasourcesSubmit( + client: GleanCore, + requestBody: { [k: string]: any }, + datasourceInstance: string, + type: string, + options?: RequestOptions, +): APIPromise< + Result< + operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse, + | errors.ErrorInfoResponse + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + requestBody, + datasourceInstance, + type, + options, + )); +} + +async function $do( + client: GleanCore, + requestBody: { [k: string]: any }, + datasourceInstance: string, + type: string, + options?: RequestOptions, +): Promise< + [ + Result< + operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse, + | errors.ErrorInfoResponse + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const input: + operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest = { + requestBody: requestBody, + datasourceInstance: datasourceInstance, + type: type, + }; + + const parsed = safeParse( + input, + (value) => + operations + .PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const baseURL = options?.serverURL + || pathToFunc( + PostRestApiIndexSubmissionsDatasourceInstanceTypeServerList[0], + { charEncoding: "percent" }, + )({ + instance: "instance-name", + }); + + const pathParams = { + datasourceInstance: encodeSimple( + "datasourceInstance", + payload.datasourceInstance, + { explode: false, charEncoding: "percent" }, + ), + type: encodeSimple("type", payload.type, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc( + "/rest/api/index/submissions/{datasourceInstance}/{type}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiToken); + const securityInput = secConfig == null ? {} : { apiToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: baseURL ?? "", + operationID: "post_/rest/api/index/submissions/{datasourceInstance}/{type}", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: baseURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse, + | errors.ErrorInfoResponse + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json( + 202, + operations + .PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse$inboundSchema, + ), + M.jsonErr([400, 401, 404], errors.ErrorInfoResponse$inboundSchema), + M.jsonErr(500, errors.ErrorInfoResponse$inboundSchema), + M.fail([405, 413, "4XX"]), + M.fail([503, "5XX"]), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/skillsList.ts b/src/funcs/skillsList.ts new file mode 100644 index 00000000..099d6983 --- /dev/null +++ b/src/funcs/skillsList.ts @@ -0,0 +1,193 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a643d8a0c73b + */ + +import { GleanCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List skills + * + * @remarks + * List skills available to the authenticated user. + */ +export function skillsList( + client: GleanCore, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, +): APIPromise< + Result< + components.PlatformSkillsListResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + pageSize, + cursor, + options, + )); +} + +async function $do( + client: GleanCore, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + components.PlatformSkillsListResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const input: operations.PlatformSkillsListRequest = { + page_size: pageSize, + cursor: cursor, + }; + + const parsed = safeParse( + input, + (value) => operations.PlatformSkillsListRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/api/skills")(); + + const query = encodeFormQuery({ + "cursor": payload.cursor, + "page_size": payload.page_size, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiToken); + const securityInput = secConfig == null ? {} : { apiToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "platform-skills-list", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.PlatformSkillsListResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PlatformSkillsListResponse$inboundSchema), + M.jsonErr( + [400, 401, 403, 404, 408, 429], + errors.PlatformProblemDetailError$inboundSchema, + { ctype: "application/problem+json" }, + ), + M.jsonErr([500, 503], errors.PlatformProblemDetailError$inboundSchema, { + ctype: "application/problem+json", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/skillsRetrieve.ts b/src/funcs/skillsRetrieve.ts new file mode 100644 index 00000000..f942a289 --- /dev/null +++ b/src/funcs/skillsRetrieve.ts @@ -0,0 +1,189 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 7bff1ef0523e + */ + +import { GleanCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Retrieve skill + * + * @remarks + * Retrieve metadata for a skill available to the authenticated user. + */ +export function skillsRetrieve( + client: GleanCore, + skillId: string, + options?: RequestOptions, +): APIPromise< + Result< + components.PlatformSkillGetResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + skillId, + options, + )); +} + +async function $do( + client: GleanCore, + skillId: string, + options?: RequestOptions, +): Promise< + [ + Result< + components.PlatformSkillGetResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const input: operations.PlatformSkillsGetRequest = { + skill_id: skillId, + }; + + const parsed = safeParse( + input, + (value) => operations.PlatformSkillsGetRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + skill_id: encodeSimple("skill_id", payload.skill_id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/api/skills/{skill_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiToken); + const securityInput = secConfig == null ? {} : { apiToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "platform-skills-get", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.PlatformSkillGetResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PlatformSkillGetResponse$inboundSchema), + M.jsonErr( + [400, 401, 403, 404, 408, 429], + errors.PlatformProblemDetailError$inboundSchema, + { ctype: "application/problem+json" }, + ), + M.jsonErr([500, 503], errors.PlatformProblemDetailError$inboundSchema, { + ctype: "application/problem+json", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/lib/config.ts b/src/lib/config.ts index 458dd7f8..c07efa35 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.9.0", - sdkVersion: "0.17.3", - genVersion: "2.916.4", + sdkVersion: "0.18.0", + genVersion: "2.918.3", userAgent: - "speakeasy-sdk/typescript 0.17.3 2.916.4 0.9.0 @gleanwork/api-client", + "speakeasy-sdk/typescript 0.18.0 2.918.3 0.9.0 @gleanwork/api-client", } as const; diff --git a/src/models/components/dlpfindingfilter.ts b/src/models/components/dlpfindingfilter.ts index 771a1aa0..3be1768c 100644 --- a/src/models/components/dlpfindingfilter.ts +++ b/src/models/components/dlpfindingfilter.ts @@ -32,7 +32,7 @@ export type DlpFindingFilter = { visibility?: string | undefined; documentIds?: Array | undefined; /** - * Severity levels for DLP findings and analyses. + * Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses that concluded every flagged entity is a detector false positive. */ severity?: DlpSeverity | undefined; documentSeverity?: Array | undefined; diff --git a/src/models/components/dlpseverity.ts b/src/models/components/dlpseverity.ts index ddb616bb..7b0cc5aa 100644 --- a/src/models/components/dlpseverity.ts +++ b/src/models/components/dlpseverity.ts @@ -8,16 +8,17 @@ import * as openEnums from "../../types/enums.js"; import { OpenEnum } from "../../types/enums.js"; /** - * Severity levels for DLP findings and analyses. + * Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses that concluded every flagged entity is a detector false positive. */ export const DlpSeverity = { Unspecified: "UNSPECIFIED", Low: "LOW", Medium: "MEDIUM", High: "HIGH", + FalsePositive: "FALSE_POSITIVE", } as const; /** - * Severity levels for DLP findings and analyses. + * Severity levels for DLP findings and analyses. FALSE_POSITIVE ranks below LOW and marks analyses that concluded every flagged entity is a detector false positive. */ export type DlpSeverity = OpenEnum; diff --git a/src/models/components/index.ts b/src/models/components/index.ts index 7e39bf7d..a62c5237 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -367,6 +367,13 @@ export * from "./platformproblemdetailerror.js"; export * from "./platformresult.js"; export * from "./platformsearchrequest.js"; export * from "./platformsearchresponse.js"; +export * from "./platformskill.js"; +export * from "./platformskillgetresponse.js"; +export * from "./platformskillorigin.js"; +export * from "./platformskillslistresponse.js"; +export * from "./platformskillsourceprovenance.js"; +export * from "./platformskillstatus.js"; +export * from "./platformskillsyncstatus.js"; export * from "./platformtimerange.js"; export * from "./possiblevalue.js"; export * from "./processalldocumentsrequest.js"; diff --git a/src/models/components/platformskill.ts b/src/models/components/platformskill.ts new file mode 100644 index 00000000..4d1a1f40 --- /dev/null +++ b/src/models/components/platformskill.ts @@ -0,0 +1,98 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d34696ea810b + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformPersonReference, + PlatformPersonReference$inboundSchema, +} from "./platformpersonreference.js"; +import { + PlatformSkillOrigin, + PlatformSkillOrigin$inboundSchema, +} from "./platformskillorigin.js"; +import { + PlatformSkillSourceProvenance, + PlatformSkillSourceProvenance$inboundSchema, +} from "./platformskillsourceprovenance.js"; +import { + PlatformSkillStatus, + PlatformSkillStatus$inboundSchema, +} from "./platformskillstatus.js"; + +export type PlatformSkill = { + /** + * Glean skill ID. + */ + id: string; + /** + * Human-readable skill name. + */ + display_name: string; + /** + * Human-readable skill description. + */ + description: string; + /** + * Latest major version number for the skill. + */ + latest_version: number; + /** + * Latest minor version number for the skill. + */ + latest_minor_version: number; + /** + * Current skill status. + */ + status: PlatformSkillStatus; + /** + * Source category for the skill. + */ + origin: PlatformSkillOrigin; + source_provenance?: PlatformSkillSourceProvenance | undefined; + /** + * A lightweight reference to a person, used where a payload merely points at someone. + */ + owner: PlatformPersonReference; + /** + * Time the skill was created. + */ + created_at: Date; + /** + * Time the skill was last updated. + */ + updated_at: Date; +}; + +/** @internal */ +export const PlatformSkill$inboundSchema: z.ZodType< + PlatformSkill, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + display_name: z.string(), + description: z.string(), + latest_version: z.number().int(), + latest_minor_version: z.number().int(), + status: PlatformSkillStatus$inboundSchema, + origin: PlatformSkillOrigin$inboundSchema, + source_provenance: PlatformSkillSourceProvenance$inboundSchema.optional(), + owner: PlatformPersonReference$inboundSchema, + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), +}); + +export function platformSkillFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSkill$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSkill' from JSON`, + ); +} diff --git a/src/models/components/platformskillgetresponse.ts b/src/models/components/platformskillgetresponse.ts new file mode 100644 index 00000000..26177c0f --- /dev/null +++ b/src/models/components/platformskillgetresponse.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: b9dd0e54b6c6 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { PlatformSkill, PlatformSkill$inboundSchema } from "./platformskill.js"; + +export type PlatformSkillGetResponse = { + skill: PlatformSkill; + /** + * Platform-generated request ID for support correlation. + */ + request_id: string; +}; + +/** @internal */ +export const PlatformSkillGetResponse$inboundSchema: z.ZodType< + PlatformSkillGetResponse, + z.ZodTypeDef, + unknown +> = z.object({ + skill: PlatformSkill$inboundSchema, + request_id: z.string(), +}); + +export function platformSkillGetResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSkillGetResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSkillGetResponse' from JSON`, + ); +} diff --git a/src/models/components/platformskillorigin.ts b/src/models/components/platformskillorigin.ts new file mode 100644 index 00000000..a2cd7a5f --- /dev/null +++ b/src/models/components/platformskillorigin.ts @@ -0,0 +1,23 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5f9163750617 + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Source category for the skill. + */ +export const PlatformSkillOrigin = { + Custom: "CUSTOM", +} as const; +/** + * Source category for the skill. + */ +export type PlatformSkillOrigin = ClosedEnum; + +/** @internal */ +export const PlatformSkillOrigin$inboundSchema: z.ZodNativeEnum< + typeof PlatformSkillOrigin +> = z.nativeEnum(PlatformSkillOrigin); diff --git a/src/models/components/platformskillslistresponse.ts b/src/models/components/platformskillslistresponse.ts new file mode 100644 index 00000000..584e1849 --- /dev/null +++ b/src/models/components/platformskillslistresponse.ts @@ -0,0 +1,51 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 0b4832ec4dc7 + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { PlatformSkill, PlatformSkill$inboundSchema } from "./platformskill.js"; + +export type PlatformSkillsListResponse = { + /** + * Skills available to the user. + */ + skills: Array; + /** + * Whether additional results are available. + */ + has_more: boolean; + /** + * Cursor for the next page, or null when no more results are available. + */ + next_cursor: string | null; + /** + * Platform-generated request ID for support correlation. + */ + request_id: string; +}; + +/** @internal */ +export const PlatformSkillsListResponse$inboundSchema: z.ZodType< + PlatformSkillsListResponse, + z.ZodTypeDef, + unknown +> = z.object({ + skills: z.array(PlatformSkill$inboundSchema), + has_more: z.boolean(), + next_cursor: z.nullable(z.string()), + request_id: z.string(), +}); + +export function platformSkillsListResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSkillsListResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSkillsListResponse' from JSON`, + ); +} diff --git a/src/models/components/platformskillsourceprovenance.ts b/src/models/components/platformskillsourceprovenance.ts new file mode 100644 index 00000000..be0b13f6 --- /dev/null +++ b/src/models/components/platformskillsourceprovenance.ts @@ -0,0 +1,67 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d205a4ca5eab + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformSkillSyncStatus, + PlatformSkillSyncStatus$inboundSchema, +} from "./platformskillsyncstatus.js"; + +export type PlatformSkillSourceProvenance = { + /** + * URL of the external source the skill was imported from. + */ + source_url?: string | undefined; + /** + * Source commit SHA for the imported skill. + */ + commit_sha?: string | undefined; + /** + * Time the skill was imported. + */ + imported_at?: Date | undefined; + /** + * Time the skill was last synced from its source. + */ + last_synced_at?: Date | undefined; + /** + * Current external-source sync status. + */ + sync_status?: PlatformSkillSyncStatus | undefined; + /** + * Human-readable sync failure reason, present only when sync_status is SYNC_FAILED. + */ + sync_error?: string | undefined; +}; + +/** @internal */ +export const PlatformSkillSourceProvenance$inboundSchema: z.ZodType< + PlatformSkillSourceProvenance, + z.ZodTypeDef, + unknown +> = z.object({ + source_url: z.string().optional(), + commit_sha: z.string().optional(), + imported_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + last_synced_at: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), + sync_status: PlatformSkillSyncStatus$inboundSchema.optional(), + sync_error: z.string().optional(), +}); + +export function platformSkillSourceProvenanceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSkillSourceProvenance$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSkillSourceProvenance' from JSON`, + ); +} diff --git a/src/models/components/platformskillstatus.ts b/src/models/components/platformskillstatus.ts new file mode 100644 index 00000000..43aaae8c --- /dev/null +++ b/src/models/components/platformskillstatus.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3239e840356d + */ + +import * as z from "zod/v3"; +import * as openEnums from "../../types/enums.js"; +import { OpenEnum } from "../../types/enums.js"; + +/** + * Current skill status. + */ +export const PlatformSkillStatus = { + Draft: "DRAFT", + Enabled: "ENABLED", + Disabled: "DISABLED", +} as const; +/** + * Current skill status. + */ +export type PlatformSkillStatus = OpenEnum; + +/** @internal */ +export const PlatformSkillStatus$inboundSchema: z.ZodType< + PlatformSkillStatus, + z.ZodTypeDef, + unknown +> = openEnums.inboundSchema(PlatformSkillStatus); diff --git a/src/models/components/platformskillsyncstatus.ts b/src/models/components/platformskillsyncstatus.ts new file mode 100644 index 00000000..2efda9b8 --- /dev/null +++ b/src/models/components/platformskillsyncstatus.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 474e34580f2d + */ + +import * as z from "zod/v3"; +import * as openEnums from "../../types/enums.js"; +import { OpenEnum } from "../../types/enums.js"; + +/** + * Current external-source sync status. + */ +export const PlatformSkillSyncStatus = { + UpToDate: "UP_TO_DATE", + UpdateAvailable: "UPDATE_AVAILABLE", + SyncFailed: "SYNC_FAILED", +} as const; +/** + * Current external-source sync status. + */ +export type PlatformSkillSyncStatus = OpenEnum; + +/** @internal */ +export const PlatformSkillSyncStatus$inboundSchema: z.ZodType< + PlatformSkillSyncStatus, + z.ZodTypeDef, + unknown +> = openEnums.inboundSchema(PlatformSkillSyncStatus); diff --git a/src/models/components/toolmetadata.ts b/src/models/components/toolmetadata.ts index 4fb9511c..7f4802a6 100644 --- a/src/models/components/toolmetadata.ts +++ b/src/models/components/toolmetadata.ts @@ -66,6 +66,38 @@ export const WriteActionType = { */ export type WriteActionType = OpenEnum; +/** + * Analytics-only signal (product snapshot) describing WHERE the action's + * + * @remarks + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ +export const ActionTypeSource = { + McpAnnotation: "MCP_ANNOTATION", + AdminOverride: "ADMIN_OVERRIDE", + None: "NONE", + NativeToolDefinition: "NATIVE_TOOL_DEFINITION", +} as const; +/** + * Analytics-only signal (product snapshot) describing WHERE the action's + * + * @remarks + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ +export type ActionTypeSource = OpenEnum; + /** * The type of authentication being used. * @@ -144,6 +176,19 @@ export type ToolMetadata = { * Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. MCP - Send a tools/call request to an MCP server to execute the action. */ writeActionType?: WriteActionType | undefined; + /** + * Analytics-only signal (product snapshot) describing WHERE the action's + * + * @remarks + * read/write determination came from. Complementary to the effective + * read/write value (the tool's ToolType, which drives HITL): the value says + * read-or-write, this says how confident that is. MCP_ANNOTATION = from the + * tool's read-only/destructive hints; ADMIN_OVERRIDE = an admin set it; + * NONE = no usable hint (the effective value then defaults to write); + * NATIVE_TOOL_DEFINITION = from a curated native tool (snapshot-derived). + * Does not affect runtime behavior. + */ + actionTypeSource?: ActionTypeSource | undefined; /** * The type of authentication being used. * @@ -208,6 +253,19 @@ export const WriteActionType$outboundSchema: z.ZodType< WriteActionType > = openEnums.outboundSchema(WriteActionType); +/** @internal */ +export const ActionTypeSource$inboundSchema: z.ZodType< + ActionTypeSource, + z.ZodTypeDef, + unknown +> = openEnums.inboundSchema(ActionTypeSource); +/** @internal */ +export const ActionTypeSource$outboundSchema: z.ZodType< + string, + z.ZodTypeDef, + ActionTypeSource +> = openEnums.outboundSchema(ActionTypeSource); + /** @internal */ export const AuthType$inboundSchema: z.ZodType< AuthType, @@ -243,6 +301,7 @@ export const ToolMetadata$inboundSchema: z.ZodType< new Date(v) ).optional(), writeActionType: WriteActionType$inboundSchema.optional(), + actionTypeSource: ActionTypeSource$inboundSchema.optional(), authType: AuthType$inboundSchema.optional(), auth: AuthConfig$inboundSchema.optional(), permissions: ObjectPermissions$inboundSchema.optional(), @@ -264,6 +323,7 @@ export type ToolMetadata$Outbound = { createdAt?: string | undefined; lastUpdatedAt?: string | undefined; writeActionType?: string | undefined; + actionTypeSource?: string | undefined; authType?: string | undefined; auth?: AuthConfig$Outbound | undefined; permissions?: ObjectPermissions$Outbound | undefined; @@ -290,6 +350,7 @@ export const ToolMetadata$outboundSchema: z.ZodType< createdAt: z.date().transform(v => v.toISOString()).optional(), lastUpdatedAt: z.date().transform(v => v.toISOString()).optional(), writeActionType: WriteActionType$outboundSchema.optional(), + actionTypeSource: ActionTypeSource$outboundSchema.optional(), authType: AuthType$outboundSchema.optional(), auth: AuthConfig$outboundSchema.optional(), permissions: ObjectPermissions$outboundSchema.optional(), diff --git a/src/models/components/workflow.ts b/src/models/components/workflow.ts index 2b33053f..7c829d0c 100644 --- a/src/models/components/workflow.ts +++ b/src/models/components/workflow.ts @@ -50,6 +50,12 @@ export type Workflow = { * When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits. */ showOrganizationAsAuthor?: boolean | undefined; + /** + * For a CUSTOM_WEBHOOK-triggered agent, the full inbound webhook URL (.../webhooks/custom/) minted for the agent. Empty for other trigger types. + * + * @remarks + */ + webhookUrl?: string | undefined; }; /** @internal */ @@ -70,6 +76,7 @@ export const Workflow$inboundSchema: z.ZodType< id: z.string().optional(), verified: z.boolean().optional(), showOrganizationAsAuthor: z.boolean().optional(), + webhookUrl: z.string().optional(), }); export function workflowFromJSON( diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index 00caa4b0..b6fa7452 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -75,11 +75,14 @@ export * from "./pin.js"; export * from "./platformagentscreaterun.js"; export * from "./platformagentsget.js"; export * from "./platformagentsgetschemas.js"; +export * from "./platformskillsget.js"; +export * from "./platformskillslist.js"; export * from "./postapiindexv1debugdatasourcedocument.js"; export * from "./postapiindexv1debugdatasourcedocumentevents.js"; export * from "./postapiindexv1debugdatasourcedocuments.js"; export * from "./postapiindexv1debugdatasourcestatus.js"; export * from "./postapiindexv1debugdatasourceuser.js"; +export * from "./postrestapiindexsubmissionsdatasourceinstancetype.js"; export * from "./putrestapiindexcustommetadataschemagroupname.js"; export * from "./putrestapiindexdocumentdocidcustommetadatagroupname.js"; export * from "./recommendations.js"; diff --git a/src/models/operations/platformskillsget.ts b/src/models/operations/platformskillsget.ts new file mode 100644 index 00000000..c3d2123e --- /dev/null +++ b/src/models/operations/platformskillsget.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 24dc86e69e49 + */ + +import * as z from "zod/v3"; + +export type PlatformSkillsGetRequest = { + /** + * Glean skill ID. + */ + skill_id: string; +}; + +/** @internal */ +export type PlatformSkillsGetRequest$Outbound = { + skill_id: string; +}; + +/** @internal */ +export const PlatformSkillsGetRequest$outboundSchema: z.ZodType< + PlatformSkillsGetRequest$Outbound, + z.ZodTypeDef, + PlatformSkillsGetRequest +> = z.object({ + skill_id: z.string(), +}); + +export function platformSkillsGetRequestToJSON( + platformSkillsGetRequest: PlatformSkillsGetRequest, +): string { + return JSON.stringify( + PlatformSkillsGetRequest$outboundSchema.parse(platformSkillsGetRequest), + ); +} diff --git a/src/models/operations/platformskillslist.ts b/src/models/operations/platformskillslist.ts new file mode 100644 index 00000000..e081d779 --- /dev/null +++ b/src/models/operations/platformskillslist.ts @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 909cbd063812 + */ + +import * as z from "zod/v3"; + +export type PlatformSkillsListRequest = { + /** + * Maximum number of skills to return. + */ + page_size?: number | undefined; + /** + * Opaque pagination cursor from a previous response. + */ + cursor?: string | undefined; +}; + +/** @internal */ +export type PlatformSkillsListRequest$Outbound = { + page_size?: number | undefined; + cursor?: string | undefined; +}; + +/** @internal */ +export const PlatformSkillsListRequest$outboundSchema: z.ZodType< + PlatformSkillsListRequest$Outbound, + z.ZodTypeDef, + PlatformSkillsListRequest +> = z.object({ + page_size: z.number().int().optional(), + cursor: z.string().optional(), +}); + +export function platformSkillsListRequestToJSON( + platformSkillsListRequest: PlatformSkillsListRequest, +): string { + return JSON.stringify( + PlatformSkillsListRequest$outboundSchema.parse(platformSkillsListRequest), + ); +} diff --git a/src/models/operations/postrestapiindexsubmissionsdatasourceinstancetype.ts b/src/models/operations/postrestapiindexsubmissionsdatasourceinstancetype.ts new file mode 100644 index 00000000..2788dcf1 --- /dev/null +++ b/src/models/operations/postrestapiindexsubmissionsdatasourceinstancetype.ts @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 85b9298a2d8c + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const PostRestApiIndexSubmissionsDatasourceInstanceTypeServerList = [ + "https://{instance}-be.glean.com", +] as const; + +export type PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest = { + /** + * Datasource instance that should process the submission + */ + datasourceInstance: string; + /** + * Submission type registered for the datasource + */ + type: string; + requestBody: { [k: string]: any }; +}; + +/** + * Accepted + */ +export type PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse = { + requestId: string; +}; + +/** @internal */ +export type PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest$Outbound = + { + datasourceInstance: string; + type: string; + RequestBody: { [k: string]: any }; + }; + +/** @internal */ +export const PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest$outboundSchema: + z.ZodType< + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest$Outbound, + z.ZodTypeDef, + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest + > = z.object({ + datasourceInstance: z.string(), + type: z.string(), + requestBody: z.record(z.any()), + }).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); + }); + +export function postRestApiIndexSubmissionsDatasourceInstanceTypeRequestToJSON( + postRestApiIndexSubmissionsDatasourceInstanceTypeRequest: + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest, +): string { + return JSON.stringify( + PostRestApiIndexSubmissionsDatasourceInstanceTypeRequest$outboundSchema + .parse(postRestApiIndexSubmissionsDatasourceInstanceTypeRequest), + ); +} + +/** @internal */ +export const PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse$inboundSchema: + z.ZodType< + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse, + z.ZodTypeDef, + unknown + > = z.object({ + requestId: z.string(), + }); + +export function postRestApiIndexSubmissionsDatasourceInstanceTypeResponseFromJSON( + jsonString: string, +): SafeParseResult< + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse' from JSON`, + ); +} diff --git a/src/react-query/index.ts b/src/react-query/index.ts index b8610dc0..705c7e69 100644 --- a/src/react-query/index.ts +++ b/src/react-query/index.ts @@ -107,6 +107,7 @@ export * from "./indexingCustomMetadataUpsert.js"; export * from "./indexingCustomMetadataUpsertSchema.js"; export * from "./indexingDatasourcesAdd.js"; export * from "./indexingDatasourcesRetrieveConfig.js"; +export * from "./indexingDatasourcesSubmit.js"; export * from "./indexingDatasourceStatus.js"; export * from "./indexingDocumentsAddOrUpdate.js"; export * from "./indexingDocumentsBulkIndex.js"; @@ -143,3 +144,5 @@ export * from "./indexingPermissionsUpdatePermissions.js"; export * from "./indexingShortcutsBulkIndex.js"; export * from "./indexingShortcutsUpload.js"; export * from "./searchQuery.js"; +export * from "./skillsList.js"; +export * from "./skillsRetrieve.js"; diff --git a/src/react-query/indexingDatasourcesSubmit.ts b/src/react-query/indexingDatasourcesSubmit.ts new file mode 100644 index 00000000..0a90b0eb --- /dev/null +++ b/src/react-query/indexingDatasourcesSubmit.ts @@ -0,0 +1,118 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 2975f214d3b7 + */ + +import { + MutationKey, + useMutation, + UseMutationResult, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { indexingDatasourcesSubmit } from "../funcs/indexingDatasourcesSubmit.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; +import { useGleanContext } from "./_context.js"; +import { MutationHookOptions } from "./_types.js"; + +export type IndexingDatasourcesSubmitMutationVariables = { + requestBody: { [k: string]: any }; + datasourceInstance: string; + type: string; + options?: RequestOptions; +}; + +export type IndexingDatasourcesSubmitMutationData = + operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse; + +export type IndexingDatasourcesSubmitMutationError = + | errors.ErrorInfoResponse + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * Submit datasource data + * + * @remarks + * Validates and asynchronously processes a datasource-specific submission. + */ +export function useIndexingDatasourcesSubmitMutation( + options?: MutationHookOptions< + IndexingDatasourcesSubmitMutationData, + IndexingDatasourcesSubmitMutationError, + IndexingDatasourcesSubmitMutationVariables + >, +): UseMutationResult< + IndexingDatasourcesSubmitMutationData, + IndexingDatasourcesSubmitMutationError, + IndexingDatasourcesSubmitMutationVariables +> { + const client = useGleanContext(); + return useMutation({ + ...buildIndexingDatasourcesSubmitMutation(client, options), + ...options, + }); +} + +export function mutationKeyIndexingDatasourcesSubmit(): MutationKey { + return ["@gleanwork/api-client", "datasources", "submit"]; +} + +export function buildIndexingDatasourcesSubmitMutation( + client$: GleanCore, + hookOptions?: RequestOptions, +): { + mutationKey: MutationKey; + mutationFn: ( + variables: IndexingDatasourcesSubmitMutationVariables, + ) => Promise; +} { + return { + mutationKey: mutationKeyIndexingDatasourcesSubmit(), + mutationFn: function indexingDatasourcesSubmitMutationFn({ + requestBody, + datasourceInstance, + type, + options, + }): Promise { + const mergedOptions = { + ...hookOptions, + ...options, + fetchOptions: { + ...hookOptions?.fetchOptions, + ...options?.fetchOptions, + signal: combineSignals( + hookOptions?.fetchOptions?.signal, + options?.fetchOptions?.signal, + ), + }, + }; + return unwrapAsync(indexingDatasourcesSubmit( + client$, + requestBody, + datasourceInstance, + type, + mergedOptions, + )); + }, + }; +} diff --git a/src/react-query/skillsList.core.ts b/src/react-query/skillsList.core.ts new file mode 100644 index 00000000..9134b7a2 --- /dev/null +++ b/src/react-query/skillsList.core.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e91168fc9e6b + */ + +import { + QueryClient, + QueryFunctionContext, + QueryKey, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { skillsList } from "../funcs/skillsList.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import { unwrapAsync } from "../types/fp.js"; +export type SkillsListQueryData = components.PlatformSkillsListResponse; + +export function prefetchSkillsList( + queryClient: QueryClient, + client$: GleanCore, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, +): Promise { + return queryClient.prefetchQuery({ + ...buildSkillsListQuery( + client$, + pageSize, + cursor, + options, + ), + }); +} + +export function buildSkillsListQuery( + client$: GleanCore, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, +): { + queryKey: QueryKey; + queryFn: (context: QueryFunctionContext) => Promise; +} { + return { + queryKey: queryKeySkillsList({ pageSize, cursor }), + queryFn: async function skillsListQueryFn( + ctx, + ): Promise { + const sig = combineSignals( + ctx.signal, + options?.signal, + options?.fetchOptions?.signal, + ); + const mergedOptions = { + ...options?.fetchOptions, + ...options, + signal: sig, + }; + + return unwrapAsync(skillsList( + client$, + pageSize, + cursor, + mergedOptions, + )); + }, + }; +} + +export function queryKeySkillsList( + parameters: { pageSize?: number | undefined; cursor?: string | undefined }, +): QueryKey { + return ["@gleanwork/api-client", "skills", "list", parameters]; +} diff --git a/src/react-query/skillsList.ts b/src/react-query/skillsList.ts new file mode 100644 index 00000000..b911a654 --- /dev/null +++ b/src/react-query/skillsList.ts @@ -0,0 +1,134 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3377edb65dda + */ + +import { + InvalidateQueryFilters, + QueryClient, + useQuery, + UseQueryResult, + useSuspenseQuery, + UseSuspenseQueryResult, +} from "@tanstack/react-query"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { useGleanContext } from "./_context.js"; +import { + QueryHookOptions, + SuspenseQueryHookOptions, + TupleToPrefixes, +} from "./_types.js"; +import { + buildSkillsListQuery, + prefetchSkillsList, + queryKeySkillsList, + SkillsListQueryData, +} from "./skillsList.core.js"; +export { + buildSkillsListQuery, + prefetchSkillsList, + queryKeySkillsList, + type SkillsListQueryData, +}; + +export type SkillsListQueryError = + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * List skills + * + * @remarks + * List skills available to the authenticated user. + */ +export function useSkillsList( + pageSize?: number | undefined, + cursor?: string | undefined, + options?: QueryHookOptions, +): UseQueryResult { + const client = useGleanContext(); + return useQuery({ + ...buildSkillsListQuery( + client, + pageSize, + cursor, + options, + ), + ...options, + }); +} + +/** + * List skills + * + * @remarks + * List skills available to the authenticated user. + */ +export function useSkillsListSuspense( + pageSize?: number | undefined, + cursor?: string | undefined, + options?: SuspenseQueryHookOptions, +): UseSuspenseQueryResult { + const client = useGleanContext(); + return useSuspenseQuery({ + ...buildSkillsListQuery( + client, + pageSize, + cursor, + options, + ), + ...options, + }); +} + +export function setSkillsListData( + client: QueryClient, + queryKeyBase: [ + parameters: { pageSize?: number | undefined; cursor?: string | undefined }, + ], + data: SkillsListQueryData, +): SkillsListQueryData | undefined { + const key = queryKeySkillsList(...queryKeyBase); + + return client.setQueryData(key, data); +} + +export function invalidateSkillsList( + client: QueryClient, + queryKeyBase: TupleToPrefixes< + [parameters: { pageSize?: number | undefined; cursor?: string | undefined }] + >, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: ["@gleanwork/api-client", "skills", "list", ...queryKeyBase], + }); +} + +export function invalidateAllSkillsList( + client: QueryClient, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: ["@gleanwork/api-client", "skills", "list"], + }); +} diff --git a/src/react-query/skillsRetrieve.core.ts b/src/react-query/skillsRetrieve.core.ts new file mode 100644 index 00000000..3c4f811c --- /dev/null +++ b/src/react-query/skillsRetrieve.core.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: b293a018b942 + */ + +import { + QueryClient, + QueryFunctionContext, + QueryKey, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { skillsRetrieve } from "../funcs/skillsRetrieve.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import { unwrapAsync } from "../types/fp.js"; +export type SkillsRetrieveQueryData = components.PlatformSkillGetResponse; + +export function prefetchSkillsRetrieve( + queryClient: QueryClient, + client$: GleanCore, + skillId: string, + options?: RequestOptions, +): Promise { + return queryClient.prefetchQuery({ + ...buildSkillsRetrieveQuery( + client$, + skillId, + options, + ), + }); +} + +export function buildSkillsRetrieveQuery( + client$: GleanCore, + skillId: string, + options?: RequestOptions, +): { + queryKey: QueryKey; + queryFn: (context: QueryFunctionContext) => Promise; +} { + return { + queryKey: queryKeySkillsRetrieve(skillId), + queryFn: async function skillsRetrieveQueryFn( + ctx, + ): Promise { + const sig = combineSignals( + ctx.signal, + options?.signal, + options?.fetchOptions?.signal, + ); + const mergedOptions = { + ...options?.fetchOptions, + ...options, + signal: sig, + }; + + return unwrapAsync(skillsRetrieve( + client$, + skillId, + mergedOptions, + )); + }, + }; +} + +export function queryKeySkillsRetrieve(skillId: string): QueryKey { + return ["@gleanwork/api-client", "skills", "retrieve", skillId]; +} diff --git a/src/react-query/skillsRetrieve.ts b/src/react-query/skillsRetrieve.ts new file mode 100644 index 00000000..c3b68b13 --- /dev/null +++ b/src/react-query/skillsRetrieve.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8bd7927c56aa + */ + +import { + InvalidateQueryFilters, + QueryClient, + useQuery, + UseQueryResult, + useSuspenseQuery, + UseSuspenseQueryResult, +} from "@tanstack/react-query"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { useGleanContext } from "./_context.js"; +import { + QueryHookOptions, + SuspenseQueryHookOptions, + TupleToPrefixes, +} from "./_types.js"; +import { + buildSkillsRetrieveQuery, + prefetchSkillsRetrieve, + queryKeySkillsRetrieve, + SkillsRetrieveQueryData, +} from "./skillsRetrieve.core.js"; +export { + buildSkillsRetrieveQuery, + prefetchSkillsRetrieve, + queryKeySkillsRetrieve, + type SkillsRetrieveQueryData, +}; + +export type SkillsRetrieveQueryError = + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * Retrieve skill + * + * @remarks + * Retrieve metadata for a skill available to the authenticated user. + */ +export function useSkillsRetrieve( + skillId: string, + options?: QueryHookOptions, +): UseQueryResult { + const client = useGleanContext(); + return useQuery({ + ...buildSkillsRetrieveQuery( + client, + skillId, + options, + ), + ...options, + }); +} + +/** + * Retrieve skill + * + * @remarks + * Retrieve metadata for a skill available to the authenticated user. + */ +export function useSkillsRetrieveSuspense( + skillId: string, + options?: SuspenseQueryHookOptions< + SkillsRetrieveQueryData, + SkillsRetrieveQueryError + >, +): UseSuspenseQueryResult { + const client = useGleanContext(); + return useSuspenseQuery({ + ...buildSkillsRetrieveQuery( + client, + skillId, + options, + ), + ...options, + }); +} + +export function setSkillsRetrieveData( + client: QueryClient, + queryKeyBase: [skillId: string], + data: SkillsRetrieveQueryData, +): SkillsRetrieveQueryData | undefined { + const key = queryKeySkillsRetrieve(...queryKeyBase); + + return client.setQueryData(key, data); +} + +export function invalidateSkillsRetrieve( + client: QueryClient, + queryKeyBase: TupleToPrefixes<[skillId: string]>, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: ["@gleanwork/api-client", "skills", "retrieve", ...queryKeyBase], + }); +} + +export function invalidateAllSkillsRetrieve( + client: QueryClient, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: ["@gleanwork/api-client", "skills", "retrieve"], + }); +} diff --git a/src/sdk/indexingdatasources.ts b/src/sdk/indexingdatasources.ts index ed9fa1fb..7c732198 100644 --- a/src/sdk/indexingdatasources.ts +++ b/src/sdk/indexingdatasources.ts @@ -5,8 +5,10 @@ import { indexingDatasourcesAdd } from "../funcs/indexingDatasourcesAdd.js"; import { indexingDatasourcesRetrieveConfig } from "../funcs/indexingDatasourcesRetrieveConfig.js"; +import { indexingDatasourcesSubmit } from "../funcs/indexingDatasourcesSubmit.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class IndexingDatasources extends ClientSDK { @@ -43,4 +45,27 @@ export class IndexingDatasources extends ClientSDK { options, )); } + + /** + * Submit datasource data + * + * @remarks + * Validates and asynchronously processes a datasource-specific submission. + */ + async submit( + requestBody: { [k: string]: any }, + datasourceInstance: string, + type: string, + options?: RequestOptions, + ): Promise< + operations.PostRestApiIndexSubmissionsDatasourceInstanceTypeResponse + > { + return unwrapAsync(indexingDatasourcesSubmit( + this, + requestBody, + datasourceInstance, + type, + options, + )); + } } diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index 65e63fcc..2cca83bd 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -8,6 +8,7 @@ import { Agents } from "./agents.js"; import { Client } from "./client.js"; import { Indexing } from "./indexing.js"; import { Search } from "./search.js"; +import { Skills } from "./skills.js"; export class Glean extends ClientSDK { private _agents?: Agents; @@ -15,6 +16,11 @@ export class Glean extends ClientSDK { return (this._agents ??= new Agents(this._options)); } + private _skills?: Skills; + get skills(): Skills { + return (this._skills ??= new Skills(this._options)); + } + private _search?: Search; get search(): Search { return (this._search ??= new Search(this._options)); diff --git a/src/sdk/skills.ts b/src/sdk/skills.ts new file mode 100644 index 00000000..93d42981 --- /dev/null +++ b/src/sdk/skills.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 847667a72f83 + */ + +import { skillsList } from "../funcs/skillsList.js"; +import { skillsRetrieve } from "../funcs/skillsRetrieve.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Skills extends ClientSDK { + /** + * List skills + * + * @remarks + * List skills available to the authenticated user. + */ + async list( + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(skillsList( + this, + pageSize, + cursor, + options, + )); + } + + /** + * Retrieve skill + * + * @remarks + * Retrieve metadata for a skill available to the authenticated user. + */ + async retrieve( + skillId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(skillsRetrieve( + this, + skillId, + options, + )); + } +} From b97ebcaea1b740f54aa2397abb790e1b1ae7cbb8 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 02:19:53 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow