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
14 changes: 6 additions & 8 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 @@ -24,7 +24,7 @@ generation:
generateNewTests: true
skipResponseBodyAssertions: true
typescript:
version: 0.1.0-beta.4
version: 0.1.0-beta.5
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
13 changes: 13 additions & 0 deletions .speakeasy/glean-merged-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ info:
# Usage guidelines
This API is evolving fast. Glean will provide advance notice of any planned backwards incompatible changes along
with a 6-month sunset period for anything that requires developers to adopt the new versions.

# API Clients
Official API clients for the Glean Indexing API are available in multiple languages:

- [Python](https://github.com/gleanwork/api-client-python)
- [TypeScript](https://github.com/gleanwork/api-client-typescript)
- [Go](https://github.com/gleanwork/api-client-go)
- [Java](https://github.com/gleanwork/api-client-java)

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-speakeasy-name: "Glean API"
Expand Down Expand Up @@ -3142,6 +3152,9 @@ paths:
description: Request Timeout
'429':
description: Too Many Requests
x-speakeasy-group: client.chat
x-speakeasy-name-override: startStream
x-speakeasy-usage-example: true
components:
securitySchemes:
BearerAuth:
Expand Down
12 changes: 6 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ speakeasyVersion: 1.542.0
sources:
Glean API:
sourceNamespace: glean-api-specs
sourceRevisionDigest: sha256:d40d70c4d92691d51a53fa22799793ca4113defb0713b48b8f0eddbbaff0eb66
sourceBlobDigest: sha256:a0e8b1ed041891821639f1eef8b320b46870ca17109c1ed15712cf112b462763
sourceRevisionDigest: sha256:011632a1ad4a281f6009d6b332829448c0f742f2a1fc45a3c51d61aa3f63d5e7
sourceBlobDigest: sha256:ce8abdf11ef3db8d29f3073665e1c24ea1ec3f3cd01dd59d42c51aa785e6daaa
tags:
- latest
- speakeasy-sdk-regen-1746231561
- speakeasy-sdk-regen-1746237690
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:d40d70c4d92691d51a53fa22799793ca4113defb0713b48b8f0eddbbaff0eb66
sourceBlobDigest: sha256:a0e8b1ed041891821639f1eef8b320b46870ca17109c1ed15712cf112b462763
sourceRevisionDigest: sha256:011632a1ad4a281f6009d6b332829448c0f742f2a1fc45a3c51d61aa3f63d5e7
sourceBlobDigest: sha256:ce8abdf11ef3db8d29f3073665e1c24ea1ec3f3cd01dd59d42c51aa785e6daaa
codeSamplesNamespace: glean-api-specs-typescript-code-samples
codeSamplesRevisionDigest: sha256:063ac68018659a5bae05115d771c3b6ff251061553cf205e78c18e4ba8b4d8f6
codeSamplesRevisionDigest: sha256:93941774f25257d750204ce4e5c57faccf7adb5a1a05d37658db4f5cc95b62b5
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
97 changes: 62 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage

### Example
### Example 1

```typescript
import { Glean } from "@gleanwork/api-client";
Expand Down Expand Up @@ -107,6 +107,36 @@ async function run() {

run();

```

### Example 2

```typescript
import { Glean } from "@gleanwork/api-client";

const glean = new Glean({
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
});

async function run() {
const result = await glean.client.chat.startStream({
messages: [
{
fragments: [
{
text: "What are the company holidays this year?",
},
],
},
],
});

// Handle the result
console.log(result);
}

run();

```
<!-- End SDK Example Usage [usage] -->

Expand Down Expand Up @@ -175,10 +205,6 @@ run();
* [listagents](docs/sdks/agents/README.md#listagents) - Lists all agents.
* [getagentinputs](docs/sdks/agents/README.md#getagentinputs) - Gets the inputs to an agent.

### [chat](docs/sdks/chat/README.md)

* [chatStream](docs/sdks/chat/README.md#chatstream) - Chat

### [client](docs/sdks/client/README.md)


Expand Down Expand Up @@ -208,17 +234,18 @@ run();

* [createToken](docs/sdks/clientauthentication/README.md#createtoken) - Create authentication token

#### [client.chat](docs/sdks/clientchat/README.md)
#### [client.chat](docs/sdks/chat/README.md)

* [start](docs/sdks/clientchat/README.md#start) - Chat
* [deleteAll](docs/sdks/clientchat/README.md#deleteall) - Deletes all saved Chats owned by a user
* [delete](docs/sdks/clientchat/README.md#delete) - Deletes saved Chats
* [get](docs/sdks/clientchat/README.md#get) - Retrieves a Chat
* [list](docs/sdks/clientchat/README.md#list) - Retrieves all saved Chats
* [getApplication](docs/sdks/clientchat/README.md#getapplication) - Gets the metadata for a custom Chat application
* [uploadFiles](docs/sdks/clientchat/README.md#uploadfiles) - Upload files for Chat.
* [getFiles](docs/sdks/clientchat/README.md#getfiles) - Get files uploaded by a user for Chat.
* [deleteFiles](docs/sdks/clientchat/README.md#deletefiles) - Delete files uploaded by a user for chat.
* [start](docs/sdks/chat/README.md#start) - Chat
* [deleteAll](docs/sdks/chat/README.md#deleteall) - Deletes all saved Chats owned by a user
* [delete](docs/sdks/chat/README.md#delete) - Deletes saved Chats
* [get](docs/sdks/chat/README.md#get) - Retrieves a Chat
* [list](docs/sdks/chat/README.md#list) - Retrieves all saved Chats
* [getApplication](docs/sdks/chat/README.md#getapplication) - Gets the metadata for a custom Chat application
* [uploadFiles](docs/sdks/chat/README.md#uploadfiles) - Upload files for Chat.
* [getFiles](docs/sdks/chat/README.md#getfiles) - Get files uploaded by a user for Chat.
* [deleteFiles](docs/sdks/chat/README.md#deletefiles) - Delete files uploaded by a user for chat.
* [startStream](docs/sdks/chat/README.md#startstream) - Chat

#### [client.collections](docs/sdks/collections/README.md)

Expand Down Expand Up @@ -372,7 +399,6 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
- [`agentsGetagentinputs`](docs/sdks/agents/README.md#getagentinputs) - Gets the inputs to an agent.
- [`agentsListagents`](docs/sdks/agents/README.md#listagents) - Lists all agents.
- [`agentsRunagent`](docs/sdks/agents/README.md#runagent) - Runs an Agent.
- [`chatChatStream`](docs/sdks/chat/README.md#chatstream) - Chat
- [`clientActivitiesReportActivity`](docs/sdks/activities/README.md#reportactivity) - Report client activity
- [`clientActivityReport`](docs/sdks/activity/README.md#report) - Report document activity
- [`clientAnnouncementsCreate`](docs/sdks/announcements/README.md#create) - Create Announcement
Expand All @@ -384,15 +410,16 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
- [`clientAnswersGet`](docs/sdks/answers/README.md#get) - Read Answer
- [`clientAnswersList`](docs/sdks/answers/README.md#list) - List Answers
- [`clientAuthenticationCreateToken`](docs/sdks/clientauthentication/README.md#createtoken) - Create authentication token
- [`clientChatDelete`](docs/sdks/clientchat/README.md#delete) - Deletes saved Chats
- [`clientChatDeleteAll`](docs/sdks/clientchat/README.md#deleteall) - Deletes all saved Chats owned by a user
- [`clientChatDeleteFiles`](docs/sdks/clientchat/README.md#deletefiles) - Delete files uploaded by a user for chat.
- [`clientChatGet`](docs/sdks/clientchat/README.md#get) - Retrieves a Chat
- [`clientChatGetApplication`](docs/sdks/clientchat/README.md#getapplication) - Gets the metadata for a custom Chat application
- [`clientChatGetFiles`](docs/sdks/clientchat/README.md#getfiles) - Get files uploaded by a user for Chat.
- [`clientChatList`](docs/sdks/clientchat/README.md#list) - Retrieves all saved Chats
- [`clientChatStart`](docs/sdks/clientchat/README.md#start) - Chat
- [`clientChatUploadFiles`](docs/sdks/clientchat/README.md#uploadfiles) - Upload files for Chat.
- [`clientChatDelete`](docs/sdks/chat/README.md#delete) - Deletes saved Chats
- [`clientChatDeleteAll`](docs/sdks/chat/README.md#deleteall) - Deletes all saved Chats owned by a user
- [`clientChatDeleteFiles`](docs/sdks/chat/README.md#deletefiles) - Delete files uploaded by a user for chat.
- [`clientChatGet`](docs/sdks/chat/README.md#get) - Retrieves a Chat
- [`clientChatGetApplication`](docs/sdks/chat/README.md#getapplication) - Gets the metadata for a custom Chat application
- [`clientChatGetFiles`](docs/sdks/chat/README.md#getfiles) - Get files uploaded by a user for Chat.
- [`clientChatList`](docs/sdks/chat/README.md#list) - Retrieves all saved Chats
- [`clientChatStart`](docs/sdks/chat/README.md#start) - Chat
- [`clientChatStartStream`](docs/sdks/chat/README.md#startstream) - Chat
- [`clientChatUploadFiles`](docs/sdks/chat/README.md#uploadfiles) - Upload files for Chat.
- [`clientCollectionsAddItems`](docs/sdks/collections/README.md#additems) - Add Collection item
- [`clientCollectionsCreate`](docs/sdks/collections/README.md#create) - Create Collection
- [`clientCollectionsDelete`](docs/sdks/collections/README.md#delete) - Delete Collection
Expand Down Expand Up @@ -498,7 +525,6 @@ To learn about this feature and how to get started, check
- [`useAgentsGetagentinputsMutation`](docs/sdks/agents/README.md#getagentinputs) - Gets the inputs to an agent.
- [`useAgentsListagentsMutation`](docs/sdks/agents/README.md#listagents) - Lists all agents.
- [`useAgentsRunagentMutation`](docs/sdks/agents/README.md#runagent) - Runs an Agent.
- [`useChatChatStreamMutation`](docs/sdks/chat/README.md#chatstream) - Chat
- [`useClientActivitiesReportActivityMutation`](docs/sdks/activities/README.md#reportactivity) - Report client activity
- [`useClientActivityReportMutation`](docs/sdks/activity/README.md#report) - Report document activity
- [`useClientAnnouncementsCreateMutation`](docs/sdks/announcements/README.md#create) - Create Announcement
Expand All @@ -510,15 +536,16 @@ To learn about this feature and how to get started, check
- [`useClientAnswersGetMutation`](docs/sdks/answers/README.md#get) - Read Answer
- [`useClientAnswersListMutation`](docs/sdks/answers/README.md#list) - List Answers
- [`useClientAuthenticationCreateTokenMutation`](docs/sdks/clientauthentication/README.md#createtoken) - Create authentication token
- [`useClientChatDeleteAllMutation`](docs/sdks/clientchat/README.md#deleteall) - Deletes all saved Chats owned by a user
- [`useClientChatDeleteFilesMutation`](docs/sdks/clientchat/README.md#deletefiles) - Delete files uploaded by a user for chat.
- [`useClientChatDeleteMutation`](docs/sdks/clientchat/README.md#delete) - Deletes saved Chats
- [`useClientChatGetApplicationMutation`](docs/sdks/clientchat/README.md#getapplication) - Gets the metadata for a custom Chat application
- [`useClientChatGetFilesMutation`](docs/sdks/clientchat/README.md#getfiles) - Get files uploaded by a user for Chat.
- [`useClientChatGetMutation`](docs/sdks/clientchat/README.md#get) - Retrieves a Chat
- [`useClientChatListMutation`](docs/sdks/clientchat/README.md#list) - Retrieves all saved Chats
- [`useClientChatStartMutation`](docs/sdks/clientchat/README.md#start) - Chat
- [`useClientChatUploadFilesMutation`](docs/sdks/clientchat/README.md#uploadfiles) - Upload files for Chat.
- [`useClientChatDeleteAllMutation`](docs/sdks/chat/README.md#deleteall) - Deletes all saved Chats owned by a user
- [`useClientChatDeleteFilesMutation`](docs/sdks/chat/README.md#deletefiles) - Delete files uploaded by a user for chat.
- [`useClientChatDeleteMutation`](docs/sdks/chat/README.md#delete) - Deletes saved Chats
- [`useClientChatGetApplicationMutation`](docs/sdks/chat/README.md#getapplication) - Gets the metadata for a custom Chat application
- [`useClientChatGetFilesMutation`](docs/sdks/chat/README.md#getfiles) - Get files uploaded by a user for Chat.
- [`useClientChatGetMutation`](docs/sdks/chat/README.md#get) - Retrieves a Chat
- [`useClientChatListMutation`](docs/sdks/chat/README.md#list) - Retrieves all saved Chats
- [`useClientChatStartMutation`](docs/sdks/chat/README.md#start) - Chat
- [`useClientChatStartStreamMutation`](docs/sdks/chat/README.md#startstream) - Chat
- [`useClientChatUploadFilesMutation`](docs/sdks/chat/README.md#uploadfiles) - Upload files for Chat.
- [`useClientCollectionsAddItemsMutation`](docs/sdks/collections/README.md#additems) - Add Collection item
- [`useClientCollectionsCreateMutation`](docs/sdks/collections/README.md#create) - Create Collection
- [`useClientCollectionsDeleteItemMutation`](docs/sdks/collections/README.md#deleteitem) - Delete Collection item
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,14 @@ Based on:
### Generated
- [typescript v0.1.0-beta.4] .
### Releases
- [NPM v0.1.0-beta.4] https://www.npmjs.com/package/@gleanwork/api-client/v/0.1.0-beta.4 - .
- [NPM v0.1.0-beta.4] https://www.npmjs.com/package/@gleanwork/api-client/v/0.1.0-beta.4 - .

## 2025-05-03 15:07:16
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.542.0 (2.596.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.1.0-beta.5] .
### Releases
- [NPM v0.1.0-beta.5] https://www.npmjs.com/package/@gleanwork/api-client/v/0.1.0-beta.5 - .
28 changes: 28 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,33 @@ async function run() {

run();

```

```typescript
import { Glean } from "@gleanwork/api-client";

const glean = new Glean({
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
});

async function run() {
const result = await glean.client.chat.startStream({
messages: [
{
fragments: [
{
text: "What are the company holidays this year?",
},
],
},
],
});

// Handle the result
console.log(result);
}

run();

```
<!-- End SDK Example Usage [usage] -->
Loading