Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a5f0af7
docs: update URLs from stainlessapi.com to stainless.com (#53)
stainless-app[bot] Feb 28, 2025
20b4808
feat(client): allow custom baseurls without trailing slash (#55)
stainless-app[bot] Mar 8, 2025
dc521f6
chore(internal): codegen related update (#56)
stainless-app[bot] Mar 11, 2025
0cb0d29
feat(client): improve default client options support (#57)
stainless-app[bot] Mar 14, 2025
80ff63b
chore(internal): remove extra empty newlines (#58)
stainless-app[bot] Mar 14, 2025
2d3d9e7
chore(docs): improve security documentation (#59)
stainless-app[bot] Mar 25, 2025
b575336
chore: add request options to client tests (#60)
stainless-app[bot] Mar 26, 2025
0295d21
fix(test): return early after test failure (#61)
stainless-app[bot] Mar 26, 2025
2ab745f
chore: fix typos (#62)
stainless-app[bot] Mar 27, 2025
bae4379
codegen metadata
stainless-app[bot] Mar 27, 2025
9cf0811
fix(client): unmarshal stream events into fresh memory (#63)
stainless-app[bot] Apr 3, 2025
656a0d1
fix(client): return error on bad custom url instead of panic (#64)
stainless-app[bot] Apr 3, 2025
ba2780f
feat(client): support custom http clients (#65)
stainless-app[bot] Apr 8, 2025
359070f
chore(tests): improve enum examples (#66)
stainless-app[bot] Apr 9, 2025
7d00669
chore(internal): expand CI branch coverage
stainless-app[bot] Apr 10, 2025
3b674ac
chore(internal): reduce CI branch coverage
stainless-app[bot] Apr 10, 2025
df86410
docs: update documentation links to be more uniform
stainless-app[bot] Apr 15, 2025
f2e2e2e
chore(docs): document pre-request options
stainless-app[bot] Apr 16, 2025
e074cd4
feat(client): add support for reading base URL from environment variable
stainless-app[bot] Apr 16, 2025
41d7ceb
chore(ci): add timeout thresholds for CI jobs
stainless-app[bot] Apr 23, 2025
a14dae0
chore(internal): codegen related update
stainless-app[bot] Apr 24, 2025
9fbbeb1
chore(ci): only use depot for staging repos
stainless-app[bot] Apr 24, 2025
6155e91
fix: handle empty bodies in WithJSONSet
stainless-app[bot] Apr 30, 2025
8853449
fix(pagination): handle errors when applying options
stainless-app[bot] May 1, 2025
77f5109
feat(api): manual updates
stainless-app[bot] May 7, 2025
3ecd0c4
feat(api): manual updates
stainless-app[bot] May 9, 2025
60b3e5e
feat(api): manual updates
stainless-app[bot] May 9, 2025
ccca7e5
feat(api): manual updates
stainless-app[bot] Jun 3, 2025
04616ff
feat(api): manual updates
stainless-app[bot] Jun 6, 2025
f37ac8f
release: 0.5.0
stainless-app[bot] Jun 6, 2025
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
22 changes: 0 additions & 22 deletions .devcontainer/Dockerfile

This file was deleted.

19 changes: 3 additions & 16 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
{
"name": "Debian",
"build": {
"dockerfile": "Dockerfile"
}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
"name": "Development",
"image": "mcr.microsoft.com/devcontainers/go:1.23-bookworm",
"postCreateCommand": "go mod tidy"
}
21 changes: 10 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
- next
branches-ignore:
- 'generated'
- 'codegen/**'
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'

jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ubuntu-latest

runs-on: ${{ github.repository == 'stainless-sdks/gitpod-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}

steps:
- uses: actions/checkout@v4
Expand All @@ -25,9 +25,9 @@ jobs:
- name: Run lints
run: ./scripts/lint
test:
timeout-minutes: 10
name: test
runs-on: ubuntu-latest

runs-on: ${{ github.repository == 'stainless-sdks/gitpod-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4

Expand All @@ -41,4 +41,3 @@ jobs:

- name: Run tests
run: ./scripts/test

2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.4.0"
".": "0.5.0"
}
6 changes: 4 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-3655d5ad0ac3e228c1519af70dbf3d0bfa3c47a2d06d4cac92a650da051b49a6.yml
configured_endpoints: 119
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-ca9a49ac7fbb63f55611fd7cd48a22a3ff8b38a797125c8513e891d9b7345550.yml
openapi_spec_hash: fd6ffbdfaefcc555e61ca1c565e05214
config_hash: bb9d0a0bdadbee0985dd7c1e4f0e9e8a
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
# Changelog

## 0.5.0 (2025-06-06)

Full Changelog: [v0.4.0...v0.5.0](https://github.com/gitpod-io/gitpod-sdk-go/compare/v0.4.0...v0.5.0)

### Features

* **api:** manual updates ([04616ff](https://github.com/gitpod-io/gitpod-sdk-go/commit/04616fff8d30f184d182f2f446c9d91ee82b896b))
* **api:** manual updates ([ccca7e5](https://github.com/gitpod-io/gitpod-sdk-go/commit/ccca7e5f582b1cb79fa8f18111ac2d59f3c8f42e))
* **api:** manual updates ([60b3e5e](https://github.com/gitpod-io/gitpod-sdk-go/commit/60b3e5e20df48bbb2e6d544ccbd266bf418eea7c))
* **api:** manual updates ([3ecd0c4](https://github.com/gitpod-io/gitpod-sdk-go/commit/3ecd0c4894b471a99b52da94d98ee4b1c12cde30))
* **api:** manual updates ([77f5109](https://github.com/gitpod-io/gitpod-sdk-go/commit/77f510928da90a197e8e556203677aa1a5838b9b))
* **client:** add support for reading base URL from environment variable ([e074cd4](https://github.com/gitpod-io/gitpod-sdk-go/commit/e074cd4d1977e7d9c861c9a08a5e8fd0b182d944))
* **client:** allow custom baseurls without trailing slash ([#55](https://github.com/gitpod-io/gitpod-sdk-go/issues/55)) ([20b4808](https://github.com/gitpod-io/gitpod-sdk-go/commit/20b480853025ee9b5402ae5a361010c7de9eabdc))
* **client:** improve default client options support ([#57](https://github.com/gitpod-io/gitpod-sdk-go/issues/57)) ([0cb0d29](https://github.com/gitpod-io/gitpod-sdk-go/commit/0cb0d293a64defd394978cd2b4da6cb006753a69))
* **client:** support custom http clients ([#65](https://github.com/gitpod-io/gitpod-sdk-go/issues/65)) ([ba2780f](https://github.com/gitpod-io/gitpod-sdk-go/commit/ba2780f5173f3e569527a24e9151e258e90df509))


### Bug Fixes

* **client:** return error on bad custom url instead of panic ([#64](https://github.com/gitpod-io/gitpod-sdk-go/issues/64)) ([656a0d1](https://github.com/gitpod-io/gitpod-sdk-go/commit/656a0d137cfa42afa6d540d80d306d254f4841aa))
* **client:** unmarshal stream events into fresh memory ([#63](https://github.com/gitpod-io/gitpod-sdk-go/issues/63)) ([9cf0811](https://github.com/gitpod-io/gitpod-sdk-go/commit/9cf08112fe7b5e702311882b79f167956b09753f))
* handle empty bodies in WithJSONSet ([6155e91](https://github.com/gitpod-io/gitpod-sdk-go/commit/6155e915016da00b885ed17f2452e0b48e1e4fd6))
* **pagination:** handle errors when applying options ([8853449](https://github.com/gitpod-io/gitpod-sdk-go/commit/8853449c7377b7d2976647e4f84598513394b4ab))
* **test:** return early after test failure ([#61](https://github.com/gitpod-io/gitpod-sdk-go/issues/61)) ([0295d21](https://github.com/gitpod-io/gitpod-sdk-go/commit/0295d214d2934e8d4789883255885d3e5ea474c9))


### Chores

* add request options to client tests ([#60](https://github.com/gitpod-io/gitpod-sdk-go/issues/60)) ([b575336](https://github.com/gitpod-io/gitpod-sdk-go/commit/b5753364f5bc6c5617205b2145ade577bc43ac72))
* **ci:** add timeout thresholds for CI jobs ([41d7ceb](https://github.com/gitpod-io/gitpod-sdk-go/commit/41d7cebf060b9a6d6f432d2caa6a82032ca3408c))
* **ci:** only use depot for staging repos ([9fbbeb1](https://github.com/gitpod-io/gitpod-sdk-go/commit/9fbbeb1fd88a3dc49943ef661c1d1c39da956fa2))
* **docs:** document pre-request options ([f2e2e2e](https://github.com/gitpod-io/gitpod-sdk-go/commit/f2e2e2e6286c2641387a0fc11b7ada23d8afc9fc))
* **docs:** improve security documentation ([#59](https://github.com/gitpod-io/gitpod-sdk-go/issues/59)) ([2d3d9e7](https://github.com/gitpod-io/gitpod-sdk-go/commit/2d3d9e7bdb95db8579085db1a23fa7f558b3ab2b))
* fix typos ([#62](https://github.com/gitpod-io/gitpod-sdk-go/issues/62)) ([2ab745f](https://github.com/gitpod-io/gitpod-sdk-go/commit/2ab745f9136f7c6f4528f05e26c1c22a4b15b959))
* **internal:** codegen related update ([a14dae0](https://github.com/gitpod-io/gitpod-sdk-go/commit/a14dae09ffdfec9ef7e1cb3c4b0c3ead27b14e14))
* **internal:** codegen related update ([#56](https://github.com/gitpod-io/gitpod-sdk-go/issues/56)) ([dc521f6](https://github.com/gitpod-io/gitpod-sdk-go/commit/dc521f608d7475d2d98f64fe118433450ab5b2af))
* **internal:** expand CI branch coverage ([7d00669](https://github.com/gitpod-io/gitpod-sdk-go/commit/7d00669f67ba5d7007feceb6f25863de34a237df))
* **internal:** reduce CI branch coverage ([3b674ac](https://github.com/gitpod-io/gitpod-sdk-go/commit/3b674ac888efc38b3713547841770b6c77af2ac8))
* **internal:** remove extra empty newlines ([#58](https://github.com/gitpod-io/gitpod-sdk-go/issues/58)) ([80ff63b](https://github.com/gitpod-io/gitpod-sdk-go/commit/80ff63b57f6df81750f4acaee91003902d2ddae6))
* **tests:** improve enum examples ([#66](https://github.com/gitpod-io/gitpod-sdk-go/issues/66)) ([359070f](https://github.com/gitpod-io/gitpod-sdk-go/commit/359070f05052c648ae75a806ddd037c8eb28dbe7))


### Documentation

* update documentation links to be more uniform ([df86410](https://github.com/gitpod-io/gitpod-sdk-go/commit/df86410ba6bf256e7dc7ebd8b41fc5e15d762fa0))
* update URLs from stainlessapi.com to stainless.com ([#53](https://github.com/gitpod-io/gitpod-sdk-go/issues/53)) ([a5f0af7](https://github.com/gitpod-io/gitpod-sdk-go/commit/a5f0af754b7fb4ef5d967aa53ce3ad22648826be))

## 0.4.0 (2025-02-21)

Full Changelog: [v0.3.2...v0.4.0](https://github.com/gitpod-io/gitpod-sdk-go/compare/v0.3.2...v0.4.0)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

<a href="https://pkg.go.dev/github.com/gitpod-io/gitpod-sdk-go"><img src="https://pkg.go.dev/badge/github.com/gitpod-io/gitpod-sdk-go.svg" alt="Go Reference"></a>

The Gitpod Go library provides convenient access to [the Gitpod REST
API](https://docs.gitpod.io) from applications written in Go. The full API of this library can be found in [api.md](api.md).
The Gitpod Go library provides convenient access to the [Gitpod REST API](https://docs.gitpod.io)
from applications written in Go.

It is generated with [Stainless](https://www.stainlessapi.com/).
It is generated with [Stainless](https://www.stainless.com/).

## Installation

Expand All @@ -24,7 +24,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/gitpod-io/gitpod-sdk-go@v0.4.0'
go get -u 'github.com/gitpod-io/gitpod-sdk-go@v0.5.0'
```

<!-- x-release-please-end -->
Expand Down
8 changes: 4 additions & 4 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Reporting Security Issues

This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.
This SDK is generated by [Stainless Software Inc](http://stainless.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.

To report a security issue, please contact the Stainless team at security@stainlessapi.com.
To report a security issue, please contact the Stainless team at security@stainless.com.

## Responsible Disclosure

Expand All @@ -16,11 +16,11 @@ before making any information public.
## Reporting Non-SDK Related Security Issues

If you encounter security issues that are not directly related to SDKs but pertain to the services
or products provided by Gitpod please follow the respective company's security reporting guidelines.
or products provided by Gitpod, please follow the respective company's security reporting guidelines.

### Gitpod Terms and Policies

Please contact [email protected] for any questions or concerns regarding security of our services.
Please contact [email protected] for any questions or concerns regarding the security of our services.

---

Expand Down
71 changes: 69 additions & 2 deletions account.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,30 @@ func (r *AccountService) GetSSOLoginURL(ctx context.Context, body AccountGetSSOL
return
}

// Lists organizations that the currently authenticated account can join.
//
// Use this method to:
//
// - Discover organizations associated with the account's email domain.
// - Allow users to join existing organizations.
// - Display potential organizations during onboarding.
//
// ### Examples
//
// - List joinable organizations:
//
// Retrieves a list of organizations the account can join.
//
// ```yaml
// {}
// ```
func (r *AccountService) ListJoinableOrganizations(ctx context.Context, params AccountListJoinableOrganizationsParams, opts ...option.RequestOption) (res *AccountListJoinableOrganizationsResponse, err error) {
opts = append(r.Options[:], opts...)
path := "gitpod.v1.AccountService/ListJoinableOrganizations"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &res, opts...)
return
}

// Lists available login providers with optional filtering.
//
// Use this method to:
Expand Down Expand Up @@ -380,8 +404,11 @@ type Account struct {
// Joda Time's
// [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
// to obtain a formatter capable of generating timestamps in this format.
UpdatedAt time.Time `json:"updatedAt,required" format:"date-time"`
AvatarURL string `json:"avatarUrl"`
UpdatedAt time.Time `json:"updatedAt,required" format:"date-time"`
AvatarURL string `json:"avatarUrl"`
// joinables is deprecated. Use ListJoinableOrganizations instead.
//
// Deprecated: deprecated
Joinables []JoinableOrganization `json:"joinables"`
Memberships []AccountMembership `json:"memberships"`
// organization_id is the ID of the organization the account is owned by if it's
Expand Down Expand Up @@ -552,6 +579,27 @@ func (r accountGetSSOLoginURLResponseJSON) RawJSON() string {
return r.raw
}

type AccountListJoinableOrganizationsResponse struct {
JoinableOrganizations []JoinableOrganization `json:"joinableOrganizations"`
JSON accountListJoinableOrganizationsResponseJSON `json:"-"`
}

// accountListJoinableOrganizationsResponseJSON contains the JSON metadata for the
// struct [AccountListJoinableOrganizationsResponse]
type accountListJoinableOrganizationsResponseJSON struct {
JoinableOrganizations apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

func (r *AccountListJoinableOrganizationsResponse) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

func (r accountListJoinableOrganizationsResponseJSON) RawJSON() string {
return r.raw
}

type AccountGetParams struct {
Empty param.Field[bool] `json:"empty"`
}
Expand Down Expand Up @@ -579,6 +627,25 @@ func (r AccountGetSSOLoginURLParams) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}

type AccountListJoinableOrganizationsParams struct {
Token param.Field[string] `query:"token"`
PageSize param.Field[int64] `query:"pageSize"`
Empty param.Field[bool] `json:"empty"`
}

func (r AccountListJoinableOrganizationsParams) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}

// URLQuery serializes [AccountListJoinableOrganizationsParams]'s query parameters
// as `url.Values`.
func (r AccountListJoinableOrganizationsParams) URLQuery() (v url.Values) {
return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
ArrayFormat: apiquery.ArrayQueryFormatComma,
NestedFormat: apiquery.NestedQueryFormatBrackets,
})
}

type AccountListLoginProvidersParams struct {
Token param.Field[string] `query:"token"`
PageSize param.Field[int64] `query:"pageSize"`
Expand Down
27 changes: 27 additions & 0 deletions account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,33 @@ func TestAccountGetSSOLoginURLWithOptionalParams(t *testing.T) {
}
}

func TestAccountListJoinableOrganizationsWithOptionalParams(t *testing.T) {
t.Skip("skipped: tests are disabled for the time being")
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
baseURL = envURL
}
if !testutil.CheckTestServer(t, baseURL) {
return
}
client := gitpod.NewClient(
option.WithBaseURL(baseURL),
option.WithBearerToken("My Bearer Token"),
)
_, err := client.Accounts.ListJoinableOrganizations(context.TODO(), gitpod.AccountListJoinableOrganizationsParams{
Token: gitpod.F("token"),
PageSize: gitpod.F(int64(0)),
Empty: gitpod.F(true),
})
if err != nil {
var apierr *gitpod.Error
if errors.As(err, &apierr) {
t.Log(string(apierr.DumpRequest(true)))
}
t.Fatalf("err should be nil: %s", err.Error())
}
}

func TestAccountListLoginProvidersWithOptionalParams(t *testing.T) {
t.Skip("skipped: tests are disabled for the time being")
baseURL := "http://localhost:4010"
Expand Down
8 changes: 8 additions & 0 deletions aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ type FieldValue = shared.FieldValue
// This is an alias to an internal type.
type FieldValueParam = shared.FieldValueParam

// Gateway represents a system gateway that provides access to services
//
// This is an alias to an internal type.
type Gateway = shared.Gateway

// This is an alias to an internal type.
type OrganizationRole = shared.OrganizationRole

Expand Down Expand Up @@ -88,6 +93,9 @@ const PrincipalEnvironment = shared.PrincipalEnvironment
// This is an alias to an internal value.
const PrincipalServiceAccount = shared.PrincipalServiceAccount

// This is an alias to an internal value.
const PrincipalRunnerManager = shared.PrincipalRunnerManager

// This is an alias to an internal type.
type RunsOn = shared.RunsOn

Expand Down
Loading