Skip to content

Commit 34dfea0

Browse files
feat(api): update via SDK Studio
1 parent 4208ce7 commit 34dfea0

4 files changed

Lines changed: 4 additions & 116 deletions

File tree

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 7
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-c9d64df733f286f09d2203f4e3d820ce57e8d4c629c5e2db4e2bfac91fbc1598.yml
3-
openapi_spec_hash: fa407611fc566d55f403864fbfaa6c23
4-
config_hash: 7f67c5b95af1e4b39525515240b72275
1+
configured_endpoints: 6
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-19b0d17ba368f32827ee322d15a7f4ff7e1f3bbf66606fad227b3465f8ffc5ab.yml
3+
openapi_spec_hash: 4a3cb766898e8a134ef99fe6c4c87736
4+
config_hash: 4dfa4d870ce0e23e31ce33ab6a53dd21

api.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
# Apps
22

3-
Response Types:
4-
5-
- <a href="https://pkg.go.dev/github.com/onkernel/kernel-go-sdk">kernel</a>.<a href="https://pkg.go.dev/github.com/onkernel/kernel-go-sdk#AppListResponse">AppListResponse</a>
6-
7-
Methods:
8-
9-
- <code title="get /apps">client.Apps.<a href="https://pkg.go.dev/github.com/onkernel/kernel-go-sdk#AppService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/onkernel/kernel-go-sdk">kernel</a>.<a href="https://pkg.go.dev/github.com/onkernel/kernel-go-sdk#AppListParams">AppListParams</a>) ([]<a href="https://pkg.go.dev/github.com/onkernel/kernel-go-sdk">kernel</a>.<a href="https://pkg.go.dev/github.com/onkernel/kernel-go-sdk#AppListResponse">AppListResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
10-
113
## Deployments
124

135
Response Types:

app.go

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,7 @@
33
package kernel
44

55
import (
6-
"context"
7-
"net/http"
8-
"net/url"
9-
10-
"github.com/onkernel/kernel-go-sdk/internal/apijson"
11-
"github.com/onkernel/kernel-go-sdk/internal/apiquery"
12-
"github.com/onkernel/kernel-go-sdk/internal/requestconfig"
136
"github.com/onkernel/kernel-go-sdk/option"
14-
"github.com/onkernel/kernel-go-sdk/packages/param"
15-
"github.com/onkernel/kernel-go-sdk/packages/respjson"
167
)
178

189
// AppService contains methods and other services that help with interacting with
@@ -37,58 +28,3 @@ func NewAppService(opts ...option.RequestOption) (r AppService) {
3728
r.Invocations = NewAppInvocationService(opts...)
3829
return
3930
}
40-
41-
// List application versions for the authenticated user. Optionally filter by app
42-
// name and/or version label.
43-
func (r *AppService) List(ctx context.Context, query AppListParams, opts ...option.RequestOption) (res *[]AppListResponse, err error) {
44-
opts = append(r.Options[:], opts...)
45-
path := "apps"
46-
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
47-
return
48-
}
49-
50-
// Summary of an application version.
51-
type AppListResponse struct {
52-
// Unique identifier for the app version
53-
ID string `json:"id,required"`
54-
// Name of the application
55-
AppName string `json:"app_name,required"`
56-
// Deployment region code
57-
Region string `json:"region,required"`
58-
// Version label for the application
59-
Version string `json:"version,required"`
60-
// Environment variables configured for this app version
61-
EnvVars map[string]string `json:"env_vars"`
62-
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
63-
JSON struct {
64-
ID respjson.Field
65-
AppName respjson.Field
66-
Region respjson.Field
67-
Version respjson.Field
68-
EnvVars respjson.Field
69-
ExtraFields map[string]respjson.Field
70-
raw string
71-
} `json:"-"`
72-
}
73-
74-
// Returns the unmodified JSON received from the API
75-
func (r AppListResponse) RawJSON() string { return r.JSON.raw }
76-
func (r *AppListResponse) UnmarshalJSON(data []byte) error {
77-
return apijson.UnmarshalRoot(data, r)
78-
}
79-
80-
type AppListParams struct {
81-
// Filter results by application name.
82-
AppName param.Opt[string] `query:"app_name,omitzero" json:"-"`
83-
// Filter results by version label.
84-
Version param.Opt[string] `query:"version,omitzero" json:"-"`
85-
paramObj
86-
}
87-
88-
// URLQuery serializes [AppListParams]'s query parameters as `url.Values`.
89-
func (r AppListParams) URLQuery() (v url.Values, err error) {
90-
return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
91-
ArrayFormat: apiquery.ArrayQueryFormatComma,
92-
NestedFormat: apiquery.NestedQueryFormatBrackets,
93-
})
94-
}

app_test.go

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)