Skip to content

Commit 24846e9

Browse files
Merge pull request #5 from gleanwork/speakeasy-sdk-regen-1746035267
chore: 🐝 Update SDK - Generate GLEAN 0.1.0-beta.1
2 parents 53f7944 + 2cd539e commit 24846e9

File tree

11 files changed

+1029
-64
lines changed

11 files changed

+1029
-64
lines changed

.devcontainer/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11

2+
<div align="center">
3+
<a href="https://codespaces.new/gleanwork/api-client-go.git/tree/main"><img src="https://github.com/codespaces/badge.svg" /></a>
4+
</div>
5+
<br>
6+
27
> **Remember to shutdown a GitHub Codespace when it is not in use!**
38
49
# Dev Containers Quick Start

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.DS_Store
2+
.speakeasy/logs/
13
# .gitignore
24
.speakeasy/temp/
35
.speakeasy/reports

.speakeasy/gen.lock

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
lockVersion: 2.0.0
22
id: 9d90eb9e-33f8-4170-8944-988f4000aad0
33
management:
4-
docChecksum: 1a2c49930fef57ea7cddf2ed9b486f1d
4+
docChecksum: 5f39e048571bfcd8aae3cc610c7d8852
55
docVersion: 0.9.0
6-
speakeasyVersion: 1.540.1
7-
generationVersion: 2.593.4
8-
releaseVersion: 0.1.3
9-
configChecksum: f793813e85ccf1c7fc01ba063d7ba452
6+
speakeasyVersion: 1.541.0
7+
generationVersion: 2.595.2
8+
releaseVersion: 0.1.0-beta.1
9+
configChecksum: 387333697654f35129ea088c3fcbe532
10+
repoURL: https://github.com/gleanwork/api-client-go.git
11+
installationURL: https://github.com/gleanwork/api-client-go
1012
features:
1113
go:
1214
additionalDependencies: 0.1.0
@@ -17,6 +19,7 @@ features:
1719
deprecations: 2.81.3
1820
devContainers: 2.90.0
1921
envVarSecurityUsage: 0.3.2
22+
examples: 2.81.4
2023
flattening: 2.81.1
2124
globalSecurity: 2.82.11
2225
globalSecurityCallbacks: 0.1.0

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ generation:
2222
generateNewTests: true
2323
skipResponseBodyAssertions: true
2424
go:
25-
version: 0.1.3
25+
version: 0.1.0-beta.1
2626
additionalDependencies: {}
2727
allowUnknownFieldsInWeakUnions: false
2828
clientServerStatusCodesAsErrors: true

.speakeasy/glean-merged-spec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ paths:
522522
description: Too Many Requests
523523
x-speakeasy-group: client.chat
524524
x-speakeasy-name-override: start
525+
x-speakeasy-usage-example: true
525526
/rest/api/v1/deleteallchats:
526527
post:
527528
tags:

.speakeasy/workflow.lock

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
speakeasyVersion: 1.540.1
1+
speakeasyVersion: 1.541.0
22
sources:
33
Glean API:
44
sourceNamespace: glean-api-specs
5-
sourceRevisionDigest: sha256:33b8b6d8447549ad225d8eb93b6629385a696b9836c5c86f40e75f2dc9ae92e0
6-
sourceBlobDigest: sha256:02dae61341a702b82c050ed3828f22d5a82de8e9f2fa6a99ddab6ad0dfe4a38a
5+
sourceRevisionDigest: sha256:1756c09ecbe23405704c2ca0a7fc16f744e0104dd7eae3eea4f70d5a04348c16
6+
sourceBlobDigest: sha256:774205fd75a3374e402da1109732bc48f7fcd38efe41d5709663e17ac4f28898
77
tags:
88
- latest
9+
- speakeasy-sdk-regen-1746035267
910
petstore-oas:
1011
sourceNamespace: petstore-oas
1112
sourceRevisionDigest: sha256:97b2eff2f43ce14276d28efc41ec5de8034cde61db8445f12b626e4dc88ea40e
@@ -17,8 +18,10 @@ targets:
1718
glean:
1819
source: Glean API
1920
sourceNamespace: glean-api-specs
20-
sourceRevisionDigest: sha256:33b8b6d8447549ad225d8eb93b6629385a696b9836c5c86f40e75f2dc9ae92e0
21-
sourceBlobDigest: sha256:02dae61341a702b82c050ed3828f22d5a82de8e9f2fa6a99ddab6ad0dfe4a38a
21+
sourceRevisionDigest: sha256:1756c09ecbe23405704c2ca0a7fc16f744e0104dd7eae3eea4f70d5a04348c16
22+
sourceBlobDigest: sha256:774205fd75a3374e402da1109732bc48f7fcd38efe41d5709663e17ac4f28898
23+
codeSamplesNamespace: glean-api-specs-go-code-samples
24+
codeSamplesRevisionDigest: sha256:4f6a2f7fc0467c009be003af9d554181df55111188e1e7b314e5532cb92a0e81
2225
petstore:
2326
source: petstore-oas
2427
sourceNamespace: petstore-oas

README.md

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ import (
4343
"context"
4444
apiclientgo "github.com/gleanwork/api-client-go"
4545
"github.com/gleanwork/api-client-go/models/components"
46-
"github.com/gleanwork/api-client-go/types"
4746
"log"
4847
"os"
4948
)
@@ -55,36 +54,21 @@ func main() {
5554
apiclientgo.WithSecurity(os.Getenv("GLEAN_BEARER_AUTH")),
5655
)
5756

