Skip to content

Commit b8a9fd6

Browse files
release: 0.4.0 (#49)
* feat(api): manual updates (#48) * codegen metadata * feat(api): manual updates (#50) * release: 0.4.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 1817924 commit b8a9fd6

35 files changed

+1388
-1724
lines changed

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.3.2"
2+
".": "0.4.0"
33
}

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-cd6a05ae99d2a050577fa0e729e6ae89b4eacd78f61366a77269398368f8a877.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-3655d5ad0ac3e228c1519af70dbf3d0bfa3c47a2d06d4cac92a650da051b49a6.yml

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 0.4.0 (2025-02-21)
4+
5+
Full Changelog: [v0.3.2...v0.4.0](https://github.com/gitpod-io/gitpod-sdk-go/compare/v0.3.2...v0.4.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([#48](https://github.com/gitpod-io/gitpod-sdk-go/issues/48)) ([78b2504](https://github.com/gitpod-io/gitpod-sdk-go/commit/78b2504189e98dcfaef1427444378752ccede6cc))
10+
* **api:** manual updates ([#50](https://github.com/gitpod-io/gitpod-sdk-go/issues/50)) ([19015d3](https://github.com/gitpod-io/gitpod-sdk-go/commit/19015d3d486ef7569342f1f08bcadebc9e5f89e3))
11+
312
## 0.3.2 (2025-02-18)
413

514
Full Changelog: [v0.3.1...v0.3.2](https://github.com/gitpod-io/gitpod-sdk-go/compare/v0.3.1...v0.3.2)

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Or to pin the version:
2424
<!-- x-release-please-start-version -->
2525

2626
```sh
27-
go get -u 'github.com/gitpod-io/gitpod-sdk-go@v0.3.2'
27+
go get -u 'github.com/gitpod-io/gitpod-sdk-go@v0.4.0'
2828
```
2929

3030
<!-- x-release-please-end -->

environment.go

+39-566
Large diffs are not rendered by default.

environment_test.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ func TestEnvironmentNewWithOptionalParams(t *testing.T) {
5757
Devcontainer: gitpod.F(gitpod.EnvironmentSpecDevcontainerParam{
5858
DevcontainerFilePath: gitpod.F("devcontainerFilePath"),
5959
Dotfiles: gitpod.F(gitpod.EnvironmentSpecDevcontainerDotfilesParam{
60-
Repository: gitpod.F("https://example.com"),
61-
InstallCommand: gitpod.F("installCommand"),
62-
TargetPath: gitpod.F("targetPath"),
60+
Repository: gitpod.F("https://example.com"),
6361
}),
6462
Session: gitpod.F("session"),
6563
}),
@@ -300,9 +298,7 @@ func TestEnvironmentNewFromProjectWithOptionalParams(t *testing.T) {
300298
Devcontainer: gitpod.F(gitpod.EnvironmentSpecDevcontainerParam{
301299
DevcontainerFilePath: gitpod.F("devcontainerFilePath"),
302300
Dotfiles: gitpod.F(gitpod.EnvironmentSpecDevcontainerDotfilesParam{
303-
Repository: gitpod.F("https://example.com"),
304-
InstallCommand: gitpod.F("installCommand"),
305-
TargetPath: gitpod.F("targetPath"),
301+
Repository: gitpod.F("https://example.com"),
306302
}),
307303
Session: gitpod.F("session"),
308304
}),

environmentautomationservice.go

+2-176
Original file line numberDiff line numberDiff line change
@@ -355,94 +355,7 @@ func (r serviceJSON) RawJSON() string {
355355
}
356356

357357
type ServiceMetadata struct {
358-
// A Timestamp represents a point in time independent of any time zone or local
359-
// calendar, encoded as a count of seconds and fractions of seconds at nanosecond
360-
// resolution. The count is relative to an epoch at UTC midnight on January 1,
361-
// 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar
362-
// backwards to year one.
363-
//
364-
// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
365-
// second table is needed for interpretation, using a
366-
// [24-hour linear smear](https://developers.google.com/time/smear).
367-
//
368-
// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
369-
// restricting to that range, we ensure that we can convert to and from
370-
// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
371-
//
372-
// # Examples
373-
//
374-
// Example 1: Compute Timestamp from POSIX `time()`.
375-
//
376-
// Timestamp timestamp;
377-
// timestamp.set_seconds(time(NULL));
378-
// timestamp.set_nanos(0);
379-
//
380-
// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
381-
//
382-
// struct timeval tv;
383-
// gettimeofday(&tv, NULL);
384-
//
385-
// Timestamp timestamp;
386-
// timestamp.set_seconds(tv.tv_sec);
387-
// timestamp.set_nanos(tv.tv_usec * 1000);
388-
//
389-
// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
390-
//
391-
// FILETIME ft;
392-
// GetSystemTimeAsFileTime(&ft);
393-
// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
394-
//
395-
// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
396-
// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
397-
// Timestamp timestamp;
398-
// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
399-
// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
400-
//
401-
// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
402-
//
403-
// long millis = System.currentTimeMillis();
404-
//
405-
// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
406-
// .setNanos((int) ((millis % 1000) * 1000000)).build();
407-
//
408-
// Example 5: Compute Timestamp from Java `Instant.now()`.
409-
//
410-
// Instant now = Instant.now();
411-
//
412-
// Timestamp timestamp =
413-
// Timestamp.newBuilder().setSeconds(now.getEpochSecond())
414-
// .setNanos(now.getNano()).build();
415-
//
416-
// Example 6: Compute Timestamp from current time in Python.
417-
//
418-
// timestamp = Timestamp()
419-
// timestamp.GetCurrentTime()
420-
//
421-
// # JSON Mapping
422-
//
423-
// In JSON format, the Timestamp type is encoded as a string in the
424-
// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is
425-
// "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always
426-
// expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are
427-
// zero-padded to two digits each. The fractional seconds, which can go up to 9
428-
// digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix
429-
// indicates the timezone ("UTC"); the timezone is required. A proto3 JSON
430-
// serializer should always use UTC (as indicated by "Z") when printing the
431-
// Timestamp type and a proto3 JSON parser should be able to accept both UTC and
432-
// other timezones (as indicated by an offset).
433-
//
434-
// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on
435-
// January 15, 2017.
436-
//
437-
// In JavaScript, one can convert a Date object to this format using the standard
438-
// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
439-
// method. In Python, a standard `datetime.datetime` object can be converted to
440-
// this format using
441-
// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the
442-
// time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the
443-
// Joda Time's
444-
// [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
445-
// to obtain a formatter capable of generating timestamps in this format.
358+
// created_at is the time the service was created.
446359
CreatedAt time.Time `json:"createdAt" format:"date-time"`
447360
// creator describes the principal who created the service.
448361
Creator shared.Subject `json:"creator"`
@@ -483,94 +396,7 @@ func (r serviceMetadataJSON) RawJSON() string {
483396
}
484397

485398
type ServiceMetadataParam struct {
486-
// A Timestamp represents a point in time independent of any time zone or local
487-
// calendar, encoded as a count of seconds and fractions of seconds at nanosecond
488-
// resolution. The count is relative to an epoch at UTC midnight on January 1,
489-
// 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar
490-
// backwards to year one.
491-
//
492-
// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
493-
// second table is needed for interpretation, using a
494-
// [24-hour linear smear](https://developers.google.com/time/smear).
495-
//
496-
// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
497-
// restricting to that range, we ensure that we can convert to and from
498-
// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
499-
//
500-
// # Examples
501-
//
502-
// Example 1: Compute Timestamp from POSIX `time()`.
503-
//
504-
// Timestamp timestamp;
505-
// timestamp.set_seconds(time(NULL));
506-
// timestamp.set_nanos(0);
507-
//
508-
// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
509-
//
510-
// struct timeval tv;
511-
// gettimeofday(&tv, NULL);
512-
//
513-
// Timestamp timestamp;
514-
// timestamp.set_seconds(tv.tv_sec);
515-
// timestamp.set_nanos(tv.tv_usec * 1000);
516-
//
517-
// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
518-
//
519-
// FILETIME ft;
520-
// GetSystemTimeAsFileTime(&ft);
521-
// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
522-
//
523-
// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
524-
// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
525-
// Timestamp timestamp;
526-
// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
527-
// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
528-
//
529-
// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
530-
//
531-
// long millis = System.currentTimeMillis();
532-
//
533-
// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
534-
// .setNanos((int) ((millis % 1000) * 1000000)).build();
535-
//
536-
// Example 5: Compute Timestamp from Java `Instant.now()`.
537-
//
538-
// Instant now = Instant.now();
539-
//
540-
// Timestamp timestamp =
541-
// Timestamp.newBuilder().setSeconds(now.getEpochSecond())
542-
// .setNanos(now.getNano()).build();
543-
//
544-
// Example 6: Compute Timestamp from current time in Python.
545-
//
546-
// timestamp = Timestamp()
547-
// timestamp.GetCurrentTime()
548-
//
549-
// # JSON Mapping
550-
//
551-
// In JSON format, the Timestamp type is encoded as a string in the
552-
// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is
553-
// "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always
554-
// expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are
555-
// zero-padded to two digits each. The fractional seconds, which can go up to 9
556-
// digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix
557-
// indicates the timezone ("UTC"); the timezone is required. A proto3 JSON
558-
// serializer should always use UTC (as indicated by "Z") when printing the
559-
// Timestamp type and a proto3 JSON parser should be able to accept both UTC and
560-
// other timezones (as indicated by an offset).
561-
//
562-
// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on
563-
// January 15, 2017.
564-
//
565-
// In JavaScript, one can convert a Date object to this format using the standard
566-
// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
567-
// method. In Python, a standard `datetime.datetime` object can be converted to
568-
// this format using
569-
// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the
570-
// time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the
571-
// Joda Time's
572-
// [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
573-
// to obtain a formatter capable of generating timestamps in this format.
399+
// created_at is the time the service was created.
574400
CreatedAt param.Field[time.Time] `json:"createdAt" format:"date-time"`
575401
// creator describes the principal who created the service.
576402
Creator param.Field[shared.SubjectParam] `json:"creator"`

event.go

+69-5
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,32 @@ func NewEventService(opts ...option.RequestOption) (r *EventService) {
3737
return
3838
}
3939

40-
// ListAuditLogs retrieves a paginated list of audit logs for the specified
41-
// organization
40+
// Lists audit logs with filtering and pagination options.
41+
//
42+
// Use this method to:
43+
//
44+
// - View audit history
45+
// - Track user actions
46+
// - Monitor system changes
47+
//
48+
// ### Examples
49+
//
50+
// - List all logs:
51+
//
52+
// ```yaml
53+
// pagination:
54+
// pageSize: 20
55+
// ```
56+
//
57+
// - Filter by actor:
58+
//
59+
// ```yaml
60+
// filter:
61+
// actorIds: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"]
62+
// actorPrincipals: ["PRINCIPAL_USER"]
63+
// pagination:
64+
// pageSize: 20
65+
// ```
4266
func (r *EventService) List(ctx context.Context, params EventListParams, opts ...option.RequestOption) (res *pagination.EntriesPage[EventListResponse], err error) {
4367
var raw *http.Response
4468
opts = append(r.Options[:], opts...)
@@ -56,13 +80,53 @@ func (r *EventService) List(ctx context.Context, params EventListParams, opts ..
5680
return res, nil
5781
}
5882

59-
// ListAuditLogs retrieves a paginated list of audit logs for the specified
60-
// organization
83+
// Lists audit logs with filtering and pagination options.
84+
//
85+
// Use this method to:
86+
//
87+
// - View audit history
88+
// - Track user actions
89+
// - Monitor system changes
90+
//
91+
// ### Examples
92+
//
93+
// - List all logs:
94+
//
95+
// ```yaml
96+
// pagination:
97+
// pageSize: 20
98+
// ```
99+
//
100+
// - Filter by actor:
101+
//
102+
// ```yaml
103+
// filter:
104+
// actorIds: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"]
105+
// actorPrincipals: ["PRINCIPAL_USER"]
106+
// pagination:
107+
// pageSize: 20
108+
// ```
61109
func (r *EventService) ListAutoPaging(ctx context.Context, params EventListParams, opts ...option.RequestOption) *pagination.EntriesPageAutoPager[EventListResponse] {
62110
return pagination.NewEntriesPageAutoPager(r.List(ctx, params, opts...))
63111
}
64112

65-
// WatchEvents streams all requests events to the client
113+
// Streams events for all projects, runners, environments, tasks, and services
114+
// based on the specified scope.
115+
//
116+
// Use this method to:
117+
//
118+
// - Monitor resource changes in real-time
119+
// - Track system events
120+
// - Receive notifications
121+
//
122+
// The scope parameter determines which events to watch:
123+
//
124+
// - Organization scope (default): Watch all organization-wide events including
125+
// projects, runners and environments. Task and service events are not included.
126+
// Use by setting organization=true or omitting the scope.
127+
// - Environment scope: Watch events for a specific environment, including its
128+
// tasks, task executions, and services. Use by setting environment_id to the
129+
// UUID of the environment to watch.
66130
func (r *EventService) WatchStreaming(ctx context.Context, body EventWatchParams, opts ...option.RequestOption) (stream *jsonl.Stream[EventWatchResponse]) {
67131
var (
68132
raw *http.Response

event_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ func TestEventListWithOptionalParams(t *testing.T) {
3131
Token: gitpod.F("token"),
3232
PageSize: gitpod.F(int64(0)),
3333
Filter: gitpod.F(gitpod.EventListParamsFilter{
34-
ActorIDs: gitpod.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
34+
ActorIDs: gitpod.F([]string{"d2c94c27-3b76-4a42-b88c-95a85e392c68"}),
3535
ActorPrincipals: gitpod.F([]shared.Principal{shared.PrincipalUnspecified}),
3636
SubjectIDs: gitpod.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
3737
SubjectTypes: gitpod.F([]gitpod.ResourceType{gitpod.ResourceTypeUnspecified}),
3838
}),
3939
Pagination: gitpod.F(gitpod.EventListParamsPagination{
4040
Token: gitpod.F("token"),
41-
PageSize: gitpod.F(int64(100)),
41+
PageSize: gitpod.F(int64(20)),
4242
}),
4343
})
4444
if err != nil {

0 commit comments

Comments
 (0)