Skip to content

Commit d1c7f7d

Browse files
Merge pull request #15 from gleanwork/speakeasy-sdk-regen-1747525148
chore: 🐝 Update SDK - Generate 0.4.2
2 parents 42d8acf + fe37f2b commit d1c7f7d

File tree

145 files changed

+442
-896
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+442
-896
lines changed

.speakeasy/gen.lock

Lines changed: 20 additions & 19 deletions
Large diffs are not rendered by default.

.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.4.1
25+
version: 0.4.2
2626
additionalDependencies: {}
2727
allowUnknownFieldsInWeakUnions: false
2828
clientServerStatusCodesAsErrors: true

.speakeasy/glean-merged-spec.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ servers:
3232
description: The instance name (typically the email domain without the TLD) that determines the deployment backend.
3333
security:
3434
- APIToken: []
35-
- cookieAuth: []
3635
paths:
3736
/rest/api/v1/activity:
3837
post:

.speakeasy/workflow.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
speakeasyVersion: 1.546.1
1+
speakeasyVersion: 1.546.2
22
sources:
33
Glean API:
44
sourceNamespace: glean-api-specs
5-
sourceRevisionDigest: sha256:81bbab1ab458be7ad4d3b4e052629504f2dc32e0554426fc4bac347061fad35c
6-
sourceBlobDigest: sha256:f2a2721aa0c1960218fc0a261ef3f689e2e78c399b36b7e6602e6ad8650206ac
5+
sourceRevisionDigest: sha256:d6fa8702a32b71122384445deea1072af1cf22ed50c70ffc25cc87a25fc82612
6+
sourceBlobDigest: sha256:393fd23b9e5d6d5f6929f86557b6b42c770f61271257cd10bc6a364b3ac8b053
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1747427766
9+
- speakeasy-sdk-regen-1747525148
1010
petstore-oas:
1111
sourceNamespace: petstore-oas
1212
sourceRevisionDigest: sha256:97b2eff2f43ce14276d28efc41ec5de8034cde61db8445f12b626e4dc88ea40e
@@ -18,10 +18,10 @@ targets:
1818
glean:
1919
source: Glean API
2020
sourceNamespace: glean-api-specs
21-
sourceRevisionDigest: sha256:81bbab1ab458be7ad4d3b4e052629504f2dc32e0554426fc4bac347061fad35c
22-
sourceBlobDigest: sha256:f2a2721aa0c1960218fc0a261ef3f689e2e78c399b36b7e6602e6ad8650206ac
21+
sourceRevisionDigest: sha256:d6fa8702a32b71122384445deea1072af1cf22ed50c70ffc25cc87a25fc82612
22+
sourceBlobDigest: sha256:393fd23b9e5d6d5f6929f86557b6b42c770f61271257cd10bc6a364b3ac8b053
2323
codeSamplesNamespace: glean-api-specs-go-code-samples
24-
codeSamplesRevisionDigest: sha256:8218591547ac9ccde3ac57db8a4c660a39a6d57cbb6d9652e0387ed571127f83
24+
codeSamplesRevisionDigest: sha256:526bab7ab5dfc23aad140abf06c57749256a9a64d9868070cd81bac2699f2203
2525
petstore:
2626
source: petstore-oas
2727
sourceNamespace: petstore-oas

