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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.speakeasy/logs/
.speakeasy/temp/
.DS_Store
/models
Expand Down
11 changes: 6 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 9e4b1e83-7853-4088-b960-4cbc5769b62c
management:
docChecksum: 1a2c49930fef57ea7cddf2ed9b486f1d
docChecksum: 5f39e048571bfcd8aae3cc610c7d8852
docVersion: 0.9.0
speakeasyVersion: 1.540.1
generationVersion: 2.593.4
releaseVersion: 0.1.0-beta
configChecksum: 385d1e516bba00f162736f14ce7aa499
speakeasyVersion: 1.541.0
generationVersion: 2.595.2
releaseVersion: 0.1.0-beta.1
configChecksum: 4d72514137c7e0629ea2992e39a79487
repoURL: https://github.com/gleanwork/api-client-typescript.git
installationURL: https://github.com/gleanwork/api-client-typescript
published: true
Expand All @@ -21,6 +21,7 @@ features:
devContainers: 2.90.0
enumUnions: 0.1.0
envVarSecurityUsage: 0.1.2
examples: 2.81.5
flattening: 2.82.1
globalSecurity: 2.82.13
globalSecurityCallbacks: 0.1.0
Expand Down
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
version: 0.1.0-beta.1
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
1 change: 1 addition & 0 deletions .speakeasy/glean-merged-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ paths:
description: Too Many Requests
x-speakeasy-group: client.chat
x-speakeasy-name-override: start
x-speakeasy-usage-example: true
/rest/api/v1/deleteallchats:
post:
tags:
Expand Down
13 changes: 8 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
speakeasyVersion: 1.540.1
speakeasyVersion: 1.541.0
sources:
Glean API:
sourceNamespace: glean-api-specs
sourceRevisionDigest: sha256:bb693058375d00f6308376d62438b7a64826195f9aa3d8063780acde0a58cbea
sourceBlobDigest: sha256:02dae61341a702b82c050ed3828f22d5a82de8e9f2fa6a99ddab6ad0dfe4a38a
sourceRevisionDigest: sha256:1756c09ecbe23405704c2ca0a7fc16f744e0104dd7eae3eea4f70d5a04348c16
sourceBlobDigest: sha256:774205fd75a3374e402da1109732bc48f7fcd38efe41d5709663e17ac4f28898
tags:
- latest
- speakeasy-sdk-regen-1746034495
Glean Client API:
sourceNamespace: glean-client-api
sourceRevisionDigest: sha256:aec0770b5bcca91068c3a844cb9ef4a091281f6cc3b7d86f2abef1bd6fb2b301
Expand All @@ -17,8 +18,10 @@ targets:
glean:
source: Glean API
sourceNamespace: glean-api-specs
sourceRevisionDigest: sha256:bb693058375d00f6308376d62438b7a64826195f9aa3d8063780acde0a58cbea
sourceBlobDigest: sha256:02dae61341a702b82c050ed3828f22d5a82de8e9f2fa6a99ddab6ad0dfe4a38a
sourceRevisionDigest: sha256:1756c09ecbe23405704c2ca0a7fc16f744e0104dd7eae3eea4f70d5a04348c16
sourceBlobDigest: sha256:774205fd75a3374e402da1109732bc48f7fcd38efe41d5709663e17ac4f28898
codeSamplesNamespace: glean-api-specs-typescript-code-samples
codeSamplesRevisionDigest: sha256:837ee35dad1dd584148f11525d5ff859e25218924d6e8cd895ccc860a24a1862
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
34 changes: 10 additions & 24 deletions FUNCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ specific category of applications.

```typescript
import { GleanCore } from "@gleanwork/api-client/core.js";
import { clientActivityReport } from "@gleanwork/api-client/funcs/clientActivityReport.js";
import { clientChatStart } from "@gleanwork/api-client/funcs/clientChatStart.js";
import { SDKValidationError } from "@gleanwork/api-client/models/errors/sdkvalidationerror.js";

// Use `GleanCore` for best tree-shaking performance.
Expand All @@ -30,29 +30,14 @@ const glean = new GleanCore({
});

async function run() {
const res = await clientActivityReport(glean, {
events: [
const res = await clientChatStart(glean, {
messages: [
{
action: "HISTORICAL_VIEW",
timestamp: new Date("2000-01-23T04:56:07.000Z"),
url: "https://example.com/",
},
{
action: "SEARCH",
params: {
query: "query",
},
timestamp: new Date("2000-01-23T04:56:07.000Z"),
url: "https://example.com/search?q=query",
},
{
action: "VIEW",
params: {
duration: 20,
referrer: "https://example.com/document",
},
timestamp: new Date("2000-01-23T04:56:07.000Z"),
url: "https://example.com/",
fragments: [
{
text: "What are the company holidays this year?",
},
],
},
],
});
Expand All @@ -76,7 +61,8 @@ async function run() {

const { value: result } = res;


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

run();
Expand Down
32 changes: 10 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,32 +89,20 @@ const glean = new Glean({
});

async function run() {
await glean.client.activity.report({
events: [
const result = await glean.client.chat.start({
messages: [
{
action: "HISTORICAL_VIEW",
timestamp: new Date("2000-01-23T04:56:07.000Z"),
url: "https://example.com/",
},
{
action: "SEARCH",
params: {
query: "query",
},
timestamp: new Date("2000-01-23T04:56:07.000Z"),
url: "https://example.com/search?q=query",
},
{
action: "VIEW",
params: {
duration: 20,
referrer: "https://example.com/document",
},
timestamp: new Date("2000-01-23T04:56:07.000Z"),
url: "https://example.com/",
fragments: [
{
text: "What are the company holidays this year?",
},
],
},
],
});

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

run();
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,14 @@ Based on:
### Generated
- [typescript v0.1.0-beta] .
### Releases
- [NPM v0.1.0-beta] https://www.npmjs.com/package/@gleanwork/api-client/v/0.1.0-beta - .
- [NPM v0.1.0-beta] https://www.npmjs.com/package/@gleanwork/api-client/v/0.1.0-beta - .

## 2025-04-30 17:34:38
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.541.0 (2.595.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.1.0-beta.1] .
### Releases
- [NPM v0.1.0-beta.1] https://www.npmjs.com/package/@gleanwork/api-client/v/0.1.0-beta.1 - .
32 changes: 10 additions & 22 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,20 @@ const glean = new Glean({
});

async function run() {
await glean.client.activity.report({
events: [
const result = await glean.client.chat.start({
messages: [
{
action: "HISTORICAL_VIEW",
timestamp: new Date("2000-01-23T04:56:07.000Z"),
url: "https://example.com/",
},
{
action: "SEARCH",
params: {
query: "query",
},
timestamp: new Date("2000-01-23T04:56:07.000Z"),
url: "https://example.com/search?q=query",
},
{
action: "VIEW",
params: {
duration: 20,
referrer: "https://example.com/document",
},
timestamp: new Date("2000-01-23T04:56:07.000Z"),
url: "https://example.com/",
fragments: [
{
text: "What are the company holidays this year?",
},
],
},
],
});

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

run();
Expand Down
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "@gleanwork/api-client",
"version": "0.1.0-beta",
"version": "0.1.0-beta.1",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gleanwork/api-client",
"version": "0.1.0-beta",
"version": "0.1.0-beta.1",
"author": "Speakeasy",
"type": "module",
"tshy": {
Expand Down
Loading