Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
78 changes: 36 additions & 42 deletions go/pkg/basecamp/todosets.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,26 @@ import (
// Todoset represents a Basecamp todoset (container for todolists in a project).
// Each project has exactly one todoset in its dock.
type Todoset struct {
ID int64 `json:"id"`
Status string `json:"status"`
VisibleToClients bool `json:"visible_to_clients"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Title string `json:"title"`
InheritsStatus bool `json:"inherits_status"`
Type string `json:"type"`
URL string `json:"url"`
AppURL string `json:"app_url"`
BookmarkURL string `json:"bookmark_url"`
Position *int `json:"position,omitempty"`
Bucket *Bucket `json:"bucket,omitempty"`
Creator *Person `json:"creator,omitempty"`
Name string `json:"name"`
TodolistsCount int `json:"todolists_count"`
TodolistsURL string `json:"todolists_url"`
CompletedRatio string `json:"completed_ratio"`
Completed bool `json:"completed"`
CompletedCount int `json:"completed_count"`
OnScheduleCount int `json:"on_schedule_count"`
OverScheduleCount int `json:"over_schedule_count"`
AppTodolistsURL string `json:"app_todolists_url"`
ID int64 `json:"id"`
Status string `json:"status"`
VisibleToClients bool `json:"visible_to_clients"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Title string `json:"title"`
InheritsStatus bool `json:"inherits_status"`
Type string `json:"type"`
URL string `json:"url"`
AppURL string `json:"app_url"`
BookmarkURL string `json:"bookmark_url"`
Position *int `json:"position,omitempty"`
Bucket *Bucket `json:"bucket,omitempty"`
Creator *Person `json:"creator,omitempty"`
Name string `json:"name"`
TodolistsCount int `json:"todolists_count"`
TodolistsURL string `json:"todolists_url"`
CompletedRatio string `json:"completed_ratio"`
Completed bool `json:"completed"`
AppTodolistsURL string `json:"app_todolists_url"`
}

// TodosetsService handles todoset operations.
Expand Down Expand Up @@ -81,25 +78,22 @@ func (s *TodosetsService) Get(ctx context.Context, todosetID int64) (result *Tod
// todosetFromGenerated converts a generated Todoset to our clean Todoset type.
func todosetFromGenerated(gts generated.Todoset) Todoset {
ts := Todoset{
Status: gts.Status,
VisibleToClients: gts.VisibleToClients,
Title: gts.Title,
InheritsStatus: gts.InheritsStatus,
Type: gts.Type,
URL: gts.Url,
AppURL: gts.AppUrl,
BookmarkURL: gts.BookmarkUrl,
Name: gts.Name,
TodolistsCount: int(gts.TodolistsCount),
TodolistsURL: gts.TodolistsUrl,
CompletedRatio: gts.CompletedRatio,
Completed: gts.Completed,
CompletedCount: int(gts.CompletedCount),
OnScheduleCount: int(gts.OnScheduleCount),
OverScheduleCount: int(gts.OverScheduleCount),
AppTodolistsURL: gts.AppTodolistsUrl,
CreatedAt: gts.CreatedAt,
UpdatedAt: gts.UpdatedAt,
Status: gts.Status,
VisibleToClients: gts.VisibleToClients,
Title: gts.Title,
InheritsStatus: gts.InheritsStatus,
Type: gts.Type,
URL: gts.Url,
AppURL: gts.AppUrl,
BookmarkURL: gts.BookmarkUrl,
Name: gts.Name,
TodolistsCount: int(gts.TodolistsCount),
TodolistsURL: gts.TodolistsUrl,
CompletedRatio: gts.CompletedRatio,
Completed: gts.Completed,
AppTodolistsURL: gts.AppTodolistsUrl,
CreatedAt: gts.CreatedAt,
UpdatedAt: gts.UpdatedAt,
}

if gts.Id != 0 {
Expand Down
9 changes: 0 additions & 9 deletions go/pkg/basecamp/todosets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@ func TestTodoset_UnmarshalGet(t *testing.T) {
if todoset.CompletedRatio != "5/15" {
t.Errorf("expected completed_ratio '5/15', got %q", todoset.CompletedRatio)
}
if todoset.CompletedCount != 5 {
t.Errorf("expected completed_count 5, got %d", todoset.CompletedCount)
}
if todoset.OnScheduleCount != 3 {
t.Errorf("expected on_schedule_count 3, got %d", todoset.OnScheduleCount)
}
if todoset.OverScheduleCount != 2 {
t.Errorf("expected over_schedule_count 2, got %d", todoset.OverScheduleCount)
}
if todoset.Bucket == nil {
t.Fatal("expected Bucket to be non-nil")
}
Expand Down
43 changes: 20 additions & 23 deletions go/pkg/generated/client.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,5 @@ data class Todoset(
@SerialName("todolists_url") val todolistsUrl: String? = null,
@SerialName("completed_ratio") val completedRatio: String? = null,
val completed: Boolean = false,
@SerialName("completed_count") val completedCount: Int = 0,
@SerialName("on_schedule_count") val onScheduleCount: Int = 0,
@SerialName("over_schedule_count") val overScheduleCount: Int = 0,
@SerialName("app_todolists_url") val appTodolistsUrl: String? = null
)
12 changes: 0 additions & 12 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -23746,18 +23746,6 @@
"completed": {
"type": "boolean"
},
"completed_count": {
"type": "integer",
"format": "int32"
},
"on_schedule_count": {
"type": "integer",
"format": "int32"
},
"over_schedule_count": {
"type": "integer",
"format": "int32"
},
"app_todolists_url": {
"type": "string"
}
Expand Down
2 changes: 1 addition & 1 deletion ruby/lib/basecamp/generated/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://basecamp.com/schemas/sdk-metadata.json",
"version": "1.0.0",
"generated": "2026-03-16T07:14:48Z",
"generated": "2026-03-16T16:40:07Z",
"operations": {
"CreateAttachment": {
"retry": {
Expand Down
10 changes: 2 additions & 8 deletions ruby/lib/basecamp/generated/types.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Auto-generated from OpenAPI spec. Do not edit manually.
# Generated: 2026-03-16T07:14:48Z
# Generated: 2026-03-16T16:40:07Z

require "json"
require "time"
Expand Down Expand Up @@ -2925,7 +2925,7 @@ def to_json(*args)
# Todoset
class Todoset
include TypeHelpers
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :name, :status, :title, :type, :updated_at, :url, :visible_to_clients, :app_todolists_url, :bookmark_url, :completed, :completed_count, :completed_ratio, :on_schedule_count, :over_schedule_count, :position, :todolists_count, :todolists_url
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :name, :status, :title, :type, :updated_at, :url, :visible_to_clients, :app_todolists_url, :bookmark_url, :completed, :completed_ratio, :position, :todolists_count, :todolists_url

# @return [Array<Symbol>]
def self.required_fields
Expand All @@ -2949,10 +2949,7 @@ def initialize(data = {})
@app_todolists_url = data["app_todolists_url"]
@bookmark_url = data["bookmark_url"]
@completed = parse_boolean(data["completed"])
@completed_count = parse_integer(data["completed_count"])
@completed_ratio = data["completed_ratio"]
@on_schedule_count = parse_integer(data["on_schedule_count"])
@over_schedule_count = parse_integer(data["over_schedule_count"])
@position = parse_integer(data["position"])
@todolists_count = parse_integer(data["todolists_count"])
@todolists_url = data["todolists_url"]
Expand All @@ -2976,10 +2973,7 @@ def to_h
"app_todolists_url" => @app_todolists_url,
"bookmark_url" => @bookmark_url,
"completed" => @completed,
"completed_count" => @completed_count,
"completed_ratio" => @completed_ratio,
"on_schedule_count" => @on_schedule_count,
"over_schedule_count" => @over_schedule_count,
"position" => @position,
"todolists_count" => @todolists_count,
"todolists_url" => @todolists_url,
Expand Down
3 changes: 0 additions & 3 deletions spec/basecamp.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -1321,9 +1321,6 @@ structure Todoset {
todolists_url: String
completed_ratio: String
completed: Boolean
completed_count: Integer
on_schedule_count: Integer
over_schedule_count: Integer
app_todolists_url: String
}

Expand Down
3 changes: 0 additions & 3 deletions spec/fixtures/todosets/get.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,5 @@
"todolists_url": "https://3.basecampapi.com/195539477/buckets/2085958500/todosets/1069479338/todolists.json",
"completed_ratio": "5/15",
"completed": false,
"completed_count": 5,
"on_schedule_count": 3,
"over_schedule_count": 2,
"app_todolists_url": "https://3.basecamp.com/195539477/buckets/2085958500/todosets/1069479338/todolists"
}
9 changes: 0 additions & 9 deletions swift/Sources/Basecamp/Generated/Models/Todoset.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ public struct Todoset: Codable, Sendable {
public var appTodolistsUrl: String?
public var bookmarkUrl: String?
public var completed: Bool?
public var completedCount: Int32?
public var completedRatio: String?
public var onScheduleCount: Int32?
public var overScheduleCount: Int32?
public var position: Int32?
public var todolistsCount: Int32?
public var todolistsUrl: String?
Expand All @@ -43,10 +40,7 @@ public struct Todoset: Codable, Sendable {
appTodolistsUrl: String? = nil,
bookmarkUrl: String? = nil,
completed: Bool? = nil,
completedCount: Int32? = nil,
completedRatio: String? = nil,
onScheduleCount: Int32? = nil,
overScheduleCount: Int32? = nil,
position: Int32? = nil,
todolistsCount: Int32? = nil,
todolistsUrl: String? = nil
Expand All @@ -67,10 +61,7 @@ public struct Todoset: Codable, Sendable {
self.appTodolistsUrl = appTodolistsUrl
self.bookmarkUrl = bookmarkUrl
self.completed = completed
self.completedCount = completedCount
self.completedRatio = completedRatio
self.onScheduleCount = onScheduleCount
self.overScheduleCount = overScheduleCount
self.position = position
self.todolistsCount = todolistsCount
self.todolistsUrl = todolistsUrl
Expand Down
2 changes: 1 addition & 1 deletion typescript/src/generated/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://basecamp.com/schemas/sdk-metadata.json",
"version": "1.0.0",
"generated": "2026-03-18T18:21:50.474Z",
"generated": "2026-03-16T16:40:07.598Z",
"operations": {
"CreateAttachment": {
"retry": {
Expand Down
12 changes: 0 additions & 12 deletions typescript/src/generated/openapi-stripped.json
Original file line number Diff line number Diff line change
Expand Up @@ -21672,18 +21672,6 @@
"completed": {
"type": "boolean"
},
"completed_count": {
"type": "integer",
"format": "int32"
},
"on_schedule_count": {
"type": "integer",
"format": "int32"
},
"over_schedule_count": {
"type": "integer",
"format": "int32"
},
"app_todolists_url": {
"type": "string"
}
Expand Down
6 changes: 0 additions & 6 deletions typescript/src/generated/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3618,12 +3618,6 @@ export interface components {
todolists_url?: string;
completed_ratio?: string;
completed?: boolean;
/** Format: int32 */
completed_count?: number;
/** Format: int32 */
on_schedule_count?: number;
/** Format: int32 */
over_schedule_count?: number;
app_todolists_url?: string;
};
Tool: {
Expand Down
Loading