basecamp-sdk 0.35.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60e13fb8f3a5bfb7d62df5ae6764c0c680d09696d9c6b4df93170e764ffde603
4
- data.tar.gz: d119173b75c2ee189ebf96dfe3ce8ef91a16b0513763e8eeb4d7aa0537af8fe7
3
+ metadata.gz: 39b5c6361a42bafa7ea74565fc96959d10c706be5d72b9f63a109efc295b62f8
4
+ data.tar.gz: 57969a324c9f27679146417495673af363bcc24f1771652a92047c79465087fc
5
5
  SHA512:
6
- metadata.gz: 3cf418ea7d029ac7161a876abf6923fb8c0ce4a240e41388d4d2fc3a9d6dd4565e0a3b4211c9fc0cd9c7e2b868725bc7f67bbe3b1330cfb95062a7f74496f3df
7
- data.tar.gz: '00919c080f692172c1670649406c6598fd19c829ff417b31afab420a44a7892f2f91eb206c614d28590a8fde71a6d3a1764ff3793e8122dce64c40b30acb5ef7'
6
+ metadata.gz: b5c339056349e6f3da03bc35a0c1d4d5ae78090740d1977d22c48cb5156bacd35d34135e4636dc5f7388c20254cda23eb397a331025a6cc8cade4c8c77a8a142
7
+ data.tar.gz: 466a8f23341fed5b12327b739211da2b4256244cff00de7583e3b0a6e0e45b0c90d4996443f48982b3dc7de5e6ef673a3621287d5b162aafb27b60152e68d55b
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://basecamp.com/schemas/sdk-metadata.json",
3
3
  "version": "1.0.0",
