basecamp-sdk 0.8.0 → 0.10.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 +4 -4
- data/README.md +2 -1
- data/lib/basecamp/client.rb +10 -0
- data/lib/basecamp/generated/metadata.json +343 -12
- data/lib/basecamp/generated/services/automation_service.rb +1 -1
- data/lib/basecamp/generated/services/base_service.rb +13 -0
- data/lib/basecamp/generated/services/campfires_service.rb +2 -2
- data/lib/basecamp/generated/services/card_columns_service.rb +3 -3
- data/lib/basecamp/generated/services/cards_service.rb +2 -2
- data/lib/basecamp/generated/services/checkins_service.rb +5 -4
- data/lib/basecamp/generated/services/client_approvals_service.rb +1 -1
- data/lib/basecamp/generated/services/client_correspondences_service.rb +1 -1
- data/lib/basecamp/generated/services/documents_service.rb +3 -2
- data/lib/basecamp/generated/services/everything_service.rb +179 -0
- data/lib/basecamp/generated/services/forwards_service.rb +1 -1
- data/lib/basecamp/generated/services/gauges_service.rb +4 -4
- data/lib/basecamp/generated/services/message_types_service.rb +20 -15
- data/lib/basecamp/generated/services/messages_service.rb +4 -3
- data/lib/basecamp/generated/services/my_assignments_service.rb +3 -3
- data/lib/basecamp/generated/services/my_notifications_service.rb +16 -2
- data/lib/basecamp/generated/services/people_service.rb +3 -3
- data/lib/basecamp/generated/services/projects_service.rb +2 -2
- data/lib/basecamp/generated/services/recordings_service.rb +2 -2
- data/lib/basecamp/generated/services/reports_service.rb +2 -2
- data/lib/basecamp/generated/services/schedules_service.rb +14 -5
- data/lib/basecamp/generated/services/search_service.rb +14 -3
- data/lib/basecamp/generated/services/templates_service.rb +4 -5
- data/lib/basecamp/generated/services/timesheets_service.rb +4 -4
- data/lib/basecamp/generated/services/todolists_service.rb +15 -3
- data/lib/basecamp/generated/services/todos_service.rb +1 -1
- data/lib/basecamp/generated/services/tools_service.rb +4 -3
- data/lib/basecamp/generated/services/uploads_service.rb +3 -2
- data/lib/basecamp/generated/services/webhooks_service.rb +2 -2
- data/lib/basecamp/generated/services/wormholes_service.rb +44 -0
- data/lib/basecamp/generated/types.rb +656 -71
- data/lib/basecamp/http.rb +2 -1
- data/lib/basecamp/services/cards_extensions.rb +67 -0
- data/lib/basecamp/version.rb +2 -2
- data/lib/basecamp.rb +5 -0
- data/scripts/generate-services.rb +39 -10
- data/scripts/generate-types.rb +60 -1
- metadata +5 -2
|
@@ -11,10 +11,11 @@ module Basecamp
|
|
|
11
11
|
# @param bucket_id [Integer] bucket id ID
|
|
12
12
|
# @param tool_type [String] Tool type to add to the project dock. Values: Chat::Transcript|Inbox|Kanban::Board|Message::Board|Questionnaire|Schedule|Todoset|Vault.
|
|
13
13
|
# @param title [String, nil] Title for the new tool. When omitted, Basecamp assigns the next available default title for the tool type.
|
|
14
|
+
# @param visible_to_clients [Boolean, nil] Create the tool already visible to clients. Honored only for tool types that manage their own client visibility (Chat::Transcript, Kanban::Board), which otherwise start hidden; every other tool type ignores it and inherits the project default.
|
|
14
15
|
# @return [Hash] response data
|
|
15
|
-
def create(bucket_id:, tool_type:, title: nil)
|
|
16
|
-
with_operation(service: "tools", operation: "create", is_mutation: true,
|
|
17
|
-
http_post("/buckets/#{bucket_id}/dock/tools.json", body: compact_params(tool_type: tool_type, title: title)).json
|
|
16
|
+
def create(bucket_id:, tool_type:, title: nil, visible_to_clients: nil)
|
|
17
|
+
with_operation(service: "tools", operation: "create", is_mutation: true, project_id: bucket_id) do
|
|
18
|
+
http_post("/buckets/#{bucket_id}/dock/tools.json", body: compact_params(tool_type: tool_type, title: title, visible_to_clients: visible_to_clients)).json
|
|
18
19
|
end
|
|
19
20
|
end
|
|
20
21
|
|
|
@@ -51,10 +51,11 @@ module Basecamp
|
|
|
51
51
|
# @param description [String, nil] description
|
|
52
52
|
# @param base_name [String, nil] base name
|
|
53
53
|
# @param subscriptions [Array, nil] subscriptions
|
|
54
|
+
# @param visible_to_clients [Boolean, nil] visible to clients
|
|
54
55
|
# @return [Hash] response data
|
|
55
|
-
def create(vault_id:, attachable_sgid:, description: nil, base_name: nil, subscriptions: nil)
|
|
56
|
+
def create(vault_id:, attachable_sgid:, description: nil, base_name: nil, subscriptions: nil, visible_to_clients: nil)
|
|
56
57
|
with_operation(service: "uploads", operation: "create", is_mutation: true, resource_id: vault_id) do
|
|
57
|
-
http_post("/vaults/#{vault_id}/uploads.json", body: compact_params(attachable_sgid: attachable_sgid, description: description, base_name: base_name, subscriptions: subscriptions)).json
|
|
58
|
+
http_post("/vaults/#{vault_id}/uploads.json", body: compact_params(attachable_sgid: attachable_sgid, description: description, base_name: base_name, subscriptions: subscriptions, visible_to_clients: visible_to_clients)).json
|
|
58
59
|
end
|
|
59
60
|
end
|
|
60
61
|
|
|
@@ -11,7 +11,7 @@ module Basecamp
|
|
|
11
11
|
# @param bucket_id [Integer] bucket id ID
|
|
12
12
|
# @return [Enumerator<Hash>] paginated results
|
|
13
13
|
def list(bucket_id:)
|
|
14
|
-
wrap_paginated(service: "webhooks", operation: "list", is_mutation: false,
|
|
14
|
+
wrap_paginated(service: "webhooks", operation: "list", is_mutation: false, project_id: bucket_id) do
|
|
15
15
|
paginate("/buckets/#{bucket_id}/webhooks.json")
|
|
16
16
|
end
|
|
17
17
|
end
|
|
@@ -23,7 +23,7 @@ module Basecamp
|
|
|
23
23
|
# @param active [Boolean, nil] active
|
|
24
24
|
# @return [Hash] response data
|
|
25
25
|
def create(bucket_id:, payload_url:, types:, active: nil)
|
|
26
|
-
with_operation(service: "webhooks", operation: "create", is_mutation: true,
|
|
26
|
+
with_operation(service: "webhooks", operation: "create", is_mutation: true, project_id: bucket_id) do
|
|
27
27
|
http_post("/buckets/#{bucket_id}/webhooks.json", body: compact_params(payload_url: payload_url, types: types, active: active)).json
|
|
28
28
|
end
|
|
29
29
|
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Basecamp
|
|
4
|
+
module Services
|
|
5
|
+
# Service for Wormholes operations
|
|
6
|
+
#
|
|
7
|
+
# @generated from OpenAPI spec
|
|
8
|
+
class WormholesService < BaseService
|
|
9
|
+
|
|
10
|
+
# Update a wormhole's destination column
|
|
11
|
+
# @param bucket_id [Integer] bucket id ID
|
|
12
|
+
# @param wormhole_id [Integer] wormhole id ID
|
|
13
|
+
# @param destination_recording_id [Integer] Id of the new destination column (on another accessible card table).
|
|
14
|
+
# @return [Hash] response data
|
|
15
|
+
def update(bucket_id:, wormhole_id:, destination_recording_id:)
|
|
16
|
+
with_operation(service: "wormholes", operation: "update", is_mutation: true, project_id: bucket_id, resource_id: wormhole_id) do
|
|
17
|
+
http_put("/buckets/#{bucket_id}/card_tables/wormholes/#{wormhole_id}", body: compact_params(destination_recording_id: destination_recording_id)).json
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Delete a wormhole
|
|
22
|
+
# @param bucket_id [Integer] bucket id ID
|
|
23
|
+
# @param wormhole_id [Integer] wormhole id ID
|
|
24
|
+
# @return [void]
|
|
25
|
+
def delete(bucket_id:, wormhole_id:)
|
|
26
|
+
with_operation(service: "wormholes", operation: "delete", is_mutation: true, project_id: bucket_id, resource_id: wormhole_id) do
|
|
27
|
+
http_delete("/buckets/#{bucket_id}/card_tables/wormholes/#{wormhole_id}")
|
|
28
|
+
nil
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create a wormhole linking this card table to a column on another card table.
|
|
33
|
+
# @param bucket_id [Integer] bucket id ID
|
|
34
|
+
# @param card_table_id [Integer] card table id ID
|
|
35
|
+
# @param destination_recording_id [Integer] Id of the destination column (on another accessible card table) to link to.
|
|
36
|
+
# @return [Hash] response data
|
|
37
|
+
def create(bucket_id:, card_table_id:, destination_recording_id:)
|
|
38
|
+
with_operation(service: "wormholes", operation: "create", is_mutation: true, project_id: bucket_id, resource_id: card_table_id) do
|
|
39
|
+
http_post("/buckets/#{bucket_id}/card_tables/#{card_table_id}/wormholes.json", body: compact_params(destination_recording_id: destination_recording_id)).json
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|