diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index d4797aa0..4ce68c70 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: 586f40e432b9bb469fad89ebabfbc480 docVersion: 0.9.0 - speakeasyVersion: 1.789.2 - generationVersion: 2.916.4 - releaseVersion: 0.17.3 - configChecksum: ceee23da0b77c78087da10f0482d460b + speakeasyVersion: 1.790.3 + generationVersion: 2.918.4 + 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: 9e95817a-40c5-4743-a499-0250106c03da + pristine_commit_hash: a9f04c569c07ecd3b65bc08d93030574d4d5c168 + pristine_tree_hash: ad92bc963dbd9d2df9c7dad95a55dd9edd00cc92 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,16 +936,16 @@ 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 pristine_git_object: ad8edbd802be96f8d76256ab442b40db3ad49793 docs/models/components/dlpissuefilter.md: id: a714280f0964 - last_write_checksum: sha1:6c493636bbc4e10a1f820143831750ed7f63d763 - pristine_git_object: b8cd2061b4a28ec7748b7bd9397de39b289bb3e3 + last_write_checksum: sha1:69f1b3712ac31d0e2f3fdec0957dbd016fabd0b2 + pristine_git_object: 60198294d535d8794d536cca909ec7b474b963b3 docs/models/components/dlpissuestatus.md: id: 9c4943d2de77 last_write_checksum: sha1:056c4a80cdc9ecab385154fcdaab693c928b07bc @@ -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 @@ -1254,10 +1258,6 @@ trackedFiles: id: 23caffb85bb7 last_write_checksum: sha1:b90b2a0fba0f78b414366202e56a1637a8a8793f pristine_git_object: 532dd8528589cc3d63e2341b4aca70430ee683ea - docs/models/components/filet.md: - id: 1d4366ab038f - last_write_checksum: sha1:1cfeb78d8c64db4ba7f0449bc80e211dba264db0 - pristine_git_object: 067a1402c4d0987616dd8550de36b2117109fb5a docs/models/components/followupaction.md: id: c9ee54c0f562 last_write_checksum: sha1:fc4c0ab45b9aa0fde0a46f7bbe15fdc062d7d2a6 @@ -1942,6 +1942,94 @@ 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/platformskillcreaterequest.md: + id: ddb3e21de644 + last_write_checksum: sha1:c96ab4beb13252213f15750e14aa13300ef6312a + pristine_git_object: b714d71197b21278b271e72b4f5f9a6fdd5caced + docs/models/components/platformskillcreaterequestfile.md: + id: e00e3aced33f + last_write_checksum: sha1:898e3883faea3e9914ed7dfcfbc9527a0bd7aab2 + pristine_git_object: 86de6b5dca1c8adfdea6be08f11bdb197d6e2cc3 + docs/models/components/platformskillcreateresponse.md: + id: b335fca5b16a + last_write_checksum: sha1:d53e9b430b9308fb7bf2d28b9b9f4308bb3f3d4f + pristine_git_object: bae820b4ce8b74e9c1f9535b57fa7fbd2b52acea + docs/models/components/platformskillgetresponse.md: + id: bc5043e8f6f7 + last_write_checksum: sha1:768a5431cf9df1f97f5ea2f0c216e038fd1b443b + pristine_git_object: 01ba7d7a8885a08f4df2ea211b0ee8c9c10cab2c + 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/platformskillvalidationfile.md: + id: 745acf6f2b41 + last_write_checksum: sha1:c83e4c165251568b765d3e2441ca669dd61f1c8e + pristine_git_object: d0fa1f7eb9d2d25f147274f94edd97a821119396 + docs/models/components/platformskillvalidationmetadata.md: + id: 60a8250a06e0 + last_write_checksum: sha1:eba3fbd56cd1066dcf7d14ab9e9c92756424b02f + pristine_git_object: 9349bf2589128eab019a4f5e9ba8d6e70ef2a24d + docs/models/components/platformskillvalidationrequest.md: + id: 57693c31466c + last_write_checksum: sha1:3ed081a2adf38ea9ef8c7d3490803e23ea13b84e + pristine_git_object: 2d5ed2d70136a266027ac69bd59c4ef148df0647 + docs/models/components/platformskillvalidationrequestfile.md: + id: b4263ac20c69 + last_write_checksum: sha1:f073af18d6eab1c100e44460bee3b4051c4eea89 + pristine_git_object: 0d74a6e05fd0b1f1772a5f2e710f38c92200a701 + docs/models/components/platformskillvalidationresponse.md: + id: 54c67702e75e + last_write_checksum: sha1:89592456343aa59d384f1d2fc265407282fd3a12 + pristine_git_object: 953912739b8be4b4b1c0a45ebb2911112a7b3c4c + docs/models/components/platformskillvalidationwarning.md: + id: a108dbb4d802 + last_write_checksum: sha1:7f8e2c9db3013e1dfb208c65ef614a82ec4e79bf + pristine_git_object: 4bf12c9c65b00fa6d5b273cc0c24e2bac6c92d39 + docs/models/components/platformskillversion.md: + id: e8ce8fdac3ed + last_write_checksum: sha1:f118faff7469b900398ba743766f87e5900d089d + pristine_git_object: e21461ad1126a41f4f035e8111221a586ee8c582 + docs/models/components/platformskillversioncreaterequest.md: + id: fc0bc95024aa + last_write_checksum: sha1:fd13b9617b6b2314ba3bc7a4cc660a305a1719e2 + pristine_git_object: 342bbdf0648403df277d165d80aeb935a1a651cf + docs/models/components/platformskillversioncreaterequestfile.md: + id: 504c458d2135 + last_write_checksum: sha1:105cce601f3b9a909577d5422771aa59d8969903 + pristine_git_object: b31dac56728e482d15077b4d2079e20f5880b872 + docs/models/components/platformskillversioncreateresponse.md: + id: 512cae7b61d0 + last_write_checksum: sha1:3b01aa3382a6b76193a4c6b72f82f4131c284344 + pristine_git_object: 20612d51d320f76a223bf207ae066c33ee8c6359 + docs/models/components/platformskillversiongetresponse.md: + id: 0017f872ca44 + last_write_checksum: sha1:5d91ae60a65243338c03f05ee2a40ade016b1942 + pristine_git_object: c36f0a6fc9516b4ae8e2d99d8868f4d991f44dea + docs/models/components/platformskillversionslistresponse.md: + id: 4eb8de7042ef + last_write_checksum: sha1:d742c98a5e0d41e069fd12252d2ef6e9e8f15900 + pristine_git_object: 978b662b0ae707a49a70fac08ff828f5618dbc50 docs/models/components/platformtimerange.md: id: d2e589bb488c last_write_checksum: sha1:b16b0fb45a16cafd4942fc70075e8ba92d0b9386 @@ -2376,8 +2464,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 @@ -2500,8 +2588,12 @@ trackedFiles: pristine_git_object: 9d82c49bfc7338b347217f1ba1fb7b861e07c47b docs/models/components/uploadchatfilesrequest.md: id: 3f2d7527a96c - last_write_checksum: sha1:f54ecbbc0e86397e711ec2e6a80c3f2ac673c59c - pristine_git_object: 1f724f3e47833be86c07bfd8e2ae755555c7c8c5 + last_write_checksum: sha1:2bff1139cf4d546768bbc82532609ef2361eb843 + pristine_git_object: 6fb65fb512f4172a774b8243db5e79a36f592c21 + docs/models/components/uploadchatfilesrequestfile.md: + id: 69fef769c49b + last_write_checksum: sha1:3600898d600540cf6ab27c27cf134375700a89dc + pristine_git_object: 0e9eafd43f3e36625abbcf9b124c5967596af68d docs/models/components/uploadchatfilesresponse.md: id: b9bbe833e719 last_write_checksum: sha1:0ac61e32a143b9e15ebc02b6de0dc2b6a3b121ff @@ -2588,8 +2680,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 +3038,42 @@ trackedFiles: id: 58d615b7c78f last_write_checksum: sha1:f72548f52835bd70987fa96727569f7fd5d32f9f pristine_git_object: 86d0551865da2973d4bc49c26a9ae3fab6829f85 + docs/models/operations/platformskillscreateversionrequest.md: + id: "2144541424e6" + last_write_checksum: sha1:ae8c31be517af1b8d10a6a016812899bf059bec6 + pristine_git_object: 3c4146374563d18862fdc9d3730f8f3ef02710c4 + docs/models/operations/platformskillsgetcontentrequest.md: + id: 5462edb6ce37 + last_write_checksum: sha1:aefcfbcba14318c140d86d2d856fa4268d8d7414 + pristine_git_object: d9cde490eb1dbf7d1adccc794b239c42c6e4fcef + docs/models/operations/platformskillsgetcontentresponse.md: + id: b6485cee828d + last_write_checksum: sha1:1046b825f3c99353ce4269a61edc5df9b9436aa6 + pristine_git_object: a1323c53a7f65b0be6eca65326f1d5704deb8f61 + docs/models/operations/platformskillsgetrequest.md: + id: 6e77031ea696 + last_write_checksum: sha1:77b912d1988027c6569d81359278fe1ce453b9e2 + pristine_git_object: 9e4d8cee63af8a2ff90a3bb1579be91720170191 + docs/models/operations/platformskillsgetversioncontentrequest.md: + id: 422bf4074e8b + last_write_checksum: sha1:538fe84e11e6db7693a32ed491e56dc83258679b + pristine_git_object: 46f44647ef53fd415a06875fdb79e75bfd4d686c + docs/models/operations/platformskillsgetversioncontentresponse.md: + id: b0cf2f3b0901 + last_write_checksum: sha1:ea9d050cd52478683d1b11bd3752dbd193cc12af + pristine_git_object: 2c598faaa1e7a0f7df2a09edb8991f9d7c136a75 + docs/models/operations/platformskillsgetversionrequest.md: + id: ef0df25fbc16 + last_write_checksum: sha1:19c288b31e681f7618bf6f21efeddc9806140f77 + pristine_git_object: 362f1257388e0161a23ec674a745400b85c30589 + docs/models/operations/platformskillslistrequest.md: + id: 2e304cbf2212 + last_write_checksum: sha1:91ee0f4ef89ff4d3634615a9d2ee6daa1db63c20 + pristine_git_object: 6a07bb06bb7902990b6031e194b30e73a289d62a + docs/models/operations/platformskillslistversionsrequest.md: + id: 6445143da2e1 + last_write_checksum: sha1:ee8144358fe287c81a6675c284216168fa9e0586 + pristine_git_object: f5215f8a3f1ae9373c2d255ad331c6b4fd739fd1 docs/models/operations/postapiindexv1debugdatasourcedocumenteventsrequest.md: id: 13205d748dcd last_write_checksum: sha1:a4343ef66a0c237e1eada5f9fe0ca897db13a0a2 @@ -2966,6 +3094,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 +3232,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 +3274,10 @@ trackedFiles: id: 5c534716244c last_write_checksum: sha1:8a3c41c736e3ce7dfd9b0f5d733beed5f7446648 pristine_git_object: 233dcbff8035e0284a82067af91f627201db89df + docs/sdks/skills/README.md: + id: 3a14a5c90791 + last_write_checksum: sha1:cea7719a8a49d7ae6e4728ce3c6d65fff53956dc + pristine_git_object: 53e8324409c5f7949cd59a3a4cf6045f74a25449 docs/sdks/tools/README.md: id: 044286549bac last_write_checksum: sha1:15085522c8371637004ea441fe579e3ab1f0b47b @@ -3176,12 +3316,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 +3418,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 +3436,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:17d923a23384341a26ce4774612e47a9bcfc8dc6 + pristine_git_object: 41c0b3c93454418989eac9a34b10c888541e3e2e src/__tests__/mockserver/.gitignore: id: 4a7fc421b6b6 last_write_checksum: sha1:228e1b05712a973948fd771323a2140a3b355ff4 @@ -3348,8 +3492,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:5fac7733e60f50b01303449747a684d19e3e4ae0 + pristine_git_object: 6d7e94030527bc769fb794dd5e05a6287e766d49 src/__tests__/mockserver/internal/handler/pathdeleterestapiindexcustommetadataschemagroupname.go: id: ef047f0e0f32 last_write_checksum: sha1:187ff16d05efa1c937632f61dd3f49e49691d5ff @@ -3366,6 +3510,30 @@ 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/pathgetapiskillsskillidcontent.go: + id: bb0abc98a661 + last_write_checksum: sha1:707d5278fccf5b205be706a2be42a927680e0fd1 + pristine_git_object: e54fa1e1e27b903ed3e8b6d34bc14bfed9bdc8d2 + src/__tests__/mockserver/internal/handler/pathgetapiskillsskillidversions.go: + id: 256aa3680e34 + last_write_checksum: sha1:13f0052f2666abbc0898ea42d43776fd46a1fb9d + pristine_git_object: 3e2425d14102416566f4db6616e7e5e666a5a2fd + src/__tests__/mockserver/internal/handler/pathgetapiskillsskillidversionsversion.go: + id: 65a4c3e6ac69 + last_write_checksum: sha1:97a9d55793aa2ad077d8d35d5ae0d4cc7d5ce38f + pristine_git_object: c26b9c27fb4b41e2731bd60769bd81bfb221d064 + src/__tests__/mockserver/internal/handler/pathgetapiskillsskillidversionsversioncontent.go: + id: 3e78ab5e8aac + last_write_checksum: sha1:fcfe1c35c8eb5a2cf5b59039fb4f417c9b41e5a9 + pristine_git_object: 378a0630e5be5b0fe9d6f25920076c4b7f57deb4 src/__tests__/mockserver/internal/handler/pathgetrestapiindexcustommetadataschemagroupname.go: id: 68f9bc7ddc35 last_write_checksum: sha1:4fe0018044e99586f72be23534b463468e194ba2 @@ -3534,6 +3702,22 @@ trackedFiles: id: 53fb32000093 last_write_checksum: sha1:81fd212ba125c73b475a1f479e7555e441369ab5 pristine_git_object: 9baa62914befd9597996b2c8ad6fe1f93f93440f + src/__tests__/mockserver/internal/handler/pathpostapiskills.go: + id: 3ea49d94d44f + last_write_checksum: sha1:88142842749a56eb5a034652b9146db1bfb2b729 + pristine_git_object: 10c52a6f07c84fea2c7a02fca130ed36bf052b44 + src/__tests__/mockserver/internal/handler/pathpostapiskillsskillidversions.go: + id: e0720f878899 + last_write_checksum: sha1:6167c6aa949f0743dc174b24d5c191e7794c53a7 + pristine_git_object: 644e8bc8c9576ec59c8a7b5578eed57773a6e590 + src/__tests__/mockserver/internal/handler/pathpostapiskillsvalidation.go: + id: 352938cf16f1 + last_write_checksum: sha1:23bd3bdc3394c0a47ce68226f28c89459ec477c9 + pristine_git_object: 20d53bc57edcdc2eac6dd88c8d6b546d35806330 + 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,16 +4688,16 @@ 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 pristine_git_object: 3172b444e6aef36339d6310a902f38d4822c6cf3 src/__tests__/mockserver/internal/sdk/models/components/dlpissuefilter.go: id: 0576486983c3 - last_write_checksum: sha1:7799fa717dcdb8e720a81200ae220af05739992e - pristine_git_object: aa2535333e3fb08fa63a63b5641e4e0787a0ab91 + last_write_checksum: sha1:df0b7ab3d9ab61f6d090ea3f3dd80c1d260bda8f + pristine_git_object: 718e05274ef9f73edde049ff27d3c44d24629098 src/__tests__/mockserver/internal/sdk/models/components/dlpissuestatus.go: id: 919f360a14a6 last_write_checksum: sha1:fe393114058d8650cc518a72f6f62f0f60e92aae @@ -4536,8 +4720,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 +5458,82 @@ 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/platformskillcreaterequest.go: + id: aea7980bc993 + last_write_checksum: sha1:7295fafcacdd73a63c99753376760be90bccc651 + pristine_git_object: b743207d10532d5884217ae786d7b5689decc620 + src/__tests__/mockserver/internal/sdk/models/components/platformskillcreateresponse.go: + id: 5b428fd2dae4 + last_write_checksum: sha1:3aa01150eb532c9e04e2f936118030b92e0b3449 + pristine_git_object: 2fc631973c8d09a37a8835dd2218b3cfe3a6bb64 + 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/platformskillvalidationfile.go: + id: 32335c0f8fd4 + last_write_checksum: sha1:577edc4d1458c07954e42c2f7c7446a11132b7d7 + pristine_git_object: 416a8efd5b0f2969bff787657dc08f08a3c27364 + src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationmetadata.go: + id: ac843043a71e + last_write_checksum: sha1:99f61dd9e256f0d34636b85317d28e58bb434729 + pristine_git_object: 8db7eb3802faf80ae5da4bc599ae7e0c00703905 + src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationrequest.go: + id: 8695c0f943ff + last_write_checksum: sha1:8c8e144e80228ab1a542b5a8793952ea93d6aff1 + pristine_git_object: 6c8817346b9be5c7403f00c010cee04cbea89660 + src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationresponse.go: + id: 7d765ea13b6e + last_write_checksum: sha1:0fe37f1925ab3f29baf0ea936e7152c3e91cb76c + pristine_git_object: 86d8b6841cf3a4f8b439852bf25bff6ac988f656 + src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationwarning.go: + id: 03b68047dab7 + last_write_checksum: sha1:f7a8da11de8e21d7f2ccec1d3cbd82b2e77a86d2 + pristine_git_object: 76745cb0d6476e8f3dfc27c974bf0a924510ea25 + src/__tests__/mockserver/internal/sdk/models/components/platformskillversion.go: + id: 54223c53b14e + last_write_checksum: sha1:37d8c920413d84e81dd0b29cb9dee3b89f353263 + pristine_git_object: e39f0537f29f7179884f6e665a2110940ec91426 + src/__tests__/mockserver/internal/sdk/models/components/platformskillversioncreaterequest.go: + id: 898cd6d763b8 + last_write_checksum: sha1:3756306bd8b7eebca2d9d191d7946d1a4efc03e6 + pristine_git_object: 5a17830fa2d68195854cde9851443df926d511ca + src/__tests__/mockserver/internal/sdk/models/components/platformskillversioncreateresponse.go: + id: bd39d9458902 + last_write_checksum: sha1:19bf18bdf6ed46f4e60d0459d6c99fab1434e9c4 + pristine_git_object: 8dcc273b79d4b9d1dfda48262ce1e548cc8e377e + src/__tests__/mockserver/internal/sdk/models/components/platformskillversiongetresponse.go: + id: 8c217f4e9ded + last_write_checksum: sha1:7be8ab8bdcc9c215dc693fa7d8abccc60dbae49f + pristine_git_object: e706c6c8d11bb0f60ab4ba0fcdcd04c569d92171 + src/__tests__/mockserver/internal/sdk/models/components/platformskillversionslistresponse.go: + id: d2102202e6dd + last_write_checksum: sha1:7c849ff1c23f5d91178391aa92a2513cce27c62d + pristine_git_object: 59481bad54177566f98fa1cb3d271462f15d7f52 src/__tests__/mockserver/internal/sdk/models/components/platformtimerange.go: id: b8e92c9af7ab last_write_checksum: sha1:4e21c170201779eccc4d8c31ddbd56673895e674 @@ -5612,8 +5872,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 @@ -5708,8 +5968,8 @@ trackedFiles: pristine_git_object: bfbfbd58a0c5c3037e87c21904e11976785bfe98 src/__tests__/mockserver/internal/sdk/models/components/uploadchatfilesrequest.go: id: 5c526d60d3e1 - last_write_checksum: sha1:79dc65165ca4335850d8fda4812135281383bead - pristine_git_object: 863f8734b0f177fced1af62bed63dfbf0ca98b33 + last_write_checksum: sha1:07efd313bfa29c9833dd958371eef65a0681a554 + pristine_git_object: 0c7994a39418a250308cfa276bd5411b83cf79de src/__tests__/mockserver/internal/sdk/models/components/uploadchatfilesresponse.go: id: 4403e4fb4121 last_write_checksum: sha1:ae0bf84e9e5c79cd6834f3e56a981f3fc02a5398 @@ -5780,8 +6040,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 +6390,42 @@ trackedFiles: id: 8d5d0787d271 last_write_checksum: sha1:99dd76e44d3d48fb22d7582ecea439e2505ca224 pristine_git_object: 20b4d8b2efb5bc9a67f3e927fe3d3f919bf85897 + src/__tests__/mockserver/internal/sdk/models/operations/platformskillscreate.go: + id: 5926ffd35a42 + last_write_checksum: sha1:e892d1b2d5ffa19a40b2007cbdfbeca9fe358e63 + pristine_git_object: 73d1fe675d3b5e1cc4a51bdeeca0c69d6e64c663 + src/__tests__/mockserver/internal/sdk/models/operations/platformskillscreateversion.go: + id: e1b8211b9898 + last_write_checksum: sha1:ca87c4e14a7517d02638a30564108fa592d0ce42 + pristine_git_object: e98d6f9da6a2c88bef5faa79c6ff36edb7e8ee24 + 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/platformskillsgetcontent.go: + id: 59b8a5c7f997 + last_write_checksum: sha1:b7b0c0bcc2ba25b34e22d8669a16efd4b3957b0f + pristine_git_object: 8d5b57c81aef109eb8e50eb870266b41e1cb1d78 + src/__tests__/mockserver/internal/sdk/models/operations/platformskillsgetversion.go: + id: 5f92479ff728 + last_write_checksum: sha1:602dd57d8da7da312762114f2fb0a3a8d96f1d84 + pristine_git_object: 3897a80d3f4204bc01584617010d8a530314eee7 + src/__tests__/mockserver/internal/sdk/models/operations/platformskillsgetversioncontent.go: + id: 1a44c3a3c2a0 + last_write_checksum: sha1:76f9dfc6c2d91f8b490c052221148f22bfab985a + pristine_git_object: a4e4830efb54a35c428a628e4728209338a69216 + 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/platformskillslistversions.go: + id: 3bdf8967c612 + last_write_checksum: sha1:968aa0d910a052fb38c9772779edbb8372a6dd8a + pristine_git_object: 556fde5ba2a9c1874505ffe499cf7aadbf082a5c + src/__tests__/mockserver/internal/sdk/models/operations/platformskillsvalidate.go: + id: 5dab5ea12f2b + last_write_checksum: sha1:dae94b074a43988aaff25ae114e9c8f68a29d495 + pristine_git_object: 505fba968ce250a879f5c9c9b5895dcc87a94f7a src/__tests__/mockserver/internal/sdk/models/operations/postapiindexv1adddatasource.go: id: 4e5c790cee10 last_write_checksum: sha1:883a8812b033023bad4b6b01e7717970bbd2c3ba @@ -6282,6 +6578,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 +6770,14 @@ trackedFiles: id: 97f2005515d0 last_write_checksum: sha1:ddd72ab0c544d9bdc041891b5d6c85921c1f4a5b pristine_git_object: e36f1fde9af40fca3a6eee03a93a8c9c43e424bd + src/__tests__/skills.test.ts: + id: 3fa6e540c659 + last_write_checksum: sha1:20dae6491eee103f9b7156ef7193199e5e1eda4f + pristine_git_object: 21c6d6a4c46995ac2618790de8695c8169cca9fa src/__tests__/summarize.test.ts: id: 3105d6ebc7eb - last_write_checksum: sha1:bb2dba46f1d4304d8236c52e0355a53081ab6119 - pristine_git_object: bb5e2b02fd92c4bc218d0a791e8786a14448f109 + last_write_checksum: sha1:687786e8909fc65b8bea8778b6f48ca1b4eac734 + pristine_git_object: 59161d47cdbb7680e2c2efabb041c8765191c1b5 src/__tests__/testclient.ts: id: f142c080bff8 last_write_checksum: sha1:3a38647391f52221c009a9273eebf90793b3d430 @@ -6902,6 +7206,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 +7350,42 @@ trackedFiles: id: cc6075d2a5d0 last_write_checksum: sha1:2b013dc9368701f9b40ca2cd755094fcd72aba45 pristine_git_object: ad23061a8f21ce08b627a6ab903b462441bc1116 + src/funcs/skillsCreate.ts: + id: 58256c9d32bf + last_write_checksum: sha1:0c1f6554cbddfd18df4b859ab3c3e19b1c5cd8ed + pristine_git_object: 15d58a451d4e5b241cddabc6f39c40fe72eb7a54 + src/funcs/skillsCreateVersion.ts: + id: a41608d008c9 + last_write_checksum: sha1:55b962063d2017ea9d29788afd76fad2b88d8efd + pristine_git_object: 3bd0bf2f597f522475690dd8ab70cefd86ee0ff0 + src/funcs/skillsList.ts: + id: a643d8a0c73b + last_write_checksum: sha1:23440e1a5e404eff9b9392156cded3df9f38146a + pristine_git_object: 099d6983f978b48c4cf376a9e931d4742c8da7b2 + src/funcs/skillsListVersions.ts: + id: c33faaee572b + last_write_checksum: sha1:e56afdcd32b5f52e8f3049d358ff77e985332764 + pristine_git_object: 02324bc8c8351949ad952dc9cae34b8a9ec83dad + src/funcs/skillsRetrieve.ts: + id: 7bff1ef0523e + last_write_checksum: sha1:bde130c314937ad66a558488943ad485d9389c81 + pristine_git_object: f942a2894ee0886f9396f0951112e2e58a6bd9cb + src/funcs/skillsRetrieveContent.ts: + id: 4dbfedab3662 + last_write_checksum: sha1:d6c9d21f9b20aead497fb49c04a9a9d749ef9c60 + pristine_git_object: 5366d47cdeacdd6026fcd6f254a817bac66fcdf7 + src/funcs/skillsRetrieveVersion.ts: + id: b57c316cac51 + last_write_checksum: sha1:7d9fe1f63ac510f360590e71482edc75009a5112 + pristine_git_object: cb40bd2dc0772c8bf430a33376a6a12816549d03 + src/funcs/skillsRetrieveVersionContent.ts: + id: d466e3621984 + last_write_checksum: sha1:412592b6ebbb48b864e8d265da704f1ed466a711 + pristine_git_object: 4f06adc830c8b5622f45fe3b850f4dcff23c2a9a + src/funcs/skillsValidate.ts: + id: 4fe727b61c05 + last_write_checksum: sha1:a2eae2592460b35910407b62dfa0c948e0d1b4b2 + pristine_git_object: c12a452c3ee99c50537608a89b28dad5bea7ddb1 src/hooks/hooks.ts: id: a2463fc6f69b last_write_checksum: sha1:6e42a763f6217572cc59f8799af55dd21d961be9 @@ -7064,8 +7408,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:366fbe71d325c1c559ff7c875b5a9d54c4915963 + pristine_git_object: 2e610ceda8d0fef79daebd2ee1664b78ac9f1bcf src/lib/encodings.ts: id: 3bd8ead98afd last_write_checksum: sha1:a74725064d06b6994b95873c037975d2f2e63467 @@ -7804,16 +8148,16 @@ 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 pristine_git_object: 7c84ec2a318ac1d59f3629f31c22c3641873b6d0 src/models/components/dlpissuefilter.ts: id: 9bb0d9158454 - last_write_checksum: sha1:9261680b6bff4adfafa85a202d298f5d7b1fc7d5 - pristine_git_object: a8cb158d523fdc853d7edce5c33a86f414d63012 + last_write_checksum: sha1:80dbca23aa4c79deffe35349031bad767d0ea883 + pristine_git_object: cee29641f93438654e61098204cc0dcd926d8895 src/models/components/dlpissuestatus.ts: id: 9ca6c456ec8b last_write_checksum: sha1:b3ed7e3fb6891e81ca75621aa2b1cef5011d27a1 @@ -7836,8 +8180,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 +8556,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:1e184c24922f8297cde74342603942260a6e859c + pristine_git_object: 00ee413cea6e347de0c14eca79e186216362896a src/models/components/indexdocumentrequest.ts: id: deb13e2cdc65 last_write_checksum: sha1:33e2093c7fcdd3c90ef45c48e7b79c4cb2aea6e5 @@ -8574,6 +8918,82 @@ 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/platformskillcreaterequest.ts: + id: c3bbe84be116 + last_write_checksum: sha1:feff394c3c3b261d0a899b570bc61d6ec1d348b1 + pristine_git_object: 6be530ea8cc68a09f5ffc7e506b68c6f3edd83fe + src/models/components/platformskillcreateresponse.ts: + id: e0c14e4ff936 + last_write_checksum: sha1:46b2d382e66f58d72c68742e9b0533c433b0ab11 + pristine_git_object: dcb3b7d26705bc7e093fd27af767ba69a2edd67e + 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/platformskillvalidationfile.ts: + id: ed89a1d60695 + last_write_checksum: sha1:8bfc3a13a3d913a1ec080ec4a97c51d6600af9a5 + pristine_git_object: e232ccd5283eaa232380ce38d8b0ce5cfbf9ffe1 + src/models/components/platformskillvalidationmetadata.ts: + id: 198f33194249 + last_write_checksum: sha1:406b40f3ac8526e7f8e1aba32997009fed74e2c0 + pristine_git_object: 6ddc63fbfca3e793f0c32b2b9a68d01df0882735 + src/models/components/platformskillvalidationrequest.ts: + id: c7759b98c6a9 + last_write_checksum: sha1:a62b3cc0df7475f3f67656a4ef4d699645760374 + pristine_git_object: a18b7b028e84c04993d7632860ff20836abfb282 + src/models/components/platformskillvalidationresponse.ts: + id: 72e990f8b408 + last_write_checksum: sha1:974d92f3b16c83264e8fc634b3f7eedb1ff3a775 + pristine_git_object: 037388bd4167ab5bf64208f1c38b924097ea52b5 + src/models/components/platformskillvalidationwarning.ts: + id: 9f6d3a564161 + last_write_checksum: sha1:5e04b8c9f66d6d7ed5b30e80ac3317f936c3e3d7 + pristine_git_object: 73238ea01b138bad4f5836c71ac69c33a57edff9 + src/models/components/platformskillversion.ts: + id: f58a116c278b + last_write_checksum: sha1:4f0df0041dbc192f9913929b37b2462a5a74a42d + pristine_git_object: f8a493649696239dcffa6dff3de25184dc478e60 + src/models/components/platformskillversioncreaterequest.ts: + id: 48a1435a29de + last_write_checksum: sha1:3aaa4dd4b4558aa1e708460b2ea1f3275f5fae4b + pristine_git_object: 747e50eff1110e422e042ed87033192fe13aab42 + src/models/components/platformskillversioncreateresponse.ts: + id: fbe062f0608b + last_write_checksum: sha1:9e976cbd8c1d7cd212d61c75c37863c58bdeac2f + pristine_git_object: 6f5a8d157655e3182fbef732dca72dbc463745b0 + src/models/components/platformskillversiongetresponse.ts: + id: 5468769fbfe8 + last_write_checksum: sha1:db9438ee8e434317a6bde87fc9a7696fe57c6dfb + pristine_git_object: b83d5a92c3ba96e60b20a4196305e0cb0f3b226d + src/models/components/platformskillversionslistresponse.ts: + id: fc6cbf29ca76 + last_write_checksum: sha1:f35b89046817273650a973a66b8119f9d15cb824 + pristine_git_object: 0eae4ee4f7219b1d4eaae9616731823d0c82e99d src/models/components/platformtimerange.ts: id: fb9ab6343c3a last_write_checksum: sha1:5816eda5ae4c626e40a45ad8f94a2409bc885d49 @@ -8912,8 +9332,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 @@ -9008,8 +9428,8 @@ trackedFiles: pristine_git_object: d73084aea13396d71b1db32825c6bf2ab9d9450b src/models/components/uploadchatfilesrequest.ts: id: e813edcec507 - last_write_checksum: sha1:4c0db4073f4ae4b21fab27e8bb99238af202d329 - pristine_git_object: b3dc70ae3b496da52369d0aef84537865b3d71f4 + last_write_checksum: sha1:f0823eb3565aadbbbe2244925a0d88a672d95aea + pristine_git_object: d6344c919ed5c0378633eff4872dfa64826fe001 src/models/components/uploadchatfilesresponse.ts: id: 29de41a36d75 last_write_checksum: sha1:d81f5a78bb4b219e277a4061415b3bcc89de8246 @@ -9080,8 +9500,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 +9792,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:1e70671a266409d922dfefea502fc9defb6045e3 + pristine_git_object: 270171c35788f02fd1cd16672e634631aff83a10 src/models/operations/insights.ts: id: 7bef0edaab32 last_write_checksum: sha1:37db16bc7603defd715210dfd8c12de88bde8b72 @@ -9434,6 +9854,34 @@ trackedFiles: id: c025879102b3 last_write_checksum: sha1:65d7361ac886e2c8f3200c6cc3141daf78ba1eac pristine_git_object: 69bd1349edebd305537e0ec66afbe70db4e9aa14 + src/models/operations/platformskillscreateversion.ts: + id: 9006c3c1a29c + last_write_checksum: sha1:c180d3d0bfa13c7661e8c84a4a49dc6c54557b11 + pristine_git_object: b742860383210812130553f403bf4e1330561acc + src/models/operations/platformskillsget.ts: + id: 24dc86e69e49 + last_write_checksum: sha1:4979b3fb3b38b0b13a40a1fb548fa73d3f36bc48 + pristine_git_object: c3d2123ed894d2bdbeee10060566018e320c36cb + src/models/operations/platformskillsgetcontent.ts: + id: f83cfd7f2d50 + last_write_checksum: sha1:b94df6c763f381bbe2a507d854cc96a60253a8c0 + pristine_git_object: fcd62f365bafd3934b9197e929c753b78d09bc62 + src/models/operations/platformskillsgetversion.ts: + id: d3f862b0c2e7 + last_write_checksum: sha1:870d1241aa8bcd061c6724118d69e0efe44d08ad + pristine_git_object: 3f03fe5996317ba66cf16cb9a1f053d456b8a508 + src/models/operations/platformskillsgetversioncontent.ts: + id: 191f01905043 + last_write_checksum: sha1:b729d221cffaa74f37ce84d05a4e0c78e60db608 + pristine_git_object: d29ed4826977a58afb22f0cf2f6de7f5ffff38ab + src/models/operations/platformskillslist.ts: + id: 909cbd063812 + last_write_checksum: sha1:f4ff7c3e2ae74219bdc8df3f9efd1d6a9db5d1fe + pristine_git_object: e081d77940f8b67ed533e1a8e7bceb9e0f83c80c + src/models/operations/platformskillslistversions.ts: + id: 826a93a86c4e + last_write_checksum: sha1:cb4f58426327b3007a56744d33f8fe77578ba10b + pristine_git_object: e03a136af2eb65628713a5f1e9fd5ed1b4dbac4f src/models/operations/postapiindexv1debugdatasourcedocument.ts: id: 03753664a7e3 last_write_checksum: sha1:1fc8451990ad08329b62b2915f227f575e7e4b0b @@ -9454,6 +9902,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 +10416,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:c31d2d63d0e338e1515a1d0d6d7581ec98af773d + pristine_git_object: a4a0c405f98e6904b43e5bde0747872c7a96f58d src/react-query/indexingAuthenticationRotateToken.ts: id: e56c0845e38e last_write_checksum: sha1:035d7baae9a7fd7c32f69211cfe85b0f6ccbbf8c @@ -10006,6 +10458,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 +10602,66 @@ trackedFiles: id: a67629da8040 last_write_checksum: sha1:5ce8b5811af2d6dd5bc95afd2e9358c16d7c7a99 pristine_git_object: bc4f7e63f7066516b637ad801275acd0fa53c9e0 + src/react-query/skillsCreate.ts: + id: 7726086743dc + last_write_checksum: sha1:3409d7b9f44ec43b20674cda6aa520c0bf70a808 + pristine_git_object: d247758f75a04098e435e6407e8a33f430aa657e + src/react-query/skillsCreateVersion.ts: + id: 2bcd9406d548 + last_write_checksum: sha1:ecc101446976f0340521d875ce375d2da65b66ab + pristine_git_object: 70e74e8c83c1c4d29da22bff79d6fd6aefd71764 + 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/skillsListVersions.core.ts: + id: 92446ae9c4cc + last_write_checksum: sha1:54f7f1ad125c6b58610cdcc4958c67550d064a15 + pristine_git_object: 7d9e72adf13504e144d4c316aa698a6b3b0edf8e + src/react-query/skillsListVersions.ts: + id: f270a8f770bf + last_write_checksum: sha1:b646c9255a7801ac70cb3a4bed39f56036a44be1 + pristine_git_object: 8db5ef1d98ce7b7757a35ed0d41be4675770f123 + 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/react-query/skillsRetrieveContent.core.ts: + id: d03069e54713 + last_write_checksum: sha1:e718901f06a08ec59c1415887edb8ab05a2a870d + pristine_git_object: a0ab5639faf49bfa30d0716030f2027f9bd2335c + src/react-query/skillsRetrieveContent.ts: + id: c3ff7f8aede3 + last_write_checksum: sha1:35e49e675e79299ddadc4ae0423ff7dd19aa5d26 + pristine_git_object: 7e405a08f6874fb46185c01f2e409d8f480b10da + src/react-query/skillsRetrieveVersion.core.ts: + id: 8a1dd7dcdfdd + last_write_checksum: sha1:319dc1b651f118983bccaa2fb934a8b346394f07 + pristine_git_object: e7df86c2701a222fb9ad2a405af2fba058b57384 + src/react-query/skillsRetrieveVersion.ts: + id: 1cb35f733792 + last_write_checksum: sha1:e1fb81343d23991bccaa6602a93be67199caeb38 + pristine_git_object: 17abf16af6b0f771a849b6fc1303bbbe42f13ae1 + src/react-query/skillsRetrieveVersionContent.core.ts: + id: 740cd8836341 + last_write_checksum: sha1:17226ac85835f66b461ca14bb96c055f10782d89 + pristine_git_object: 9cb178d328bbcc7017b03e0dc5b91764aa772ee2 + src/react-query/skillsRetrieveVersionContent.ts: + id: df4ac1f925b8 + last_write_checksum: sha1:69104669b5a1ff88bbf1c1cb93c45865c2817d88 + pristine_git_object: 8f8681a4c0e351034a5b0df66a79b9093dcc1453 + src/react-query/skillsValidate.ts: + id: 03ea65130133 + last_write_checksum: sha1:701439a52242439ae477cc1578a090c621af85b5 + pristine_git_object: ce78f372ad8137b2febf85f9261a8086fe68f152 src/sdk/activity.ts: id: 87dddbbca815 last_write_checksum: sha1:1b66eb529dcde53e002e35ac6fd6e6e7e56be73e @@ -10240,8 +10756,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 +10796,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:edb8c0137cf0bf51e06cbc592522227d0db8fe84 + pristine_git_object: 9155b69114897a43a5bcc9d22b85c17130173bbe src/sdk/tools.ts: id: f997ccdd9dd9 last_write_checksum: sha1:803cc691fc4535aba26609bc73553dcef9edda58 @@ -11346,6 +11866,128 @@ examples: responses: "200": application/json: {"authorizationUrl": "https://shocked-casket.name/"} + platform-skills-create: + speakeasy-default-platform-skills-create: + requestBody: + multipart/form-data: {"file": "x-file: example.file"} + responses: + "200": + application/json: {"skill": {"id": "", "display_name": "Merl18", "description": "rural ugh unexpectedly excepting livid", "latest_version": 504149, "latest_minor_version": 106110, "status": "DISABLED", "origin": "CUSTOM", "owner": {"name": ""}, "created_at": "2025-01-04T03:16:16.951Z", "updated_at": "2025-09-10T16:05:46.046Z"}, "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-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-validate: + speakeasy-default-platform-skills-validate: + requestBody: + multipart/form-data: {"file": "x-file: example.file"} + responses: + "200": + application/json: {"metadata": {"display_name": "Hattie10", "description": "overburden actual impact"}, "files": [], "warnings": [], "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"}]} + platform-skills-get-content: + speakeasy-default-platform-skills-get-content: + parameters: + path: + skill_id: "" + responses: + "200": + application/octet-stream: "x-file: example.file" + "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-create-version: + speakeasy-default-platform-skills-create-version: + parameters: + path: + skill_id: "" + requestBody: + multipart/form-data: {"file": "x-file: example.file"} + responses: + "200": + application/json: {"version": {"skill_id": "", "version": 375506, "minor_version": 600322, "is_latest": false, "created_by": {"name": ""}, "created_at": "2026-09-27T14:37:09.109Z", "updated_at": "2024-05-30T08:59:58.715Z"}, "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-list-versions: + speakeasy-default-platform-skills-list-versions: + parameters: + path: + skill_id: "" + responses: + "200": + application/json: {"versions": [], "has_more": false, "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-version: + speakeasy-default-platform-skills-get-version: + parameters: + path: + skill_id: "" + version: 495658 + responses: + "200": + application/json: {"version": {"skill_id": "", "version": 81632, "minor_version": 646412, "is_latest": false, "created_by": {"name": ""}, "created_at": "2025-02-17T18:47:57.025Z", "updated_at": "2024-12-19T03:10:35.770Z"}, "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-version-content: + speakeasy-default-platform-skills-get-version-content: + parameters: + path: + skill_id: "" + version: 117760 + responses: + "200": + application/octet-stream: "x-file: example.file" + "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 +12155,17 @@ 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-create: "2026-07-21T09:01:01Z" + platform-skills-list: "2026-07-21T09:01:01Z" + platform-skills-validate: "2026-07-21T09:01:01Z" + platform-skills-get: "2026-07-21T09:01:01Z" + platform-skills-get-content: "2026-07-21T09:01:01Z" + platform-skills-create-version: "2026-07-21T09:01:01Z" + platform-skills-list-versions: "2026-07-21T09:01:01Z" + platform-skills-get-version: "2026-07-21T09:01:01Z" + platform-skills-get-version-content: "2026-07-21T09:01:01Z" + post_/rest/api/index/submissions/{datasourceInstance}/{type}: "2026-07-21T09:01:02Z" +releaseNotes: "## Typescript SDK Changes:\n* `glean.skills.create()`: **Added**\n* `glean.skills.list()`: **Added**\n* `glean.skills.validate()`: **Added**\n* `glean.skills.retrieve()`: **Added**\n* `glean.skills.retrieveContent()`: **Added**\n* `glean.skills.createVersion()`: **Added**\n* `glean.skills.listVersions()`: **Added**\n* `glean.skills.retrieveVersion()`: **Added**\n* `glean.skills.retrieveVersionContent()`: **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` **Changed**\n * `response` **Changed**\n* `glean.client.governance.data.findings.list()`: `response.exports[]` **Changed**\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..9b00266d 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: 2822daae55430107c738db822cbeeb5a6bef463b + x-open-api-commit-sha: 0bdefe83a21f917592624e6f1dbaa180e89d5224 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,489 @@ paths: x-speakeasy-name-override: createRun security: - APIToken: [] + /api/skills: + post: + tags: + - Skills + summary: Create skill + description: | + Create a skill from an uploaded SKILL.md, .zip, or .skill bundle. If the authenticated user already has a skill with the same name, the existing skill is superseded with a new version. + operationId: platform-skills-create + x-visibility: Public + x-glean-experimental: + id: 3cd55572-0d5c-4898-9ecf-1b86c520d1c7 + introduced: "2026-06-24" + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/PlatformSkillCreateRequest" + x-codegen-request-body-name: request + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillCreateResponse" + "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" + "413": + $ref: "#/components/responses/PlatformRequestTooLarge" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: create + security: + - APIToken: [] + 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/validation: + post: + tags: + - Skills + summary: Validate skill bundle + description: | + Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. + operationId: platform-skills-validate + x-visibility: Public + x-glean-experimental: + id: 0b086fa6-30f8-4279-8d11-10ab0059c14a + introduced: "2026-06-24" + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/PlatformSkillValidationRequest" + x-codegen-request-body-name: request + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillValidationResponse" + "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" + "413": + $ref: "#/components/responses/PlatformRequestTooLarge" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: validate + 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/skills/{skill_id}/content: + get: + tags: + - Skills + summary: Download skill content + description: | + Download the latest installable bundle for a skill available to the authenticated user. + operationId: platform-skills-get-content + x-visibility: Public + x-glean-experimental: + id: fd6908d8-f230-4cd5-bf45-f71e69266b1d + introduced: "2026-06-24" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + headers: + Content-Disposition: + description: Attachment filename for the skill bundle. + schema: + type: string + content: + application/octet-stream: + schema: + type: string + format: binary + "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: retrieveContent + security: + - APIToken: [] + /api/skills/{skill_id}/versions: + post: + tags: + - Skills + summary: Create skill version + description: | + Create a new immutable version for an existing caller-managed skill from an uploaded SKILL.md, .zip, or .skill bundle. + operationId: platform-skills-create-version + x-visibility: Public + x-glean-experimental: + id: 0d5e48e2-7a41-4d54-b3aa-5026f0dd65df + introduced: "2026-06-24" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/PlatformSkillVersionCreateRequest" + x-codegen-request-body-name: request + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillVersionCreateResponse" + "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" + "409": + $ref: "#/components/responses/PlatformConflict" + "413": + $ref: "#/components/responses/PlatformRequestTooLarge" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: createVersion + security: + - APIToken: [] + get: + tags: + - Skills + summary: List skill versions + description: | + List versions for a skill available to the authenticated user. + operationId: platform-skills-list-versions + x-visibility: Public + x-glean-experimental: + id: 9efbb8a3-d546-4304-a653-09bb427e3681 + introduced: "2026-06-24" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + - in: query + name: page_size + description: Maximum number of versions 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/PlatformSkillVersionsListResponse" + "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: listVersions + security: + - APIToken: [] + /api/skills/{skill_id}/versions/{version}: + get: + tags: + - Skills + summary: Retrieve skill version + description: | + Retrieve metadata for a skill version available to the authenticated user. + operationId: platform-skills-get-version + x-visibility: Public + x-glean-experimental: + id: d70986b1-ad80-48dd-8e52-f294e7251dda + introduced: "2026-06-24" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + - name: version + in: path + required: true + description: Major version number. + schema: + type: integer + minimum: 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillVersionGetResponse" + "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: retrieveVersion + security: + - APIToken: [] + /api/skills/{skill_id}/versions/{version}/content: + get: + tags: + - Skills + summary: Download skill version content + description: | + Download the installable bundle for a skill version available to the authenticated user. + operationId: platform-skills-get-version-content + x-visibility: Public + x-glean-experimental: + id: 70c85692-7042-403a-a3a5-5b315576432a + introduced: "2026-06-24" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + - name: version + in: path + required: true + description: Major version number. + schema: + type: integer + minimum: 1 + responses: + "200": + description: Successful response. + headers: + Content-Disposition: + description: Attachment filename for the skill bundle. + schema: + type: string + content: + application/octet-stream: + schema: + type: string + format: binary + "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: retrieveVersionContent + security: + - APIToken: [] /api/search: post: tags: @@ -4158,25 +4641,88 @@ paths: content: application/json; charset=UTF-8: schema: - $ref: '#/components/schemas/DebugDocumentLifecycleRequest' + $ref: '#/components/schemas/DebugDocumentLifecycleRequest' + required: true + x-exportParamName: DebugDocumentLifecycleRequest + responses: + "200": + description: OK + content: + application/json; charset=UTF-8: + schema: + $ref: '#/components/schemas/DebugDocumentLifecycleResponse' + "400": + description: Bad Request + "401": + description: Not Authorized + "429": + description: Too Many Requests + 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: DebugDocumentLifecycleRequest + x-exportParamName: SubmissionRequest responses: - "200": - description: OK + "202": + description: Accepted content: - application/json; charset=UTF-8: + application/json: schema: - $ref: '#/components/schemas/DebugDocumentLifecycleResponse' + type: object + properties: + requestId: + type: string + required: + - requestId "400": - description: Bad Request + $ref: '#/components/responses/BadRequestError' "401": - description: Not Authorized - "429": - description: Too Many Requests - x-beta: true - x-speakeasy-group: indexing.documents - x-speakeasy-name-override: debugEvents + $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 +6025,322 @@ 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. + PlatformSkillCreateRequest: + type: object + additionalProperties: false + required: + - file + properties: + file: + type: string + format: binary + description: SKILL.md, .zip, or .skill bundle to create. + PlatformSkillCreateResponse: + type: object + required: + - skill + - request_id + properties: + skill: + $ref: "#/components/schemas/PlatformSkill" + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformSkillValidationRequest: + type: object + additionalProperties: false + required: + - file + properties: + file: + type: string + format: binary + description: SKILL.md, .zip, or .skill bundle to validate. + PlatformSkillValidationMetadata: + type: object + required: + - display_name + - description + properties: + display_name: + type: string + description: Skill name parsed from SKILL.md frontmatter. + description: + type: string + description: Skill description parsed from SKILL.md frontmatter. + PlatformSkillValidationFile: + type: object + required: + - path + - size_bytes + - is_manifest + properties: + path: + type: string + description: Normalized relative path in the skill bundle. + size_bytes: + type: integer + description: File size in bytes. + is_manifest: + type: boolean + description: Whether this file is the skill manifest. + PlatformSkillValidationWarning: + type: object + required: + - code + - message + properties: + code: + type: string + description: Stable warning code. + message: + type: string + description: Human-readable warning message. + PlatformSkillValidationResponse: + type: object + required: + - metadata + - files + - warnings + - request_id + properties: + metadata: + $ref: "#/components/schemas/PlatformSkillValidationMetadata" + files: + type: array + description: Normalized files in the bundle after stripping an optional single root folder. + items: + $ref: "#/components/schemas/PlatformSkillValidationFile" + warnings: + type: array + description: Non-blocking validation warnings. + items: + $ref: "#/components/schemas/PlatformSkillValidationWarning" + 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. + PlatformSkillVersion: + type: object + required: + - skill_id + - version + - minor_version + - is_latest + - created_by + - created_at + - updated_at + properties: + skill_id: + type: string + description: Glean skill ID. + version: + type: integer + description: Major version number. + minor_version: + type: integer + description: Minor version number. + is_latest: + type: boolean + description: Whether this is the latest version of the skill. + created_by: + $ref: "#/components/schemas/PlatformPersonReference" + created_at: + type: string + format: date-time + description: Time this version was created. + updated_at: + type: string + format: date-time + description: Time this version was last updated. + source_provenance: + $ref: "#/components/schemas/PlatformSkillSourceProvenance" + PlatformSkillVersionsListResponse: + type: object + required: + - versions + - has_more + - next_cursor + - request_id + properties: + versions: + type: array + description: Versions available for the skill. + items: + $ref: "#/components/schemas/PlatformSkillVersion" + 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. + PlatformSkillVersionCreateRequest: + type: object + additionalProperties: false + required: + - file + properties: + file: + type: string + format: binary + description: SKILL.md, .zip, or .skill bundle to store as a new version. + PlatformSkillVersionCreateResponse: + type: object + required: + - version + - request_id + properties: + version: + $ref: "#/components/schemas/PlatformSkillVersion" + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformSkillVersionGetResponse: + type: object + required: + - version + - request_id + properties: + version: + $ref: "#/components/schemas/PlatformSkillVersion" + request_id: + type: string + description: Platform-generated request ID for support correlation. PlatformFilterOperator: type: string description: Supported filter operator. @@ -5579,18 +6441,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 +10485,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 +11089,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 +16624,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 @@ -15819,11 +16691,31 @@ components: description: Filter by one or more issue statuses. assigneeId: type: string - description: Filter by assignee user ID. + description: Filter by a single assignee user ID. Deprecated; use assigneeIds. + deprecated: true + assigneeIds: + type: array + items: + type: string + description: Filter by one or more assignee user IDs. Use the sentinel value "UNASSIGNED" to match issues with no assignee. infoType: type: string + description: Filter by a single built-in info type. Deprecated; use infoTypes. + deprecated: true + infoTypes: + type: array + items: + type: string + description: Filter by one or more built-in info types. regexId: type: string + description: Filter by a single regex rule ID. Deprecated; use regexIds. + deprecated: true + regexIds: + type: array + items: + type: string + description: Filter by one or more regex rule IDs. reportIds: type: array items: @@ -15833,6 +16725,13 @@ components: type: string datasource: type: string + description: Filter by a single datasource. Deprecated; use datasources. + deprecated: true + datasources: + type: array + items: + type: string + description: Filter by one or more datasources. visibility: type: string severities: diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index b1ff6863..d458c216 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -164747,3 +164747,188 @@ workflows: type: simple x-speakeasy-test-group: tools x-speakeasy-test-rebuild: true + - workflowId: platform-skills-create + steps: + - stepId: test + operationId: platform-skills-create + requestBody: + contentType: multipart/form-data + payload: + file: 'x-file: example.file' + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"skill":{"id":"","display_name":"Merl18","description":"rural ugh unexpectedly excepting livid","latest_version":504149,"latest_minor_version":106110,"status":"DISABLED","origin":"CUSTOM","owner":{"name":""},"created_at":"2025-01-04T03:16:16.951Z","updated_at":"2025-09-10T16:05:46.046Z"},"request_id":""} + type: simple + x-speakeasy-test-group: skills + 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-validate + steps: + - stepId: test + operationId: platform-skills-validate + requestBody: + contentType: multipart/form-data + payload: + file: 'x-file: example.file' + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"metadata":{"display_name":"Hattie10","description":"overburden actual impact"},"files":[],"warnings":[],"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: platform-skills-get-content + steps: + - stepId: test + operationId: platform-skills-get-content + parameters: + - name: skill_id + in: path + value: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/octet-stream + - context: $response.body + condition: | + "x-file: example.file" + type: simple + x-speakeasy-test-group: skills + x-speakeasy-test-rebuild: true + - workflowId: platform-skills-create-version + steps: + - stepId: test + operationId: platform-skills-create-version + parameters: + - name: skill_id + in: path + value: + requestBody: + contentType: multipart/form-data + payload: + file: 'x-file: example.file' + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"version":{"skill_id":"","version":375506,"minor_version":600322,"is_latest":false,"created_by":{"name":""},"created_at":"2026-09-27T14:37:09.109Z","updated_at":"2024-05-30T08:59:58.715Z"},"request_id":""} + type: simple + x-speakeasy-test-group: skills + x-speakeasy-test-rebuild: true + - workflowId: platform-skills-list-versions + steps: + - stepId: test + operationId: platform-skills-list-versions + parameters: + - name: skill_id + in: path + value: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"versions":[],"has_more":false,"next_cursor":"","request_id":""} + type: simple + x-speakeasy-test-group: skills + x-speakeasy-test-rebuild: true + - workflowId: platform-skills-get-version + steps: + - stepId: test + operationId: platform-skills-get-version + parameters: + - name: skill_id + in: path + value: + - name: version + in: path + value: 495658 + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"version":{"skill_id":"","version":81632,"minor_version":646412,"is_latest":false,"created_by":{"name":""},"created_at":"2025-02-17T18:47:57.025Z","updated_at":"2024-12-19T03:10:35.770Z"},"request_id":""} + type: simple + x-speakeasy-test-group: skills + x-speakeasy-test-rebuild: true + - workflowId: platform-skills-get-version-content + steps: + - stepId: test + operationId: platform-skills-get-version-content + parameters: + - name: skill_id + in: path + value: + - name: version + in: path + value: 117760 + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/octet-stream + - context: $response.body + condition: | + "x-file: example.file" + 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..64afd73d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.789.2 +speakeasyVersion: 1.790.3 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:145236c33451e6e87cf1507a4d8829678b0df02af59afc9341330627e33ed760 - sourceBlobDigest: sha256:862b1370a65d146eac83f86c6fbd2d787f04ea93c2cf28259af5ded934f9fb3b + sourceRevisionDigest: sha256:bb3bada7cfd1fef35eb00e096010fcd9238a6dde135ee387c782bba65dfa45fb + sourceBlobDigest: sha256:5552ea5e20187c775de44c60abbd112a31cf189b9486aafe2e303b5f71e76f0b 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:bb3bada7cfd1fef35eb00e096010fcd9238a6dde135ee387c782bba65dfa45fb + sourceBlobDigest: sha256:5552ea5e20187c775de44c60abbd112a31cf189b9486aafe2e303b5f71e76f0b codeSamplesNamespace: glean-api-specs-typescript-code-samples - codeSamplesRevisionDigest: sha256:3926e0a4287d60c4246139ee2a719a81878de8c9e8716c7c1f962b062706e5aa + codeSamplesRevisionDigest: sha256:4fccf3340ecfd3b8983f80b9a4fd877136f252809bab9111058d76b4637a86a7 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 17a81aaa..cfa87548 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,18 @@ 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) + +* [create](docs/sdks/skills/README.md#create) - Create skill +* [list](docs/sdks/skills/README.md#list) - List skills +* [validate](docs/sdks/skills/README.md#validate) - Validate skill bundle +* [retrieve](docs/sdks/skills/README.md#retrieve) - Retrieve skill +* [retrieveContent](docs/sdks/skills/README.md#retrievecontent) - Download skill content +* [createVersion](docs/sdks/skills/README.md#createversion) - Create skill version +* [listVersions](docs/sdks/skills/README.md#listversions) - List skill versions +* [retrieveVersion](docs/sdks/skills/README.md#retrieveversion) - Retrieve skill version +* [retrieveVersionContent](docs/sdks/skills/README.md#retrieveversioncontent) - Download skill version content + @@ -612,6 +625,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 +663,15 @@ 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 +- [`skillsCreate`](docs/sdks/skills/README.md#create) - Create skill +- [`skillsCreateVersion`](docs/sdks/skills/README.md#createversion) - Create skill version +- [`skillsList`](docs/sdks/skills/README.md#list) - List skills +- [`skillsListVersions`](docs/sdks/skills/README.md#listversions) - List skill versions +- [`skillsRetrieve`](docs/sdks/skills/README.md#retrieve) - Retrieve skill +- [`skillsRetrieveContent`](docs/sdks/skills/README.md#retrievecontent) - Download skill content +- [`skillsRetrieveVersion`](docs/sdks/skills/README.md#retrieveversion) - Retrieve skill version +- [`skillsRetrieveVersionContent`](docs/sdks/skills/README.md#retrieveversioncontent) - Download skill version content +- [`skillsValidate`](docs/sdks/skills/README.md#validate) - Validate skill bundle - ~~[`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 +803,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 +841,15 @@ 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 +- [`useSkillsCreateMutation`](docs/sdks/skills/README.md#create) - Create skill +- [`useSkillsCreateVersionMutation`](docs/sdks/skills/README.md#createversion) - Create skill version +- [`useSkillsList`](docs/sdks/skills/README.md#list) - List skills +- [`useSkillsListVersions`](docs/sdks/skills/README.md#listversions) - List skill versions +- [`useSkillsRetrieve`](docs/sdks/skills/README.md#retrieve) - Retrieve skill +- [`useSkillsRetrieveContent`](docs/sdks/skills/README.md#retrievecontent) - Download skill content +- [`useSkillsRetrieveVersion`](docs/sdks/skills/README.md#retrieveversion) - Retrieve skill version +- [`useSkillsRetrieveVersionContent`](docs/sdks/skills/README.md#retrieveversioncontent) - Download skill version content +- [`useSkillsValidateMutation`](docs/sdks/skills/README.md#validate) - Validate skill bundle - ~~[`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** @@ -849,10 +882,8 @@ const glean = new Glean({ }); async function run() { - const result = await glean.client.chat.uploadFiles({ - files: [ - await openAsBlob("example.file"), - ], + const result = await glean.skills.create({ + file: await openAsBlob("example.file"), }); console.log(result); @@ -1061,11 +1092,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..9722ce5c 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-21 08:58:45 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.790.3 (2.918.4) 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/dlpissuefilter.md b/docs/models/components/dlpissuefilter.md index b8cd2061..60198294 100644 --- a/docs/models/components/dlpissuefilter.md +++ b/docs/models/components/dlpissuefilter.md @@ -12,16 +12,20 @@ let value: DlpIssueFilter = {}; ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `searchText` | *string* | :heavy_minus_sign: | Text to search for in issue fields. | -| `statuses` | [components.DlpIssueStatus](../../models/components/dlpissuestatus.md)[] | :heavy_minus_sign: | Filter by one or more issue statuses. | -| `assigneeId` | *string* | :heavy_minus_sign: | Filter by assignee user ID. | -| `infoType` | *string* | :heavy_minus_sign: | N/A | -| `regexId` | *string* | :heavy_minus_sign: | N/A | -| `reportIds` | *string*[] | :heavy_minus_sign: | Filter by one or more report/policy IDs. | -| `docId` | *string* | :heavy_minus_sign: | N/A | -| `datasource` | *string* | :heavy_minus_sign: | N/A | -| `visibility` | *string* | :heavy_minus_sign: | N/A | -| `severities` | [components.DlpSeverity](../../models/components/dlpseverity.md)[] | :heavy_minus_sign: | Filter by one or more severity levels. | -| `timeRange` | [components.TimeRangeFilter](../../models/components/timerangefilter.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `searchText` | *string* | :heavy_minus_sign: | Text to search for in issue fields. | +| `statuses` | [components.DlpIssueStatus](../../models/components/dlpissuestatus.md)[] | :heavy_minus_sign: | Filter by one or more issue statuses. | +| ~~`assigneeId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter by a single assignee user ID. Deprecated; use assigneeIds. | +| `assigneeIds` | *string*[] | :heavy_minus_sign: | Filter by one or more assignee user IDs. Use the sentinel value "UNASSIGNED" to match issues with no assignee. | +| ~~`infoType`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter by a single built-in info type. Deprecated; use infoTypes. | +| `infoTypes` | *string*[] | :heavy_minus_sign: | Filter by one or more built-in info types. | +| ~~`regexId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter by a single regex rule ID. Deprecated; use regexIds. | +| `regexIds` | *string*[] | :heavy_minus_sign: | Filter by one or more regex rule IDs. | +| `reportIds` | *string*[] | :heavy_minus_sign: | Filter by one or more report/policy IDs. | +| `docId` | *string* | :heavy_minus_sign: | N/A | +| ~~`datasource`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Filter by a single datasource. Deprecated; use datasources. | +| `datasources` | *string*[] | :heavy_minus_sign: | Filter by one or more datasources. | +| `visibility` | *string* | :heavy_minus_sign: | N/A | +| `severities` | [components.DlpSeverity](../../models/components/dlpseverity.md)[] | :heavy_minus_sign: | Filter by one or more severity levels. | +| `timeRange` | [components.TimeRangeFilter](../../models/components/timerangefilter.md) | :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/platformskillcreaterequest.md b/docs/models/components/platformskillcreaterequest.md new file mode 100644 index 00000000..b714d711 --- /dev/null +++ b/docs/models/components/platformskillcreaterequest.md @@ -0,0 +1,15 @@ +# PlatformSkillCreateRequest + +## Example Usage + +```typescript +import { PlatformSkillCreateRequest } from "@gleanwork/api-client/models/components"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `file` | [File](https://developer.mozilla.org/en-US/docs/Web/API/File) \| [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) \| [components.PlatformSkillCreateRequestFile](../../models/components/platformskillcreaterequestfile.md) | :heavy_check_mark: | SKILL.md, .zip, or .skill bundle to create. | \ No newline at end of file diff --git a/docs/models/components/platformskillcreaterequestfile.md b/docs/models/components/platformskillcreaterequestfile.md new file mode 100644 index 00000000..86de6b5d --- /dev/null +++ b/docs/models/components/platformskillcreaterequestfile.md @@ -0,0 +1,16 @@ +# PlatformSkillCreateRequestFile + +## Example Usage + +```typescript +import { PlatformSkillCreateRequestFile } from "@gleanwork/api-client/models/components"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `fileName` | *string* | :heavy_check_mark: | N/A | +| `content` | *ReadableStream* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/platformskillcreateresponse.md b/docs/models/components/platformskillcreateresponse.md new file mode 100644 index 00000000..bae820b4 --- /dev/null +++ b/docs/models/components/platformskillcreateresponse.md @@ -0,0 +1,32 @@ +# PlatformSkillCreateResponse + +## Example Usage + +```typescript +import { PlatformSkillCreateResponse } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillCreateResponse = { + skill: { + id: "", + display_name: "Kian.Klein18", + description: "per whereas indeed than devise oh", + latest_version: 33911, + latest_minor_version: 977646, + status: "ENABLED", + origin: "CUSTOM", + owner: { + name: "", + }, + created_at: new Date("2025-10-31T03:35:54.354Z"), + updated_at: new Date("2025-01-03T15:10:34.800Z"), + }, + 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/platformskillgetresponse.md b/docs/models/components/platformskillgetresponse.md new file mode 100644 index 00000000..01ba7d7a --- /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: "Kian.Klein18", + description: "per whereas indeed than devise oh", + latest_version: 33911, + latest_minor_version: 977646, + status: "ENABLED", + origin: "CUSTOM", + owner: { + name: "", + }, + created_at: new Date("2025-10-31T03:35:54.354Z"), + updated_at: new Date("2025-01-03T15:10:34.800Z"), + }, + 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/platformskillvalidationfile.md b/docs/models/components/platformskillvalidationfile.md new file mode 100644 index 00000000..d0fa1f7e --- /dev/null +++ b/docs/models/components/platformskillvalidationfile.md @@ -0,0 +1,21 @@ +# PlatformSkillValidationFile + +## Example Usage + +```typescript +import { PlatformSkillValidationFile } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillValidationFile = { + path: "/usr/X11R6", + size_bytes: 562050, + is_manifest: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `path` | *string* | :heavy_check_mark: | Normalized relative path in the skill bundle. | +| `sizeBytes` | *number* | :heavy_check_mark: | File size in bytes. | +| `isManifest` | *boolean* | :heavy_check_mark: | Whether this file is the skill manifest. | \ No newline at end of file diff --git a/docs/models/components/platformskillvalidationmetadata.md b/docs/models/components/platformskillvalidationmetadata.md new file mode 100644 index 00000000..9349bf25 --- /dev/null +++ b/docs/models/components/platformskillvalidationmetadata.md @@ -0,0 +1,20 @@ +# PlatformSkillValidationMetadata + +## Example Usage + +```typescript +import { PlatformSkillValidationMetadata } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillValidationMetadata = { + display_name: "Danyka_OConnell", + description: + "scale enthusiastically jiggle boohoo um whenever healthily awkwardly only among", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `displayName` | *string* | :heavy_check_mark: | Skill name parsed from SKILL.md frontmatter. | +| `description` | *string* | :heavy_check_mark: | Skill description parsed from SKILL.md frontmatter. | \ No newline at end of file diff --git a/docs/models/components/platformskillvalidationrequest.md b/docs/models/components/platformskillvalidationrequest.md new file mode 100644 index 00000000..2d5ed2d7 --- /dev/null +++ b/docs/models/components/platformskillvalidationrequest.md @@ -0,0 +1,15 @@ +# PlatformSkillValidationRequest + +## Example Usage + +```typescript +import { PlatformSkillValidationRequest } from "@gleanwork/api-client/models/components"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `file` | [File](https://developer.mozilla.org/en-US/docs/Web/API/File) \| [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) \| [components.PlatformSkillValidationRequestFile](../../models/components/platformskillvalidationrequestfile.md) | :heavy_check_mark: | SKILL.md, .zip, or .skill bundle to validate. | \ No newline at end of file diff --git a/docs/models/components/platformskillvalidationrequestfile.md b/docs/models/components/platformskillvalidationrequestfile.md new file mode 100644 index 00000000..0d74a6e0 --- /dev/null +++ b/docs/models/components/platformskillvalidationrequestfile.md @@ -0,0 +1,16 @@ +# PlatformSkillValidationRequestFile + +## Example Usage + +```typescript +import { PlatformSkillValidationRequestFile } from "@gleanwork/api-client/models/components"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `fileName` | *string* | :heavy_check_mark: | N/A | +| `content` | *ReadableStream* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/platformskillvalidationresponse.md b/docs/models/components/platformskillvalidationresponse.md new file mode 100644 index 00000000..95391273 --- /dev/null +++ b/docs/models/components/platformskillvalidationresponse.md @@ -0,0 +1,32 @@ +# PlatformSkillValidationResponse + +## Example Usage + +```typescript +import { PlatformSkillValidationResponse } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillValidationResponse = { + metadata: { + display_name: "Jimmie39", + description: "consequently of ordinary finding eek parody tedious", + }, + files: [ + { + path: "/Applications", + size_bytes: 187237, + is_manifest: false, + }, + ], + warnings: [], + request_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `metadata` | [components.PlatformSkillValidationMetadata](../../models/components/platformskillvalidationmetadata.md) | :heavy_check_mark: | N/A | +| `files` | [components.PlatformSkillValidationFile](../../models/components/platformskillvalidationfile.md)[] | :heavy_check_mark: | Normalized files in the bundle after stripping an optional single root folder. | +| `warnings` | [components.PlatformSkillValidationWarning](../../models/components/platformskillvalidationwarning.md)[] | :heavy_check_mark: | Non-blocking validation warnings. | +| `requestId` | *string* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/platformskillvalidationwarning.md b/docs/models/components/platformskillvalidationwarning.md new file mode 100644 index 00000000..4bf12c9c --- /dev/null +++ b/docs/models/components/platformskillvalidationwarning.md @@ -0,0 +1,19 @@ +# PlatformSkillValidationWarning + +## Example Usage + +```typescript +import { PlatformSkillValidationWarning } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillValidationWarning = { + code: "", + message: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `code` | *string* | :heavy_check_mark: | Stable warning code. | +| `message` | *string* | :heavy_check_mark: | Human-readable warning message. | \ No newline at end of file diff --git a/docs/models/components/platformskillversion.md b/docs/models/components/platformskillversion.md new file mode 100644 index 00000000..e21461ad --- /dev/null +++ b/docs/models/components/platformskillversion.md @@ -0,0 +1,32 @@ +# PlatformSkillVersion + +## Example Usage + +```typescript +import { PlatformSkillVersion } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillVersion = { + skill_id: "", + version: 603352, + minor_version: 26947, + is_latest: true, + created_by: { + name: "", + }, + created_at: new Date("2025-07-26T18:03:02.232Z"), + updated_at: new Date("2026-05-29T20:34:24.328Z"), +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `skillId` | *string* | :heavy_check_mark: | Glean skill ID. | +| `version` | *number* | :heavy_check_mark: | Major version number. | +| `minorVersion` | *number* | :heavy_check_mark: | Minor version number. | +| `isLatest` | *boolean* | :heavy_check_mark: | Whether this is the latest version of the skill. | +| `createdBy` | [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 this version was created. | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Time this version was last updated. | +| `sourceProvenance` | [components.PlatformSkillSourceProvenance](../../models/components/platformskillsourceprovenance.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/platformskillversioncreaterequest.md b/docs/models/components/platformskillversioncreaterequest.md new file mode 100644 index 00000000..342bbdf0 --- /dev/null +++ b/docs/models/components/platformskillversioncreaterequest.md @@ -0,0 +1,15 @@ +# PlatformSkillVersionCreateRequest + +## Example Usage + +```typescript +import { PlatformSkillVersionCreateRequest } from "@gleanwork/api-client/models/components"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `file` | [File](https://developer.mozilla.org/en-US/docs/Web/API/File) \| [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) \| [components.PlatformSkillVersionCreateRequestFile](../../models/components/platformskillversioncreaterequestfile.md) | :heavy_check_mark: | SKILL.md, .zip, or .skill bundle to store as a new version. | \ No newline at end of file diff --git a/docs/models/components/platformskillversioncreaterequestfile.md b/docs/models/components/platformskillversioncreaterequestfile.md new file mode 100644 index 00000000..b31dac56 --- /dev/null +++ b/docs/models/components/platformskillversioncreaterequestfile.md @@ -0,0 +1,16 @@ +# PlatformSkillVersionCreateRequestFile + +## Example Usage + +```typescript +import { PlatformSkillVersionCreateRequestFile } from "@gleanwork/api-client/models/components"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `fileName` | *string* | :heavy_check_mark: | N/A | +| `content` | *ReadableStream* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/platformskillversioncreateresponse.md b/docs/models/components/platformskillversioncreateresponse.md new file mode 100644 index 00000000..20612d51 --- /dev/null +++ b/docs/models/components/platformskillversioncreateresponse.md @@ -0,0 +1,29 @@ +# PlatformSkillVersionCreateResponse + +## Example Usage + +```typescript +import { PlatformSkillVersionCreateResponse } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillVersionCreateResponse = { + version: { + skill_id: "", + version: 909044, + minor_version: 500533, + is_latest: false, + created_by: { + name: "", + }, + created_at: new Date("2025-03-06T09:11:17.220Z"), + updated_at: new Date("2024-08-21T00:22:01.723Z"), + }, + request_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `version` | [components.PlatformSkillVersion](../../models/components/platformskillversion.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/platformskillversiongetresponse.md b/docs/models/components/platformskillversiongetresponse.md new file mode 100644 index 00000000..c36f0a6f --- /dev/null +++ b/docs/models/components/platformskillversiongetresponse.md @@ -0,0 +1,29 @@ +# PlatformSkillVersionGetResponse + +## Example Usage + +```typescript +import { PlatformSkillVersionGetResponse } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillVersionGetResponse = { + version: { + skill_id: "", + version: 909044, + minor_version: 500533, + is_latest: false, + created_by: { + name: "", + }, + created_at: new Date("2025-03-06T09:11:17.220Z"), + updated_at: new Date("2024-08-21T00:22:01.723Z"), + }, + request_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `version` | [components.PlatformSkillVersion](../../models/components/platformskillversion.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/platformskillversionslistresponse.md b/docs/models/components/platformskillversionslistresponse.md new file mode 100644 index 00000000..978b662b --- /dev/null +++ b/docs/models/components/platformskillversionslistresponse.md @@ -0,0 +1,35 @@ +# PlatformSkillVersionsListResponse + +## Example Usage + +```typescript +import { PlatformSkillVersionsListResponse } from "@gleanwork/api-client/models/components"; + +let value: PlatformSkillVersionsListResponse = { + versions: [ + { + skill_id: "", + version: 684124, + minor_version: 593377, + is_latest: true, + created_by: { + name: "", + }, + created_at: new Date("2026-03-16T16:36:49.159Z"), + updated_at: new Date("2024-02-19T02:56:33.273Z"), + }, + ], + has_more: false, + next_cursor: "", + request_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `versions` | [components.PlatformSkillVersion](../../models/components/platformskillversion.md)[] | :heavy_check_mark: | Versions available for the skill. | +| `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/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/uploadchatfilesrequest.md b/docs/models/components/uploadchatfilesrequest.md index 1f724f3e..6fb65fb5 100644 --- a/docs/models/components/uploadchatfilesrequest.md +++ b/docs/models/components/uploadchatfilesrequest.md @@ -15,6 +15,6 @@ let value: UploadChatFilesRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `files` | [components.FileT](../../models/components/filet.md)[] | :heavy_check_mark: | Raw files to be uploaded for chat in binary format. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `files` | [components.UploadChatFilesRequestFile](../../models/components/uploadchatfilesrequestfile.md)[] | :heavy_check_mark: | Raw files to be uploaded for chat in binary format. | \ No newline at end of file diff --git a/docs/models/components/filet.md b/docs/models/components/uploadchatfilesrequestfile.md similarity index 83% rename from docs/models/components/filet.md rename to docs/models/components/uploadchatfilesrequestfile.md index 067a1402..0e9eafd4 100644 --- a/docs/models/components/filet.md +++ b/docs/models/components/uploadchatfilesrequestfile.md @@ -1,9 +1,9 @@ -# FileT +# UploadChatFilesRequestFile ## Example Usage ```typescript -import { FileT } from "@gleanwork/api-client/models/components"; +import { UploadChatFilesRequestFile } from "@gleanwork/api-client/models/components"; // No examples available for this model ``` 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/platformskillscreateversionrequest.md b/docs/models/operations/platformskillscreateversionrequest.md new file mode 100644 index 00000000..3c414637 --- /dev/null +++ b/docs/models/operations/platformskillscreateversionrequest.md @@ -0,0 +1,16 @@ +# PlatformSkillsCreateVersionRequest + +## Example Usage + +```typescript +import { PlatformSkillsCreateVersionRequest } from "@gleanwork/api-client/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `skillId` | *string* | :heavy_check_mark: | Glean skill ID. | +| `platformSkillVersionCreateRequest` | [components.PlatformSkillVersionCreateRequest](../../models/components/platformskillversioncreaterequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/platformskillsgetcontentrequest.md b/docs/models/operations/platformskillsgetcontentrequest.md new file mode 100644 index 00000000..d9cde490 --- /dev/null +++ b/docs/models/operations/platformskillsgetcontentrequest.md @@ -0,0 +1,17 @@ +# PlatformSkillsGetContentRequest + +## Example Usage + +```typescript +import { PlatformSkillsGetContentRequest } from "@gleanwork/api-client/models/operations"; + +let value: PlatformSkillsGetContentRequest = { + 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/platformskillsgetcontentresponse.md b/docs/models/operations/platformskillsgetcontentresponse.md new file mode 100644 index 00000000..a1323c53 --- /dev/null +++ b/docs/models/operations/platformskillsgetcontentresponse.md @@ -0,0 +1,16 @@ +# PlatformSkillsGetContentResponse + +## Example Usage + +```typescript +import { PlatformSkillsGetContentResponse } from "@gleanwork/api-client/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | *ReadableStream* | :heavy_check_mark: | N/A | \ 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/platformskillsgetversioncontentrequest.md b/docs/models/operations/platformskillsgetversioncontentrequest.md new file mode 100644 index 00000000..46f44647 --- /dev/null +++ b/docs/models/operations/platformskillsgetversioncontentrequest.md @@ -0,0 +1,19 @@ +# PlatformSkillsGetVersionContentRequest + +## Example Usage + +```typescript +import { PlatformSkillsGetVersionContentRequest } from "@gleanwork/api-client/models/operations"; + +let value: PlatformSkillsGetVersionContentRequest = { + skill_id: "", + version: 320976, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `skillId` | *string* | :heavy_check_mark: | Glean skill ID. | +| `version` | *number* | :heavy_check_mark: | Major version number. | \ No newline at end of file diff --git a/docs/models/operations/platformskillsgetversioncontentresponse.md b/docs/models/operations/platformskillsgetversioncontentresponse.md new file mode 100644 index 00000000..2c598faa --- /dev/null +++ b/docs/models/operations/platformskillsgetversioncontentresponse.md @@ -0,0 +1,16 @@ +# PlatformSkillsGetVersionContentResponse + +## Example Usage + +```typescript +import { PlatformSkillsGetVersionContentResponse } from "@gleanwork/api-client/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `headers` | Record | :heavy_check_mark: | N/A | +| `result` | *ReadableStream* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/platformskillsgetversionrequest.md b/docs/models/operations/platformskillsgetversionrequest.md new file mode 100644 index 00000000..362f1257 --- /dev/null +++ b/docs/models/operations/platformskillsgetversionrequest.md @@ -0,0 +1,19 @@ +# PlatformSkillsGetVersionRequest + +## Example Usage + +```typescript +import { PlatformSkillsGetVersionRequest } from "@gleanwork/api-client/models/operations"; + +let value: PlatformSkillsGetVersionRequest = { + skill_id: "", + version: 986773, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `skillId` | *string* | :heavy_check_mark: | Glean skill ID. | +| `version` | *number* | :heavy_check_mark: | Major version number. | \ 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/platformskillslistversionsrequest.md b/docs/models/operations/platformskillslistversionsrequest.md new file mode 100644 index 00000000..f5215f8a --- /dev/null +++ b/docs/models/operations/platformskillslistversionsrequest.md @@ -0,0 +1,19 @@ +# PlatformSkillsListVersionsRequest + +## Example Usage + +```typescript +import { PlatformSkillsListVersionsRequest } from "@gleanwork/api-client/models/operations"; + +let value: PlatformSkillsListVersionsRequest = { + skill_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `skillId` | *string* | :heavy_check_mark: | Glean skill ID. | +| `pageSize` | *number* | :heavy_minus_sign: | Maximum number of versions 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..53e83244 --- /dev/null +++ b/docs/sdks/skills/README.md @@ -0,0 +1,906 @@ +# Skills + +## Overview + +### Available Operations + +* [create](#create) - Create skill +* [list](#list) - List skills +* [validate](#validate) - Validate skill bundle +* [retrieve](#retrieve) - Retrieve skill +* [retrieveContent](#retrievecontent) - Download skill content +* [createVersion](#createversion) - Create skill version +* [listVersions](#listversions) - List skill versions +* [retrieveVersion](#retrieveversion) - Retrieve skill version +* [retrieveVersionContent](#retrieveversioncontent) - Download skill version content + +## create + +Create a skill from an uploaded SKILL.md, .zip, or .skill bundle. If the authenticated user already has a skill with the same name, the existing skill is superseded with a new version. + + +### Example Usage + + +```typescript +import { Glean } from "@gleanwork/api-client"; +import { openAsBlob } from "node:fs"; + +const glean = new Glean({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const result = await glean.skills.create({ + file: await openAsBlob("example.file"), + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { skillsCreate } from "@gleanwork/api-client/funcs/skillsCreate.js"; +import { openAsBlob } from "node:fs"; + +// 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 skillsCreate(glean, { + file: await openAsBlob("example.file"), + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("skillsCreate 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. + useSkillsCreateMutation +} from "@gleanwork/api-client/react-query/skillsCreate.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.PlatformSkillCreateRequest](../../models/components/platformskillcreaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `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.PlatformSkillCreateResponse](../../models/components/platformskillcreateresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 413, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 500, 503 | application/problem+json | +| errors.GleanError | 4XX, 5XX | \*/\* | + +## 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 | \*/\* | + +## validate + +Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. + + +### Example Usage + + +```typescript +import { Glean } from "@gleanwork/api-client"; +import { openAsBlob } from "node:fs"; + +const glean = new Glean({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const result = await glean.skills.validate({ + file: await openAsBlob("example.file"), + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { skillsValidate } from "@gleanwork/api-client/funcs/skillsValidate.js"; +import { openAsBlob } from "node:fs"; + +// 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 skillsValidate(glean, { + file: await openAsBlob("example.file"), + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("skillsValidate 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. + useSkillsValidateMutation +} from "@gleanwork/api-client/react-query/skillsValidate.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.PlatformSkillValidationRequest](../../models/components/platformskillvalidationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `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.PlatformSkillValidationResponse](../../models/components/platformskillvalidationresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 413, 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 | \*/\* | + +## retrieveContent + +Download the latest installable bundle 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.retrieveContent(""); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { skillsRetrieveContent } from "@gleanwork/api-client/funcs/skillsRetrieveContent.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 skillsRetrieveContent(glean, ""); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("skillsRetrieveContent 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. + useSkillsRetrieveContent, + useSkillsRetrieveContentSuspense, + + // Utility for prefetching data during server-side rendering and in React + // Server Components that will be immediately available to client components + // using the hooks. + prefetchSkillsRetrieveContent, + + // Utilities to invalidate the query cache for this query in response to + // mutations and other user actions. + invalidateSkillsRetrieveContent, + invalidateAllSkillsRetrieveContent, +} from "@gleanwork/api-client/react-query/skillsRetrieveContent.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\<[operations.PlatformSkillsGetContentResponse](../../models/operations/platformskillsgetcontentresponse.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 | \*/\* | + +## createVersion + +Create a new immutable version for an existing caller-managed skill from an uploaded SKILL.md, .zip, or .skill bundle. + + +### Example Usage + + +```typescript +import { Glean } from "@gleanwork/api-client"; +import { openAsBlob } from "node:fs"; + +const glean = new Glean({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const result = await glean.skills.createVersion({ + file: await openAsBlob("example.file"), + }, ""); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { skillsCreateVersion } from "@gleanwork/api-client/funcs/skillsCreateVersion.js"; +import { openAsBlob } from "node:fs"; + +// 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 skillsCreateVersion(glean, { + file: await openAsBlob("example.file"), + }, ""); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("skillsCreateVersion 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. + useSkillsCreateVersionMutation +} from "@gleanwork/api-client/react-query/skillsCreateVersion.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `skillId` | *string* | :heavy_check_mark: | Glean skill ID. | +| `platformSkillVersionCreateRequest` | [components.PlatformSkillVersionCreateRequest](../../models/components/platformskillversioncreaterequest.md) | :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. | + +### Response + +**Promise\<[components.PlatformSkillVersionCreateResponse](../../models/components/platformskillversioncreateresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 409, 413, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 500, 503 | application/problem+json | +| errors.GleanError | 4XX, 5XX | \*/\* | + +## listVersions + +List versions 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.listVersions(""); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { skillsListVersions } from "@gleanwork/api-client/funcs/skillsListVersions.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 skillsListVersions(glean, ""); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("skillsListVersions 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. + useSkillsListVersions, + useSkillsListVersionsSuspense, + + // Utility for prefetching data during server-side rendering and in React + // Server Components that will be immediately available to client components + // using the hooks. + prefetchSkillsListVersions, + + // Utilities to invalidate the query cache for this query in response to + // mutations and other user actions. + invalidateSkillsListVersions, + invalidateAllSkillsListVersions, +} from "@gleanwork/api-client/react-query/skillsListVersions.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `skillId` | *string* | :heavy_check_mark: | Glean skill ID. | +| `pageSize` | *number* | :heavy_minus_sign: | Maximum number of versions 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.PlatformSkillVersionsListResponse](../../models/components/platformskillversionslistresponse.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 | \*/\* | + +## retrieveVersion + +Retrieve metadata for a skill version 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.retrieveVersion("", 495658); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { skillsRetrieveVersion } from "@gleanwork/api-client/funcs/skillsRetrieveVersion.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 skillsRetrieveVersion(glean, "", 495658); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("skillsRetrieveVersion 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. + useSkillsRetrieveVersion, + useSkillsRetrieveVersionSuspense, + + // Utility for prefetching data during server-side rendering and in React + // Server Components that will be immediately available to client components + // using the hooks. + prefetchSkillsRetrieveVersion, + + // Utilities to invalidate the query cache for this query in response to + // mutations and other user actions. + invalidateSkillsRetrieveVersion, + invalidateAllSkillsRetrieveVersion, +} from "@gleanwork/api-client/react-query/skillsRetrieveVersion.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `skillId` | *string* | :heavy_check_mark: | Glean skill ID. | +| `version` | *number* | :heavy_check_mark: | Major version number. | +| `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.PlatformSkillVersionGetResponse](../../models/components/platformskillversiongetresponse.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 | \*/\* | + +## retrieveVersionContent + +Download the installable bundle for a skill version 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.retrieveVersionContent("", 117760); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { skillsRetrieveVersionContent } from "@gleanwork/api-client/funcs/skillsRetrieveVersionContent.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 skillsRetrieveVersionContent(glean, "", 117760); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("skillsRetrieveVersionContent 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. + useSkillsRetrieveVersionContent, + useSkillsRetrieveVersionContentSuspense, + + // Utility for prefetching data during server-side rendering and in React + // Server Components that will be immediately available to client components + // using the hooks. + prefetchSkillsRetrieveVersionContent, + + // Utilities to invalidate the query cache for this query in response to + // mutations and other user actions. + invalidateSkillsRetrieveVersionContent, + invalidateAllSkillsRetrieveVersionContent, +} from "@gleanwork/api-client/react-query/skillsRetrieveVersionContent.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `skillId` | *string* | :heavy_check_mark: | Glean skill ID. | +| `version` | *number* | :heavy_check_mark: | Major version number. | +| `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\<[operations.PlatformSkillsGetVersionContentResponse](../../models/operations/platformskillsgetversioncontentresponse.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..41c0b3c9 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: "GCHAT", }); 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..6d7e9403 100644 --- a/src/__tests__/mockserver/internal/handler/generated_handlers.go +++ b/src/__tests__/mockserver/internal/handler/generated_handlers.go @@ -17,6 +17,12 @@ 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, "/api/skills/{skill_id}/content", pathGetAPISkillsSkillIDContent(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/api/skills/{skill_id}/versions", pathGetAPISkillsSkillIDVersions(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/api/skills/{skill_id}/versions/{version}", pathGetAPISkillsSkillIDVersionsVersion(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/api/skills/{skill_id}/versions/{version}/content", pathGetAPISkillsSkillIDVersionsVersionContent(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 +65,10 @@ 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, "/api/skills", pathPostAPISkills(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/skills/validation", pathPostAPISkillsValidation(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/skills/{skill_id}/versions", pathPostAPISkillsSkillIDVersions(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/pathgetapiskillsskillidcontent.go b/src/__tests__/mockserver/internal/handler/pathgetapiskillsskillidcontent.go new file mode 100644 index 00000000..e54fa1e1 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetapiskillsskillidcontent.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: bb0abc98a661 + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/handler/values" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetAPISkillsSkillIDContent(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-content[0]": + dir.HandlerFunc("platform-skills-get-content", testPlatformSkillsGetContentPlatformSkillsGetContent0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformSkillsGetContentPlatformSkillsGetContent0(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/octet-stream"}); 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 + } + respBodyBytes := values.ReadFileToBytes("./testdata/example.file") + w.Header().Set("Content-Type", "application/octet-stream") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetapiskillsskillidversions.go b/src/__tests__/mockserver/internal/handler/pathgetapiskillsskillidversions.go new file mode 100644 index 00000000..3e2425d1 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetapiskillsskillidversions.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 256aa3680e34 + +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 pathGetAPISkillsSkillIDVersions(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-versions[0]": + dir.HandlerFunc("platform-skills-list-versions", testPlatformSkillsListVersionsPlatformSkillsListVersions0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformSkillsListVersionsPlatformSkillsListVersions0(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.PlatformSkillVersionsListResponse = &components.PlatformSkillVersionsListResponse{ + Versions: []components.PlatformSkillVersion{}, + HasMore: false, + 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/pathgetapiskillsskillidversionsversion.go b/src/__tests__/mockserver/internal/handler/pathgetapiskillsskillidversionsversion.go new file mode 100644 index 00000000..c26b9c27 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetapiskillsskillidversionsversion.go @@ -0,0 +1,77 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 65a4c3e6ac69 + +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 pathGetAPISkillsSkillIDVersionsVersion(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-version[0]": + dir.HandlerFunc("platform-skills-get-version", testPlatformSkillsGetVersionPlatformSkillsGetVersion0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformSkillsGetVersionPlatformSkillsGetVersion0(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.PlatformSkillVersionGetResponse = &components.PlatformSkillVersionGetResponse{ + Version: components.PlatformSkillVersion{ + SkillID: "", + Version: 81632, + MinorVersion: 646412, + IsLatest: false, + CreatedBy: components.PlatformPersonReference{ + Name: "", + }, + CreatedAt: types.MustTimeFromString("2025-02-17T18:47:57.025Z"), + UpdatedAt: types.MustTimeFromString("2024-12-19T03:10:35.770Z"), + }, + 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/pathgetapiskillsskillidversionsversioncontent.go b/src/__tests__/mockserver/internal/handler/pathgetapiskillsskillidversionsversioncontent.go new file mode 100644 index 00000000..378a0630 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetapiskillsskillidversionsversioncontent.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 3e78ab5e8aac + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/handler/values" + "mockserver/internal/logging" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetAPISkillsSkillIDVersionsVersionContent(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-version-content[0]": + dir.HandlerFunc("platform-skills-get-version-content", testPlatformSkillsGetVersionContentPlatformSkillsGetVersionContent0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformSkillsGetVersionContentPlatformSkillsGetVersionContent0(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/octet-stream"}); 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 + } + respBodyBytes := values.ReadFileToBytes("./testdata/example.file") + w.Header().Set("Content-Type", "application/octet-stream") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostapiskills.go b/src/__tests__/mockserver/internal/handler/pathpostapiskills.go new file mode 100644 index 00000000..10c52a6f --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostapiskills.go @@ -0,0 +1,85 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 3ea49d94d44f + +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 pathPostAPISkills(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-create[0]": + dir.HandlerFunc("platform-skills-create", testPlatformSkillsCreatePlatformSkillsCreate0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformSkillsCreatePlatformSkillsCreate0(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, "multipart/form-data", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + var respBody *components.PlatformSkillCreateResponse = &components.PlatformSkillCreateResponse{ + Skill: components.PlatformSkill{ + ID: "", + DisplayName: "Merl18", + Description: "rural ugh unexpectedly excepting livid", + LatestVersion: 504149, + LatestMinorVersion: 106110, + Status: components.PlatformSkillStatusDisabled, + Origin: components.PlatformSkillOriginCustom, + Owner: components.PlatformPersonReference{ + Name: "", + }, + CreatedAt: types.MustTimeFromString("2025-01-04T03:16:16.951Z"), + UpdatedAt: types.MustTimeFromString("2025-09-10T16:05:46.046Z"), + }, + 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/pathpostapiskillsskillidversions.go b/src/__tests__/mockserver/internal/handler/pathpostapiskillsskillidversions.go new file mode 100644 index 00000000..644e8bc8 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostapiskillsskillidversions.go @@ -0,0 +1,82 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: e0720f878899 + +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 pathPostAPISkillsSkillIDVersions(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-create-version[0]": + dir.HandlerFunc("platform-skills-create-version", testPlatformSkillsCreateVersionPlatformSkillsCreateVersion0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformSkillsCreateVersionPlatformSkillsCreateVersion0(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, "multipart/form-data", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + var respBody *components.PlatformSkillVersionCreateResponse = &components.PlatformSkillVersionCreateResponse{ + Version: components.PlatformSkillVersion{ + SkillID: "", + Version: 375506, + MinorVersion: 600322, + IsLatest: false, + CreatedBy: components.PlatformPersonReference{ + Name: "", + }, + CreatedAt: types.MustTimeFromString("2026-09-27T14:37:09.109Z"), + UpdatedAt: types.MustTimeFromString("2024-05-30T08:59:58.715Z"), + }, + 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/pathpostapiskillsvalidation.go b/src/__tests__/mockserver/internal/handler/pathpostapiskillsvalidation.go new file mode 100644 index 00000000..20d53bc5 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostapiskillsvalidation.go @@ -0,0 +1,76 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 352938cf16f1 + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPISkillsValidation(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-validate[0]": + dir.HandlerFunc("platform-skills-validate", testPlatformSkillsValidatePlatformSkillsValidate0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformSkillsValidatePlatformSkillsValidate0(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, "multipart/form-data", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + var respBody *components.PlatformSkillValidationResponse = &components.PlatformSkillValidationResponse{ + Metadata: components.PlatformSkillValidationMetadata{ + DisplayName: "Hattie10", + Description: "overburden actual impact", + }, + Files: []components.PlatformSkillValidationFile{}, + Warnings: []components.PlatformSkillValidationWarning{}, + 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/dlpissuefilter.go b/src/__tests__/mockserver/internal/sdk/models/components/dlpissuefilter.go index aa253533..718e0527 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/dlpissuefilter.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/dlpissuefilter.go @@ -9,15 +9,34 @@ type DlpIssueFilter struct { SearchText *string `json:"searchText,omitempty"` // Filter by one or more issue statuses. Statuses []DlpIssueStatus `json:"statuses,omitempty"` - // Filter by assignee user ID. + // Filter by a single assignee user ID. Deprecated; use assigneeIds. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. AssigneeID *string `json:"assigneeId,omitempty"` - InfoType *string `json:"infoType,omitempty"` - RegexID *string `json:"regexId,omitempty"` + // Filter by one or more assignee user IDs. Use the sentinel value "UNASSIGNED" to match issues with no assignee. + AssigneeIds []string `json:"assigneeIds,omitempty"` + // Filter by a single built-in info type. Deprecated; use infoTypes. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + InfoType *string `json:"infoType,omitempty"` + // Filter by one or more built-in info types. + InfoTypes []string `json:"infoTypes,omitempty"` + // Filter by a single regex rule ID. Deprecated; use regexIds. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + RegexID *string `json:"regexId,omitempty"` + // Filter by one or more regex rule IDs. + RegexIds []string `json:"regexIds,omitempty"` // Filter by one or more report/policy IDs. - ReportIds []string `json:"reportIds,omitempty"` - DocID *string `json:"docId,omitempty"` - Datasource *string `json:"datasource,omitempty"` - Visibility *string `json:"visibility,omitempty"` + ReportIds []string `json:"reportIds,omitempty"` + DocID *string `json:"docId,omitempty"` + // Filter by a single datasource. Deprecated; use datasources. + // + // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible. + Datasource *string `json:"datasource,omitempty"` + // Filter by one or more datasources. + Datasources []string `json:"datasources,omitempty"` + Visibility *string `json:"visibility,omitempty"` // Filter by one or more severity levels. Severities []DlpSeverity `json:"severities,omitempty"` TimeRange *TimeRangeFilter `json:"timeRange,omitempty"` @@ -44,6 +63,13 @@ func (o *DlpIssueFilter) GetAssigneeID() *string { return o.AssigneeID } +func (o *DlpIssueFilter) GetAssigneeIds() []string { + if o == nil { + return nil + } + return o.AssigneeIds +} + func (o *DlpIssueFilter) GetInfoType() *string { if o == nil { return nil @@ -51,6 +77,13 @@ func (o *DlpIssueFilter) GetInfoType() *string { return o.InfoType } +func (o *DlpIssueFilter) GetInfoTypes() []string { + if o == nil { + return nil + } + return o.InfoTypes +} + func (o *DlpIssueFilter) GetRegexID() *string { if o == nil { return nil @@ -58,6 +91,13 @@ func (o *DlpIssueFilter) GetRegexID() *string { return o.RegexID } +func (o *DlpIssueFilter) GetRegexIds() []string { + if o == nil { + return nil + } + return o.RegexIds +} + func (o *DlpIssueFilter) GetReportIds() []string { if o == nil { return nil @@ -79,6 +119,13 @@ func (o *DlpIssueFilter) GetDatasource() *string { return o.Datasource } +func (o *DlpIssueFilter) GetDatasources() []string { + if o == nil { + return nil + } + return o.Datasources +} + func (o *DlpIssueFilter) GetVisibility() *string { if o == nil { return nil 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/platformskillcreaterequest.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillcreaterequest.go new file mode 100644 index 00000000..b743207d --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillcreaterequest.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: aea7980bc993 + +package components + +import ( + "io" +) + +type PlatformSkillCreateRequestFile struct { + FileName string `multipartForm:"name=fileName"` + Content io.Reader `multipartForm:"content"` +} + +func (o *PlatformSkillCreateRequestFile) GetFileName() string { + if o == nil { + return "" + } + return o.FileName +} + +func (o *PlatformSkillCreateRequestFile) GetContent() io.Reader { + if o == nil { + return nil + } + return o.Content +} + +type PlatformSkillCreateRequest struct { + // SKILL.md, .zip, or .skill bundle to create. + File PlatformSkillCreateRequestFile `multipartForm:"file,name=file"` +} + +func (o *PlatformSkillCreateRequest) GetFile() PlatformSkillCreateRequestFile { + if o == nil { + return PlatformSkillCreateRequestFile{} + } + return o.File +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillcreateresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillcreateresponse.go new file mode 100644 index 00000000..2fc63197 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillcreateresponse.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 5b428fd2dae4 + +package components + +type PlatformSkillCreateResponse struct { + Skill PlatformSkill `json:"skill"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformSkillCreateResponse) GetSkill() PlatformSkill { + if o == nil { + return PlatformSkill{} + } + return o.Skill +} + +func (o *PlatformSkillCreateResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} 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/platformskillvalidationfile.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationfile.go new file mode 100644 index 00000000..416a8efd --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationfile.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 32335c0f8fd4 + +package components + +type PlatformSkillValidationFile struct { + // Normalized relative path in the skill bundle. + Path string `json:"path"` + // File size in bytes. + SizeBytes int64 `json:"size_bytes"` + // Whether this file is the skill manifest. + IsManifest bool `json:"is_manifest"` +} + +func (o *PlatformSkillValidationFile) GetPath() string { + if o == nil { + return "" + } + return o.Path +} + +func (o *PlatformSkillValidationFile) GetSizeBytes() int64 { + if o == nil { + return 0 + } + return o.SizeBytes +} + +func (o *PlatformSkillValidationFile) GetIsManifest() bool { + if o == nil { + return false + } + return o.IsManifest +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationmetadata.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationmetadata.go new file mode 100644 index 00000000..8db7eb38 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationmetadata.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: ac843043a71e + +package components + +type PlatformSkillValidationMetadata struct { + // Skill name parsed from SKILL.md frontmatter. + DisplayName string `json:"display_name"` + // Skill description parsed from SKILL.md frontmatter. + Description string `json:"description"` +} + +func (o *PlatformSkillValidationMetadata) GetDisplayName() string { + if o == nil { + return "" + } + return o.DisplayName +} + +func (o *PlatformSkillValidationMetadata) GetDescription() string { + if o == nil { + return "" + } + return o.Description +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationrequest.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationrequest.go new file mode 100644 index 00000000..6c881734 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationrequest.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 8695c0f943ff + +package components + +import ( + "io" +) + +type PlatformSkillValidationRequestFile struct { + FileName string `multipartForm:"name=fileName"` + Content io.Reader `multipartForm:"content"` +} + +func (o *PlatformSkillValidationRequestFile) GetFileName() string { + if o == nil { + return "" + } + return o.FileName +} + +func (o *PlatformSkillValidationRequestFile) GetContent() io.Reader { + if o == nil { + return nil + } + return o.Content +} + +type PlatformSkillValidationRequest struct { + // SKILL.md, .zip, or .skill bundle to validate. + File PlatformSkillValidationRequestFile `multipartForm:"file,name=file"` +} + +func (o *PlatformSkillValidationRequest) GetFile() PlatformSkillValidationRequestFile { + if o == nil { + return PlatformSkillValidationRequestFile{} + } + return o.File +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationresponse.go new file mode 100644 index 00000000..86d8b684 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationresponse.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 7d765ea13b6e + +package components + +type PlatformSkillValidationResponse struct { + Metadata PlatformSkillValidationMetadata `json:"metadata"` + // Normalized files in the bundle after stripping an optional single root folder. + Files []PlatformSkillValidationFile `json:"files"` + // Non-blocking validation warnings. + Warnings []PlatformSkillValidationWarning `json:"warnings"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformSkillValidationResponse) GetMetadata() PlatformSkillValidationMetadata { + if o == nil { + return PlatformSkillValidationMetadata{} + } + return o.Metadata +} + +func (o *PlatformSkillValidationResponse) GetFiles() []PlatformSkillValidationFile { + if o == nil { + return []PlatformSkillValidationFile{} + } + return o.Files +} + +func (o *PlatformSkillValidationResponse) GetWarnings() []PlatformSkillValidationWarning { + if o == nil { + return []PlatformSkillValidationWarning{} + } + return o.Warnings +} + +func (o *PlatformSkillValidationResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationwarning.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationwarning.go new file mode 100644 index 00000000..76745cb0 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillvalidationwarning.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 03b68047dab7 + +package components + +type PlatformSkillValidationWarning struct { + // Stable warning code. + Code string `json:"code"` + // Human-readable warning message. + Message string `json:"message"` +} + +func (o *PlatformSkillValidationWarning) GetCode() string { + if o == nil { + return "" + } + return o.Code +} + +func (o *PlatformSkillValidationWarning) GetMessage() string { + if o == nil { + return "" + } + return o.Message +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillversion.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillversion.go new file mode 100644 index 00000000..e39f0537 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillversion.go @@ -0,0 +1,94 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 54223c53b14e + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type PlatformSkillVersion struct { + // Glean skill ID. + SkillID string `json:"skill_id"` + // Major version number. + Version int64 `json:"version"` + // Minor version number. + MinorVersion int64 `json:"minor_version"` + // Whether this is the latest version of the skill. + IsLatest bool `json:"is_latest"` + // A lightweight reference to a person, used where a payload merely points at someone. + CreatedBy PlatformPersonReference `json:"created_by"` + // Time this version was created. + CreatedAt time.Time `json:"created_at"` + // Time this version was last updated. + UpdatedAt time.Time `json:"updated_at"` + SourceProvenance *PlatformSkillSourceProvenance `json:"source_provenance,omitempty"` +} + +func (p PlatformSkillVersion) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformSkillVersion) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"skill_id", "version", "minor_version", "is_latest", "created_by", "created_at", "updated_at"}); err != nil { + return err + } + return nil +} + +func (o *PlatformSkillVersion) GetSkillID() string { + if o == nil { + return "" + } + return o.SkillID +} + +func (o *PlatformSkillVersion) GetVersion() int64 { + if o == nil { + return 0 + } + return o.Version +} + +func (o *PlatformSkillVersion) GetMinorVersion() int64 { + if o == nil { + return 0 + } + return o.MinorVersion +} + +func (o *PlatformSkillVersion) GetIsLatest() bool { + if o == nil { + return false + } + return o.IsLatest +} + +func (o *PlatformSkillVersion) GetCreatedBy() PlatformPersonReference { + if o == nil { + return PlatformPersonReference{} + } + return o.CreatedBy +} + +func (o *PlatformSkillVersion) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *PlatformSkillVersion) GetUpdatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.UpdatedAt +} + +func (o *PlatformSkillVersion) GetSourceProvenance() *PlatformSkillSourceProvenance { + if o == nil { + return nil + } + return o.SourceProvenance +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillversioncreaterequest.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillversioncreaterequest.go new file mode 100644 index 00000000..5a17830f --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillversioncreaterequest.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 898cd6d763b8 + +package components + +import ( + "io" +) + +type PlatformSkillVersionCreateRequestFile struct { + FileName string `multipartForm:"name=fileName"` + Content io.Reader `multipartForm:"content"` +} + +func (o *PlatformSkillVersionCreateRequestFile) GetFileName() string { + if o == nil { + return "" + } + return o.FileName +} + +func (o *PlatformSkillVersionCreateRequestFile) GetContent() io.Reader { + if o == nil { + return nil + } + return o.Content +} + +type PlatformSkillVersionCreateRequest struct { + // SKILL.md, .zip, or .skill bundle to store as a new version. + File PlatformSkillVersionCreateRequestFile `multipartForm:"file,name=file"` +} + +func (o *PlatformSkillVersionCreateRequest) GetFile() PlatformSkillVersionCreateRequestFile { + if o == nil { + return PlatformSkillVersionCreateRequestFile{} + } + return o.File +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillversioncreateresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillversioncreateresponse.go new file mode 100644 index 00000000..8dcc273b --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillversioncreateresponse.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: bd39d9458902 + +package components + +type PlatformSkillVersionCreateResponse struct { + Version PlatformSkillVersion `json:"version"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformSkillVersionCreateResponse) GetVersion() PlatformSkillVersion { + if o == nil { + return PlatformSkillVersion{} + } + return o.Version +} + +func (o *PlatformSkillVersionCreateResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillversiongetresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillversiongetresponse.go new file mode 100644 index 00000000..e706c6c8 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillversiongetresponse.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 8c217f4e9ded + +package components + +type PlatformSkillVersionGetResponse struct { + Version PlatformSkillVersion `json:"version"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformSkillVersionGetResponse) GetVersion() PlatformSkillVersion { + if o == nil { + return PlatformSkillVersion{} + } + return o.Version +} + +func (o *PlatformSkillVersionGetResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformskillversionslistresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformskillversionslistresponse.go new file mode 100644 index 00000000..59481bad --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformskillversionslistresponse.go @@ -0,0 +1,43 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: d2102202e6dd + +package components + +type PlatformSkillVersionsListResponse struct { + // Versions available for the skill. + Versions []PlatformSkillVersion `json:"versions"` + // 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 *PlatformSkillVersionsListResponse) GetVersions() []PlatformSkillVersion { + if o == nil { + return []PlatformSkillVersion{} + } + return o.Versions +} + +func (o *PlatformSkillVersionsListResponse) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *PlatformSkillVersionsListResponse) GetNextCursor() *string { + if o == nil { + return nil + } + return o.NextCursor +} + +func (o *PlatformSkillVersionsListResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} 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/uploadchatfilesrequest.go b/src/__tests__/mockserver/internal/sdk/models/components/uploadchatfilesrequest.go index 863f8734..0c7994a3 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/uploadchatfilesrequest.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/uploadchatfilesrequest.go @@ -7,19 +7,19 @@ import ( "io" ) -type File struct { +type UploadChatFilesRequestFile struct { FileName string `multipartForm:"name=fileName"` Content io.Reader `multipartForm:"content"` } -func (o *File) GetFileName() string { +func (o *UploadChatFilesRequestFile) GetFileName() string { if o == nil { return "" } return o.FileName } -func (o *File) GetContent() io.Reader { +func (o *UploadChatFilesRequestFile) GetContent() io.Reader { if o == nil { return nil } @@ -28,12 +28,12 @@ func (o *File) GetContent() io.Reader { type UploadChatFilesRequest struct { // Raw files to be uploaded for chat in binary format. - Files []File `multipartForm:"file,name=files"` + Files []UploadChatFilesRequestFile `multipartForm:"file,name=files"` } -func (o *UploadChatFilesRequest) GetFiles() []File { +func (o *UploadChatFilesRequest) GetFiles() []UploadChatFilesRequestFile { if o == nil { - return []File{} + return []UploadChatFilesRequestFile{} } return o.Files } 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/platformskillscreate.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillscreate.go new file mode 100644 index 00000000..73d1fe67 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillscreate.go @@ -0,0 +1,28 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 5926ffd35a42 + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformSkillsCreateResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformSkillCreateResponse *components.PlatformSkillCreateResponse +} + +func (o *PlatformSkillsCreateResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformSkillsCreateResponse) GetPlatformSkillCreateResponse() *components.PlatformSkillCreateResponse { + if o == nil { + return nil + } + return o.PlatformSkillCreateResponse +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformskillscreateversion.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillscreateversion.go new file mode 100644 index 00000000..e98d6f9d --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillscreateversion.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: e1b8211b9898 + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformSkillsCreateVersionRequest struct { + // Glean skill ID. + SkillID string `pathParam:"style=simple,explode=false,name=skill_id"` + Body components.PlatformSkillVersionCreateRequest `request:"mediaType=multipart/form-data"` +} + +func (o *PlatformSkillsCreateVersionRequest) GetSkillID() string { + if o == nil { + return "" + } + return o.SkillID +} + +func (o *PlatformSkillsCreateVersionRequest) GetBody() components.PlatformSkillVersionCreateRequest { + if o == nil { + return components.PlatformSkillVersionCreateRequest{} + } + return o.Body +} + +type PlatformSkillsCreateVersionResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformSkillVersionCreateResponse *components.PlatformSkillVersionCreateResponse +} + +func (o *PlatformSkillsCreateVersionResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformSkillsCreateVersionResponse) GetPlatformSkillVersionCreateResponse() *components.PlatformSkillVersionCreateResponse { + if o == nil { + return nil + } + return o.PlatformSkillVersionCreateResponse +} 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/platformskillsgetcontent.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsgetcontent.go new file mode 100644 index 00000000..8d5b57c8 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsgetcontent.go @@ -0,0 +1,50 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 59b8a5c7f997 + +package operations + +import ( + "io" + "mockserver/internal/sdk/models/components" +) + +type PlatformSkillsGetContentRequest struct { + // Glean skill ID. + SkillID string `pathParam:"style=simple,explode=false,name=skill_id"` +} + +func (o *PlatformSkillsGetContentRequest) GetSkillID() string { + if o == nil { + return "" + } + return o.SkillID +} + +type PlatformSkillsGetContentResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + // The Close method must be called on this field, even if it is not used, to prevent resource leaks. + ResponseStream io.ReadCloser + Headers map[string][]string +} + +func (o *PlatformSkillsGetContentResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformSkillsGetContentResponse) GetResponseStream() io.ReadCloser { + if o == nil { + return nil + } + return o.ResponseStream +} + +func (o *PlatformSkillsGetContentResponse) GetHeaders() map[string][]string { + if o == nil { + return map[string][]string{} + } + return o.Headers +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsgetversion.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsgetversion.go new file mode 100644 index 00000000..3897a80d --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsgetversion.go @@ -0,0 +1,49 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 5f92479ff728 + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformSkillsGetVersionRequest struct { + // Glean skill ID. + SkillID string `pathParam:"style=simple,explode=false,name=skill_id"` + // Major version number. + Version int64 `pathParam:"style=simple,explode=false,name=version"` +} + +func (o *PlatformSkillsGetVersionRequest) GetSkillID() string { + if o == nil { + return "" + } + return o.SkillID +} + +func (o *PlatformSkillsGetVersionRequest) GetVersion() int64 { + if o == nil { + return 0 + } + return o.Version +} + +type PlatformSkillsGetVersionResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformSkillVersionGetResponse *components.PlatformSkillVersionGetResponse +} + +func (o *PlatformSkillsGetVersionResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformSkillsGetVersionResponse) GetPlatformSkillVersionGetResponse() *components.PlatformSkillVersionGetResponse { + if o == nil { + return nil + } + return o.PlatformSkillVersionGetResponse +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsgetversioncontent.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsgetversioncontent.go new file mode 100644 index 00000000..a4e4830e --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsgetversioncontent.go @@ -0,0 +1,59 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 1a44c3a3c2a0 + +package operations + +import ( + "io" + "mockserver/internal/sdk/models/components" +) + +type PlatformSkillsGetVersionContentRequest struct { + // Glean skill ID. + SkillID string `pathParam:"style=simple,explode=false,name=skill_id"` + // Major version number. + Version int64 `pathParam:"style=simple,explode=false,name=version"` +} + +func (o *PlatformSkillsGetVersionContentRequest) GetSkillID() string { + if o == nil { + return "" + } + return o.SkillID +} + +func (o *PlatformSkillsGetVersionContentRequest) GetVersion() int64 { + if o == nil { + return 0 + } + return o.Version +} + +type PlatformSkillsGetVersionContentResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + // The Close method must be called on this field, even if it is not used, to prevent resource leaks. + ResponseStream io.ReadCloser + Headers map[string][]string +} + +func (o *PlatformSkillsGetVersionContentResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformSkillsGetVersionContentResponse) GetResponseStream() io.ReadCloser { + if o == nil { + return nil + } + return o.ResponseStream +} + +func (o *PlatformSkillsGetVersionContentResponse) GetHeaders() map[string][]string { + if o == nil { + return map[string][]string{} + } + return o.Headers +} 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/platformskillslistversions.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillslistversions.go new file mode 100644 index 00000000..556fde5b --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillslistversions.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 3bdf8967c612 + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformSkillsListVersionsRequest struct { + // Glean skill ID. + SkillID string `pathParam:"style=simple,explode=false,name=skill_id"` + // Maximum number of versions 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 *PlatformSkillsListVersionsRequest) GetSkillID() string { + if o == nil { + return "" + } + return o.SkillID +} + +func (o *PlatformSkillsListVersionsRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *PlatformSkillsListVersionsRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +type PlatformSkillsListVersionsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformSkillVersionsListResponse *components.PlatformSkillVersionsListResponse +} + +func (o *PlatformSkillsListVersionsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformSkillsListVersionsResponse) GetPlatformSkillVersionsListResponse() *components.PlatformSkillVersionsListResponse { + if o == nil { + return nil + } + return o.PlatformSkillVersionsListResponse +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsvalidate.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsvalidate.go new file mode 100644 index 00000000..505fba96 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformskillsvalidate.go @@ -0,0 +1,28 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 5dab5ea12f2b + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformSkillsValidateResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformSkillValidationResponse *components.PlatformSkillValidationResponse +} + +func (o *PlatformSkillsValidateResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformSkillsValidateResponse) GetPlatformSkillValidationResponse() *components.PlatformSkillValidationResponse { + if o == nil { + return nil + } + return o.PlatformSkillValidationResponse +} 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..21c6d6a4 --- /dev/null +++ b/src/__tests__/skills.test.ts @@ -0,0 +1,143 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3fa6e540c659 + */ + +import { expect, test } from "vitest"; +import { Glean } from "../index.js"; +import { filesToStream } from "./files.js"; +import { createTestHTTPClient } from "./testclient.js"; + +test("Skills Platform Skills Create", async () => { + const testHttpClient = createTestHTTPClient("platform-skills-create"); + + 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.create({ + file: { + fileName: "example.file", + content: filesToStream(".speakeasy/testfiles/example.file"), + }, + }); + expect(result).toBeDefined(); +}); + +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 Validate", async () => { + const testHttpClient = createTestHTTPClient("platform-skills-validate"); + + 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.validate({ + file: { + fileName: "example.file", + content: filesToStream(".speakeasy/testfiles/example.file"), + }, + }); + 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(); +}); + +test("Skills Platform Skills Get Content", async () => { + const testHttpClient = createTestHTTPClient("platform-skills-get-content"); + + 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.retrieveContent(""); + expect(result).toBeDefined(); +}); + +test("Skills Platform Skills Create Version", async () => { + const testHttpClient = createTestHTTPClient("platform-skills-create-version"); + + 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.createVersion({ + file: { + fileName: "example.file", + content: filesToStream(".speakeasy/testfiles/example.file"), + }, + }, ""); + expect(result).toBeDefined(); +}); + +test("Skills Platform Skills List Versions", async () => { + const testHttpClient = createTestHTTPClient("platform-skills-list-versions"); + + 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.listVersions(""); + expect(result).toBeDefined(); +}); + +test("Skills Platform Skills Get Version", async () => { + const testHttpClient = createTestHTTPClient("platform-skills-get-version"); + + 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.retrieveVersion("", 495658); + expect(result).toBeDefined(); +}); + +test("Skills Platform Skills Get Version Content", async () => { + const testHttpClient = createTestHTTPClient( + "platform-skills-get-version-content", + ); + + 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.retrieveVersionContent("", 117760); + expect(result).toBeDefined(); +}); diff --git a/src/__tests__/summarize.test.ts b/src/__tests__/summarize.test.ts index bb5e2b02..59161d47 100644 --- a/src/__tests__/summarize.test.ts +++ b/src/__tests__/summarize.test.ts @@ -19,10 +19,11 @@ test("Summarize Summarize", async () => { const result = await glean.client.documents.summarize({ documentSpecs: [ { - url: "https://dim-glider.com/", + ugcType: "COLLECTIONS", + contentId: 252303, }, { - id: "", + url: "https://shocked-casket.name/", }, ], }); 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/skillsCreate.ts b/src/funcs/skillsCreate.ts new file mode 100644 index 00000000..15d58a45 --- /dev/null +++ b/src/funcs/skillsCreate.ts @@ -0,0 +1,212 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 58256c9d32bf + */ + +import { GleanCore } from "../core.js"; +import { appendForm, normalizeBlob } from "../lib/encodings.js"; +import { + bytesToBlob, + getContentTypeFromFileName, + readableStreamToArrayBuffer, +} from "../lib/files.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 { APICall, APIPromise } from "../types/async.js"; +import { isBlobLike } from "../types/blobs.js"; +import { Result } from "../types/fp.js"; +import { isReadableStream } from "../types/streams.js"; + +/** + * Create skill + * + * @remarks + * Create a skill from an uploaded SKILL.md, .zip, or .skill bundle. If the authenticated user already has a skill with the same name, the existing skill is superseded with a new version. + */ +export function skillsCreate( + client: GleanCore, + request: components.PlatformSkillCreateRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PlatformSkillCreateResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: GleanCore, + request: components.PlatformSkillCreateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PlatformSkillCreateResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + components.PlatformSkillCreateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = new FormData(); + + if (isBlobLike(payload.file)) { + const file = payload.file; + const blob = await normalizeBlob(file); + const name = "name" in file ? (file.name as string) : undefined; + appendForm(body, "file", blob, name); + } else if (isReadableStream(payload.file.content)) { + const buffer = await readableStreamToArrayBuffer(payload.file.content); + const contentType = getContentTypeFromFileName(payload.file.fileName) + || "application/octet-stream"; + appendForm( + body, + "file", + bytesToBlob(buffer, contentType), + payload.file.fileName, + ); + } else { + const contentType = getContentTypeFromFileName(payload.file.fileName) + || "application/octet-stream"; + appendForm( + body, + "file", + bytesToBlob(payload.file.content, contentType), + payload.file.fileName, + ); + } + + const path = pathToFunc("/api/skills")(); + + 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-create", + 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: 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.PlatformSkillCreateResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PlatformSkillCreateResponse$inboundSchema), + M.jsonErr( + [400, 401, 403, 404, 408, 413, 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/skillsCreateVersion.ts b/src/funcs/skillsCreateVersion.ts new file mode 100644 index 00000000..3bd0bf2f --- /dev/null +++ b/src/funcs/skillsCreateVersion.ts @@ -0,0 +1,240 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a41608d008c9 + */ + +import { GleanCore } from "../core.js"; +import { appendForm, encodeSimple, normalizeBlob } from "../lib/encodings.js"; +import { + bytesToBlob, + getContentTypeFromFileName, + readableStreamToArrayBuffer, +} from "../lib/files.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 { isBlobLike } from "../types/blobs.js"; +import { Result } from "../types/fp.js"; +import { isReadableStream } from "../types/streams.js"; + +/** + * Create skill version + * + * @remarks + * Create a new immutable version for an existing caller-managed skill from an uploaded SKILL.md, .zip, or .skill bundle. + */ +export function skillsCreateVersion( + client: GleanCore, + platformSkillVersionCreateRequest: + components.PlatformSkillVersionCreateRequest, + skillId: string, + options?: RequestOptions, +): APIPromise< + Result< + components.PlatformSkillVersionCreateResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + platformSkillVersionCreateRequest, + skillId, + options, + )); +} + +async function $do( + client: GleanCore, + platformSkillVersionCreateRequest: + components.PlatformSkillVersionCreateRequest, + skillId: string, + options?: RequestOptions, +): Promise< + [ + Result< + components.PlatformSkillVersionCreateResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const input: operations.PlatformSkillsCreateVersionRequest = { + platformSkillVersionCreateRequest: platformSkillVersionCreateRequest, + skill_id: skillId, + }; + + const parsed = safeParse( + input, + (value) => + operations.PlatformSkillsCreateVersionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = new FormData(); + + if (isBlobLike(payload.PlatformSkillVersionCreateRequest.file)) { + const file = payload.PlatformSkillVersionCreateRequest.file; + const blob = await normalizeBlob(file); + const name = "name" in file ? (file.name as string) : undefined; + appendForm(body, "file", blob, name); + } else if ( + isReadableStream(payload.PlatformSkillVersionCreateRequest.file.content) + ) { + const buffer = await readableStreamToArrayBuffer( + payload.PlatformSkillVersionCreateRequest.file.content, + ); + const contentType = + getContentTypeFromFileName( + payload.PlatformSkillVersionCreateRequest.file.fileName, + ) || "application/octet-stream"; + appendForm( + body, + "file", + bytesToBlob(buffer, contentType), + payload.PlatformSkillVersionCreateRequest.file.fileName, + ); + } else { + const contentType = + getContentTypeFromFileName( + payload.PlatformSkillVersionCreateRequest.file.fileName, + ) || "application/octet-stream"; + appendForm( + body, + "file", + bytesToBlob( + payload.PlatformSkillVersionCreateRequest.file.content, + contentType, + ), + payload.PlatformSkillVersionCreateRequest.file.fileName, + ); + } + + const pathParams = { + skill_id: encodeSimple("skill_id", payload.skill_id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/api/skills/{skill_id}/versions")(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-create-version", + 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: 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.PlatformSkillVersionCreateResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PlatformSkillVersionCreateResponse$inboundSchema), + M.jsonErr( + [400, 401, 403, 404, 408, 409, 413, 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/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/skillsListVersions.ts b/src/funcs/skillsListVersions.ts new file mode 100644 index 00000000..02324bc8 --- /dev/null +++ b/src/funcs/skillsListVersions.ts @@ -0,0 +1,204 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c33faaee572b + */ + +import { GleanCore } from "../core.js"; +import { encodeFormQuery, 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"; + +/** + * List skill versions + * + * @remarks + * List versions for a skill available to the authenticated user. + */ +export function skillsListVersions( + client: GleanCore, + skillId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, +): APIPromise< + Result< + components.PlatformSkillVersionsListResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + skillId, + pageSize, + cursor, + options, + )); +} + +async function $do( + client: GleanCore, + skillId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + components.PlatformSkillVersionsListResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const input: operations.PlatformSkillsListVersionsRequest = { + skill_id: skillId, + page_size: pageSize, + cursor: cursor, + }; + + const parsed = safeParse( + input, + (value) => + operations.PlatformSkillsListVersionsRequest$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}/versions")(pathParams); + + 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-versions", + 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.PlatformSkillVersionsListResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PlatformSkillVersionsListResponse$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/funcs/skillsRetrieveContent.ts b/src/funcs/skillsRetrieveContent.ts new file mode 100644 index 00000000..5366d47c --- /dev/null +++ b/src/funcs/skillsRetrieveContent.ts @@ -0,0 +1,192 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4dbfedab3662 + */ + +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 { 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"; + +/** + * Download skill content + * + * @remarks + * Download the latest installable bundle for a skill available to the authenticated user. + */ +export function skillsRetrieveContent( + client: GleanCore, + skillId: string, + options?: RequestOptions, +): APIPromise< + Result< + operations.PlatformSkillsGetContentResponse, + | 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< + operations.PlatformSkillsGetContentResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const input: operations.PlatformSkillsGetContentRequest = { + skill_id: skillId, + }; + + const parsed = safeParse( + input, + (value) => + operations.PlatformSkillsGetContentRequest$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}/content")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/octet-stream", + })); + + 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-content", + 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< + operations.PlatformSkillsGetContentResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.stream(200, operations.PlatformSkillsGetContentResponse$inboundSchema, { + hdrs: true, + key: "Result", + }), + 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/skillsRetrieveVersion.ts b/src/funcs/skillsRetrieveVersion.ts new file mode 100644 index 00000000..cb40bd2d --- /dev/null +++ b/src/funcs/skillsRetrieveVersion.ts @@ -0,0 +1,200 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: b57c316cac51 + */ + +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 version + * + * @remarks + * Retrieve metadata for a skill version available to the authenticated user. + */ +export function skillsRetrieveVersion( + client: GleanCore, + skillId: string, + version: number, + options?: RequestOptions, +): APIPromise< + Result< + components.PlatformSkillVersionGetResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + skillId, + version, + options, + )); +} + +async function $do( + client: GleanCore, + skillId: string, + version: number, + options?: RequestOptions, +): Promise< + [ + Result< + components.PlatformSkillVersionGetResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const input: operations.PlatformSkillsGetVersionRequest = { + skill_id: skillId, + version: version, + }; + + const parsed = safeParse( + input, + (value) => + operations.PlatformSkillsGetVersionRequest$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", + }), + version: encodeSimple("version", payload.version, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/api/skills/{skill_id}/versions/{version}")( + 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-version", + 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.PlatformSkillVersionGetResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PlatformSkillVersionGetResponse$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/skillsRetrieveVersionContent.ts b/src/funcs/skillsRetrieveVersionContent.ts new file mode 100644 index 00000000..4f06adc8 --- /dev/null +++ b/src/funcs/skillsRetrieveVersionContent.ts @@ -0,0 +1,205 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d466e3621984 + */ + +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 { 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"; + +/** + * Download skill version content + * + * @remarks + * Download the installable bundle for a skill version available to the authenticated user. + */ +export function skillsRetrieveVersionContent( + client: GleanCore, + skillId: string, + version: number, + options?: RequestOptions, +): APIPromise< + Result< + operations.PlatformSkillsGetVersionContentResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + skillId, + version, + options, + )); +} + +async function $do( + client: GleanCore, + skillId: string, + version: number, + options?: RequestOptions, +): Promise< + [ + Result< + operations.PlatformSkillsGetVersionContentResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const input: operations.PlatformSkillsGetVersionContentRequest = { + skill_id: skillId, + version: version, + }; + + const parsed = safeParse( + input, + (value) => + operations.PlatformSkillsGetVersionContentRequest$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", + }), + version: encodeSimple("version", payload.version, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/api/skills/{skill_id}/versions/{version}/content")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/octet-stream", + })); + + 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-version-content", + 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< + operations.PlatformSkillsGetVersionContentResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.stream( + 200, + operations.PlatformSkillsGetVersionContentResponse$inboundSchema, + { hdrs: true, key: "Result" }, + ), + 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/skillsValidate.ts b/src/funcs/skillsValidate.ts new file mode 100644 index 00000000..c12a452c --- /dev/null +++ b/src/funcs/skillsValidate.ts @@ -0,0 +1,212 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4fe727b61c05 + */ + +import { GleanCore } from "../core.js"; +import { appendForm, normalizeBlob } from "../lib/encodings.js"; +import { + bytesToBlob, + getContentTypeFromFileName, + readableStreamToArrayBuffer, +} from "../lib/files.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 { APICall, APIPromise } from "../types/async.js"; +import { isBlobLike } from "../types/blobs.js"; +import { Result } from "../types/fp.js"; +import { isReadableStream } from "../types/streams.js"; + +/** + * Validate skill bundle + * + * @remarks + * Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. + */ +export function skillsValidate( + client: GleanCore, + request: components.PlatformSkillValidationRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PlatformSkillValidationResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: GleanCore, + request: components.PlatformSkillValidationRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PlatformSkillValidationResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + components.PlatformSkillValidationRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = new FormData(); + + if (isBlobLike(payload.file)) { + const file = payload.file; + const blob = await normalizeBlob(file); + const name = "name" in file ? (file.name as string) : undefined; + appendForm(body, "file", blob, name); + } else if (isReadableStream(payload.file.content)) { + const buffer = await readableStreamToArrayBuffer(payload.file.content); + const contentType = getContentTypeFromFileName(payload.file.fileName) + || "application/octet-stream"; + appendForm( + body, + "file", + bytesToBlob(buffer, contentType), + payload.file.fileName, + ); + } else { + const contentType = getContentTypeFromFileName(payload.file.fileName) + || "application/octet-stream"; + appendForm( + body, + "file", + bytesToBlob(payload.file.content, contentType), + payload.file.fileName, + ); + } + + const path = pathToFunc("/api/skills/validation")(); + + 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-validate", + 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: 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.PlatformSkillValidationResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PlatformSkillValidationResponse$inboundSchema), + M.jsonErr( + [400, 401, 403, 404, 408, 413, 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..a6cb9234 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.4", userAgent: - "speakeasy-sdk/typescript 0.17.3 2.916.4 0.9.0 @gleanwork/api-client", + "speakeasy-sdk/typescript 0.18.0 2.918.4 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/dlpissuefilter.ts b/src/models/components/dlpissuefilter.ts index a8cb158d..cee29641 100644 --- a/src/models/components/dlpissuefilter.ts +++ b/src/models/components/dlpissuefilter.ts @@ -37,17 +37,50 @@ export type DlpIssueFilter = { */ statuses?: Array | undefined; /** - * Filter by assignee user ID. + * Filter by a single assignee user ID. Deprecated; use assigneeIds. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ assigneeId?: string | undefined; + /** + * Filter by one or more assignee user IDs. Use the sentinel value "UNASSIGNED" to match issues with no assignee. + */ + assigneeIds?: Array | undefined; + /** + * Filter by a single built-in info type. Deprecated; use infoTypes. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ infoType?: string | undefined; + /** + * Filter by one or more built-in info types. + */ + infoTypes?: Array | undefined; + /** + * Filter by a single regex rule ID. Deprecated; use regexIds. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ regexId?: string | undefined; + /** + * Filter by one or more regex rule IDs. + */ + regexIds?: Array | undefined; /** * Filter by one or more report/policy IDs. */ reportIds?: Array | undefined; docId?: string | undefined; + /** + * Filter by a single datasource. Deprecated; use datasources. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ datasource?: string | undefined; + /** + * Filter by one or more datasources. + */ + datasources?: Array | undefined; visibility?: string | undefined; /** * Filter by one or more severity levels. @@ -65,11 +98,15 @@ export const DlpIssueFilter$inboundSchema: z.ZodType< searchText: z.string().optional(), statuses: z.array(DlpIssueStatus$inboundSchema).optional(), assigneeId: z.string().optional(), + assigneeIds: z.array(z.string()).optional(), infoType: z.string().optional(), + infoTypes: z.array(z.string()).optional(), regexId: z.string().optional(), + regexIds: z.array(z.string()).optional(), reportIds: z.array(z.string()).optional(), docId: z.string().optional(), datasource: z.string().optional(), + datasources: z.array(z.string()).optional(), visibility: z.string().optional(), severities: z.array(DlpSeverity$inboundSchema).optional(), timeRange: TimeRangeFilter$inboundSchema.optional(), @@ -79,11 +116,15 @@ export type DlpIssueFilter$Outbound = { searchText?: string | undefined; statuses?: Array | undefined; assigneeId?: string | undefined; + assigneeIds?: Array | undefined; infoType?: string | undefined; + infoTypes?: Array | undefined; regexId?: string | undefined; + regexIds?: Array | undefined; reportIds?: Array | undefined; docId?: string | undefined; datasource?: string | undefined; + datasources?: Array | undefined; visibility?: string | undefined; severities?: Array | undefined; timeRange?: TimeRangeFilter$Outbound | undefined; @@ -98,11 +139,15 @@ export const DlpIssueFilter$outboundSchema: z.ZodType< searchText: z.string().optional(), statuses: z.array(DlpIssueStatus$outboundSchema).optional(), assigneeId: z.string().optional(), + assigneeIds: z.array(z.string()).optional(), infoType: z.string().optional(), + infoTypes: z.array(z.string()).optional(), regexId: z.string().optional(), + regexIds: z.array(z.string()).optional(), reportIds: z.array(z.string()).optional(), docId: z.string().optional(), datasource: z.string().optional(), + datasources: z.array(z.string()).optional(), visibility: z.string().optional(), severities: z.array(DlpSeverity$outboundSchema).optional(), timeRange: TimeRangeFilter$outboundSchema.optional(), 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..00ee413c 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -367,6 +367,25 @@ export * from "./platformproblemdetailerror.js"; export * from "./platformresult.js"; export * from "./platformsearchrequest.js"; export * from "./platformsearchresponse.js"; +export * from "./platformskill.js"; +export * from "./platformskillcreaterequest.js"; +export * from "./platformskillcreateresponse.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 "./platformskillvalidationfile.js"; +export * from "./platformskillvalidationmetadata.js"; +export * from "./platformskillvalidationrequest.js"; +export * from "./platformskillvalidationresponse.js"; +export * from "./platformskillvalidationwarning.js"; +export * from "./platformskillversion.js"; +export * from "./platformskillversioncreaterequest.js"; +export * from "./platformskillversioncreateresponse.js"; +export * from "./platformskillversiongetresponse.js"; +export * from "./platformskillversionslistresponse.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/platformskillcreaterequest.ts b/src/models/components/platformskillcreaterequest.ts new file mode 100644 index 00000000..6be530ea --- /dev/null +++ b/src/models/components/platformskillcreaterequest.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c3bbe84be116 + */ + +import * as z from "zod/v3"; +import { blobLikeSchema } from "../../types/blobs.js"; + +export type PlatformSkillCreateRequestFile = { + fileName: string; + content: ReadableStream | Blob | ArrayBuffer | Uint8Array; +}; + +export type PlatformSkillCreateRequest = { + /** + * SKILL.md, .zip, or .skill bundle to create. + */ + file: PlatformSkillCreateRequestFile | Blob; +}; + +/** @internal */ +export type PlatformSkillCreateRequestFile$Outbound = { + fileName: string; + content: ReadableStream | Blob | ArrayBuffer | Uint8Array; +}; + +/** @internal */ +export const PlatformSkillCreateRequestFile$outboundSchema: z.ZodType< + PlatformSkillCreateRequestFile$Outbound, + z.ZodTypeDef, + PlatformSkillCreateRequestFile +> = z.object({ + fileName: z.string(), + content: z.union([ + z.instanceof(ReadableStream), + z.instanceof(Blob), + z.instanceof(ArrayBuffer), + z.instanceof(Uint8Array), + ]), +}); + +export function platformSkillCreateRequestFileToJSON( + platformSkillCreateRequestFile: PlatformSkillCreateRequestFile, +): string { + return JSON.stringify( + PlatformSkillCreateRequestFile$outboundSchema.parse( + platformSkillCreateRequestFile, + ), + ); +} + +/** @internal */ +export type PlatformSkillCreateRequest$Outbound = { + file: PlatformSkillCreateRequestFile$Outbound | Blob; +}; + +/** @internal */ +export const PlatformSkillCreateRequest$outboundSchema: z.ZodType< + PlatformSkillCreateRequest$Outbound, + z.ZodTypeDef, + PlatformSkillCreateRequest +> = z.object({ + file: z.lazy(() => PlatformSkillCreateRequestFile$outboundSchema).or( + blobLikeSchema, + ), +}); + +export function platformSkillCreateRequestToJSON( + platformSkillCreateRequest: PlatformSkillCreateRequest, +): string { + return JSON.stringify( + PlatformSkillCreateRequest$outboundSchema.parse(platformSkillCreateRequest), + ); +} diff --git a/src/models/components/platformskillcreateresponse.ts b/src/models/components/platformskillcreateresponse.ts new file mode 100644 index 00000000..dcb3b7d2 --- /dev/null +++ b/src/models/components/platformskillcreateresponse.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e0c14e4ff936 + */ + +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 PlatformSkillCreateResponse = { + skill: PlatformSkill; + /** + * Platform-generated request ID for support correlation. + */ + request_id: string; +}; + +/** @internal */ +export const PlatformSkillCreateResponse$inboundSchema: z.ZodType< + PlatformSkillCreateResponse, + z.ZodTypeDef, + unknown +> = z.object({ + skill: PlatformSkill$inboundSchema, + request_id: z.string(), +}); + +export function platformSkillCreateResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSkillCreateResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSkillCreateResponse' 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/platformskillvalidationfile.ts b/src/models/components/platformskillvalidationfile.ts new file mode 100644 index 00000000..e232ccd5 --- /dev/null +++ b/src/models/components/platformskillvalidationfile.ts @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ed89a1d60695 + */ + +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"; + +export type PlatformSkillValidationFile = { + /** + * Normalized relative path in the skill bundle. + */ + path: string; + /** + * File size in bytes. + */ + size_bytes: number; + /** + * Whether this file is the skill manifest. + */ + is_manifest: boolean; +}; + +/** @internal */ +export const PlatformSkillValidationFile$inboundSchema: z.ZodType< + PlatformSkillValidationFile, + z.ZodTypeDef, + unknown +> = z.object({ + path: z.string(), + size_bytes: z.number().int(), + is_manifest: z.boolean(), +}); + +export function platformSkillValidationFileFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSkillValidationFile$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSkillValidationFile' from JSON`, + ); +} diff --git a/src/models/components/platformskillvalidationmetadata.ts b/src/models/components/platformskillvalidationmetadata.ts new file mode 100644 index 00000000..6ddc63fb --- /dev/null +++ b/src/models/components/platformskillvalidationmetadata.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 198f33194249 + */ + +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"; + +export type PlatformSkillValidationMetadata = { + /** + * Skill name parsed from SKILL.md frontmatter. + */ + display_name: string; + /** + * Skill description parsed from SKILL.md frontmatter. + */ + description: string; +}; + +/** @internal */ +export const PlatformSkillValidationMetadata$inboundSchema: z.ZodType< + PlatformSkillValidationMetadata, + z.ZodTypeDef, + unknown +> = z.object({ + display_name: z.string(), + description: z.string(), +}); + +export function platformSkillValidationMetadataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSkillValidationMetadata$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSkillValidationMetadata' from JSON`, + ); +} diff --git a/src/models/components/platformskillvalidationrequest.ts b/src/models/components/platformskillvalidationrequest.ts new file mode 100644 index 00000000..a18b7b02 --- /dev/null +++ b/src/models/components/platformskillvalidationrequest.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c7759b98c6a9 + */ + +import * as z from "zod/v3"; +import { blobLikeSchema } from "../../types/blobs.js"; + +export type PlatformSkillValidationRequestFile = { + fileName: string; + content: ReadableStream | Blob | ArrayBuffer | Uint8Array; +}; + +export type PlatformSkillValidationRequest = { + /** + * SKILL.md, .zip, or .skill bundle to validate. + */ + file: PlatformSkillValidationRequestFile | Blob; +}; + +/** @internal */ +export type PlatformSkillValidationRequestFile$Outbound = { + fileName: string; + content: ReadableStream | Blob | ArrayBuffer | Uint8Array; +}; + +/** @internal */ +export const PlatformSkillValidationRequestFile$outboundSchema: z.ZodType< + PlatformSkillValidationRequestFile$Outbound, + z.ZodTypeDef, + PlatformSkillValidationRequestFile +> = z.object({ + fileName: z.string(), + content: z.union([ + z.instanceof(ReadableStream), + z.instanceof(Blob), + z.instanceof(ArrayBuffer), + z.instanceof(Uint8Array), + ]), +}); + +export function platformSkillValidationRequestFileToJSON( + platformSkillValidationRequestFile: PlatformSkillValidationRequestFile, +): string { + return JSON.stringify( + PlatformSkillValidationRequestFile$outboundSchema.parse( + platformSkillValidationRequestFile, + ), + ); +} + +/** @internal */ +export type PlatformSkillValidationRequest$Outbound = { + file: PlatformSkillValidationRequestFile$Outbound | Blob; +}; + +/** @internal */ +export const PlatformSkillValidationRequest$outboundSchema: z.ZodType< + PlatformSkillValidationRequest$Outbound, + z.ZodTypeDef, + PlatformSkillValidationRequest +> = z.object({ + file: z.lazy(() => PlatformSkillValidationRequestFile$outboundSchema).or( + blobLikeSchema, + ), +}); + +export function platformSkillValidationRequestToJSON( + platformSkillValidationRequest: PlatformSkillValidationRequest, +): string { + return JSON.stringify( + PlatformSkillValidationRequest$outboundSchema.parse( + platformSkillValidationRequest, + ), + ); +} diff --git a/src/models/components/platformskillvalidationresponse.ts b/src/models/components/platformskillvalidationresponse.ts new file mode 100644 index 00000000..037388bd --- /dev/null +++ b/src/models/components/platformskillvalidationresponse.ts @@ -0,0 +1,59 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 72e990f8b408 + */ + +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 { + PlatformSkillValidationFile, + PlatformSkillValidationFile$inboundSchema, +} from "./platformskillvalidationfile.js"; +import { + PlatformSkillValidationMetadata, + PlatformSkillValidationMetadata$inboundSchema, +} from "./platformskillvalidationmetadata.js"; +import { + PlatformSkillValidationWarning, + PlatformSkillValidationWarning$inboundSchema, +} from "./platformskillvalidationwarning.js"; + +export type PlatformSkillValidationResponse = { + metadata: PlatformSkillValidationMetadata; + /** + * Normalized files in the bundle after stripping an optional single root folder. + */ + files: Array; + /** + * Non-blocking validation warnings. + */ + warnings: Array; + /** + * Platform-generated request ID for support correlation. + */ + request_id: string; +}; + +/** @internal */ +export const PlatformSkillValidationResponse$inboundSchema: z.ZodType< + PlatformSkillValidationResponse, + z.ZodTypeDef, + unknown +> = z.object({ + metadata: PlatformSkillValidationMetadata$inboundSchema, + files: z.array(PlatformSkillValidationFile$inboundSchema), + warnings: z.array(PlatformSkillValidationWarning$inboundSchema), + request_id: z.string(), +}); + +export function platformSkillValidationResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSkillValidationResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSkillValidationResponse' from JSON`, + ); +} diff --git a/src/models/components/platformskillvalidationwarning.ts b/src/models/components/platformskillvalidationwarning.ts new file mode 100644 index 00000000..73238ea0 --- /dev/null +++ b/src/models/components/platformskillvalidationwarning.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9f6d3a564161 + */ + +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"; + +export type PlatformSkillValidationWarning = { + /** + * Stable warning code. + */ + code: string; + /** + * Human-readable warning message. + */ + message: string; +}; + +/** @internal */ +export const PlatformSkillValidationWarning$inboundSchema: z.ZodType< + PlatformSkillValidationWarning, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.string(), + message: z.string(), +}); + +export function platformSkillValidationWarningFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSkillValidationWarning$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSkillValidationWarning' from JSON`, + ); +} diff --git a/src/models/components/platformskillversion.ts b/src/models/components/platformskillversion.ts new file mode 100644 index 00000000..f8a49364 --- /dev/null +++ b/src/models/components/platformskillversion.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f58a116c278b + */ + +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 { + PlatformSkillSourceProvenance, + PlatformSkillSourceProvenance$inboundSchema, +} from "./platformskillsourceprovenance.js"; + +export type PlatformSkillVersion = { + /** + * Glean skill ID. + */ + skill_id: string; + /** + * Major version number. + */ + version: number; + /** + * Minor version number. + */ + minor_version: number; + /** + * Whether this is the latest version of the skill. + */ + is_latest: boolean; + /** + * A lightweight reference to a person, used where a payload merely points at someone. + */ + created_by: PlatformPersonReference; + /** + * Time this version was created. + */ + created_at: Date; + /** + * Time this version was last updated. + */ + updated_at: Date; + source_provenance?: PlatformSkillSourceProvenance | undefined; +}; + +/** @internal */ +export const PlatformSkillVersion$inboundSchema: z.ZodType< + PlatformSkillVersion, + z.ZodTypeDef, + unknown +> = z.object({ + skill_id: z.string(), + version: z.number().int(), + minor_version: z.number().int(), + is_latest: z.boolean(), + created_by: 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)), + source_provenance: PlatformSkillSourceProvenance$inboundSchema.optional(), +}); + +export function platformSkillVersionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSkillVersion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSkillVersion' from JSON`, + ); +} diff --git a/src/models/components/platformskillversioncreaterequest.ts b/src/models/components/platformskillversioncreaterequest.ts new file mode 100644 index 00000000..747e50ef --- /dev/null +++ b/src/models/components/platformskillversioncreaterequest.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 48a1435a29de + */ + +import * as z from "zod/v3"; +import { blobLikeSchema } from "../../types/blobs.js"; + +export type PlatformSkillVersionCreateRequestFile = { + fileName: string; + content: ReadableStream | Blob | ArrayBuffer | Uint8Array; +}; + +export type PlatformSkillVersionCreateRequest = { + /** + * SKILL.md, .zip, or .skill bundle to store as a new version. + */ + file: PlatformSkillVersionCreateRequestFile | Blob; +}; + +/** @internal */ +export type PlatformSkillVersionCreateRequestFile$Outbound = { + fileName: string; + content: ReadableStream | Blob | ArrayBuffer | Uint8Array; +}; + +/** @internal */ +export const PlatformSkillVersionCreateRequestFile$outboundSchema: z.ZodType< + PlatformSkillVersionCreateRequestFile$Outbound, + z.ZodTypeDef, + PlatformSkillVersionCreateRequestFile +> = z.object({ + fileName: z.string(), + content: z.union([ + z.instanceof(ReadableStream), + z.instanceof(Blob), + z.instanceof(ArrayBuffer), + z.instanceof(Uint8Array), + ]), +}); + +export function platformSkillVersionCreateRequestFileToJSON( + platformSkillVersionCreateRequestFile: PlatformSkillVersionCreateRequestFile, +): string { + return JSON.stringify( + PlatformSkillVersionCreateRequestFile$outboundSchema.parse( + platformSkillVersionCreateRequestFile, + ), + ); +} + +/** @internal */ +export type PlatformSkillVersionCreateRequest$Outbound = { + file: PlatformSkillVersionCreateRequestFile$Outbound | Blob; +}; + +/** @internal */ +export const PlatformSkillVersionCreateRequest$outboundSchema: z.ZodType< + PlatformSkillVersionCreateRequest$Outbound, + z.ZodTypeDef, + PlatformSkillVersionCreateRequest +> = z.object({ + file: z.lazy(() => PlatformSkillVersionCreateRequestFile$outboundSchema).or( + blobLikeSchema, + ), +}); + +export function platformSkillVersionCreateRequestToJSON( + platformSkillVersionCreateRequest: PlatformSkillVersionCreateRequest, +): string { + return JSON.stringify( + PlatformSkillVersionCreateRequest$outboundSchema.parse( + platformSkillVersionCreateRequest, + ), + ); +} diff --git a/src/models/components/platformskillversioncreateresponse.ts b/src/models/components/platformskillversioncreateresponse.ts new file mode 100644 index 00000000..6f5a8d15 --- /dev/null +++ b/src/models/components/platformskillversioncreateresponse.ts @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fbe062f0608b + */ + +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 { + PlatformSkillVersion, + PlatformSkillVersion$inboundSchema, +} from "./platformskillversion.js"; + +export type PlatformSkillVersionCreateResponse = { + version: PlatformSkillVersion; + /** + * Platform-generated request ID for support correlation. + */ + request_id: string; +}; + +/** @internal */ +export const PlatformSkillVersionCreateResponse$inboundSchema: z.ZodType< + PlatformSkillVersionCreateResponse, + z.ZodTypeDef, + unknown +> = z.object({ + version: PlatformSkillVersion$inboundSchema, + request_id: z.string(), +}); + +export function platformSkillVersionCreateResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + PlatformSkillVersionCreateResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSkillVersionCreateResponse' from JSON`, + ); +} diff --git a/src/models/components/platformskillversiongetresponse.ts b/src/models/components/platformskillversiongetresponse.ts new file mode 100644 index 00000000..b83d5a92 --- /dev/null +++ b/src/models/components/platformskillversiongetresponse.ts @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5468769fbfe8 + */ + +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 { + PlatformSkillVersion, + PlatformSkillVersion$inboundSchema, +} from "./platformskillversion.js"; + +export type PlatformSkillVersionGetResponse = { + version: PlatformSkillVersion; + /** + * Platform-generated request ID for support correlation. + */ + request_id: string; +}; + +/** @internal */ +export const PlatformSkillVersionGetResponse$inboundSchema: z.ZodType< + PlatformSkillVersionGetResponse, + z.ZodTypeDef, + unknown +> = z.object({ + version: PlatformSkillVersion$inboundSchema, + request_id: z.string(), +}); + +export function platformSkillVersionGetResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSkillVersionGetResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSkillVersionGetResponse' from JSON`, + ); +} diff --git a/src/models/components/platformskillversionslistresponse.ts b/src/models/components/platformskillversionslistresponse.ts new file mode 100644 index 00000000..0eae4ee4 --- /dev/null +++ b/src/models/components/platformskillversionslistresponse.ts @@ -0,0 +1,54 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fc6cbf29ca76 + */ + +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 { + PlatformSkillVersion, + PlatformSkillVersion$inboundSchema, +} from "./platformskillversion.js"; + +export type PlatformSkillVersionsListResponse = { + /** + * Versions available for the skill. + */ + versions: 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 PlatformSkillVersionsListResponse$inboundSchema: z.ZodType< + PlatformSkillVersionsListResponse, + z.ZodTypeDef, + unknown +> = z.object({ + versions: z.array(PlatformSkillVersion$inboundSchema), + has_more: z.boolean(), + next_cursor: z.nullable(z.string()), + request_id: z.string(), +}); + +export function platformSkillVersionsListResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSkillVersionsListResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSkillVersionsListResponse' from JSON`, + ); +} 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/uploadchatfilesrequest.ts b/src/models/components/uploadchatfilesrequest.ts index b3dc70ae..d6344c91 100644 --- a/src/models/components/uploadchatfilesrequest.ts +++ b/src/models/components/uploadchatfilesrequest.ts @@ -5,7 +5,7 @@ import * as z from "zod/v3"; -export type FileT = { +export type UploadChatFilesRequestFile = { fileName: string; content: ReadableStream | Blob | ArrayBuffer | Uint8Array; }; @@ -14,20 +14,20 @@ export type UploadChatFilesRequest = { /** * Raw files to be uploaded for chat in binary format. */ - files: Array; + files: Array; }; /** @internal */ -export type FileT$Outbound = { +export type UploadChatFilesRequestFile$Outbound = { fileName: string; content: ReadableStream | Blob | ArrayBuffer | Uint8Array; }; /** @internal */ -export const FileT$outboundSchema: z.ZodType< - FileT$Outbound, +export const UploadChatFilesRequestFile$outboundSchema: z.ZodType< + UploadChatFilesRequestFile$Outbound, z.ZodTypeDef, - FileT + UploadChatFilesRequestFile > = z.object({ fileName: z.string(), content: z.union([ @@ -38,13 +38,17 @@ export const FileT$outboundSchema: z.ZodType< ]), }); -export function fileToJSON(fileT: FileT): string { - return JSON.stringify(FileT$outboundSchema.parse(fileT)); +export function uploadChatFilesRequestFileToJSON( + uploadChatFilesRequestFile: UploadChatFilesRequestFile, +): string { + return JSON.stringify( + UploadChatFilesRequestFile$outboundSchema.parse(uploadChatFilesRequestFile), + ); } /** @internal */ export type UploadChatFilesRequest$Outbound = { - files: Array; + files: Array; }; /** @internal */ @@ -53,7 +57,7 @@ export const UploadChatFilesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, UploadChatFilesRequest > = z.object({ - files: z.array(z.lazy(() => FileT$outboundSchema)), + files: z.array(z.lazy(() => UploadChatFilesRequestFile$outboundSchema)), }); export function uploadChatFilesRequestToJSON( 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..270171c3 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -75,11 +75,19 @@ export * from "./pin.js"; export * from "./platformagentscreaterun.js"; export * from "./platformagentsget.js"; export * from "./platformagentsgetschemas.js"; +export * from "./platformskillscreateversion.js"; +export * from "./platformskillsget.js"; +export * from "./platformskillsgetcontent.js"; +export * from "./platformskillsgetversion.js"; +export * from "./platformskillsgetversioncontent.js"; +export * from "./platformskillslist.js"; +export * from "./platformskillslistversions.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/platformskillscreateversion.ts b/src/models/operations/platformskillscreateversion.ts new file mode 100644 index 00000000..b7428603 --- /dev/null +++ b/src/models/operations/platformskillscreateversion.ts @@ -0,0 +1,49 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9006c3c1a29c + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import * as components from "../components/index.js"; + +export type PlatformSkillsCreateVersionRequest = { + /** + * Glean skill ID. + */ + skill_id: string; + platformSkillVersionCreateRequest: + components.PlatformSkillVersionCreateRequest; +}; + +/** @internal */ +export type PlatformSkillsCreateVersionRequest$Outbound = { + skill_id: string; + PlatformSkillVersionCreateRequest: + components.PlatformSkillVersionCreateRequest$Outbound; +}; + +/** @internal */ +export const PlatformSkillsCreateVersionRequest$outboundSchema: z.ZodType< + PlatformSkillsCreateVersionRequest$Outbound, + z.ZodTypeDef, + PlatformSkillsCreateVersionRequest +> = z.object({ + skill_id: z.string(), + platformSkillVersionCreateRequest: + components.PlatformSkillVersionCreateRequest$outboundSchema, +}).transform((v) => { + return remap$(v, { + platformSkillVersionCreateRequest: "PlatformSkillVersionCreateRequest", + }); +}); + +export function platformSkillsCreateVersionRequestToJSON( + platformSkillsCreateVersionRequest: PlatformSkillsCreateVersionRequest, +): string { + return JSON.stringify( + PlatformSkillsCreateVersionRequest$outboundSchema.parse( + platformSkillsCreateVersionRequest, + ), + ); +} 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/platformskillsgetcontent.ts b/src/models/operations/platformskillsgetcontent.ts new file mode 100644 index 00000000..fcd62f36 --- /dev/null +++ b/src/models/operations/platformskillsgetcontent.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f83cfd7f2d50 + */ + +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 type PlatformSkillsGetContentRequest = { + /** + * Glean skill ID. + */ + skill_id: string; +}; + +export type PlatformSkillsGetContentResponse = { + Headers: { [k: string]: Array }; + result: ReadableStream; +}; + +/** @internal */ +export type PlatformSkillsGetContentRequest$Outbound = { + skill_id: string; +}; + +/** @internal */ +export const PlatformSkillsGetContentRequest$outboundSchema: z.ZodType< + PlatformSkillsGetContentRequest$Outbound, + z.ZodTypeDef, + PlatformSkillsGetContentRequest +> = z.object({ + skill_id: z.string(), +}); + +export function platformSkillsGetContentRequestToJSON( + platformSkillsGetContentRequest: PlatformSkillsGetContentRequest, +): string { + return JSON.stringify( + PlatformSkillsGetContentRequest$outboundSchema.parse( + platformSkillsGetContentRequest, + ), + ); +} + +/** @internal */ +export const PlatformSkillsGetContentResponse$inboundSchema: z.ZodType< + PlatformSkillsGetContentResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Headers: z.record(z.array(z.string())).default({}), + Result: z.instanceof(ReadableStream), +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); + +export function platformSkillsGetContentResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformSkillsGetContentResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformSkillsGetContentResponse' from JSON`, + ); +} diff --git a/src/models/operations/platformskillsgetversion.ts b/src/models/operations/platformskillsgetversion.ts new file mode 100644 index 00000000..3f03fe59 --- /dev/null +++ b/src/models/operations/platformskillsgetversion.ts @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d3f862b0c2e7 + */ + +import * as z from "zod/v3"; + +export type PlatformSkillsGetVersionRequest = { + /** + * Glean skill ID. + */ + skill_id: string; + /** + * Major version number. + */ + version: number; +}; + +/** @internal */ +export type PlatformSkillsGetVersionRequest$Outbound = { + skill_id: string; + version: number; +}; + +/** @internal */ +export const PlatformSkillsGetVersionRequest$outboundSchema: z.ZodType< + PlatformSkillsGetVersionRequest$Outbound, + z.ZodTypeDef, + PlatformSkillsGetVersionRequest +> = z.object({ + skill_id: z.string(), + version: z.number().int(), +}); + +export function platformSkillsGetVersionRequestToJSON( + platformSkillsGetVersionRequest: PlatformSkillsGetVersionRequest, +): string { + return JSON.stringify( + PlatformSkillsGetVersionRequest$outboundSchema.parse( + platformSkillsGetVersionRequest, + ), + ); +} diff --git a/src/models/operations/platformskillsgetversioncontent.ts b/src/models/operations/platformskillsgetversioncontent.ts new file mode 100644 index 00000000..d29ed482 --- /dev/null +++ b/src/models/operations/platformskillsgetversioncontent.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 191f01905043 + */ + +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 type PlatformSkillsGetVersionContentRequest = { + /** + * Glean skill ID. + */ + skill_id: string; + /** + * Major version number. + */ + version: number; +}; + +export type PlatformSkillsGetVersionContentResponse = { + Headers: { [k: string]: Array }; + result: ReadableStream; +}; + +/** @internal */ +export type PlatformSkillsGetVersionContentRequest$Outbound = { + skill_id: string; + version: number; +}; + +/** @internal */ +export const PlatformSkillsGetVersionContentRequest$outboundSchema: z.ZodType< + PlatformSkillsGetVersionContentRequest$Outbound, + z.ZodTypeDef, + PlatformSkillsGetVersionContentRequest +> = z.object({ + skill_id: z.string(), + version: z.number().int(), +}); + +export function platformSkillsGetVersionContentRequestToJSON( + platformSkillsGetVersionContentRequest: + PlatformSkillsGetVersionContentRequest, +): string { + return JSON.stringify( + PlatformSkillsGetVersionContentRequest$outboundSchema.parse( + platformSkillsGetVersionContentRequest, + ), + ); +} + +/** @internal */ +export const PlatformSkillsGetVersionContentResponse$inboundSchema: z.ZodType< + PlatformSkillsGetVersionContentResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Headers: z.record(z.array(z.string())).default({}), + Result: z.instanceof(ReadableStream), +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); + +export function platformSkillsGetVersionContentResponseFromJSON( + jsonString: string, +): SafeParseResult< + PlatformSkillsGetVersionContentResponse, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + PlatformSkillsGetVersionContentResponse$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'PlatformSkillsGetVersionContentResponse' from JSON`, + ); +} 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/platformskillslistversions.ts b/src/models/operations/platformskillslistversions.ts new file mode 100644 index 00000000..e03a136a --- /dev/null +++ b/src/models/operations/platformskillslistversions.ts @@ -0,0 +1,49 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 826a93a86c4e + */ + +import * as z from "zod/v3"; + +export type PlatformSkillsListVersionsRequest = { + /** + * Glean skill ID. + */ + skill_id: string; + /** + * Maximum number of versions to return. + */ + page_size?: number | undefined; + /** + * Opaque pagination cursor from a previous response. + */ + cursor?: string | undefined; +}; + +/** @internal */ +export type PlatformSkillsListVersionsRequest$Outbound = { + skill_id: string; + page_size?: number | undefined; + cursor?: string | undefined; +}; + +/** @internal */ +export const PlatformSkillsListVersionsRequest$outboundSchema: z.ZodType< + PlatformSkillsListVersionsRequest$Outbound, + z.ZodTypeDef, + PlatformSkillsListVersionsRequest +> = z.object({ + skill_id: z.string(), + page_size: z.number().int().optional(), + cursor: z.string().optional(), +}); + +export function platformSkillsListVersionsRequestToJSON( + platformSkillsListVersionsRequest: PlatformSkillsListVersionsRequest, +): string { + return JSON.stringify( + PlatformSkillsListVersionsRequest$outboundSchema.parse( + platformSkillsListVersionsRequest, + ), + ); +} 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..a4a0c405 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,12 @@ export * from "./indexingPermissionsUpdatePermissions.js"; export * from "./indexingShortcutsBulkIndex.js"; export * from "./indexingShortcutsUpload.js"; export * from "./searchQuery.js"; +export * from "./skillsCreate.js"; +export * from "./skillsCreateVersion.js"; +export * from "./skillsList.js"; +export * from "./skillsListVersions.js"; +export * from "./skillsRetrieve.js"; +export * from "./skillsRetrieveContent.js"; +export * from "./skillsRetrieveVersion.js"; +export * from "./skillsRetrieveVersionContent.js"; +export * from "./skillsValidate.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/skillsCreate.ts b/src/react-query/skillsCreate.ts new file mode 100644 index 00000000..d247758f --- /dev/null +++ b/src/react-query/skillsCreate.ts @@ -0,0 +1,111 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 7726086743dc + */ + +import { + MutationKey, + useMutation, + UseMutationResult, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { skillsCreate } from "../funcs/skillsCreate.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.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 { unwrapAsync } from "../types/fp.js"; +import { useGleanContext } from "./_context.js"; +import { MutationHookOptions } from "./_types.js"; + +export type SkillsCreateMutationVariables = { + request: components.PlatformSkillCreateRequest; + options?: RequestOptions; +}; + +export type SkillsCreateMutationData = components.PlatformSkillCreateResponse; + +export type SkillsCreateMutationError = + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * Create skill + * + * @remarks + * Create a skill from an uploaded SKILL.md, .zip, or .skill bundle. If the authenticated user already has a skill with the same name, the existing skill is superseded with a new version. + */ +export function useSkillsCreateMutation( + options?: MutationHookOptions< + SkillsCreateMutationData, + SkillsCreateMutationError, + SkillsCreateMutationVariables + >, +): UseMutationResult< + SkillsCreateMutationData, + SkillsCreateMutationError, + SkillsCreateMutationVariables +> { + const client = useGleanContext(); + return useMutation({ + ...buildSkillsCreateMutation(client, options), + ...options, + }); +} + +export function mutationKeySkillsCreate(): MutationKey { + return ["@gleanwork/api-client", "skills", "create"]; +} + +export function buildSkillsCreateMutation( + client$: GleanCore, + hookOptions?: RequestOptions, +): { + mutationKey: MutationKey; + mutationFn: ( + variables: SkillsCreateMutationVariables, + ) => Promise; +} { + return { + mutationKey: mutationKeySkillsCreate(), + mutationFn: function skillsCreateMutationFn({ + request, + options, + }): Promise { + const mergedOptions = { + ...hookOptions, + ...options, + fetchOptions: { + ...hookOptions?.fetchOptions, + ...options?.fetchOptions, + signal: combineSignals( + hookOptions?.fetchOptions?.signal, + options?.fetchOptions?.signal, + ), + }, + }; + return unwrapAsync(skillsCreate( + client$, + request, + mergedOptions, + )); + }, + }; +} diff --git a/src/react-query/skillsCreateVersion.ts b/src/react-query/skillsCreateVersion.ts new file mode 100644 index 00000000..70e74e8c --- /dev/null +++ b/src/react-query/skillsCreateVersion.ts @@ -0,0 +1,116 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 2bcd9406d548 + */ + +import { + MutationKey, + useMutation, + UseMutationResult, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { skillsCreateVersion } from "../funcs/skillsCreateVersion.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.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 { unwrapAsync } from "../types/fp.js"; +import { useGleanContext } from "./_context.js"; +import { MutationHookOptions } from "./_types.js"; + +export type SkillsCreateVersionMutationVariables = { + platformSkillVersionCreateRequest: + components.PlatformSkillVersionCreateRequest; + skillId: string; + options?: RequestOptions; +}; + +export type SkillsCreateVersionMutationData = + components.PlatformSkillVersionCreateResponse; + +export type SkillsCreateVersionMutationError = + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * Create skill version + * + * @remarks + * Create a new immutable version for an existing caller-managed skill from an uploaded SKILL.md, .zip, or .skill bundle. + */ +export function useSkillsCreateVersionMutation( + options?: MutationHookOptions< + SkillsCreateVersionMutationData, + SkillsCreateVersionMutationError, + SkillsCreateVersionMutationVariables + >, +): UseMutationResult< + SkillsCreateVersionMutationData, + SkillsCreateVersionMutationError, + SkillsCreateVersionMutationVariables +> { + const client = useGleanContext(); + return useMutation({ + ...buildSkillsCreateVersionMutation(client, options), + ...options, + }); +} + +export function mutationKeySkillsCreateVersion(): MutationKey { + return ["@gleanwork/api-client", "skills", "createVersion"]; +} + +export function buildSkillsCreateVersionMutation( + client$: GleanCore, + hookOptions?: RequestOptions, +): { + mutationKey: MutationKey; + mutationFn: ( + variables: SkillsCreateVersionMutationVariables, + ) => Promise; +} { + return { + mutationKey: mutationKeySkillsCreateVersion(), + mutationFn: function skillsCreateVersionMutationFn({ + platformSkillVersionCreateRequest, + skillId, + options, + }): Promise { + const mergedOptions = { + ...hookOptions, + ...options, + fetchOptions: { + ...hookOptions?.fetchOptions, + ...options?.fetchOptions, + signal: combineSignals( + hookOptions?.fetchOptions?.signal, + options?.fetchOptions?.signal, + ), + }, + }; + return unwrapAsync(skillsCreateVersion( + client$, + platformSkillVersionCreateRequest, + skillId, + 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/skillsListVersions.core.ts b/src/react-query/skillsListVersions.core.ts new file mode 100644 index 00000000..7d9e72ad --- /dev/null +++ b/src/react-query/skillsListVersions.core.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 92446ae9c4cc + */ + +import { + QueryClient, + QueryFunctionContext, + QueryKey, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { skillsListVersions } from "../funcs/skillsListVersions.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 SkillsListVersionsQueryData = + components.PlatformSkillVersionsListResponse; + +export function prefetchSkillsListVersions( + queryClient: QueryClient, + client$: GleanCore, + skillId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, +): Promise { + return queryClient.prefetchQuery({ + ...buildSkillsListVersionsQuery( + client$, + skillId, + pageSize, + cursor, + options, + ), + }); +} + +export function buildSkillsListVersionsQuery( + client$: GleanCore, + skillId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, +): { + queryKey: QueryKey; + queryFn: ( + context: QueryFunctionContext, + ) => Promise; +} { + return { + queryKey: queryKeySkillsListVersions(skillId, { pageSize, cursor }), + queryFn: async function skillsListVersionsQueryFn( + ctx, + ): Promise { + const sig = combineSignals( + ctx.signal, + options?.signal, + options?.fetchOptions?.signal, + ); + const mergedOptions = { + ...options?.fetchOptions, + ...options, + signal: sig, + }; + + return unwrapAsync(skillsListVersions( + client$, + skillId, + pageSize, + cursor, + mergedOptions, + )); + }, + }; +} + +export function queryKeySkillsListVersions( + skillId: string, + parameters: { pageSize?: number | undefined; cursor?: string | undefined }, +): QueryKey { + return [ + "@gleanwork/api-client", + "skills", + "listVersions", + skillId, + parameters, + ]; +} diff --git a/src/react-query/skillsListVersions.ts b/src/react-query/skillsListVersions.ts new file mode 100644 index 00000000..8db5ef1d --- /dev/null +++ b/src/react-query/skillsListVersions.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f270a8f770bf + */ + +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 { + buildSkillsListVersionsQuery, + prefetchSkillsListVersions, + queryKeySkillsListVersions, + SkillsListVersionsQueryData, +} from "./skillsListVersions.core.js"; +export { + buildSkillsListVersionsQuery, + prefetchSkillsListVersions, + queryKeySkillsListVersions, + type SkillsListVersionsQueryData, +}; + +export type SkillsListVersionsQueryError = + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * List skill versions + * + * @remarks + * List versions for a skill available to the authenticated user. + */ +export function useSkillsListVersions( + skillId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: QueryHookOptions< + SkillsListVersionsQueryData, + SkillsListVersionsQueryError + >, +): UseQueryResult { + const client = useGleanContext(); + return useQuery({ + ...buildSkillsListVersionsQuery( + client, + skillId, + pageSize, + cursor, + options, + ), + ...options, + }); +} + +/** + * List skill versions + * + * @remarks + * List versions for a skill available to the authenticated user. + */ +export function useSkillsListVersionsSuspense( + skillId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: SuspenseQueryHookOptions< + SkillsListVersionsQueryData, + SkillsListVersionsQueryError + >, +): UseSuspenseQueryResult< + SkillsListVersionsQueryData, + SkillsListVersionsQueryError +> { + const client = useGleanContext(); + return useSuspenseQuery({ + ...buildSkillsListVersionsQuery( + client, + skillId, + pageSize, + cursor, + options, + ), + ...options, + }); +} + +export function setSkillsListVersionsData( + client: QueryClient, + queryKeyBase: [ + skillId: string, + parameters: { pageSize?: number | undefined; cursor?: string | undefined }, + ], + data: SkillsListVersionsQueryData, +): SkillsListVersionsQueryData | undefined { + const key = queryKeySkillsListVersions(...queryKeyBase); + + return client.setQueryData(key, data); +} + +export function invalidateSkillsListVersions( + client: QueryClient, + queryKeyBase: TupleToPrefixes< + [ + skillId: string, + parameters: { + pageSize?: number | undefined; + cursor?: string | undefined; + }, + ] + >, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: [ + "@gleanwork/api-client", + "skills", + "listVersions", + ...queryKeyBase, + ], + }); +} + +export function invalidateAllSkillsListVersions( + client: QueryClient, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: ["@gleanwork/api-client", "skills", "listVersions"], + }); +} 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/react-query/skillsRetrieveContent.core.ts b/src/react-query/skillsRetrieveContent.core.ts new file mode 100644 index 00000000..a0ab5639 --- /dev/null +++ b/src/react-query/skillsRetrieveContent.core.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d03069e54713 + */ + +import { + QueryClient, + QueryFunctionContext, + QueryKey, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { skillsRetrieveContent } from "../funcs/skillsRetrieveContent.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; +export type SkillsRetrieveContentQueryData = + operations.PlatformSkillsGetContentResponse; + +export function prefetchSkillsRetrieveContent( + queryClient: QueryClient, + client$: GleanCore, + skillId: string, + options?: RequestOptions, +): Promise { + return queryClient.prefetchQuery({ + ...buildSkillsRetrieveContentQuery( + client$, + skillId, + options, + ), + }); +} + +export function buildSkillsRetrieveContentQuery( + client$: GleanCore, + skillId: string, + options?: RequestOptions, +): { + queryKey: QueryKey; + queryFn: ( + context: QueryFunctionContext, + ) => Promise; +} { + return { + queryKey: queryKeySkillsRetrieveContent(skillId), + queryFn: async function skillsRetrieveContentQueryFn( + ctx, + ): Promise { + const sig = combineSignals( + ctx.signal, + options?.signal, + options?.fetchOptions?.signal, + ); + const mergedOptions = { + ...options?.fetchOptions, + ...options, + signal: sig, + }; + + return unwrapAsync(skillsRetrieveContent( + client$, + skillId, + mergedOptions, + )); + }, + }; +} + +export function queryKeySkillsRetrieveContent(skillId: string): QueryKey { + return ["@gleanwork/api-client", "skills", "retrieveContent", skillId]; +} diff --git a/src/react-query/skillsRetrieveContent.ts b/src/react-query/skillsRetrieveContent.ts new file mode 100644 index 00000000..7e405a08 --- /dev/null +++ b/src/react-query/skillsRetrieveContent.ts @@ -0,0 +1,143 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c3ff7f8aede3 + */ + +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 { + buildSkillsRetrieveContentQuery, + prefetchSkillsRetrieveContent, + queryKeySkillsRetrieveContent, + SkillsRetrieveContentQueryData, +} from "./skillsRetrieveContent.core.js"; +export { + buildSkillsRetrieveContentQuery, + prefetchSkillsRetrieveContent, + queryKeySkillsRetrieveContent, + type SkillsRetrieveContentQueryData, +}; + +export type SkillsRetrieveContentQueryError = + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * Download skill content + * + * @remarks + * Download the latest installable bundle for a skill available to the authenticated user. + */ +export function useSkillsRetrieveContent( + skillId: string, + options?: QueryHookOptions< + SkillsRetrieveContentQueryData, + SkillsRetrieveContentQueryError + >, +): UseQueryResult< + SkillsRetrieveContentQueryData, + SkillsRetrieveContentQueryError +> { + const client = useGleanContext(); + return useQuery({ + ...buildSkillsRetrieveContentQuery( + client, + skillId, + options, + ), + ...options, + }); +} + +/** + * Download skill content + * + * @remarks + * Download the latest installable bundle for a skill available to the authenticated user. + */ +export function useSkillsRetrieveContentSuspense( + skillId: string, + options?: SuspenseQueryHookOptions< + SkillsRetrieveContentQueryData, + SkillsRetrieveContentQueryError + >, +): UseSuspenseQueryResult< + SkillsRetrieveContentQueryData, + SkillsRetrieveContentQueryError +> { + const client = useGleanContext(); + return useSuspenseQuery({ + ...buildSkillsRetrieveContentQuery( + client, + skillId, + options, + ), + ...options, + }); +} + +export function setSkillsRetrieveContentData( + client: QueryClient, + queryKeyBase: [skillId: string], + data: SkillsRetrieveContentQueryData, +): SkillsRetrieveContentQueryData | undefined { + const key = queryKeySkillsRetrieveContent(...queryKeyBase); + + return client.setQueryData(key, data); +} + +export function invalidateSkillsRetrieveContent( + client: QueryClient, + queryKeyBase: TupleToPrefixes<[skillId: string]>, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: [ + "@gleanwork/api-client", + "skills", + "retrieveContent", + ...queryKeyBase, + ], + }); +} + +export function invalidateAllSkillsRetrieveContent( + client: QueryClient, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: ["@gleanwork/api-client", "skills", "retrieveContent"], + }); +} diff --git a/src/react-query/skillsRetrieveVersion.core.ts b/src/react-query/skillsRetrieveVersion.core.ts new file mode 100644 index 00000000..e7df86c2 --- /dev/null +++ b/src/react-query/skillsRetrieveVersion.core.ts @@ -0,0 +1,85 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8a1dd7dcdfdd + */ + +import { + QueryClient, + QueryFunctionContext, + QueryKey, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { skillsRetrieveVersion } from "../funcs/skillsRetrieveVersion.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 SkillsRetrieveVersionQueryData = + components.PlatformSkillVersionGetResponse; + +export function prefetchSkillsRetrieveVersion( + queryClient: QueryClient, + client$: GleanCore, + skillId: string, + version: number, + options?: RequestOptions, +): Promise { + return queryClient.prefetchQuery({ + ...buildSkillsRetrieveVersionQuery( + client$, + skillId, + version, + options, + ), + }); +} + +export function buildSkillsRetrieveVersionQuery( + client$: GleanCore, + skillId: string, + version: number, + options?: RequestOptions, +): { + queryKey: QueryKey; + queryFn: ( + context: QueryFunctionContext, + ) => Promise; +} { + return { + queryKey: queryKeySkillsRetrieveVersion(skillId, version), + queryFn: async function skillsRetrieveVersionQueryFn( + ctx, + ): Promise { + const sig = combineSignals( + ctx.signal, + options?.signal, + options?.fetchOptions?.signal, + ); + const mergedOptions = { + ...options?.fetchOptions, + ...options, + signal: sig, + }; + + return unwrapAsync(skillsRetrieveVersion( + client$, + skillId, + version, + mergedOptions, + )); + }, + }; +} + +export function queryKeySkillsRetrieveVersion( + skillId: string, + version: number, +): QueryKey { + return [ + "@gleanwork/api-client", + "skills", + "retrieveVersion", + skillId, + version, + ]; +} diff --git a/src/react-query/skillsRetrieveVersion.ts b/src/react-query/skillsRetrieveVersion.ts new file mode 100644 index 00000000..17abf16a --- /dev/null +++ b/src/react-query/skillsRetrieveVersion.ts @@ -0,0 +1,147 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 1cb35f733792 + */ + +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 { + buildSkillsRetrieveVersionQuery, + prefetchSkillsRetrieveVersion, + queryKeySkillsRetrieveVersion, + SkillsRetrieveVersionQueryData, +} from "./skillsRetrieveVersion.core.js"; +export { + buildSkillsRetrieveVersionQuery, + prefetchSkillsRetrieveVersion, + queryKeySkillsRetrieveVersion, + type SkillsRetrieveVersionQueryData, +}; + +export type SkillsRetrieveVersionQueryError = + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * Retrieve skill version + * + * @remarks + * Retrieve metadata for a skill version available to the authenticated user. + */ +export function useSkillsRetrieveVersion( + skillId: string, + version: number, + options?: QueryHookOptions< + SkillsRetrieveVersionQueryData, + SkillsRetrieveVersionQueryError + >, +): UseQueryResult< + SkillsRetrieveVersionQueryData, + SkillsRetrieveVersionQueryError +> { + const client = useGleanContext(); + return useQuery({ + ...buildSkillsRetrieveVersionQuery( + client, + skillId, + version, + options, + ), + ...options, + }); +} + +/** + * Retrieve skill version + * + * @remarks + * Retrieve metadata for a skill version available to the authenticated user. + */ +export function useSkillsRetrieveVersionSuspense( + skillId: string, + version: number, + options?: SuspenseQueryHookOptions< + SkillsRetrieveVersionQueryData, + SkillsRetrieveVersionQueryError + >, +): UseSuspenseQueryResult< + SkillsRetrieveVersionQueryData, + SkillsRetrieveVersionQueryError +> { + const client = useGleanContext(); + return useSuspenseQuery({ + ...buildSkillsRetrieveVersionQuery( + client, + skillId, + version, + options, + ), + ...options, + }); +} + +export function setSkillsRetrieveVersionData( + client: QueryClient, + queryKeyBase: [skillId: string, version: number], + data: SkillsRetrieveVersionQueryData, +): SkillsRetrieveVersionQueryData | undefined { + const key = queryKeySkillsRetrieveVersion(...queryKeyBase); + + return client.setQueryData(key, data); +} + +export function invalidateSkillsRetrieveVersion( + client: QueryClient, + queryKeyBase: TupleToPrefixes<[skillId: string, version: number]>, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: [ + "@gleanwork/api-client", + "skills", + "retrieveVersion", + ...queryKeyBase, + ], + }); +} + +export function invalidateAllSkillsRetrieveVersion( + client: QueryClient, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: ["@gleanwork/api-client", "skills", "retrieveVersion"], + }); +} diff --git a/src/react-query/skillsRetrieveVersionContent.core.ts b/src/react-query/skillsRetrieveVersionContent.core.ts new file mode 100644 index 00000000..9cb178d3 --- /dev/null +++ b/src/react-query/skillsRetrieveVersionContent.core.ts @@ -0,0 +1,85 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 740cd8836341 + */ + +import { + QueryClient, + QueryFunctionContext, + QueryKey, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { skillsRetrieveVersionContent } from "../funcs/skillsRetrieveVersionContent.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; +export type SkillsRetrieveVersionContentQueryData = + operations.PlatformSkillsGetVersionContentResponse; + +export function prefetchSkillsRetrieveVersionContent( + queryClient: QueryClient, + client$: GleanCore, + skillId: string, + version: number, + options?: RequestOptions, +): Promise { + return queryClient.prefetchQuery({ + ...buildSkillsRetrieveVersionContentQuery( + client$, + skillId, + version, + options, + ), + }); +} + +export function buildSkillsRetrieveVersionContentQuery( + client$: GleanCore, + skillId: string, + version: number, + options?: RequestOptions, +): { + queryKey: QueryKey; + queryFn: ( + context: QueryFunctionContext, + ) => Promise; +} { + return { + queryKey: queryKeySkillsRetrieveVersionContent(skillId, version), + queryFn: async function skillsRetrieveVersionContentQueryFn( + ctx, + ): Promise { + const sig = combineSignals( + ctx.signal, + options?.signal, + options?.fetchOptions?.signal, + ); + const mergedOptions = { + ...options?.fetchOptions, + ...options, + signal: sig, + }; + + return unwrapAsync(skillsRetrieveVersionContent( + client$, + skillId, + version, + mergedOptions, + )); + }, + }; +} + +export function queryKeySkillsRetrieveVersionContent( + skillId: string, + version: number, +): QueryKey { + return [ + "@gleanwork/api-client", + "skills", + "retrieveVersionContent", + skillId, + version, + ]; +} diff --git a/src/react-query/skillsRetrieveVersionContent.ts b/src/react-query/skillsRetrieveVersionContent.ts new file mode 100644 index 00000000..8f8681a4 --- /dev/null +++ b/src/react-query/skillsRetrieveVersionContent.ts @@ -0,0 +1,147 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: df4ac1f925b8 + */ + +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 { + buildSkillsRetrieveVersionContentQuery, + prefetchSkillsRetrieveVersionContent, + queryKeySkillsRetrieveVersionContent, + SkillsRetrieveVersionContentQueryData, +} from "./skillsRetrieveVersionContent.core.js"; +export { + buildSkillsRetrieveVersionContentQuery, + prefetchSkillsRetrieveVersionContent, + queryKeySkillsRetrieveVersionContent, + type SkillsRetrieveVersionContentQueryData, +}; + +export type SkillsRetrieveVersionContentQueryError = + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * Download skill version content + * + * @remarks + * Download the installable bundle for a skill version available to the authenticated user. + */ +export function useSkillsRetrieveVersionContent( + skillId: string, + version: number, + options?: QueryHookOptions< + SkillsRetrieveVersionContentQueryData, + SkillsRetrieveVersionContentQueryError + >, +): UseQueryResult< + SkillsRetrieveVersionContentQueryData, + SkillsRetrieveVersionContentQueryError +> { + const client = useGleanContext(); + return useQuery({ + ...buildSkillsRetrieveVersionContentQuery( + client, + skillId, + version, + options, + ), + ...options, + }); +} + +/** + * Download skill version content + * + * @remarks + * Download the installable bundle for a skill version available to the authenticated user. + */ +export function useSkillsRetrieveVersionContentSuspense( + skillId: string, + version: number, + options?: SuspenseQueryHookOptions< + SkillsRetrieveVersionContentQueryData, + SkillsRetrieveVersionContentQueryError + >, +): UseSuspenseQueryResult< + SkillsRetrieveVersionContentQueryData, + SkillsRetrieveVersionContentQueryError +> { + const client = useGleanContext(); + return useSuspenseQuery({ + ...buildSkillsRetrieveVersionContentQuery( + client, + skillId, + version, + options, + ), + ...options, + }); +} + +export function setSkillsRetrieveVersionContentData( + client: QueryClient, + queryKeyBase: [skillId: string, version: number], + data: SkillsRetrieveVersionContentQueryData, +): SkillsRetrieveVersionContentQueryData | undefined { + const key = queryKeySkillsRetrieveVersionContent(...queryKeyBase); + + return client.setQueryData(key, data); +} + +export function invalidateSkillsRetrieveVersionContent( + client: QueryClient, + queryKeyBase: TupleToPrefixes<[skillId: string, version: number]>, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: [ + "@gleanwork/api-client", + "skills", + "retrieveVersionContent", + ...queryKeyBase, + ], + }); +} + +export function invalidateAllSkillsRetrieveVersionContent( + client: QueryClient, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: ["@gleanwork/api-client", "skills", "retrieveVersionContent"], + }); +} diff --git a/src/react-query/skillsValidate.ts b/src/react-query/skillsValidate.ts new file mode 100644 index 00000000..ce78f372 --- /dev/null +++ b/src/react-query/skillsValidate.ts @@ -0,0 +1,112 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 03ea65130133 + */ + +import { + MutationKey, + useMutation, + UseMutationResult, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { skillsValidate } from "../funcs/skillsValidate.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.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 { unwrapAsync } from "../types/fp.js"; +import { useGleanContext } from "./_context.js"; +import { MutationHookOptions } from "./_types.js"; + +export type SkillsValidateMutationVariables = { + request: components.PlatformSkillValidationRequest; + options?: RequestOptions; +}; + +export type SkillsValidateMutationData = + components.PlatformSkillValidationResponse; + +export type SkillsValidateMutationError = + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * Validate skill bundle + * + * @remarks + * Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. + */ +export function useSkillsValidateMutation( + options?: MutationHookOptions< + SkillsValidateMutationData, + SkillsValidateMutationError, + SkillsValidateMutationVariables + >, +): UseMutationResult< + SkillsValidateMutationData, + SkillsValidateMutationError, + SkillsValidateMutationVariables +> { + const client = useGleanContext(); + return useMutation({ + ...buildSkillsValidateMutation(client, options), + ...options, + }); +} + +export function mutationKeySkillsValidate(): MutationKey { + return ["@gleanwork/api-client", "skills", "validate"]; +} + +export function buildSkillsValidateMutation( + client$: GleanCore, + hookOptions?: RequestOptions, +): { + mutationKey: MutationKey; + mutationFn: ( + variables: SkillsValidateMutationVariables, + ) => Promise; +} { + return { + mutationKey: mutationKeySkillsValidate(), + mutationFn: function skillsValidateMutationFn({ + request, + options, + }): Promise { + const mergedOptions = { + ...hookOptions, + ...options, + fetchOptions: { + ...hookOptions?.fetchOptions, + ...options?.fetchOptions, + signal: combineSignals( + hookOptions?.fetchOptions?.signal, + options?.fetchOptions?.signal, + ), + }, + }; + return unwrapAsync(skillsValidate( + client$, + request, + mergedOptions, + )); + }, + }; +} 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..9155b691 --- /dev/null +++ b/src/sdk/skills.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 847667a72f83 + */ + +import { skillsCreate } from "../funcs/skillsCreate.js"; +import { skillsCreateVersion } from "../funcs/skillsCreateVersion.js"; +import { skillsList } from "../funcs/skillsList.js"; +import { skillsListVersions } from "../funcs/skillsListVersions.js"; +import { skillsRetrieve } from "../funcs/skillsRetrieve.js"; +import { skillsRetrieveContent } from "../funcs/skillsRetrieveContent.js"; +import { skillsRetrieveVersion } from "../funcs/skillsRetrieveVersion.js"; +import { skillsRetrieveVersionContent } from "../funcs/skillsRetrieveVersionContent.js"; +import { skillsValidate } from "../funcs/skillsValidate.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 Skills extends ClientSDK { + /** + * Create skill + * + * @remarks + * Create a skill from an uploaded SKILL.md, .zip, or .skill bundle. If the authenticated user already has a skill with the same name, the existing skill is superseded with a new version. + */ + async create( + request: components.PlatformSkillCreateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(skillsCreate( + this, + request, + options, + )); + } + + /** + * 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, + )); + } + + /** + * Validate skill bundle + * + * @remarks + * Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. + */ + async validate( + request: components.PlatformSkillValidationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(skillsValidate( + this, + request, + 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, + )); + } + + /** + * Download skill content + * + * @remarks + * Download the latest installable bundle for a skill available to the authenticated user. + */ + async retrieveContent( + skillId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(skillsRetrieveContent( + this, + skillId, + options, + )); + } + + /** + * Create skill version + * + * @remarks + * Create a new immutable version for an existing caller-managed skill from an uploaded SKILL.md, .zip, or .skill bundle. + */ + async createVersion( + platformSkillVersionCreateRequest: + components.PlatformSkillVersionCreateRequest, + skillId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(skillsCreateVersion( + this, + platformSkillVersionCreateRequest, + skillId, + options, + )); + } + + /** + * List skill versions + * + * @remarks + * List versions for a skill available to the authenticated user. + */ + async listVersions( + skillId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(skillsListVersions( + this, + skillId, + pageSize, + cursor, + options, + )); + } + + /** + * Retrieve skill version + * + * @remarks + * Retrieve metadata for a skill version available to the authenticated user. + */ + async retrieveVersion( + skillId: string, + version: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(skillsRetrieveVersion( + this, + skillId, + version, + options, + )); + } + + /** + * Download skill version content + * + * @remarks + * Download the installable bundle for a skill version available to the authenticated user. + */ + async retrieveVersionContent( + skillId: string, + version: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(skillsRetrieveVersionContent( + this, + skillId, + version, + options, + )); + } +}