4
- "generated": "2026-11-05T15:43:14Z",
4
+ "generated": "2026-11-19T01:00:51Z",
5
5
  "operations": {
6
6
  "GetAccount": {
7
7
  "retry": {
@@ -22,10 +22,13 @@ module Basecamp
22
22
  # @param content [String, nil] content
23
23
  # @param due_on [String, nil] due on (YYYY-MM-DD)
24
24
  # @param assignee_ids [Array, nil] assignee ids
25
+ # @param notify [Boolean, nil] Notify people newly assigned through assignee_ids in this same request.
26
+ # Off unless true, and has no effect without assignee_ids: people already
27
+ # assigned are not notified again.
25
28
  # @return [Hash] response data
26
- def update_verbatim(card_id:, title: nil, content: nil, due_on: nil, assignee_ids: nil)
29
+ def update_verbatim(card_id:, title: nil, content: nil, due_on: nil, assignee_ids: nil, notify: nil)
27
30
  with_operation(service: "cards", operation: "update_verbatim", is_mutation: true, resource_id: card_id) do
28
- http_put("/card_tables/cards/#{card_id}", body: compact_params(title: title, content: content, due_on: due_on, assignee_ids: assignee_ids)).json(operation: "UpdateCard")
31
+ http_put("/card_tables/cards/#{card_id}", body: compact_params(title: title, content: content, due_on: due_on, assignee_ids: assignee_ids, notify: notify)).json(operation: "UpdateCard")
29
32
  end
30
33
  end
31
34
 
@@ -59,11 +62,13 @@ module Basecamp
59
62
  # @param title [String] title
60
63
  # @param content [String, nil] content
61
64
  # @param due_on [String, nil] due on (YYYY-MM-DD)
62
- # @param notify [Boolean, nil] notify
65
+ # @param assignee_ids [Array, nil] People to assign to the new card. BC3 keeps only the ids it finds among
66
+ # the card table's reachable people and silently drops the rest.
67
+ # @param notify [Boolean, nil] Notify the people assigned through assignee_ids. Off unless true.
63
68
  # @return [Hash] response data
64
- def create(column_id:, title:, content: nil, due_on: nil, notify: nil)
69
+ def create(column_id:, title:, content: nil, due_on: nil, assignee_ids: nil, notify: nil)
65
70
  with_operation(service: "cards", operation: "create", is_mutation: true, resource_id: column_id) do
66
- http_post("/card_tables/lists/#{column_id}/cards.json", body: compact_params(title: title, content: content, due_on: due_on, notify: notify)).json(operation: "CreateCard")
71
+ http_post("/card_tables/lists/#{column_id}/cards.json", body: compact_params(title: title, content: content, due_on: due_on, assignee_ids: assignee_ids, notify: notify)).json(operation: "CreateCard")
67
72
  end
68
73
  end
69
74
  end
@@ -30,10 +30,23 @@ module Basecamp
30
30
  # Create a new project
31
31
  # @param name [String] name
32
32
  # @param description [String, nil] description
33
+ # @param color [String, nil] The project's color, used for it on calendars: white, red, orange,
34
+ # yellow, green, blue, aqua, purple, gray, pink or brown. Omitted, Basecamp
35
+ # derives one from the project's name. Basecamp answers a value outside the enum
36
+ # with a server error, not a validation error.
37
+ # @param purpose [String, nil] What kind of project it is: `topic` (a regular project, the default),
38
+ # `team`, or `company_hq` (the account's Company HQ, at most one per
39
+ # account; a second answers 422). BC3's enum also has `guide`, which marks
40
+ # a project as a sample nobody can edit afterwards, so it isn't offered.
41
+ # @param admissions [String, nil] invite|employee|team
42
+ # @param timesheet_enabled [Boolean, nil] Turn on the project's timesheet. Basecamp ignores this when the caller
43
+ # can't use timesheets (the account lacks them, or the caller is a client).
44
+ # @param wallpaper_mode [String, nil] How a wallpaper uploaded later is laid out. UpdateProjectWallpaper
45
+ # uploads one.
33
46
  # @return [Hash] response data
34
- def create(name:, description: nil)
47
+ def create(name:, description: nil, color: nil, purpose: nil, admissions: nil, timesheet_enabled: nil, wallpaper_mode: nil)
35
48
  with_operation(service: "projects", operation: "create", is_mutation: true) do
36
- http_post("/projects.json", body: compact_params(name: name, description: description)).json(operation: "CreateProject")
49
+ http_post("/projects.json", body: compact_params(name: name, description: description, color: color, purpose: purpose, admissions: admissions, timesheet_enabled: timesheet_enabled, wallpaper_mode: wallpaper_mode)).json(operation: "CreateProject")
37
50
  end
38
51
  end
39
52
 
@@ -54,10 +67,25 @@ module Basecamp
54
67
  # @param schedule_attributes [Hash, nil] schedule attributes
55
68
  # @param wallpaper_mode [String, nil] How the project's wallpaper is laid out. Changes only the layout of a
56
69
  # wallpaper already attached; UpdateProjectWallpaper uploads one.
70
+ # @param color [String, nil] The project's color, used for it on calendars: white, red, orange,
71
+ # yellow, green, blue, aqua, purple, gray, pink or brown. An empty string clears
72
+ # it, and Basecamp derives one from the project's name again. A value
73
+ # outside the enum answers a server error, not a validation error. The
74
+ # `color` a project read returns is something else: the caller's own color
75
+ # for the project on their home screen, null unless they set one.
76
+ # @param purpose [String, nil] What kind of project it is: `topic` (a regular project), `team`, or
77
+ # `company_hq` (the account's Company HQ). Changing a `topic` to anything
78
+ # else deletes the project's start and end dates. An account has at most
79
+ # one `company_hq`; asking for a second answers 422. BC3's enum also has
80
+ # `guide`, which marks a project as a sample nobody can edit afterwards,
81
+ # so it isn't offered.
82
+ # @param timesheet_enabled [Boolean, nil] Turn the project's timesheet on or off. Basecamp ignores this when the
83
+ # caller can't use timesheets (the account lacks them, or the caller is a
84
+ # client).
57
85
  # @return [Hash] response data
58
- def update(project_id:, name:, description: nil, admissions: nil, schedule_attributes: nil, wallpaper_mode: nil)
86
+ def update(project_id:, name:, description: nil, admissions: nil, schedule_attributes: nil, wallpaper_mode: nil, color: nil, purpose: nil, timesheet_enabled: nil)
59
87
  with_operation(service: "projects", operation: "update", is_mutation: true, project_id: project_id) do
60
- http_put("/projects/#{project_id}", body: compact_params(name: name, description: description, admissions: admissions, schedule_attributes: schedule_attributes, wallpaper_mode: wallpaper_mode)).json(operation: "UpdateProject")
88
+ http_put("/projects/#{project_id}", body: compact_params(name: name, description: description, admissions: admissions, schedule_attributes: schedule_attributes, wallpaper_mode: wallpaper_mode, color: color, purpose: purpose, timesheet_enabled: timesheet_enabled)).json(operation: "UpdateProject")
61
89
  end
62
90
  end
63
91
 
@@ -38,11 +38,14 @@ module Basecamp
38
38
  end
39
39
  end
40
40
 
41
- # Get overdue todos grouped by lateness
41
+ # Get one page of overdue todos grouped by lateness, latest first.
42
+ # @param page [Integer, nil] Page number for paginating through results. Defaults to 1. This
43
+ # operation is not auto-paginated in any SDK, so a page is returned as
44
+ # asked for and later pages are not followed.
42
45
  # @return [Hash] response data
43
- def overdue()
46
+ def overdue(page: nil)
44
47
  with_operation(service: "reports", operation: "overdue", is_mutation: false) do
45
- http_get("/reports/todos/overdue.json", operation: "GetOverdueTodos").json(operation: "GetOverdueTodos")
48
+ http_get("/reports/todos/overdue.json", params: compact_query_params(page: page), operation: "GetOverdueTodos").json(operation: "GetOverdueTodos")
46
49
  end
47
50
  end
48
51
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Auto-generated from OpenAPI spec. Do not edit manually.
4
- # Generated: 2026-11-05T15:43:15Z
4
+ # Generated: 2026-11-19T01:00:51Z
5
5
 
6
6
  require "json"
7
7
  require "time"
@@ -3850,7 +3850,7 @@ module Basecamp
3850
3850
  # ProjectConstructionAttributes
3851
3851
  class ProjectConstructionAttributes
3852
3852
  include TypeHelpers
3853
- attr_accessor :name, :description, :start_date
3853
+ attr_accessor :name, :admissions, :description, :start_date, :timesheet_enabled
3854
3854
 
3855
3855
  # @return [Array<Symbol>]
3856
3856
  def self.required_fields
@@ -3859,15 +3859,19 @@ module Basecamp
3859
3859
 
3860
3860
  def initialize(data = {})
3861
3861
  @name = data["name"]
3862
+ @admissions = data["admissions"]
3862
3863
  @description = data["description"]
3863
3864
  @start_date = data["start_date"]
3865
+ @timesheet_enabled = parse_boolean(data["timesheet_enabled"])
3864
3866
  end
3865
3867
 
3866
3868
  def to_h
3867
3869
  {
3868
3870
  "name" => @name,
3871
+ "admissions" => @admissions,
3869
3872
  "description" => @description,
3870
3873
  "start_date" => @start_date,
3874
+ "timesheet_enabled" => @timesheet_enabled,
3871
3875
  }.compact
3872
3876
  end
3873
3877
 
@@ -36,7 +36,9 @@ module Basecamp
36
36
  # * a date — the due date is set
37
37
  #
38
38
  # Every other argument is plain send-when-set: +nil+ leaves the field off
39
- # the body, and BC3 leaves the stored value untouched.
39
+ # the body, and BC3 leaves the stored value untouched. The exception is
40
+ # +notify+, a send directive rather than card state, which goes on the
41
+ # wire only when true (as on the todo writes).
40
42
  #
41
43
  # This is the same single PUT as {#update_verbatim}, which stays as the
42
44
  # unnormalised path; +update+ differs only in mapping an empty +due_on+ to
@@ -47,8 +49,11 @@ module Basecamp
47
49
  # @param content [String, nil] new content (nil = keep current, "" clears)
48
50
  # @param due_on [String, nil] new due date (nil = keep current, "" clears)
49
51
  # @param assignee_ids [Array, nil] new assignees (nil = keep current, [] clears)
52
+ # @param notify [Boolean, nil] notify the people this request newly assigns
53
+ # through +assignee_ids+; sent only when true, and without effect unless
54
+ # +assignee_ids+ is sent too
50
55
  # @return [Hash] the updated card
51
- def update(card_id:, title: nil, content: nil, due_on: nil, assignee_ids: nil)
56
+ def update(card_id:, title: nil, content: nil, due_on: nil, assignee_ids: nil, notify: nil)
52
57
  resolved_due_on =
53
58
  if due_on.nil?
54
59
  # Unaddressed. +compact_params+ drops the nil, so no key is sent and
@@ -67,7 +72,8 @@ module Basecamp
67
72
  title: title,
68
73
  content: content,
69
74
  due_on: resolved_due_on,
70
- assignee_ids: assignee_ids
75
+ assignee_ids: assignee_ids,
76
+ notify: notify ? true : nil
71
77
  )
72
78
  end
73
79
  end
@@ -645,17 +645,18 @@ module Basecamp
645
645
  # member was kept where the reference reads 0 and drops it.
646
646
  creator_member = read_member(summary["creator"], "name", "creator", kind: :person)
647
647
  creator_member.nil? ? summary.delete("creator") : summary["creator"] = creator_member
648
- # Absent or empty is genuinely nothing to report — the reference's
649
- # +omitempty+ leaves an empty slice out of its summary too, so the key
650
- # goes. Anything else that is not an array of objects is a decode
651
- # failure there and fails the read here.
648
+ # Absent (or null) is nothing to report, so the key goes. A list the
649
+ # server sent stays, empty or not: the reference's +omitzero+ keeps a
650
+ # server-sent [] as [], so a to-do with no assignees reads
651
+ # "assignees" => [] in every SDK. Anything else that is not an array of
652
+ # objects is a decode failure there and fails the read here.
652
653
  #
653
654
  # This comment used to say a malformed "assignees" was read as absent
654
655
  # "for the same reason a malformed bucket is". That reason stopped being
655
656
  # true when the bucket started raising, and the sentence survived the
656
657
  # change it contradicted — which is the whole hazard of writing an
657
658
  # invariant down next to the code instead of into a test.
658
- if assignees.nil? || (assignees.is_a?(Array) && assignees.empty?)
659
+ if assignees.nil?
659
660
  summary.delete("assignees")
660
661
  else
661
662
  summary["assignees"] = read_assignees(assignees)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Basecamp
4
- VERSION = "0.35.0"
4
+ VERSION = "0.37.0"
5
5
  API_VERSION = "2026-11-05"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: basecamp-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.35.0
4
+ version: 0.37.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Basecamp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-05 00:00:00.000000000 Z
11
+ date: 2026-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday