Skip to content

Commit c410af9

Browse files
authored
Merge pull request #9 from stainless-api/release-please--branches--main--changes--next
release: 0.1.0-alpha.4
2 parents f4efef2 + 5e855d5 commit c410af9

File tree

13 files changed

+74
-49
lines changed

13 files changed

+74
-49
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.3"
2+
".": "0.1.0-alpha.4"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 15
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless%2Fstainless-v0-475d7467c6365b48df46bee77ff6a07d22601f7c3a269a0383473e4ebce1146d.yml
3-
openapi_spec_hash: 4b9f1b89f983978e970133b5653fd0d8
4-
config_hash: 28c1ddd1e9bdba67e018459acdfafc5b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless%2Fstainless-v0-cfef2e882e091dad51a5b53bc39cc251ecf3f71cc0328561cec6309e8bbac93a.yml
3+
openapi_spec_hash: fac1531252a5b791107de8257fdcf3cb
4+
config_hash: e6d0ab5c40b50d896cdcacb62260c926

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## 0.1.0-alpha.4 (2025-05-23)
4+
5+
Full Changelog: [v0.1.0-alpha.3...v0.1.0-alpha.4](https://github.com/stainless-api/stainless-api-cli/compare/v0.1.0-alpha.3...v0.1.0-alpha.4)
6+
7+
### Features
8+
9+
* **api:** change v0 path param projectName -> project ([f4d71d2](https://github.com/stainless-api/stainless-api-cli/commit/f4d71d2a7329db59b1a9fa6d341619ab0532db6b))
10+
* **api:** manual updates ([ad21d1e](https://github.com/stainless-api/stainless-api-cli/commit/ad21d1e0ee263bda24f88823c31f998295c842a2))
11+
* **api:** manual updates ([2539725](https://github.com/stainless-api/stainless-api-cli/commit/253972559414ee57ef40cfcfc989fd5ea4e4cc27))
12+
13+
14+
### Refactors
15+
16+
* minor refactor of method bodies ([8a3745d](https://github.com/stainless-api/stainless-api-cli/commit/8a3745dd7415ac36eeba2ec8b54e695845ffc9b5))
17+
318
## 0.1.0-alpha.3 (2025-05-22)
419

520
Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/stainless-api/stainless-api-cli/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ stainless-api-cli [resource] [command] [flags]
2626

2727
```sh
2828
stainless-api-cli builds create \
29-
--project project \
3029
--revision string
3130
```
3231

build.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,12 @@ var buildsCompare = cli.Command{
236236

237237
func handleBuildsCreate(ctx context.Context, cmd *cli.Command) error {
238238
cc := getAPICommandContext(ctx, cmd)
239-
240239
// Log to stderr that we're creating a build (using white text)
241240
fmt.Fprintf(os.Stderr, "Creating build...\n")
242-
241+
params := stainlessv0.BuildNewParams{}
243242
res, err := cc.client.Builds.New(
244243
context.TODO(),
245-
stainlessv0.BuildNewParams{},
244+
params,
246245
option.WithMiddleware(cc.AsMiddleware()),
247246
option.WithRequestBody("application/json", cc.body),
248247
)
@@ -338,7 +337,6 @@ func handleBuildsCreate(ctx context.Context, cmd *cli.Command) error {
338337

339338
func handleBuildsRetrieve(ctx context.Context, cmd *cli.Command) error {
340339
cc := getAPICommandContext(ctx, cmd)
341-
342340
res, err := cc.client.Builds.Get(
343341
context.TODO(),
344342
cmd.Value("build-id").(string),
@@ -483,10 +481,10 @@ func pullOutput(output, url, ref, targetDir string) error {
483481

484482
func handleBuildsList(ctx context.Context, cmd *cli.Command) error {
485483
cc := getAPICommandContext(ctx, cmd)
486-
484+
params := stainlessv0.BuildListParams{}
487485
res, err := cc.client.Builds.List(
488486
context.TODO(),
489-
stainlessv0.BuildListParams{},
487+
params,
490488
option.WithMiddleware(cc.AsMiddleware()),
491489
)
492490
if err != nil {
@@ -499,10 +497,10 @@ func handleBuildsList(ctx context.Context, cmd *cli.Command) error {
499497

500498
func handleBuildsCompare(ctx context.Context, cmd *cli.Command) error {
501499
cc := getAPICommandContext(ctx, cmd)
502-
500+
params := stainlessv0.BuildCompareParams{}
503501
res, err := cc.client.Builds.Compare(
504502
context.TODO(),
505-
stainlessv0.BuildCompareParams{},
503+
params,
506504
option.WithMiddleware(cc.AsMiddleware()),
507505
option.WithRequestBody("application/json", cc.body),
508506
)

buildtargetoutput.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ var buildTargetOutputsPull = cli.Command{
6666

6767
func handleBuildTargetOutputsRetrieve(ctx context.Context, cmd *cli.Command) error {
6868
cc := getAPICommandContext(ctx, cmd)
69-
69+
params := stainlessv0.BuildTargetOutputGetParams{}
7070
res, err := cc.client.BuildTargetOutputs.Get(
7171
context.TODO(),
72-
stainlessv0.BuildTargetOutputGetParams{},
72+
params,
7373
option.WithMiddleware(cc.AsMiddleware()),
7474
)
7575
if err != nil {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ go 1.23.0
55
toolchain go1.23.9
66

77
require (
8+
github.com/stainless-api/stainless-api-go v0.5.1
89
github.com/logrusorgru/aurora/v4 v4.0.0
910
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
10-
github.com/stainless-api/stainless-api-go v0.4.0
1111
github.com/tidwall/gjson v1.17.0
1212
github.com/tidwall/pretty v1.2.1
1313
github.com/tidwall/sjson v1.2.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmd
66
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
77
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
88
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
9-
github.com/stainless-api/stainless-api-go v0.4.0 h1:uRuRqXULJEllH3NES3YbCjLngUG8eoRxaFutA1e/wEs=
10-
github.com/stainless-api/stainless-api-go v0.4.0/go.mod h1:9Q2t8xq6EFgw8HYOsVxqKEfSDVe9eqCoh1zC0HMRwTY=
9+
github.com/stainless-api/stainless-api-go v0.5.1 h1:+y/D5G9x7aaPA7AAkXhYSwKUhftz2Mj3D1MzDCymt3k=
10+
github.com/stainless-api/stainless-api-go v0.5.1/go.mod h1:9Q2t8xq6EFgw8HYOsVxqKEfSDVe9eqCoh1zC0HMRwTY=
1111
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
1212
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
1313
github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=

org.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ var orgsList = cli.Command{
3535

3636
func handleOrgsRetrieve(ctx context.Context, cmd *cli.Command) error {
3737
cc := getAPICommandContext(ctx, cmd)
38-
3938
res, err := cc.client.Orgs.Get(
4039
context.TODO(),
4140
cmd.Value("org-name").(string),
@@ -51,7 +50,6 @@ func handleOrgsRetrieve(ctx context.Context, cmd *cli.Command) error {
5150

5251
func handleOrgsList(ctx context.Context, cmd *cli.Command) error {
5352
cc := getAPICommandContext(ctx, cmd)
54-
5553
res, err := cc.client.Orgs.List(context.TODO(), option.WithMiddleware(cc.AsMiddleware()))
5654
if err != nil {
5755
return err

project.go

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var projectsRetrieve = cli.Command{
1717
Usage: "Retrieve a project by name",
1818
Flags: []cli.Flag{
1919
&cli.StringFlag{
20-
Name: "project-name",
20+
Name: "project",
2121
},
2222
},
2323
Before: initAPICommand,
@@ -30,7 +30,7 @@ var projectsUpdate = cli.Command{
3030
Usage: "Update a project's properties",
3131
Flags: []cli.Flag{
3232
&cli.StringFlag{
33-
Name: "project-name",
33+
Name: "project",
3434
},
3535
&cli.StringFlag{
3636
Name: "display-name",
@@ -66,10 +66,13 @@ var projectsList = cli.Command{
6666

6767
func handleProjectsRetrieve(ctx context.Context, cmd *cli.Command) error {
6868
cc := getAPICommandContext(ctx, cmd)
69-
69+
params := stainlessv0.ProjectGetParams{}
70+
if cmd.IsSet("project") {
71+
params.Project = stainlessv0.String(cmd.Value("project").(string))
72+
}
7073
res, err := cc.client.Projects.Get(
7174
context.TODO(),
72-
cmd.Value("project-name").(string),
75+
params,
7376
option.WithMiddleware(cc.AsMiddleware()),
7477
)
7578
if err != nil {
@@ -82,11 +85,13 @@ func handleProjectsRetrieve(ctx context.Context, cmd *cli.Command) error {
8285

8386
func handleProjectsUpdate(ctx context.Context, cmd *cli.Command) error {
8487
cc := getAPICommandContext(ctx, cmd)
85-
88+
params := stainlessv0.ProjectUpdateParams{}
89+
if cmd.IsSet("project") {
90+
params.Project = stainlessv0.String(cmd.Value("project").(string))
91+
}
8692
res, err := cc.client.Projects.Update(
8793
context.TODO(),
88-
cmd.Value("project-name").(string),
89-
stainlessv0.ProjectUpdateParams{},
94+
params,
9095
option.WithMiddleware(cc.AsMiddleware()),
9196
option.WithRequestBody("application/json", cc.body),
9297
)
@@ -100,10 +105,10 @@ func handleProjectsUpdate(ctx context.Context, cmd *cli.Command) error {
100105

101106
func handleProjectsList(ctx context.Context, cmd *cli.Command) error {
102107
cc := getAPICommandContext(ctx, cmd)
103-
108+
params := stainlessv0.ProjectListParams{}
104109
res, err := cc.client.Projects.List(
105110
context.TODO(),
106-
stainlessv0.ProjectListParams{},
111+
params,
107112
option.WithMiddleware(cc.AsMiddleware()),
108113
)
109114
if err != nil {

0 commit comments

Comments
 (0)