README.md

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ func main() {
8181
ctx := context.Background()
8282

8383
s := apiclientgo.New(
84-
apiclientgo.WithSecurity(components.Security{
85-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
86-
}),
84+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
8785
)
8886

8987
res, err := s.Client.Chat.Create(ctx, components.ChatRequest{
@@ -124,9 +122,7 @@ func main() {
124122
ctx := context.Background()
125123

126124
s := apiclientgo.New(
127-
apiclientgo.WithSecurity(components.Security{
128-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
129-
}),
125+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
130126
)
131127

132128
res, err := s.Client.Chat.CreateStream(ctx, components.ChatRequest{
@@ -156,14 +152,13 @@ func main() {
156152

157153
### Per-Client Security Schemes
158154

159-
This SDK supports the following security schemes globally:
155+
This SDK supports the following security scheme globally:
160156

161-
| Name | Type | Scheme | Environment Variable |
162-
| ------------ | ------ | ----------- | -------------------- |
163-
| `APIToken` | http | HTTP Bearer | `GLEAN_API_TOKEN` |
164-
| `CookieAuth` | apiKey | API key | `GLEAN_COOKIE_AUTH` |
157+
| Name | Type | Scheme | Environment Variable |
158+
| ---------- | ---- | ----------- | -------------------- |
159+
| `APIToken` | http | HTTP Bearer | `GLEAN_API_TOKEN` |
165160

166-
You can set the security parameters through the `WithSecurity` option when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
161+
You can configure it using the `WithSecurity` option when initializing the SDK client instance. For example:
167162
```go
168163
package main
169164

@@ -180,9 +175,7 @@ func main() {
180175
ctx := context.Background()
181176

182177
s := apiclientgo.New(
183-
apiclientgo.WithSecurity(components.Security{
184-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
185-
}),
178+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
186179
)
187180

188181
res, err := s.Client.Activity.Report(ctx, components.Activity{
@@ -484,9 +477,7 @@ func main() {
484477
ctx := context.Background()
485478

486479
s := apiclientgo.New(
487-
apiclientgo.WithSecurity(components.Security{
488-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
489-
}),
480+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
490481
)
491482

492483
res, err := s.Client.Activity.Report(ctx, components.Activity{
@@ -564,9 +555,7 @@ func main() {
564555
},
565556
RetryConnectionErrors: false,
566557
}),
567-
apiclientgo.WithSecurity(components.Security{
568-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
569-
}),
558+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
570559
)
571560

572561
res, err := s.Client.Activity.Report(ctx, components.Activity{
@@ -640,9 +629,7 @@ func main() {
640629
ctx := context.Background()
641630

642631
s := apiclientgo.New(
643-
apiclientgo.WithSecurity(components.Security{
644-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
645-
}),
632+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
646633
)
647634

648635
res, err := s.Client.Collections.Create(ctx, components.CreateCollectionRequest{
@@ -1358,9 +1345,7 @@ func main() {
13581345

13591346
s := apiclientgo.New(
13601347
apiclientgo.WithInstance("<value>"),
1361-
apiclientgo.WithSecurity(components.Security{
1362-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
1363-
}),
1348+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
13641349
)
13651350

13661351
res, err := s.Client.Activity.Report(ctx, components.Activity{
@@ -1419,9 +1404,7 @@ func main() {
14191404

14201405
s := apiclientgo.New(
14211406
apiclientgo.WithServerURL("https://instance-name-be.glean.com"),
1422-
apiclientgo.WithSecurity(components.Security{
1423-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
1424-
}),
1407+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
14251408
)
14261409

14271410
res, err := s.Client.Activity.Report(ctx, components.Activity{

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,14 @@ Based on:
5858
### Generated
5959
- [go v0.4.1] .
6060
### Releases
61-
- [Go v0.4.1] https://github.com/gleanwork/api-client-go/releases/tag/v0.4.1 - .
61+
- [Go v0.4.1] https://github.com/gleanwork/api-client-go/releases/tag/v0.4.1 - .
62+
63+
## 2025-05-17 23:38:51
64+
### Changes
65+
Based on:
66+
- OpenAPI Doc
67+
- Speakeasy CLI 1.546.2 (2.604.4) https://github.com/speakeasy-api/speakeasy
68+
### Generated
69+
- [go v0.4.2] .
70+
### Releases
71+
- [Go v0.4.2] https://github.com/gleanwork/api-client-go/releases/tag/v0.4.2 - .

USAGE.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ func main() {
1414
ctx := context.Background()
1515

1616
s := apiclientgo.New(
17-
apiclientgo.WithSecurity(components.Security{
18-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
19-
}),
17+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
2018
)
2119

2220
res, err := s.Client.Chat.Create(ctx, components.ChatRequest{
@@ -55,9 +53,7 @@ func main() {
5553
ctx := context.Background()
5654

5755
s := apiclientgo.New(
58-
apiclientgo.WithSecurity(components.Security{
59-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
60-
}),
56+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
6157
)
6258

6359
res, err := s.Client.Chat.CreateStream(ctx, components.ChatRequest{

docs/models/components/security.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55

66
| Field | Type | Required | Description |
77
| ------------------ | ------------------ | ------------------ | ------------------ |
8-
| `APIToken` | **string* | :heavy_minus_sign: | N/A |
9-
| `CookieAuth` | **string* | :heavy_minus_sign: | N/A |
8+
| `APIToken` | **string* | :heavy_minus_sign: | N/A |

docs/sdks/activity/README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ package main
2020
import(
2121
"context"
2222
"os"
23-
"github.com/gleanwork/api-client-go/models/components"
2423
apiclientgo "github.com/gleanwork/api-client-go"
24+
"github.com/gleanwork/api-client-go/models/components"
2525
"github.com/gleanwork/api-client-go/types"
2626
"log"
2727
)
@@ -30,9 +30,7 @@ func main() {
3030
ctx := context.Background()
3131

3232
s := apiclientgo.New(
33-
apiclientgo.WithSecurity(components.Security{
34-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
35-
}),
33+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
3634
)
3735

3836
res, err := s.Client.Activity.Report(ctx, components.Activity{
@@ -100,18 +98,16 @@ package main
10098
import(
10199
"context"
102100
"os"
103-
"github.com/gleanwork/api-client-go/models/components"
104101
apiclientgo "github.com/gleanwork/api-client-go"
102+
"github.com/gleanwork/api-client-go/models/components"
105103
"log"
106104
)
107105

108106
func main() {
109107
ctx := context.Background()
110108

111109
s := apiclientgo.New(
112-
apiclientgo.WithSecurity(components.Security{
113-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
114-
}),
110+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
115111
)
116112

117113
res, err := s.Client.Activity.Feedback(ctx, nil, &components.Feedback{

docs/sdks/agents/README.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ package main
2323
import(
2424
"context"
2525
"os"
26-
"github.com/gleanwork/api-client-go/models/components"
2726
apiclientgo "github.com/gleanwork/api-client-go"
2827
"log"
2928
)
@@ -32,9 +31,7 @@ func main() {
3231
ctx := context.Background()
3332

3433
s := apiclientgo.New(
35-
apiclientgo.WithSecurity(components.Security{
36-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
37-
}),
34+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
3835
)
3936

4037
res, err := s.Client.Agents.Retrieve(ctx, "<id>", nil)
@@ -78,7 +75,6 @@ package main
7875
import(
7976
"context"
8077
"os"
81-
"github.com/gleanwork/api-client-go/models/components"
8278
apiclientgo "github.com/gleanwork/api-client-go"
8379
"log"
8480
)
@@ -87,9 +83,7 @@ func main() {
8783
ctx := context.Background()
8884

8985
s := apiclientgo.New(
90-
apiclientgo.WithSecurity(components.Security{
91-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
92-
}),
86+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
9387
)
9488

9589
res, err := s.Client.Agents.RetrieveSchemas(ctx, "<id>", nil)
@@ -133,18 +127,16 @@ package main
133127
import(
134128
"context"
135129
"os"
136-
"github.com/gleanwork/api-client-go/models/components"
137130
apiclientgo "github.com/gleanwork/api-client-go"
131+
"github.com/gleanwork/api-client-go/models/components"
138132
"log"
139133
)
140134

141135
func main() {
142136
ctx := context.Background()
143137

144138
s := apiclientgo.New(
145-
apiclientgo.WithSecurity(components.Security{
146-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
147-
}),
139+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
148140
)
149141

150142
res, err := s.Client.Agents.List(ctx, components.SearchAgentsRequest{})
@@ -187,18 +179,16 @@ package main
187179
import(
188180
"context"
189181
"os"
190-
"github.com/gleanwork/api-client-go/models/components"
191182
apiclientgo "github.com/gleanwork/api-client-go"
183+
"github.com/gleanwork/api-client-go/models/components"
192184
"log"
193185
)
194186

195187
func main() {
196188
ctx := context.Background()
197189

198190
s := apiclientgo.New(
199-
apiclientgo.WithSecurity(components.Security{
200-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
201-
}),
191+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
202192
)
203193

204194
res, err := s.Client.Agents.RunStream(ctx, components.AgentRunCreate{})
@@ -241,18 +231,16 @@ package main
241231
import(
242232
"context"
243233
"os"
244-
"github.com/gleanwork/api-client-go/models/components"
245234
apiclientgo "github.com/gleanwork/api-client-go"
235+
"github.com/gleanwork/api-client-go/models/components"
246236
"log"
247237
)
248238

249239
func main() {
250240
ctx := context.Background()
251241

252242
s := apiclientgo.New(
253-
apiclientgo.WithSecurity(components.Security{
254-
APIToken: apiclientgo.String(os.Getenv("GLEAN_API_TOKEN")),
255-
}),
243+
apiclientgo.WithSecurity(os.Getenv("GLEAN_API_TOKEN")),
256244
)
257245

258246
res, err := s.Client.Agents.Run(ctx, components.AgentRunCreate{})

0 commit comments

Comments
 (0)