@@ -43,7 +43,7 @@ func (r *EditorService) Get(ctx context.Context, body EditorGetParams, opts ...o
4343}
4444
4545// ListEditors lists all editors available to the caller
46- func (r * EditorService ) List (ctx context.Context , params EditorListParams , opts ... option.RequestOption ) (res * pagination.PersonalAccessTokensPage [EditorListResponse ], err error ) {
46+ func (r * EditorService ) List (ctx context.Context , params EditorListParams , opts ... option.RequestOption ) (res * pagination.EditorsPage [EditorListResponse ], err error ) {
4747 var raw * http.Response
4848 opts = append (r .Options [:], opts ... )
4949 opts = append ([]option.RequestOption {option .WithResponseInto (& raw )}, opts ... )
@@ -61,8 +61,8 @@ func (r *EditorService) List(ctx context.Context, params EditorListParams, opts
6161}
6262
6363// ListEditors lists all editors available to the caller
64- func (r * EditorService ) ListAutoPaging (ctx context.Context , params EditorListParams , opts ... option.RequestOption ) * pagination.PersonalAccessTokensPageAutoPager [EditorListResponse ] {
65- return pagination .NewPersonalAccessTokensPageAutoPager (r .List (ctx , params , opts ... ))
64+ func (r * EditorService ) ListAutoPaging (ctx context.Context , params EditorListParams , opts ... option.RequestOption ) * pagination.EditorsPageAutoPager [EditorListResponse ] {
65+ return pagination .NewEditorsPageAutoPager (r .List (ctx , params , opts ... ))
6666}
6767
6868// ResolveEditorURL resolves the editor's URL for an environment
@@ -130,44 +130,19 @@ func (r editorGetResponseEditorJSON) RawJSON() string {
130130}
131131
132132type EditorListResponse struct {
133- // editors contains the list of editors
134- Editors []EditorListResponseEditor `json:"editors"`
135- // pagination contains the pagination options for listing environments
136- Pagination EditorListResponsePagination `json:"pagination"`
137- JSON editorListResponseJSON `json:"-"`
133+ ID string `json:"id"`
134+ Alias string `json:"alias"`
135+ IconURL string `json:"iconUrl"`
136+ InstallationInstructions string `json:"installationInstructions"`
137+ Name string `json:"name"`
138+ ShortDescription string `json:"shortDescription"`
139+ URLTemplate string `json:"urlTemplate"`
140+ JSON editorListResponseJSON `json:"-"`
138141}
139142
140143// editorListResponseJSON contains the JSON metadata for the struct
141144// [EditorListResponse]
142145type editorListResponseJSON struct {
143- Editors apijson.Field
144- Pagination apijson.Field
145- raw string
146- ExtraFields map [string ]apijson.Field
147- }
148-
149- func (r * EditorListResponse ) UnmarshalJSON (data []byte ) (err error ) {
150- return apijson .UnmarshalRoot (data , r )
151- }
152-
153- func (r editorListResponseJSON ) RawJSON () string {
154- return r .raw
155- }
156-
157- type EditorListResponseEditor struct {
158- ID string `json:"id"`
159- Alias string `json:"alias"`
160- IconURL string `json:"iconUrl"`
161- InstallationInstructions string `json:"installationInstructions"`
162- Name string `json:"name"`
163- ShortDescription string `json:"shortDescription"`
164- URLTemplate string `json:"urlTemplate"`
165- JSON editorListResponseEditorJSON `json:"-"`
166- }
167-
168- // editorListResponseEditorJSON contains the JSON metadata for the struct
169- // [EditorListResponseEditor]
170- type editorListResponseEditorJSON struct {
171146 ID apijson.Field
172147 Alias apijson.Field
173148 IconURL apijson.Field
@@ -179,39 +154,11 @@ type editorListResponseEditorJSON struct {
179154 ExtraFields map [string ]apijson.Field
180155}
181156
182- func (r * EditorListResponseEditor ) UnmarshalJSON (data []byte ) (err error ) {
183- return apijson .UnmarshalRoot (data , r )
184- }
185-
186- func (r editorListResponseEditorJSON ) RawJSON () string {
187- return r .raw
188- }
189-
190- // pagination contains the pagination options for listing environments
191- type EditorListResponsePagination struct {
192- // Token for the next set of results that was returned as next_token of a
193- // PaginationResponse
194- Token string `json:"token"`
195- // Page size is the maximum number of results to retrieve per page. Defaults to 25.
196- // Maximum 100.
197- PageSize int64 `json:"pageSize"`
198- JSON editorListResponsePaginationJSON `json:"-"`
199- }
200-
201- // editorListResponsePaginationJSON contains the JSON metadata for the struct
202- // [EditorListResponsePagination]
203- type editorListResponsePaginationJSON struct {
204- Token apijson.Field
205- PageSize apijson.Field
206- raw string
207- ExtraFields map [string ]apijson.Field
208- }
209-
210- func (r * EditorListResponsePagination ) UnmarshalJSON (data []byte ) (err error ) {
157+ func (r * EditorListResponse ) UnmarshalJSON (data []byte ) (err error ) {
211158 return apijson .UnmarshalRoot (data , r )
212159}
213160
214- func (r editorListResponsePaginationJSON ) RawJSON () string {
161+ func (r editorListResponseJSON ) RawJSON () string {
215162 return r .raw
216163}
217164
0 commit comments