Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 75 additions & 33 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ generation:
generateNewTests: true
skipResponseBodyAssertions: true
typescript:
version: 0.14.5
version: 0.14.6
acceptHeaderEnum: true
additionalDependencies:
dependencies: {}
Expand Down
107 changes: 71 additions & 36 deletions .speakeasy/glean-merged-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.0
info:
version: 0.9.0
title: Glean API
x-source-commit-sha: c18dcdd4226ac90fc693febef0db4e2f85b66110
x-source-commit-sha: 204dc378669e42116b8b928d58d5fddabb228aef
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.
Expand All @@ -22,7 +22,7 @@ info:
These API clients provide type-safe, idiomatic interfaces for working with Glean IndexingAPIs in your language of choice.
x-logo:
url: https://app.glean.com/images/glean-text2.svg
x-open-api-commit-sha: 8a421bb426d1efd54c918437077acb779a4ae87f
x-open-api-commit-sha: 8a4d8a857ef07a135526624459142e85f9444ec2
x-speakeasy-name: 'Glean API'
servers:
- url: https://{instance}-be.glean.com
Expand Down Expand Up @@ -363,6 +363,33 @@ paths:
x-speakeasy-deprecation-message: "Deprecated on 2026-01-21, removal scheduled for 2026-10-15: Answer boards have been removed and this endpoint no longer serves a purpose"
x-speakeasy-name-override: list
x-speakeasy-group: client.answers
/rest/api/v1/checkdatasourceauth:
post:
tags:
- Authentication
summary: Check datasource authorization
description: |
Returns all datasource instances that require per-user OAuth authorization
for the authenticated user, along with a transient auth token that can be
appended to auth URLs to complete OAuth flows.

Clients construct the full OAuth URL by combining the backend base URL,
the `authUrlRelativePath` from each instance, and the transient auth token:
`<backend>/<authUrlRelativePath>?transient_auth_token=<token>`.
operationId: checkdatasourceauth
x-visibility: Public
parameters: []
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/CheckDatasourceAuthResponse"
"401":
description: Not Authorized
"429":
description: Too Many Requests
/rest/api/v1/createauthtoken:
post:
tags:
Expand Down Expand Up @@ -7305,6 +7332,48 @@ components:
items:
$ref: "#/components/schemas/AnswerResult"
description: List of answers with tracking tokens.
AuthStatus:
type: string
description: The per-user authorization status for a datasource.
enum:
- DISABLED
- AWAITING_AUTH
- AUTHORIZED
- STALE_OAUTH
- SEG_MIGRATION
x-enum-varnames:
- AUTH_STATUS_DISABLED
- AUTH_STATUS_AWAITING_AUTH
- AUTH_STATUS_AUTHORIZED
- AUTH_STATUS_STALE_OAUTH
- AUTH_STATUS_SEG_MIGRATION
UnauthorizedDatasourceInstance:
description: |
A datasource instance that could not return results for this request because the user has not completed or has expired per-user OAuth.
properties:
datasourceInstance:
type: string
description: |
The instance identifier (e.g. "github", "github_enterprise_0", "slack_0"). Matches the instance names used in datasource configuration.
example: slack_0
displayName:
type: string
description: Human-readable name of the datasource instance for display.
example: Slack
authStatus:
$ref: "#/components/schemas/AuthStatus"
authUrlRelativePath:
type: string
description: |
Relative path to initiate or resume OAuth for the current user and instance, including a one-time authentication token as a query parameter. Clients should prepend their configured Glean backend base URL.
CheckDatasourceAuthResponse:
properties:
unauthorizedDatasourceInstances:
type: array
description: |
Datasource instances that require per-user OAuth authorization. Empty or absent when all datasources are authorized.
items:
$ref: "#/components/schemas/UnauthorizedDatasourceInstance"
CreateAuthTokenResponse:
required:
- token
Expand Down Expand Up @@ -7850,40 +7919,6 @@ components:
stream:
type: boolean
description: If set, response lines will be streamed one-by-one as they become available. Each will be a ChatResponse, formatted as JSON, and separated by a new line. If false, the entire response will be returned at once. Note that if this is set and the model being used does not support streaming, the model's response will not be streamed, but other messages from the endpoint still will be.
AuthStatus:
type: string
description: The per-user authorization status for a datasource.
enum:
- DISABLED
- AWAITING_AUTH
- AUTHORIZED
- STALE_OAUTH
- SEG_MIGRATION
x-enum-varnames:
- AUTH_STATUS_DISABLED
- AUTH_STATUS_AWAITING_AUTH
- AUTH_STATUS_AUTHORIZED
- AUTH_STATUS_STALE_OAUTH
- AUTH_STATUS_SEG_MIGRATION
UnauthorizedDatasourceInstance:
description: |
A datasource instance that could not return results for this request because the user has not completed or has expired per-user OAuth.
properties:
datasourceInstance:
type: string
description: |
The instance identifier (e.g. "github", "github_enterprise_0", "slack_0"). Matches the instance names used in datasource configuration.
example: slack_0
displayName:
type: string
description: Human-readable name of the datasource instance for display.
example: Slack
authStatus:
$ref: "#/components/schemas/AuthStatus"
authUrlRelativePath:
type: string
description: |
Relative path to initiate or resume OAuth for the current user and instance. Clients should prepend their configured Glean backend base URL.
ChatResponse:
description: A single response from the /chat backend.
properties:
Expand Down
13 changes: 13 additions & 0 deletions .speakeasy/tests.arazzo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164320,3 +164320,16 @@ workflows:
type: simple
x-speakeasy-test-group: Governance
x-speakeasy-test-rebuild: true
- workflowId: checkdatasourceauth
steps:
- stepId: test
operationId: checkdatasourceauth
successCriteria:
- condition: $statusCode == 200
- condition: $response.header.Content-Type == application/json
- context: $response.body
condition: |
{"unauthorizedDatasourceInstances":[{"datasourceInstance":"slack_0","displayName":"Slack"}]}
type: simple
x-speakeasy-test-group: Authentication
x-speakeasy-test-rebuild: true
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
speakeasyVersion: 1.722.0
speakeasyVersion: 1.722.7
sources:
Glean API:
sourceNamespace: glean-api-specs
sourceRevisionDigest: sha256:a417495716018a416b8210f6cb830654e301e408cceb567b5c86f81d5211db79
sourceBlobDigest: sha256:163203ddf3ff04235c0ee40e8ec377e1093ff290525e24b89dfd28248a4c331a
sourceRevisionDigest: sha256:aa0a496396e723844c85b7713e2a2d9795a8e4c9bb8ad5f4119e1ff0b3f46fc1
sourceBlobDigest: sha256:f052174bfef7ebd0efee80555a7ae4db9d3ba41118e726db87762ea1dbab1240
tags:
- latest
- speakeasy-sdk-regen-1770751877
- speakeasy-sdk-regen-1771466080
Glean Client API:
sourceNamespace: glean-client-api
sourceRevisionDigest: sha256:aec0770b5bcca91068c3a844cb9ef4a091281f6cc3b7d86f2abef1bd6fb2b301
Expand All @@ -18,10 +18,10 @@ targets:
glean:
source: Glean API
sourceNamespace: glean-api-specs
sourceRevisionDigest: sha256:a417495716018a416b8210f6cb830654e301e408cceb567b5c86f81d5211db79
sourceBlobDigest: sha256:163203ddf3ff04235c0ee40e8ec377e1093ff290525e24b89dfd28248a4c331a
sourceRevisionDigest: sha256:aa0a496396e723844c85b7713e2a2d9795a8e4c9bb8ad5f4119e1ff0b3f46fc1
sourceBlobDigest: sha256:f052174bfef7ebd0efee80555a7ae4db9d3ba41118e726db87762ea1dbab1240
codeSamplesNamespace: glean-api-specs-typescript-code-samples
codeSamplesRevisionDigest: sha256:d4ab12e5e140c26eb50854fffd9ad5452e2264d62d68190d4fc755362496f3da
codeSamplesRevisionDigest: sha256:8b8fdf0a8a039b5167e3bff70afe6df9a0267c61abac3c256fafb222f71f30b0
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ For more information on obtaining the appropriate token type, please contact you
<details open>
<summary>Available methods</summary>

### [Authentication](docs/sdks/authentication/README.md)

* [checkdatasourceauth](docs/sdks/authentication/README.md#checkdatasourceauth) - Check datasource authorization

### [Client.Activity](docs/sdks/activity/README.md)

* [report](docs/sdks/activity/README.md#report) - Report document activity
Expand Down Expand Up @@ -496,6 +500,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).

<summary>Available standalone functions</summary>

- [`authenticationCheckdatasourceauth`](docs/sdks/authentication/README.md#checkdatasourceauth) - Check datasource authorization
- [`clientActivityFeedback`](docs/sdks/activity/README.md#feedback) - Report client activity
- [`clientActivityReport`](docs/sdks/activity/README.md#report) - Report document activity
- [`clientAgentsList`](docs/sdks/agents/README.md#list) - Search agents
Expand Down Expand Up @@ -639,6 +644,7 @@ To learn about this feature and how to get started, check

<summary>Available React hooks</summary>

- [`useAuthenticationCheckdatasourceauthMutation`](docs/sdks/authentication/README.md#checkdatasourceauth) - Check datasource authorization
- [`useClientActivityFeedbackMutation`](docs/sdks/activity/README.md#feedback) - Report client activity
- [`useClientActivityReportMutation`](docs/sdks/activity/README.md#report) - Report document activity
- [`useClientAgentsListMutation`](docs/sdks/agents/README.md#list) - Search agents
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -618,4 +618,14 @@ Based on:
### Generated
- [typescript v0.14.5] .
### Releases
- [NPM v0.14.5] https://www.npmjs.com/package/@gleanwork/api-client/v/0.14.5 - .
- [NPM v0.14.5] https://www.npmjs.com/package/@gleanwork/api-client/v/0.14.5 - .

## 2026-02-19 15:48:01
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.722.7 (2.832.9) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.14.6] .
### Releases
- [NPM v0.14.6] https://www.npmjs.com/package/@gleanwork/api-client/v/0.14.6 - .
22 changes: 22 additions & 0 deletions docs/models/components/checkdatasourceauthresponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# CheckDatasourceAuthResponse

## Example Usage

```typescript
import { CheckDatasourceAuthResponse } from "@gleanwork/api-client/models/components";

let value: CheckDatasourceAuthResponse = {
unauthorizedDatasourceInstances: [
{
datasourceInstance: "slack_0",
displayName: "Slack",
},
],
};
```

## Fields

| Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `unauthorizedDatasourceInstances` | [components.UnauthorizedDatasourceInstance](../../models/components/unauthorizeddatasourceinstance.md)[] | :heavy_minus_sign: | Datasource instances that require per-user OAuth authorization. Empty or absent when all datasources are authorized.<br/> |
Loading