diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 30063bce..712e7ac5 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 664aaca5-a41f-4434-8f2a-642dba92fe68 management: - docChecksum: 1d1c4c798b764226bfeeae4268f907c1 + docChecksum: 3521c150d450f7ab90bda9b4111f374f docVersion: 0.9.0 - speakeasyVersion: 1.792.0 - generationVersion: 2.927.0 - releaseVersion: 0.18.1 - configChecksum: b41e1af1adbc70d0bc4b01c65b187d4e + speakeasyVersion: 1.793.1 + generationVersion: 2.928.0 + releaseVersion: 0.18.2 + configChecksum: 5bf49531f6f7d27e96e8d2882bf7c937 repoURL: https://github.com/gleanwork/api-client-typescript.git installationURL: https://github.com/gleanwork/api-client-typescript published: true persistentEdits: - generation_id: 316e19b7-3050-46ef-914c-73e5f77cf0cf - pristine_commit_hash: d4067214f61489816e561e4223172fb6fce61a6d - pristine_tree_hash: f35cd2723c9cdde29badb55dd110c00620f4f332 + generation_id: 9d116148-0726-4f8f-b872-6ed43554d137 + pristine_commit_hash: b9cf26657a6c7eaae51fbddbc612f68d588cf0ae + pristine_tree_hash: 6660d3aa6e5c29ce177e0ccb921f2dc74591a9cb features: typescript: acceptHeaders: 2.81.2 @@ -1248,24 +1248,24 @@ trackedFiles: pristine_git_object: 2d773c43730426ba979a2509498cc8367493d9e6 docs/models/components/feedrequestcategory.md: id: 801f1c3c64d4 - last_write_checksum: sha1:829d662641d467beed3330e4d537278c37f39545 - pristine_git_object: e5751cfd305108cba99864eb42478c256c57fe2e + last_write_checksum: sha1:08a3a91a851e5c7ac1c4885f0f0f5af40cce7382 + pristine_git_object: bdc9f84671370ef05d4da0ec9e5a02717cb69556 docs/models/components/feedrequestoptions.md: id: 76c5e4412304 last_write_checksum: sha1:9d026d140bef548159ac576066007ccc73ab5cee pristine_git_object: d36f4c0ede1e69c9b152b812a2aa33da8ec6c08a docs/models/components/feedresponse.md: id: a781b46b0647 - last_write_checksum: sha1:5b4cbe745428ba4b3596365f775d668f416cb235 - pristine_git_object: 4dca9eb879911b70ba3c11a23aa8bb3ed0dcb60b + last_write_checksum: sha1:da222a4b97b497b5386ab018ca0c6e0dd24272f6 + pristine_git_object: e0d78966cfc548106d853e46efd75b329ca6f816 docs/models/components/feedresult.md: id: c3084f56c0cc - last_write_checksum: sha1:74a6712c89de2a5b720a08fcd90d96d2b8614cc1 - pristine_git_object: 887a43f4d699b3ea3cb2cbc4af56bb639295b4a3 + last_write_checksum: sha1:1c868e892b347bcff76d4973e567f9dd6892a4ca + pristine_git_object: e205a401a4b10a28c6eb9d37be40834d7e61a181 docs/models/components/feedresultcategory.md: id: 94c0249352b4 - last_write_checksum: sha1:77ea9d22736cbf9818b4fa4167fbd10fb3f6fa23 - pristine_git_object: e9d2d9253302b7afabf2cec5f7baba521eb33107 + last_write_checksum: sha1:93ed115bad5c4a6431bd5cd5fb18e933363ac4ff + pristine_git_object: 36186d89c885b0f301fe45f525504e0f4f0b9c20 docs/models/components/fieldscope.md: id: 23caffb85bb7 last_write_checksum: sha1:b90b2a0fba0f78b414366202e56a1637a8a8793f @@ -1600,8 +1600,8 @@ trackedFiles: pristine_git_object: 796fa0574cd02b5ca3a7046196a7cc4a214eeda0 docs/models/components/justificationtype.md: id: 5a15880767a5 - last_write_checksum: sha1:5b9822a5f44f433893ef8e41131b11eba33fb7c4 - pristine_git_object: a2597f9373525a93cc58d61537511c5594c42e5e + last_write_checksum: sha1:884236c05f545100d02dd9b961e8db432c4164fb + pristine_git_object: f84ca2f73d4e63c623a2dc7f25ef6fa59463bb4c docs/models/components/knowledgetype.md: id: cf27a7cefa69 last_write_checksum: sha1:6e94f203bb1d3a0d12f0bdb0119bf36301536e8d @@ -1884,8 +1884,8 @@ trackedFiles: pristine_git_object: ae27eac7dfd55251b07c82582cf66f4e3674d7ad docs/models/components/placementreason.md: id: 4aca343a58b8 - last_write_checksum: sha1:31cfe4cb23b1ad813abe043e5f8d9d8d15740ba7 - pristine_git_object: 041fac880aca7c8fd71516bc473c54f43302f6a8 + last_write_checksum: sha1:509885082eab5876a9026362ba78812311b3f56c + pristine_git_object: adf60a35e9ab75dafb72e48e9bf892bac321f43f docs/models/components/platformactionsummary.md: id: 93ecbff93962 last_write_checksum: sha1:f0856d617e3918f6769d90cfecd01cce600a3889 @@ -3544,8 +3544,8 @@ trackedFiles: pristine_git_object: 2c29a709d3d1b54d4abef32fe9f29f6364bfee38 docs/sdks/skills/README.md: id: 3a14a5c90791 - last_write_checksum: sha1:9a6b26965cd30eef9cce0579c4f1ecae5b3dec57 - pristine_git_object: 2634c0a6b41b2fd050aa7d16cd76a44bf08cb5df + last_write_checksum: sha1:ebc027c5eb4a9403ae43f51aa265913f87ae22e6 + pristine_git_object: 4231043fb363657a0098fca957fbd6e9316b028d docs/sdks/tools/README.md: id: 044286549bac last_write_checksum: sha1:3f76f759a2a96e7e736f4c470d2937ef217d92da @@ -3584,12 +3584,12 @@ trackedFiles: pristine_git_object: 5a2797590d4be351d62915017d5b2a0f853537c8 jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:4d1be527ed9db32b91078dd54c04f39fe72ed642 - pristine_git_object: 6252229ac6decc07bb05e2d5b1da9186bd8f789c + last_write_checksum: sha1:f7dc1ab02ed0e2e390873db3bd783aeeaf5277c4 + pristine_git_object: da338064d531a7fdeec237fbe9e54e38be955807 package.json: id: 7030d0b2f71b - last_write_checksum: sha1:4f731e1df17b33991b0c2f542f9f95fd28c35a50 - pristine_git_object: 1aa7344f7cf0340c13677ac09efde9c5b6181fc2 + last_write_checksum: sha1:1e96b98002ec7c665bc49c7eab5bc68a70c54086 + pristine_git_object: aaed989914763059385612f76ae5a25b25fb29e9 src/__tests__/activities.test.ts: id: 65fa859b8f59 last_write_checksum: sha1:756bc40095f4495bbf62739b8218bb4a559a24f2 @@ -5224,12 +5224,12 @@ trackedFiles: pristine_git_object: eaa87413391e44f74a2647a75d861904a051a1af src/__tests__/mockserver/internal/sdk/models/components/feedentry.go: id: 809547cb5c68 - last_write_checksum: sha1:c8a35dce583e56a382f37d33b263066f489fc6c1 - pristine_git_object: c10cf6160b33b8dba52632d14c542b5596afcbe3 + last_write_checksum: sha1:f9133dc33cfd6aab976f87747526ca34a52fbac2 + pristine_git_object: 5a52495bd65cc469a6bc1e3c69ad8a6934d19d7d src/__tests__/mockserver/internal/sdk/models/components/feedrequest.go: id: f7bd2c505cff - last_write_checksum: sha1:570996d04749d147d75ec36caa21524209376a1e - pristine_git_object: 0a92f10622f9d3bd77b3aad8660e3d5efe0222e8 + last_write_checksum: sha1:cfc56433977be2c80d8fab232f492792fbc73c92 + pristine_git_object: a5f8b3a90bb5f38fb85c844272f39e368fb71225 src/__tests__/mockserver/internal/sdk/models/components/feedrequestoptions.go: id: d6a1872334df last_write_checksum: sha1:1ab14ce889dc4f6a8cd018f5ef731ee05e3c4f3a @@ -5240,8 +5240,8 @@ trackedFiles: pristine_git_object: c92a344643e978700da31b2f24afaf9d14fd8d69 src/__tests__/mockserver/internal/sdk/models/components/feedresult.go: id: 90772ce61c8a - last_write_checksum: sha1:0b9177ec69b138ff564f27de7a1c0f9a3b697363 - pristine_git_object: a3066261f9a430485a2d225a835251fd7681c336 + last_write_checksum: sha1:4dbd1a71f92818054220204f3d6e454fd766a875 + pristine_git_object: 7d221ae18bef2201c7db781fdc696594e81dcea5 src/__tests__/mockserver/internal/sdk/models/components/followupaction.go: id: b87db474fc6a last_write_checksum: sha1:94c11e6ccb0d238213354241dff0baa101808b64 @@ -7288,8 +7288,8 @@ trackedFiles: pristine_git_object: b5a61d7417c6131b4dddc24bb19fcdd0f73f07d3 src/__tests__/summarize.test.ts: id: 3105d6ebc7eb - last_write_checksum: sha1:fa4dfb1046b992363984b7c95dfe6a9c0f74fe2d - pristine_git_object: 31b3a9b32f8bfccb2ab5c8556f9fbed21fb4b1c4 + last_write_checksum: sha1:c436755c5b3011125204669793b0750decdc8a69 + pristine_git_object: 9afcefd9fc48f08262453ad86e34c78ad3d03984 src/__tests__/testclient.ts: id: f142c080bff8 last_write_checksum: sha1:3a38647391f52221c009a9273eebf90793b3d430 @@ -7956,8 +7956,8 @@ trackedFiles: pristine_git_object: 42d9739ab67c2fec0689f83777ffa5e1f875e5d5 src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:a28b1a6dce0da94072bb6f3d05b32dc34f97df49 - pristine_git_object: aca67314831cf1656dd79def8be0dc719c8da2ee + last_write_checksum: sha1:d9058a9740b13affa1aab0cf0b912f2c9d0ee119 + pristine_git_object: e08404f3c668ecfcc4159bf5dea271de5d1be2a3 src/lib/encodings.ts: id: 3bd8ead98afd last_write_checksum: sha1:a74725064d06b6994b95873c037975d2f2e63467 @@ -8916,12 +8916,12 @@ trackedFiles: pristine_git_object: 3fb6f14548eb0f546d0fdfcbac4ea9af834b9687 src/models/components/feedentry.ts: id: 47faae0fec45 - last_write_checksum: sha1:e1a5a6b1756792779ed68f901b91232e5bdfb3a1 - pristine_git_object: 3ca806ebee2e92cc8d8f7b20ee78fcaa08800102 + last_write_checksum: sha1:2fe54bd66873007ba03d021798affb187280a249 + pristine_git_object: 155b1275baf0e2e1e4c79b3e1d1270b4cbc2f0fe src/models/components/feedrequest.ts: id: e18410d4ffd4 - last_write_checksum: sha1:362d6e85324f74570391eb9e8986a8b2da43c607 - pristine_git_object: a271ecf6a975e906df8e2244a851cb209eb3d049 + last_write_checksum: sha1:78dbb2b566b9af8e17401776684bb73dfdf17db2 + pristine_git_object: 187318ec69b346f44b2c61ce6e5683d11b6b97e3 src/models/components/feedrequestoptions.ts: id: 684c93eb4ff3 last_write_checksum: sha1:339180c553629e9c992c1f5819612effd7d692e7 @@ -8932,8 +8932,8 @@ trackedFiles: pristine_git_object: ec512af99670430c927b57b2fcb360c620f56cf7 src/models/components/feedresult.ts: id: 94d90ce484f6 - last_write_checksum: sha1:cc351a59236a19dd66dc508d047f67dbd24680c0 - pristine_git_object: 7733310af10f4f4c25b1511d14eb0a53faf7f32a + last_write_checksum: sha1:8faa02972f837f191c5aa77084bc40978d99b8d5 + pristine_git_object: f1ee4d4e7bfe46ddcb981b9047b138ad6c2b6fb9 src/models/components/followupaction.ts: id: 0b8a71fb6ea2 last_write_checksum: sha1:ea9d1e5a53384164dc8d63d3ff831a332a5f2fed @@ -11592,8 +11592,8 @@ trackedFiles: pristine_git_object: a4ecf2ede22740e3ccd9b84253b0e065d934c916 src/sdk/skills.ts: id: 847667a72f83 - last_write_checksum: sha1:59c51e7e653207a3377940fc7b3b925381831595 - pristine_git_object: f6c835465ccc4e3af93185336aaccfad52ecff59 + last_write_checksum: sha1:3434ad19db266a076c9a63e24cc6d47c1c28d640 + pristine_git_object: fbf9360e159b3074695b85b443ddfee2d4c4fa63 src/sdk/tools.ts: id: f997ccdd9dd9 last_write_checksum: sha1:6946d59c6ed6e6796ccad26cbe49fcde7ce5e8e2 @@ -13084,6 +13084,7 @@ generatedTests: post_/api/index/v1/debug/{datasource}/documents: "2026-08-07T21:23:48Z" post_/api/index/v1/debug/{datasource}/document/events: "2026-08-07T21:23:48Z" post_/api/index/v1/debug/{datasource}/user: "2026-08-07T21:23:48Z" +releaseNotes: "## Typescript SDK Changes:\n* `glean.client.search.retrieveFeed()`: \n * `request.feedRequest.categories[].enum(knowledgeGap)` **Added**\n * `response.results[]` **Changed**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 473a7a5e..4ad5a362 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -35,7 +35,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true typescript: - version: 0.18.1 + version: 0.18.2 acceptHeaderEnum: true additionalDependencies: dependencies: {} diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index 1906bd1f..dd1c149f 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: 7a82cb818d032eca9f42d56706dd9e0a65418d45 - x-open-api-commit-sha: 987c3f6458420f6a99420d808bdccea74ab84dad + x-source-commit-sha: 26582d482fd365bb6e08720a096edc8336b2322e + x-open-api-commit-sha: ba805dad43d06e3a084ffb35806144d0ad946bcc 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. @@ -205,7 +205,8 @@ paths: text/event-stream: schema: type: string - description: Server-sent events emitted by the running agent. + description: | + Server-sent events emitted by the running agent. Successful runs emit `message` events. A terminal failure after the stream has started emits exactly one `run.failed` event whose `data` is an `AgentRunFailedEventData` payload, then closes. example: | id: 1 event: message @@ -214,6 +215,10 @@ paths: id: 2 event: message data: {"messages":[{"role":"GLEAN_AI","content":[{"text":", I can help with HR policy questions.","type":"text"}]}]} + + id: 3 + event: run.failed + data: {"error":{"type":"https://developers.glean.com/errors/spend-limit-exceeded","title":"Spend Limit Exceeded","status":403,"detail":"You've reached the monthly limit set by your admin.","code":"spend_limit_exceeded","request_id":"req_123","documentation_url":"https://developers.glean.com/errors/spend-limit-exceeded"}} "400": $ref: "#/components/responses/PlatformBadRequest" "401": @@ -281,14 +286,18 @@ paths: data: {"type":"response.created","response_id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015"} id: 2 + event: response.progress + data: {"type":"response.progress","response_id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015","text":"**Searching:** foo"} + + id: 3 event: response.output_text.delta data: {"type":"response.output_text.delta","response_id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015","delta":"Hello"} - id: 3 + id: 4 event: response.output_text.done data: {"type":"response.output_text.done","response_id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015","text":"Hello"} - id: 4 + id: 5 event: response.completed data: {"type":"response.completed","response_id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015","response":{"id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015","object":"response","status":"completed","output":[{"type":"message","role":"assistant","content":[{"type":"output_text","text":"Hello"}]}],"store":true,"request_id":"req_123","created_at":"2026-07-14T20:00:00Z"}} "400": @@ -417,42 +426,42 @@ paths: x-speakeasy-name-override: list security: - APIToken: [] - /api/skills/validation: + /api/skills/import: post: tags: - Skills - summary: Validate skill bundle + summary: Import skills from GitHub 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 + Import one or more skills selected from a GitHub source preview. Each source URL is fetched and persisted as an independent skill with source provenance. This operation does not create a durable source resource. The import is atomic: if any source cannot be fetched, validated, or persisted, no skills are created. + operationId: platform-skills-import x-visibility: Public x-glean-experimental: - id: 0b086fa6-30f8-4279-8d11-10ab0059c14a - introduced: "2026-06-24" + id: 9162d790-e101-437d-a9a0-25e4687d150b + introduced: "2026-07-28" + x-codegen-request-body-name: request requestBody: required: true content: - multipart/form-data: + application/json: schema: - $ref: "#/components/schemas/PlatformSkillValidationRequest" - x-codegen-request-body-name: request + $ref: "#/components/schemas/PlatformSkillImportRequest" responses: "200": - description: Successful response. + description: Skills imported successfully. content: application/json: schema: - $ref: "#/components/schemas/PlatformSkillValidationResponse" + $ref: "#/components/schemas/PlatformSkillImportResponse" "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": @@ -462,45 +471,45 @@ paths: "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills - x-speakeasy-name-override: validate + x-speakeasy-name-override: import security: - APIToken: [] - /api/skills/import: + /api/skills/validation: post: tags: - Skills - summary: Import skills from GitHub + summary: Validate skill bundle description: | - Import one or more skills selected from a GitHub source preview. Each source URL is fetched and persisted as an independent skill with source provenance. This operation does not create a durable source resource. The import is atomic: if any source cannot be fetched, validated, or persisted, no skills are created. - operationId: platform-skills-import + 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: 9162d790-e101-437d-a9a0-25e4687d150b - introduced: "2026-07-28" - x-codegen-request-body-name: request + id: 0b086fa6-30f8-4279-8d11-10ab0059c14a + introduced: "2026-06-24" requestBody: required: true content: - application/json: + multipart/form-data: schema: - $ref: "#/components/schemas/PlatformSkillImportRequest" + $ref: "#/components/schemas/PlatformSkillValidationRequest" + x-codegen-request-body-name: request responses: "200": - description: Skills imported successfully. + description: Successful response. content: application/json: schema: - $ref: "#/components/schemas/PlatformSkillImportResponse" + $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" - "409": - $ref: "#/components/responses/PlatformConflict" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "429": @@ -510,7 +519,7 @@ paths: "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills - x-speakeasy-name-override: import + x-speakeasy-name-override: validate security: - APIToken: [] /api/skills/sources/preview: @@ -7008,6 +7017,37 @@ components: request_id: type: string description: Platform-generated request ID for support correlation. + PlatformSkillImportRequest: + type: object + additionalProperties: false + required: + - source_urls + properties: + source_urls: + type: array + minItems: 1 + maxItems: 100 + uniqueItems: true + description: Resolved GitHub skill URLs selected from a source preview. + items: + type: string + minLength: 1 + maxLength: 2048 + PlatformSkillImportResponse: + type: object + required: + - skills + - request_id + properties: + skills: + type: array + minItems: 1 + description: Independently persisted skills in request order. + items: + $ref: "#/components/schemas/PlatformSkill" + request_id: + type: string + description: Platform-generated request ID for support correlation. PlatformSkillValidationRequest: type: object additionalProperties: false @@ -7069,37 +7109,6 @@ components: request_id: type: string description: Platform-generated request ID for support correlation. - PlatformSkillImportRequest: - type: object - additionalProperties: false - required: - - source_urls - properties: - source_urls: - type: array - minItems: 1 - maxItems: 100 - uniqueItems: true - description: Resolved GitHub skill URLs selected from a source preview. - items: - type: string - minLength: 1 - maxLength: 2048 - PlatformSkillImportResponse: - type: object - required: - - skills - - request_id - properties: - skills: - type: array - minItems: 1 - description: Independently persisted skills in request order. - items: - $ref: "#/components/schemas/PlatformSkill" - request_id: - type: string - description: Platform-generated request ID for support correlation. PlatformSkillSourcePreviewRequest: type: object additionalProperties: false @@ -14344,6 +14353,7 @@ components: - OOO_PLANNER - OOO_CATCH_UP - ADMIN_HEALTH_CENTER + - KNOWLEDGE_GAP description: Categories of content requested. An allowlist gives flexibility to request content separately or together. requestOptions: $ref: '#/components/schemas/FeedRequestOptions' @@ -14789,6 +14799,7 @@ components: - OOO_PLANNER - OOO_CATCH_UP - ADMIN_HEALTH_CENTER + - KNOWLEDGE_GAP description: Type of the justification. justification: type: string @@ -14880,6 +14891,7 @@ components: - OOO_PLANNER - OOO_CATCH_UP - ADMIN_HEALTH_CENTER + - KNOWLEDGE_GAP description: Category of the result, one of the requested categories in incoming request. primaryEntry: $ref: '#/components/schemas/FeedEntry' @@ -14896,7 +14908,8 @@ components: enum: - ORGANIC - PROMO - description: Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. + - PINNED + description: Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. PINNED means the card was moved to the head of the ranked stack (e.g. knowledge-gap pilot cards). required: - category - primaryEntry diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 2e375b22..3c88c0dc 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.792.0 +speakeasyVersion: 1.793.1 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:ca77ef4550d695da210e8f0d32f3422d29e9d09f7aa66f7b13d248c6ec8c7941 - sourceBlobDigest: sha256:469de4cd2c8ab4928c3989656bf63cc265a8ceea5a8b3e3498734137b19723f8 + sourceRevisionDigest: sha256:40892a32681b40c6c8fd06d21c7ed467727c928ef7f2d96a6470da904960f1dc + sourceBlobDigest: sha256:86f03a5610ece884b13f9bfd70fa9299b35eee4b5002865014c13de6176e6d76 tags: - latest Glean Client API: @@ -17,10 +17,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:ca77ef4550d695da210e8f0d32f3422d29e9d09f7aa66f7b13d248c6ec8c7941 - sourceBlobDigest: sha256:469de4cd2c8ab4928c3989656bf63cc265a8ceea5a8b3e3498734137b19723f8 + sourceRevisionDigest: sha256:40892a32681b40c6c8fd06d21c7ed467727c928ef7f2d96a6470da904960f1dc + sourceBlobDigest: sha256:86f03a5610ece884b13f9bfd70fa9299b35eee4b5002865014c13de6176e6d76 codeSamplesNamespace: glean-api-specs-typescript-code-samples - codeSamplesRevisionDigest: sha256:2a5a5baffaf2d176ab8a34a66631e4780357e2999769595146e8400d7dd87e06 + codeSamplesRevisionDigest: sha256:09ecf2b5d1417f76a411a8c6122eaa451dac50eff51923802e72958601a20a42 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 461cb8c0..b9228b1b 100644 --- a/README.md +++ b/README.md @@ -506,8 +506,8 @@ For more information on obtaining the appropriate token type, please contact you * [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 * [import](docs/sdks/skills/README.md#import) - Import skills from GitHub +* [validate](docs/sdks/skills/README.md#validate) - Validate skill bundle * [previewSource](docs/sdks/skills/README.md#previewsource) - Preview a GitHub skill source * [update](docs/sdks/skills/README.md#update) - Update skill * [delete](docs/sdks/skills/README.md#delete) - Delete skill diff --git a/RELEASES.md b/RELEASES.md index 43b84d97..65320e09 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -848,4 +848,14 @@ Based on: ### Generated - [typescript v0.18.1] . ### Releases -- [NPM v0.18.1] https://www.npmjs.com/package/@gleanwork/api-client/v/0.18.1 - . \ No newline at end of file +- [NPM v0.18.1] https://www.npmjs.com/package/@gleanwork/api-client/v/0.18.1 - . + +## 2026-08-12 09:19:27 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.793.1 (2.928.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.18.2] . +### Releases +- [NPM v0.18.2] https://www.npmjs.com/package/@gleanwork/api-client/v/0.18.2 - . \ No newline at end of file diff --git a/docs/models/components/feedrequestcategory.md b/docs/models/components/feedrequestcategory.md index e5751cfd..bdc9f846 100644 --- a/docs/models/components/feedrequestcategory.md +++ b/docs/models/components/feedrequestcategory.md @@ -11,5 +11,5 @@ let value: FeedRequestCategory = "PLAN_MY_DAY"; ## Values ```typescript -"DOCUMENT_SUGGESTION" | "DOCUMENT_SUGGESTION_SCENARIO" | "TRENDING_DOCUMENT" | "VERIFICATION_REMINDER" | "EVENT" | "ANNOUNCEMENT" | "MENTION" | "DATASOURCE_AFFINITY" | "RECENT" | "COMPANY_RESOURCE" | "EXPERIMENTAL" | "PEOPLE_CELEBRATIONS" | "DISPLAYABLE_LIST" | "SOCIAL_LINK" | "EXTERNAL_TASKS" | "WORKFLOW_COLLECTIONS" | "ZERO_STATE_CHAT_SUGGESTION" | "ZERO_STATE_CHAT_TOOL_SUGGESTION" | "ZERO_STATE_WORKFLOW_CREATED_BY_ME" | "ZERO_STATE_WORKFLOW_FAVORITES" | "ZERO_STATE_WORKFLOW_POPULAR" | "ZERO_STATE_WORKFLOW_RECENT" | "ZERO_STATE_WORKFLOW_SUGGESTION" | "PERSONALIZED_CHAT_SUGGESTION" | "DAILY_DIGEST" | "PODCAST" | "TASK" | "PLAN_MY_DAY" | "END_MY_DAY" | "STARTER_KIT" | "MEETING_PREP_AUTOMATION" | "MID_DAY_CATCH_UP" | "QUERY_SUGGESTION" | "COWORK_CUJ_PROMO" | "CARD_STACK_PROMO" | "WEEKLY_MEETINGS" | "FOLLOW_UP" | "MILESTONE_TIMELINE_CHECK" | "PROJECT_DISCUSSION_DIGEST" | "PROJECT_FOCUS_BLOCK" | "PROJECT_NEXT_STEP" | "DEMO_CARD" | "OOO_PLANNER" | "OOO_CATCH_UP" | "ADMIN_HEALTH_CENTER" +"DOCUMENT_SUGGESTION" | "DOCUMENT_SUGGESTION_SCENARIO" | "TRENDING_DOCUMENT" | "VERIFICATION_REMINDER" | "EVENT" | "ANNOUNCEMENT" | "MENTION" | "DATASOURCE_AFFINITY" | "RECENT" | "COMPANY_RESOURCE" | "EXPERIMENTAL" | "PEOPLE_CELEBRATIONS" | "DISPLAYABLE_LIST" | "SOCIAL_LINK" | "EXTERNAL_TASKS" | "WORKFLOW_COLLECTIONS" | "ZERO_STATE_CHAT_SUGGESTION" | "ZERO_STATE_CHAT_TOOL_SUGGESTION" | "ZERO_STATE_WORKFLOW_CREATED_BY_ME" | "ZERO_STATE_WORKFLOW_FAVORITES" | "ZERO_STATE_WORKFLOW_POPULAR" | "ZERO_STATE_WORKFLOW_RECENT" | "ZERO_STATE_WORKFLOW_SUGGESTION" | "PERSONALIZED_CHAT_SUGGESTION" | "DAILY_DIGEST" | "PODCAST" | "TASK" | "PLAN_MY_DAY" | "END_MY_DAY" | "STARTER_KIT" | "MEETING_PREP_AUTOMATION" | "MID_DAY_CATCH_UP" | "QUERY_SUGGESTION" | "COWORK_CUJ_PROMO" | "CARD_STACK_PROMO" | "WEEKLY_MEETINGS" | "FOLLOW_UP" | "MILESTONE_TIMELINE_CHECK" | "PROJECT_DISCUSSION_DIGEST" | "PROJECT_FOCUS_BLOCK" | "PROJECT_NEXT_STEP" | "DEMO_CARD" | "OOO_PLANNER" | "OOO_CATCH_UP" | "ADMIN_HEALTH_CENTER" | "KNOWLEDGE_GAP" ``` \ No newline at end of file diff --git a/docs/models/components/feedresponse.md b/docs/models/components/feedresponse.md index 4dca9eb8..e0d78966 100644 --- a/docs/models/components/feedresponse.md +++ b/docs/models/components/feedresponse.md @@ -9,7 +9,7 @@ let value: FeedResponse = { serverTimestamp: 603266, results: [ { - category: "EVENT", + category: "ANNOUNCEMENT", primaryEntry: { title: "", createdBy: { diff --git a/docs/models/components/feedresult.md b/docs/models/components/feedresult.md index 887a43f4..e205a401 100644 --- a/docs/models/components/feedresult.md +++ b/docs/models/components/feedresult.md @@ -6,7 +6,7 @@ import { FeedResult } from "@gleanwork/api-client/models/components"; let value: FeedResult = { - category: "CARD_STACK_PROMO", + category: "WEEKLY_MEETINGS", primaryEntry: { title: "", createdBy: { @@ -1228,10 +1228,10 @@ let value: FeedResult = { ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `category` | [components.FeedResultCategory](../../models/components/feedresultcategory.md) | :heavy_check_mark: | Category of the result, one of the requested categories in incoming request. | -| `primaryEntry` | [components.FeedEntry](../../models/components/feedentry.md) | :heavy_check_mark: | N/A | -| `secondaryEntries` | [components.FeedEntry](../../models/components/feedentry.md)[] | :heavy_minus_sign: | Secondary entries for the result e.g. suggested docs for the calendar, carousel. | -| `rank` | *number* | :heavy_minus_sign: | Rank of the result. Rank is suggested by server. Client side rank may differ. | -| `placementReason` | [components.PlacementReason](../../models/components/placementreason.md) | :heavy_minus_sign: | Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `category` | [components.FeedResultCategory](../../models/components/feedresultcategory.md) | :heavy_check_mark: | Category of the result, one of the requested categories in incoming request. | +| `primaryEntry` | [components.FeedEntry](../../models/components/feedentry.md) | :heavy_check_mark: | N/A | +| `secondaryEntries` | [components.FeedEntry](../../models/components/feedentry.md)[] | :heavy_minus_sign: | Secondary entries for the result e.g. suggested docs for the calendar, carousel. | +| `rank` | *number* | :heavy_minus_sign: | Rank of the result. Rank is suggested by server. Client side rank may differ. | +| `placementReason` | [components.PlacementReason](../../models/components/placementreason.md) | :heavy_minus_sign: | Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. PINNED means the card was moved to the head of the ranked stack (e.g. knowledge-gap pilot cards). | \ No newline at end of file diff --git a/docs/models/components/feedresultcategory.md b/docs/models/components/feedresultcategory.md index e9d2d925..36186d89 100644 --- a/docs/models/components/feedresultcategory.md +++ b/docs/models/components/feedresultcategory.md @@ -15,5 +15,5 @@ let value: FeedResultCategory = "MEETING_PREP_AUTOMATION"; ## Values ```typescript -"DOCUMENT_SUGGESTION" | "DOCUMENT_SUGGESTION_SCENARIO" | "TRENDING_DOCUMENT" | "USE_CASE" | "VERIFICATION_REMINDER" | "EVENT" | "ANNOUNCEMENT" | "MENTION" | "DATASOURCE_AFFINITY" | "RECENT" | "COMPANY_RESOURCE" | "EXPERIMENTAL" | "PEOPLE_CELEBRATIONS" | "SOCIAL_LINK" | "EXTERNAL_TASKS" | "DISPLAYABLE_LIST" | "ZERO_STATE_CHAT_SUGGESTION" | "ZERO_STATE_CHAT_TOOL_SUGGESTION" | "ZERO_STATE_WORKFLOW_CREATED_BY_ME" | "ZERO_STATE_WORKFLOW_FAVORITES" | "ZERO_STATE_WORKFLOW_POPULAR" | "ZERO_STATE_WORKFLOW_RECENT" | "ZERO_STATE_WORKFLOW_SUGGESTION" | "PERSONALIZED_CHAT_SUGGESTION" | "DAILY_DIGEST" | "PODCAST" | "TASK" | "PLAN_MY_DAY" | "END_MY_DAY" | "STARTER_KIT" | "MEETING_PREP_AUTOMATION" | "MID_DAY_CATCH_UP" | "QUERY_SUGGESTION" | "COWORK_CUJ_PROMO" | "CARD_STACK_PROMO" | "WEEKLY_MEETINGS" | "FOLLOW_UP" | "MILESTONE_TIMELINE_CHECK" | "PROJECT_DISCUSSION_DIGEST" | "PROJECT_FOCUS_BLOCK" | "PROJECT_NEXT_STEP" | "DEMO_CARD" | "OOO_PLANNER" | "OOO_CATCH_UP" | "ADMIN_HEALTH_CENTER" | Unrecognized +"DOCUMENT_SUGGESTION" | "DOCUMENT_SUGGESTION_SCENARIO" | "TRENDING_DOCUMENT" | "USE_CASE" | "VERIFICATION_REMINDER" | "EVENT" | "ANNOUNCEMENT" | "MENTION" | "DATASOURCE_AFFINITY" | "RECENT" | "COMPANY_RESOURCE" | "EXPERIMENTAL" | "PEOPLE_CELEBRATIONS" | "SOCIAL_LINK" | "EXTERNAL_TASKS" | "DISPLAYABLE_LIST" | "ZERO_STATE_CHAT_SUGGESTION" | "ZERO_STATE_CHAT_TOOL_SUGGESTION" | "ZERO_STATE_WORKFLOW_CREATED_BY_ME" | "ZERO_STATE_WORKFLOW_FAVORITES" | "ZERO_STATE_WORKFLOW_POPULAR" | "ZERO_STATE_WORKFLOW_RECENT" | "ZERO_STATE_WORKFLOW_SUGGESTION" | "PERSONALIZED_CHAT_SUGGESTION" | "DAILY_DIGEST" | "PODCAST" | "TASK" | "PLAN_MY_DAY" | "END_MY_DAY" | "STARTER_KIT" | "MEETING_PREP_AUTOMATION" | "MID_DAY_CATCH_UP" | "QUERY_SUGGESTION" | "COWORK_CUJ_PROMO" | "CARD_STACK_PROMO" | "WEEKLY_MEETINGS" | "FOLLOW_UP" | "MILESTONE_TIMELINE_CHECK" | "PROJECT_DISCUSSION_DIGEST" | "PROJECT_FOCUS_BLOCK" | "PROJECT_NEXT_STEP" | "DEMO_CARD" | "OOO_PLANNER" | "OOO_CATCH_UP" | "ADMIN_HEALTH_CENTER" | "KNOWLEDGE_GAP" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/components/justificationtype.md b/docs/models/components/justificationtype.md index a2597f93..f84ca2f7 100644 --- a/docs/models/components/justificationtype.md +++ b/docs/models/components/justificationtype.md @@ -7,7 +7,7 @@ Type of the justification. ```typescript import { JustificationType } from "@gleanwork/api-client/models/components"; -let value: JustificationType = "ZERO_STATE_STATIC_WORKFLOW_SUGGESTION"; +let value: JustificationType = "ZERO_STATE_AGENT_SUGGESTION"; // Open enum: unrecognized values are captured as Unrecognized ``` @@ -15,5 +15,5 @@ let value: JustificationType = "ZERO_STATE_STATIC_WORKFLOW_SUGGESTION"; ## Values ```typescript -"FREQUENTLY_ACCESSED" | "RECENTLY_ACCESSED" | "TRENDING_DOCUMENT" | "VERIFICATION_REMINDER" | "SUGGESTED_DOCUMENT" | "EMPTY_STATE_SUGGESTION" | "FRECENCY_SCORED" | "SERVER_GENERATED" | "USE_CASE" | "UPDATE_SINCE_LAST_VIEW" | "RECENTLY_STARTED" | "EVENT" | "USER_MENTION" | "ANNOUNCEMENT" | "EXTERNAL_ANNOUNCEMENT" | "POPULARITY_BASED_TRENDING" | "COMPANY_RESOURCE" | "EVENT_DOCUMENT_FROM_CONTENT" | "EVENT_DOCUMENT_FROM_SEARCH" | "VISIT_AFFINITY_SCORED" | "SUGGESTED_APP" | "SUGGESTED_PERSON" | "ACTIVITY_HIGHLIGHT" | "SAVED_SEARCH" | "SUGGESTED_CHANNEL" | "PEOPLE_CELEBRATIONS" | "SOCIAL_LINK" | "ZERO_STATE_CHAT_SUGGESTION" | "ZERO_STATE_CHAT_TOOL_SUGGESTION" | "ZERO_STATE_PROMPT_TEMPLATE_SUGGESTION" | "ZERO_STATE_STATIC_WORKFLOW_SUGGESTION" | "ZERO_STATE_AGENT_SUGGESTION" | "PERSONALIZED_CHAT_SUGGESTION" | "DAILY_DIGEST" | "PODCAST" | "TASK" | "PLAN_MY_DAY" | "END_MY_DAY" | "STARTER_KIT_EXTENSION" | "STARTER_KIT_ORG_CHART" | "STARTER_KIT_ADD_DOC" | "MEETING_RECAP" | "MEETING_PREP_AUTOMATION" | "ACTIVE_DISCUSSION" | "MID_DAY_CATCH_UP" | "QUERY_SUGGESTION" | "COWORK_CUJ_PROMO" | "CARD_STACK_PROMO" | "WEEKLY_MEETINGS" | "FOLLOW_UP" | "MILESTONE_TIMELINE_CHECK" | "PROJECT_DISCUSSION_DIGEST" | "PROJECT_FOCUS_BLOCK" | "PROJECT_NEXT_STEP" | "DEMO_CARD" | "OOO_PLANNER" | "OOO_CATCH_UP" | "ADMIN_HEALTH_CENTER" | Unrecognized +"FREQUENTLY_ACCESSED" | "RECENTLY_ACCESSED" | "TRENDING_DOCUMENT" | "VERIFICATION_REMINDER" | "SUGGESTED_DOCUMENT" | "EMPTY_STATE_SUGGESTION" | "FRECENCY_SCORED" | "SERVER_GENERATED" | "USE_CASE" | "UPDATE_SINCE_LAST_VIEW" | "RECENTLY_STARTED" | "EVENT" | "USER_MENTION" | "ANNOUNCEMENT" | "EXTERNAL_ANNOUNCEMENT" | "POPULARITY_BASED_TRENDING" | "COMPANY_RESOURCE" | "EVENT_DOCUMENT_FROM_CONTENT" | "EVENT_DOCUMENT_FROM_SEARCH" | "VISIT_AFFINITY_SCORED" | "SUGGESTED_APP" | "SUGGESTED_PERSON" | "ACTIVITY_HIGHLIGHT" | "SAVED_SEARCH" | "SUGGESTED_CHANNEL" | "PEOPLE_CELEBRATIONS" | "SOCIAL_LINK" | "ZERO_STATE_CHAT_SUGGESTION" | "ZERO_STATE_CHAT_TOOL_SUGGESTION" | "ZERO_STATE_PROMPT_TEMPLATE_SUGGESTION" | "ZERO_STATE_STATIC_WORKFLOW_SUGGESTION" | "ZERO_STATE_AGENT_SUGGESTION" | "PERSONALIZED_CHAT_SUGGESTION" | "DAILY_DIGEST" | "PODCAST" | "TASK" | "PLAN_MY_DAY" | "END_MY_DAY" | "STARTER_KIT_EXTENSION" | "STARTER_KIT_ORG_CHART" | "STARTER_KIT_ADD_DOC" | "MEETING_RECAP" | "MEETING_PREP_AUTOMATION" | "ACTIVE_DISCUSSION" | "MID_DAY_CATCH_UP" | "QUERY_SUGGESTION" | "COWORK_CUJ_PROMO" | "CARD_STACK_PROMO" | "WEEKLY_MEETINGS" | "FOLLOW_UP" | "MILESTONE_TIMELINE_CHECK" | "PROJECT_DISCUSSION_DIGEST" | "PROJECT_FOCUS_BLOCK" | "PROJECT_NEXT_STEP" | "DEMO_CARD" | "OOO_PLANNER" | "OOO_CATCH_UP" | "ADMIN_HEALTH_CENTER" | "KNOWLEDGE_GAP" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/components/placementreason.md b/docs/models/components/placementreason.md index 041fac88..adf60a35 100644 --- a/docs/models/components/placementreason.md +++ b/docs/models/components/placementreason.md @@ -1,13 +1,13 @@ # PlacementReason -Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. +Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. PINNED means the card was moved to the head of the ranked stack (e.g. knowledge-gap pilot cards). ## Example Usage ```typescript import { PlacementReason } from "@gleanwork/api-client/models/components"; -let value: PlacementReason = "PROMO"; +let value: PlacementReason = "PINNED"; // Open enum: unrecognized values are captured as Unrecognized ``` @@ -15,5 +15,5 @@ let value: PlacementReason = "PROMO"; ## Values ```typescript -"ORGANIC" | "PROMO" | Unrecognized +"ORGANIC" | "PROMO" | "PINNED" | Unrecognized ``` \ No newline at end of file diff --git a/docs/sdks/skills/README.md b/docs/sdks/skills/README.md index 2634c0a6..4231043f 100644 --- a/docs/sdks/skills/README.md +++ b/docs/sdks/skills/README.md @@ -6,8 +6,8 @@ * [create](#create) - Create skill * [list](#list) - List skills -* [validate](#validate) - Validate skill bundle * [import](#import) - Import skills from GitHub +* [validate](#validate) - Validate skill bundle * [previewSource](#previewsource) - Preview a GitHub skill source * [update](#update) - Update skill * [delete](#delete) - Delete skill @@ -215,25 +215,26 @@ import { | errors.PlatformProblemDetailError | 500, 503 | application/problem+json | | errors.GleanError | 4XX, 5XX | \*/\* | -## validate +## import -Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. +Import one or more skills selected from a GitHub source preview. Each source URL is fetched and persisted as an independent skill with source provenance. This operation does not create a durable source resource. The import is atomic: if any source cannot be fetched, validated, or persisted, no skills are created. ### 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"), + const result = await glean.skills.import({ + source_urls: [ + "", + ], }); console.log(result); @@ -248,8 +249,7 @@ 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"; +import { skillsImport } from "@gleanwork/api-client/funcs/skillsImport.js"; // Use `GleanCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -258,14 +258,16 @@ const glean = new GleanCore({ }); async function run() { - const res = await skillsValidate(glean, { - file: await openAsBlob("example.file"), + const res = await skillsImport(glean, { + source_urls: [ + "", + ], }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("skillsValidate failed:", res.error); + console.log("skillsImport failed:", res.error); } } @@ -285,51 +287,50 @@ associated utilities. ```tsx import { // Mutation hook for triggering the API call. - useSkillsValidateMutation -} from "@gleanwork/api-client/react-query/skillsValidate.js"; + useSkillsImportMutation +} from "@gleanwork/api-client/react-query/skillsImport.js"; ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PlatformSkillValidationRequest](../../models/components/platformskillvalidationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.PlatformSkillImportRequest](../../models/components/platformskillimportrequest.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)\>** +**Promise\<[components.PlatformSkillImportResponse](../../models/components/platformskillimportresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | --------------------------------- | --------------------------------- | --------------------------------- | -| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 413, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 400, 401, 403, 408, 409, 413, 429 | application/problem+json | | errors.PlatformProblemDetailError | 500, 503 | application/problem+json | | errors.GleanError | 4XX, 5XX | \*/\* | -## import +## validate -Import one or more skills selected from a GitHub source preview. Each source URL is fetched and persisted as an independent skill with source provenance. This operation does not create a durable source resource. The import is atomic: if any source cannot be fetched, validated, or persisted, no skills are created. +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.import({ - source_urls: [ - "", - ], + const result = await glean.skills.validate({ + file: await openAsBlob("example.file"), }); console.log(result); @@ -344,7 +345,8 @@ The standalone function version of this method: ```typescript import { GleanCore } from "@gleanwork/api-client/core.js"; -import { skillsImport } from "@gleanwork/api-client/funcs/skillsImport.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. @@ -353,16 +355,14 @@ const glean = new GleanCore({ }); async function run() { - const res = await skillsImport(glean, { - source_urls: [ - "", - ], + const res = await skillsValidate(glean, { + file: await openAsBlob("example.file"), }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("skillsImport failed:", res.error); + console.log("skillsValidate failed:", res.error); } } @@ -382,28 +382,28 @@ associated utilities. ```tsx import { // Mutation hook for triggering the API call. - useSkillsImportMutation -} from "@gleanwork/api-client/react-query/skillsImport.js"; + useSkillsValidateMutation +} from "@gleanwork/api-client/react-query/skillsValidate.js"; ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PlatformSkillImportRequest](../../models/components/platformskillimportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `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.PlatformSkillImportResponse](../../models/components/platformskillimportresponse.md)\>** +**Promise\<[components.PlatformSkillValidationResponse](../../models/components/platformskillvalidationresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | --------------------------------- | --------------------------------- | --------------------------------- | -| errors.PlatformProblemDetailError | 400, 401, 403, 408, 409, 413, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 413, 429 | application/problem+json | | errors.PlatformProblemDetailError | 500, 503 | application/problem+json | | errors.GleanError | 4XX, 5XX | \*/\* | diff --git a/examples/package-lock.json b/examples/package-lock.json index 401e001e..f84096c0 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -18,7 +18,7 @@ }, "..": { "name": "@gleanwork/api-client", - "version": "0.18.1", + "version": "0.18.2", "dependencies": { "zod": "^3.25.0 || ^4.0.0" }, diff --git a/jsr.json b/jsr.json index 6252229a..da338064 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@gleanwork/api-client", - "version": "0.18.1", + "version": "0.18.2", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 8854c02f..8069bf45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gleanwork/api-client", - "version": "0.18.1", + "version": "0.18.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@gleanwork/api-client", - "version": "0.18.1", + "version": "0.18.2", "dependencies": { "zod": "^3.25.0 || ^4.0.0" }, diff --git a/package.json b/package.json index 1aa7344f..aaed9899 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gleanwork/api-client", - "version": "0.18.1", + "version": "0.18.2", "author": "Speakeasy", "tshy": { "sourceDialects": [ diff --git a/src/__tests__/mockserver/internal/sdk/models/components/feedentry.go b/src/__tests__/mockserver/internal/sdk/models/components/feedentry.go index c10cf616..5a52495b 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/feedentry.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/feedentry.go @@ -115,6 +115,7 @@ const ( JustificationTypeOooPlanner JustificationType = "OOO_PLANNER" JustificationTypeOooCatchUp JustificationType = "OOO_CATCH_UP" JustificationTypeAdminHealthCenter JustificationType = "ADMIN_HEALTH_CENTER" + JustificationTypeKnowledgeGap JustificationType = "KNOWLEDGE_GAP" ) func (e JustificationType) ToPointer() *JustificationType { @@ -241,6 +242,8 @@ func (e *JustificationType) UnmarshalJSON(data []byte) error { case "OOO_CATCH_UP": fallthrough case "ADMIN_HEALTH_CENTER": + fallthrough + case "KNOWLEDGE_GAP": *e = JustificationType(v) return nil default: diff --git a/src/__tests__/mockserver/internal/sdk/models/components/feedrequest.go b/src/__tests__/mockserver/internal/sdk/models/components/feedrequest.go index 0a92f106..a5f8b3a9 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/feedrequest.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/feedrequest.go @@ -56,6 +56,7 @@ const ( FeedRequestCategoryOooPlanner FeedRequestCategory = "OOO_PLANNER" FeedRequestCategoryOooCatchUp FeedRequestCategory = "OOO_CATCH_UP" FeedRequestCategoryAdminHealthCenter FeedRequestCategory = "ADMIN_HEALTH_CENTER" + FeedRequestCategoryKnowledgeGap FeedRequestCategory = "KNOWLEDGE_GAP" ) func (e FeedRequestCategory) ToPointer() *FeedRequestCategory { @@ -156,6 +157,8 @@ func (e *FeedRequestCategory) UnmarshalJSON(data []byte) error { case "OOO_CATCH_UP": fallthrough case "ADMIN_HEALTH_CENTER": + fallthrough + case "KNOWLEDGE_GAP": *e = FeedRequestCategory(v) return nil default: diff --git a/src/__tests__/mockserver/internal/sdk/models/components/feedresult.go b/src/__tests__/mockserver/internal/sdk/models/components/feedresult.go index a3066261..7d221ae1 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/feedresult.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/feedresult.go @@ -57,6 +57,7 @@ const ( FeedResultCategoryOooPlanner FeedResultCategory = "OOO_PLANNER" FeedResultCategoryOooCatchUp FeedResultCategory = "OOO_CATCH_UP" FeedResultCategoryAdminHealthCenter FeedResultCategory = "ADMIN_HEALTH_CENTER" + FeedResultCategoryKnowledgeGap FeedResultCategory = "KNOWLEDGE_GAP" ) func (e FeedResultCategory) ToPointer() *FeedResultCategory { @@ -157,6 +158,8 @@ func (e *FeedResultCategory) UnmarshalJSON(data []byte) error { case "OOO_CATCH_UP": fallthrough case "ADMIN_HEALTH_CENTER": + fallthrough + case "KNOWLEDGE_GAP": *e = FeedResultCategory(v) return nil default: @@ -164,12 +167,13 @@ func (e *FeedResultCategory) UnmarshalJSON(data []byte) error { } } -// PlacementReason - Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. +// PlacementReason - Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. PINNED means the card was moved to the head of the ranked stack (e.g. knowledge-gap pilot cards). type PlacementReason string const ( PlacementReasonOrganic PlacementReason = "ORGANIC" PlacementReasonPromo PlacementReason = "PROMO" + PlacementReasonPinned PlacementReason = "PINNED" ) func (e PlacementReason) ToPointer() *PlacementReason { @@ -184,6 +188,8 @@ func (e *PlacementReason) UnmarshalJSON(data []byte) error { case "ORGANIC": fallthrough case "PROMO": + fallthrough + case "PINNED": *e = PlacementReason(v) return nil default: @@ -199,7 +205,7 @@ type FeedResult struct { SecondaryEntries []FeedEntry `json:"secondaryEntries,omitempty"` // Rank of the result. Rank is suggested by server. Client side rank may differ. Rank *int64 `json:"rank,omitempty"` - // Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. + // Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. PINNED means the card was moved to the head of the ranked stack (e.g. knowledge-gap pilot cards). PlacementReason *PlacementReason `json:"placementReason,omitempty"` } diff --git a/src/__tests__/summarize.test.ts b/src/__tests__/summarize.test.ts index 31b3a9b3..9afcefd9 100644 --- a/src/__tests__/summarize.test.ts +++ b/src/__tests__/summarize.test.ts @@ -19,12 +19,12 @@ test("Summarize Summarize", async () => { const result = await glean.client.documents.summarize({ documentSpecs: [ { - ugcType: "ANNOUNCEMENTS", + ugcType: "COLLECTIONS", ugcId: "", }, { - ugcType: "COLLECTIONS", - contentId: 885812, + ugcType: "ANSWERS", + contentId: 823890, }, ], }); diff --git a/src/lib/config.ts b/src/lib/config.ts index ff7af2e6..3ff99ec0 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.18.1", - genVersion: "2.927.0", + sdkVersion: "0.18.2", + genVersion: "2.928.0", userAgent: - "speakeasy-sdk/typescript 0.18.1 2.927.0 0.9.0 @gleanwork/api-client", + "speakeasy-sdk/typescript 0.18.2 2.928.0 0.9.0 @gleanwork/api-client", } as const; diff --git a/src/models/components/feedentry.ts b/src/models/components/feedentry.ts index 3ca806eb..155b1275 100644 --- a/src/models/components/feedentry.ts +++ b/src/models/components/feedentry.ts @@ -124,6 +124,7 @@ export const JustificationType = { OooPlanner: "OOO_PLANNER", OooCatchUp: "OOO_CATCH_UP", AdminHealthCenter: "ADMIN_HEALTH_CENTER", + KnowledgeGap: "KNOWLEDGE_GAP", } as const; /** * Type of the justification. diff --git a/src/models/components/feedrequest.ts b/src/models/components/feedrequest.ts index a271ecf6..187318ec 100644 --- a/src/models/components/feedrequest.ts +++ b/src/models/components/feedrequest.ts @@ -62,6 +62,7 @@ export const FeedRequestCategory = { OooPlanner: "OOO_PLANNER", OooCatchUp: "OOO_CATCH_UP", AdminHealthCenter: "ADMIN_HEALTH_CENTER", + KnowledgeGap: "KNOWLEDGE_GAP", } as const; export type FeedRequestCategory = ClosedEnum; diff --git a/src/models/components/feedresult.ts b/src/models/components/feedresult.ts index 7733310a..f1ee4d4e 100644 --- a/src/models/components/feedresult.ts +++ b/src/models/components/feedresult.ts @@ -60,6 +60,7 @@ export const FeedResultCategory = { OooPlanner: "OOO_PLANNER", OooCatchUp: "OOO_CATCH_UP", AdminHealthCenter: "ADMIN_HEALTH_CENTER", + KnowledgeGap: "KNOWLEDGE_GAP", } as const; /** * Category of the result, one of the requested categories in incoming request. @@ -67,14 +68,15 @@ export const FeedResultCategory = { export type FeedResultCategory = OpenEnum; /** - * Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. + * Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. PINNED means the card was moved to the head of the ranked stack (e.g. knowledge-gap pilot cards). */ export const PlacementReason = { Organic: "ORGANIC", Promo: "PROMO", + Pinned: "PINNED", } as const; /** - * Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. + * Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. PINNED means the card was moved to the head of the ranked stack (e.g. knowledge-gap pilot cards). */ export type PlacementReason = OpenEnum; @@ -93,7 +95,7 @@ export type FeedResult = { */ rank?: number | undefined; /** - * Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. + * Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. PINNED means the card was moved to the head of the ranked stack (e.g. knowledge-gap pilot cards). */ placementReason?: PlacementReason | undefined; }; diff --git a/src/sdk/skills.ts b/src/sdk/skills.ts index f6c83546..fbf9360e 100644 --- a/src/sdk/skills.ts +++ b/src/sdk/skills.ts @@ -65,16 +65,16 @@ export class Skills extends ClientSDK { } /** - * Validate skill bundle + * Import skills from GitHub * * @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. + * Import one or more skills selected from a GitHub source preview. Each source URL is fetched and persisted as an independent skill with source provenance. This operation does not create a durable source resource. The import is atomic: if any source cannot be fetched, validated, or persisted, no skills are created. */ - async validate( - request: components.PlatformSkillValidationRequest, + async import( + request: components.PlatformSkillImportRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(skillsValidate( + ): Promise { + return unwrapAsync(skillsImport( this, request, options, @@ -82,16 +82,16 @@ export class Skills extends ClientSDK { } /** - * Import skills from GitHub + * Validate skill bundle * * @remarks - * Import one or more skills selected from a GitHub source preview. Each source URL is fetched and persisted as an independent skill with source provenance. This operation does not create a durable source resource. The import is atomic: if any source cannot be fetched, validated, or persisted, no skills are created. + * 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 import( - request: components.PlatformSkillImportRequest, + async validate( + request: components.PlatformSkillValidationRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(skillsImport( + ): Promise { + return unwrapAsync(skillsValidate( this, request, options,