58-
res, err := s.Client.Activity.Report(ctx, components.Activity{
59-
Events: []components.ActivityEvent{
60-
components.ActivityEvent{
61-
Action: components.ActivityEventActionHistoricalView,
62-
Timestamp: types.MustTimeFromString("2000-01-23T04:56:07.000Z"),
63-
URL: "https://example.com/",
64-
},
65-
components.ActivityEvent{
66-
Action: components.ActivityEventActionSearch,
67-
Params: &components.ActivityEventParams{
68-
Query: apiclientgo.String("query"),
69-
},
70-
Timestamp: types.MustTimeFromString("2000-01-23T04:56:07.000Z"),
71-
URL: "https://example.com/search?q=query",
72-
},
73-
components.ActivityEvent{
74-
Action: components.ActivityEventActionView,
75-
Params: &components.ActivityEventParams{
76-
Duration: apiclientgo.Int64(20),
77-
Referrer: apiclientgo.String("https://example.com/document"),
57+
res, err := s.Client.Chat.Start(ctx, components.ChatRequest{
58+
Messages: []components.ChatMessage{
59+
components.ChatMessage{
60+
Fragments: []components.ChatMessageFragment{
61+
components.ChatMessageFragment{
62+
Text: apiclientgo.String("What are the company holidays this year?"),
63+
},
7864
},
79-
Timestamp: types.MustTimeFromString("2000-01-23T04:56:07.000Z"),
80-
URL: "https://example.com/",
8165
},
8266
},
83-
})
67+
}, nil, nil, nil)
8468
if err != nil {
8569
log.Fatal(err)
8670
}
87-
if res != nil {
71+
if res.ChatResponse != nil {
8872
// handle response
8973
}
9074
}

RELEASES.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
3+
## 2025-04-30 17:47:30
4+
### Changes
5+
Based on:
6+
- OpenAPI Doc
7+
- Speakeasy CLI 1.541.0 (2.595.2) https://github.com/speakeasy-api/speakeasy
8+
### Generated
9+
- [go v0.1.0-beta.1] .
10+
### Releases
11+
- [Go v0.1.0-beta.1] https://github.com/gleanwork/api-client-go/releases/tag/v0.1.0-beta.1 - .

USAGE.md

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"context"
77
apiclientgo "github.com/gleanwork/api-client-go"
88
"github.com/gleanwork/api-client-go/models/components"
9-
"github.com/gleanwork/api-client-go/types"
109
"log"
1110
"os"
1211
)
@@ -18,36 +17,21 @@ func main() {
1817
apiclientgo.WithSecurity(os.Getenv("GLEAN_BEARER_AUTH")),
1918
)
2019

21-
res, err := s.Client.Activity.Report(ctx, components.Activity{
22-
Events: []components.ActivityEvent{
23-
components.ActivityEvent{
24-
Action: components.ActivityEventActionHistoricalView,
25-
Timestamp: types.MustTimeFromString("2000-01-23T04:56:07.000Z"),
26-
URL: "https://example.com/",
27-
},
28-
components.ActivityEvent{
29-
Action: components.ActivityEventActionSearch,
30-
Params: &components.ActivityEventParams{
31-
Query: apiclientgo.String("query"),
32-
},
33-
Timestamp: types.MustTimeFromString("2000-01-23T04:56:07.000Z"),
34-
URL: "https://example.com/search?q=query",
35-
},
36-
components.ActivityEvent{
37-
Action: components.ActivityEventActionView,
38-
Params: &components.ActivityEventParams{
39-
Duration: apiclientgo.Int64(20),
40-
Referrer: apiclientgo.String("https://example.com/document"),
20+
res, err := s.Client.Chat.Start(ctx, components.ChatRequest{
21+
Messages: []components.ChatMessage{
22+
components.ChatMessage{
23+
Fragments: []components.ChatMessageFragment{
24+
components.ChatMessageFragment{
25+
Text: apiclientgo.String("What are the company holidays this year?"),
26+
},
4127
},
42-
Timestamp: types.MustTimeFromString("2000-01-23T04:56:07.000Z"),
43-
URL: "https://example.com/",
4428
},
4529
},
46-
})
30+
}, nil, nil, nil)
4731
if err != nil {
4832
log.Fatal(err)
4933
}
50-
if res != nil {
34+
if res.ChatResponse != nil {
5135
// handle response
5236
}
5337
}

glean.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ func New(opts ...SDKOption) *Glean {
169169
sdkConfiguration: sdkConfiguration{
170170
Language: "go",
171171
OpenAPIDocVersion: "0.9.0",
172-
SDKVersion: "0.1.3",
173-
GenVersion: "2.593.4",
174-
UserAgent: "speakeasy-sdk/go 0.1.3 2.593.4 0.9.0 github.com/gleanwork/api-client-go",
172+
SDKVersion: "0.1.0-beta.1",
173+
GenVersion: "2.595.2",
174+
UserAgent: "speakeasy-sdk/go 0.1.0-beta.1 2.595.2 0.9.0 github.com/gleanwork/api-client-go",
175175
ServerDefaults: []map[string]string{
176176
{
177177
"domain": "domain",

0 commit comments

Comments
 (0)