diff --git a/.surface b/.surface index 5da6e8ecc..2f6cfaddb 100644 --- a/.surface +++ b/.surface @@ -141,6 +141,8 @@ ARG basecamp config trust 00 [path] ARG basecamp config unset 00 ARG basecamp config untrust 00 [path] ARG basecamp docs archive 00 +ARG basecamp docs cloud-files create 00 [title] +ARG basecamp docs cloud-files update 00 ARG basecamp docs copy 00 ... ARG basecamp docs doc create 00 ARG basecamp docs doc create 01 [content] @@ -151,6 +153,8 @@ ARG basecamp docs documents create 01 [content] ARG basecamp docs download 00 <upload-id|url> ARG basecamp docs folder create 00 <name> ARG basecamp docs folders create 00 <name> +ARG basecamp docs google-docs create 00 [title] +ARG basecamp docs google-docs update 00 <id|url> ARG basecamp docs move 00 <id|url>... ARG basecamp docs new-version 00 <upload-id|url> ARG basecamp docs new-version 01 <file> @@ -166,6 +170,8 @@ ARG basecamp docs vault create 00 <name> ARG basecamp docs vaults create 00 <name> ARG basecamp docs versions 00 <upload_id|url> ARG basecamp documents archive 00 <id|url> +ARG basecamp documents cloud-files create 00 [title] +ARG basecamp documents cloud-files update 00 <id|url> ARG basecamp documents copy 00 <id|url>... ARG basecamp documents doc create 00 <title> ARG basecamp documents doc create 01 [content] @@ -176,6 +182,8 @@ ARG basecamp documents documents create 01 [content] ARG basecamp documents download 00 <upload-id|url> ARG basecamp documents folder create 00 <name> ARG basecamp documents folders create 00 <name> +ARG basecamp documents google-docs create 00 [title] +ARG basecamp documents google-docs update 00 <id|url> ARG basecamp documents move 00 <id|url>... ARG basecamp documents new-version 00 <upload-id|url> ARG basecamp documents new-version 01 <file> @@ -202,6 +210,8 @@ ARG basecamp external-links delete 00 <id|url> ARG basecamp external-links show 00 <id|url> ARG basecamp external-links update 00 <id|url> ARG basecamp file archive 00 <id|url> +ARG basecamp file cloud-files create 00 [title] +ARG basecamp file cloud-files update 00 <id|url> ARG basecamp file copy 00 <id|url>... ARG basecamp file doc create 00 <title> ARG basecamp file doc create 01 [content] @@ -212,6 +222,8 @@ ARG basecamp file documents create 01 [content] ARG basecamp file download 00 <upload-id|url> ARG basecamp file folder create 00 <name> ARG basecamp file folders create 00 <name> +ARG basecamp file google-docs create 00 [title] +ARG basecamp file google-docs update 00 <id|url> ARG basecamp file move 00 <id|url>... ARG basecamp file new-version 00 <upload-id|url> ARG basecamp file new-version 01 <file> @@ -227,6 +239,8 @@ ARG basecamp file vault create 00 <name> ARG basecamp file vaults create 00 <name> ARG basecamp file versions 00 <upload_id|url> ARG basecamp files archive 00 <id|url> +ARG basecamp files cloud-files create 00 [title] +ARG basecamp files cloud-files update 00 <id|url> ARG basecamp files copy 00 <id|url>... ARG basecamp files doc create 00 <title> ARG basecamp files doc create 01 [content] @@ -237,6 +251,8 @@ ARG basecamp files documents create 01 [content] ARG basecamp files download 00 <upload-id|url> ARG basecamp files folder create 00 <name> ARG basecamp files folders create 00 <name> +ARG basecamp files google-docs create 00 [title] +ARG basecamp files google-docs update 00 <id|url> ARG basecamp files move 00 <id|url>... ARG basecamp files new-version 00 <upload-id|url> ARG basecamp files new-version 01 <file> @@ -253,6 +269,8 @@ ARG basecamp files vaults create 00 <name> ARG basecamp files versions 00 <upload_id|url> ARG basecamp filings show 00 <filing_id> ARG basecamp folders archive 00 <id|url> +ARG basecamp folders cloud-files create 00 [title] +ARG basecamp folders cloud-files update 00 <id|url> ARG basecamp folders copy 00 <id|url>... ARG basecamp folders doc create 00 <title> ARG basecamp folders doc create 01 [content] @@ -263,6 +281,8 @@ ARG basecamp folders documents create 01 [content] ARG basecamp folders download 00 <upload-id|url> ARG basecamp folders folder create 00 <name> ARG basecamp folders folders create 00 <name> +ARG basecamp folders google-docs create 00 [title] +ARG basecamp folders google-docs update 00 <id|url> ARG basecamp folders move 00 <id|url>... ARG basecamp folders new-version 00 <upload-id|url> ARG basecamp folders new-version 01 <file> @@ -519,6 +539,8 @@ ARG basecamp uploads show 00 <id|url> ARG basecamp url 00 <url> ARG basecamp url parse 00 <url> ARG basecamp vault archive 00 <id|url> +ARG basecamp vault cloud-files create 00 [title] +ARG basecamp vault cloud-files update 00 <id|url> ARG basecamp vault copy 00 <id|url>... ARG basecamp vault doc create 00 <title> ARG basecamp vault doc create 01 [content] @@ -529,6 +551,8 @@ ARG basecamp vault documents create 01 [content] ARG basecamp vault download 00 <upload-id|url> ARG basecamp vault folder create 00 <name> ARG basecamp vault folders create 00 <name> +ARG basecamp vault google-docs create 00 [title] +ARG basecamp vault google-docs update 00 <id|url> ARG basecamp vault move 00 <id|url>... ARG basecamp vault new-version 00 <upload-id|url> ARG basecamp vault new-version 01 <file> @@ -544,6 +568,8 @@ ARG basecamp vault vault create 00 <name> ARG basecamp vault vaults create 00 <name> ARG basecamp vault versions 00 <upload_id|url> ARG basecamp vaults archive 00 <id|url> +ARG basecamp vaults cloud-files create 00 [title] +ARG basecamp vaults cloud-files update 00 <id|url> ARG basecamp vaults copy 00 <id|url>... ARG basecamp vaults doc create 00 <title> ARG basecamp vaults doc create 01 [content] @@ -554,6 +580,8 @@ ARG basecamp vaults documents create 01 [content] ARG basecamp vaults download 00 <upload-id|url> ARG basecamp vaults folder create 00 <name> ARG basecamp vaults folders create 00 <name> +ARG basecamp vaults google-docs create 00 [title] +ARG basecamp vaults google-docs update 00 <id|url> ARG basecamp vaults move 00 <id|url>... ARG basecamp vaults new-version 00 <upload-id|url> ARG basecamp vaults new-version 01 <file> @@ -769,6 +797,9 @@ CMD basecamp config unset CMD basecamp config untrust CMD basecamp docs CMD basecamp docs archive +CMD basecamp docs cloud-files +CMD basecamp docs cloud-files create +CMD basecamp docs cloud-files update CMD basecamp docs copy CMD basecamp docs doc CMD basecamp docs doc create @@ -786,6 +817,9 @@ CMD basecamp docs folder list CMD basecamp docs folders CMD basecamp docs folders create CMD basecamp docs folders list +CMD basecamp docs google-docs +CMD basecamp docs google-docs create +CMD basecamp docs google-docs update CMD basecamp docs list CMD basecamp docs move CMD basecamp docs new-version @@ -810,6 +844,9 @@ CMD basecamp docs versions CMD basecamp doctor CMD basecamp documents CMD basecamp documents archive +CMD basecamp documents cloud-files +CMD basecamp documents cloud-files create +CMD basecamp documents cloud-files update CMD basecamp documents copy CMD basecamp documents doc CMD basecamp documents doc create @@ -827,6 +864,9 @@ CMD basecamp documents folder list CMD basecamp documents folders CMD basecamp documents folders create CMD basecamp documents folders list +CMD basecamp documents google-docs +CMD basecamp documents google-docs create +CMD basecamp documents google-docs update CMD basecamp documents list CMD basecamp documents move CMD basecamp documents new-version @@ -870,6 +910,9 @@ CMD basecamp external-links show CMD basecamp external-links update CMD basecamp file CMD basecamp file archive +CMD basecamp file cloud-files +CMD basecamp file cloud-files create +CMD basecamp file cloud-files update CMD basecamp file copy CMD basecamp file doc CMD basecamp file doc create @@ -887,6 +930,9 @@ CMD basecamp file folder list CMD basecamp file folders CMD basecamp file folders create CMD basecamp file folders list +CMD basecamp file google-docs +CMD basecamp file google-docs create +CMD basecamp file google-docs update CMD basecamp file list CMD basecamp file move CMD basecamp file new-version @@ -910,6 +956,9 @@ CMD basecamp file vaults list CMD basecamp file versions CMD basecamp files CMD basecamp files archive +CMD basecamp files cloud-files +CMD basecamp files cloud-files create +CMD basecamp files cloud-files update CMD basecamp files copy CMD basecamp files doc CMD basecamp files doc create @@ -927,6 +976,9 @@ CMD basecamp files folder list CMD basecamp files folders CMD basecamp files folders create CMD basecamp files folders list +CMD basecamp files google-docs +CMD basecamp files google-docs create +CMD basecamp files google-docs update CMD basecamp files list CMD basecamp files move CMD basecamp files new-version @@ -952,6 +1004,9 @@ CMD basecamp filings CMD basecamp filings show CMD basecamp folders CMD basecamp folders archive +CMD basecamp folders cloud-files +CMD basecamp folders cloud-files create +CMD basecamp folders cloud-files update CMD basecamp folders copy CMD basecamp folders doc CMD basecamp folders doc create @@ -969,6 +1024,9 @@ CMD basecamp folders folder list CMD basecamp folders folders CMD basecamp folders folders create CMD basecamp folders folders list +CMD basecamp folders google-docs +CMD basecamp folders google-docs create +CMD basecamp folders google-docs update CMD basecamp folders list CMD basecamp folders move CMD basecamp folders new-version @@ -1313,6 +1371,9 @@ CMD basecamp url CMD basecamp url parse CMD basecamp vault CMD basecamp vault archive +CMD basecamp vault cloud-files +CMD basecamp vault cloud-files create +CMD basecamp vault cloud-files update CMD basecamp vault copy CMD basecamp vault doc CMD basecamp vault doc create @@ -1330,6 +1391,9 @@ CMD basecamp vault folder list CMD basecamp vault folders CMD basecamp vault folders create CMD basecamp vault folders list +CMD basecamp vault google-docs +CMD basecamp vault google-docs create +CMD basecamp vault google-docs update CMD basecamp vault list CMD basecamp vault move CMD basecamp vault new-version @@ -1353,6 +1417,9 @@ CMD basecamp vault vaults list CMD basecamp vault versions CMD basecamp vaults CMD basecamp vaults archive +CMD basecamp vaults cloud-files +CMD basecamp vaults cloud-files create +CMD basecamp vaults cloud-files update CMD basecamp vaults copy CMD basecamp vaults doc CMD basecamp vaults doc create @@ -1370,6 +1437,9 @@ CMD basecamp vaults folder list CMD basecamp vaults folders CMD basecamp vaults folders create CMD basecamp vaults folders list +CMD basecamp vaults google-docs +CMD basecamp vaults google-docs create +CMD basecamp vaults google-docs update CMD basecamp vaults list CMD basecamp vaults move CMD basecamp vaults new-version @@ -5797,6 +5867,88 @@ FLAG basecamp docs archive --styled type=bool FLAG basecamp docs archive --todolist type=string FLAG basecamp docs archive --vault type=string FLAG basecamp docs archive --verbose type=count +FLAG basecamp docs cloud-files --account type=string +FLAG basecamp docs cloud-files --agent type=bool +FLAG basecamp docs cloud-files --cache-dir type=string +FLAG basecamp docs cloud-files --count type=bool +FLAG basecamp docs cloud-files --folder type=string +FLAG basecamp docs cloud-files --help type=bool +FLAG basecamp docs cloud-files --hints type=bool +FLAG basecamp docs cloud-files --ids-only type=bool +FLAG basecamp docs cloud-files --in type=string +FLAG basecamp docs cloud-files --jq type=string +FLAG basecamp docs cloud-files --json type=bool +FLAG basecamp docs cloud-files --markdown type=bool +FLAG basecamp docs cloud-files --md type=bool +FLAG basecamp docs cloud-files --no-hints type=bool +FLAG basecamp docs cloud-files --no-stats type=bool +FLAG basecamp docs cloud-files --profile type=string +FLAG basecamp docs cloud-files --project type=string +FLAG basecamp docs cloud-files --quiet type=bool +FLAG basecamp docs cloud-files --stats type=bool +FLAG basecamp docs cloud-files --styled type=bool +FLAG basecamp docs cloud-files --todolist type=string +FLAG basecamp docs cloud-files --vault type=string +FLAG basecamp docs cloud-files --verbose type=count +FLAG basecamp docs cloud-files create --account type=string +FLAG basecamp docs cloud-files create --agent type=bool +FLAG basecamp docs cloud-files create --cache-dir type=string +FLAG basecamp docs cloud-files create --count type=bool +FLAG basecamp docs cloud-files create --description type=string +FLAG basecamp docs cloud-files create --folder type=string +FLAG basecamp docs cloud-files create --format type=string +FLAG basecamp docs cloud-files create --help type=bool +FLAG basecamp docs cloud-files create --hints type=bool +FLAG basecamp docs cloud-files create --ids-only type=bool +FLAG basecamp docs cloud-files create --in type=string +FLAG basecamp docs cloud-files create --jq type=string +FLAG basecamp docs cloud-files create --json type=bool +FLAG basecamp docs cloud-files create --markdown type=bool +FLAG basecamp docs cloud-files create --md type=bool +FLAG basecamp docs cloud-files create --no-hints type=bool +FLAG basecamp docs cloud-files create --no-stats type=bool +FLAG basecamp docs cloud-files create --no-subscribe type=bool +FLAG basecamp docs cloud-files create --profile type=string +FLAG basecamp docs cloud-files create --project type=string +FLAG basecamp docs cloud-files create --quiet type=bool +FLAG basecamp docs cloud-files create --service type=string +FLAG basecamp docs cloud-files create --stats type=bool +FLAG basecamp docs cloud-files create --styled type=bool +FLAG basecamp docs cloud-files create --subscribe type=string +FLAG basecamp docs cloud-files create --title type=string +FLAG basecamp docs cloud-files create --todolist type=string +FLAG basecamp docs cloud-files create --url type=string +FLAG basecamp docs cloud-files create --vault type=string +FLAG basecamp docs cloud-files create --verbose type=count +FLAG basecamp docs cloud-files create --visible-to-clients type=bool +FLAG basecamp docs cloud-files update --account type=string +FLAG basecamp docs cloud-files update --agent type=bool +FLAG basecamp docs cloud-files update --cache-dir type=string +FLAG basecamp docs cloud-files update --count type=bool +FLAG basecamp docs cloud-files update --description type=string +FLAG basecamp docs cloud-files update --folder type=string +FLAG basecamp docs cloud-files update --format type=string +FLAG basecamp docs cloud-files update --help type=bool +FLAG basecamp docs cloud-files update --hints type=bool +FLAG basecamp docs cloud-files update --ids-only type=bool +FLAG basecamp docs cloud-files update --in type=string +FLAG basecamp docs cloud-files update --jq type=string +FLAG basecamp docs cloud-files update --json type=bool +FLAG basecamp docs cloud-files update --markdown type=bool +FLAG basecamp docs cloud-files update --md type=bool +FLAG basecamp docs cloud-files update --no-hints type=bool +FLAG basecamp docs cloud-files update --no-stats type=bool +FLAG basecamp docs cloud-files update --profile type=string +FLAG basecamp docs cloud-files update --project type=string +FLAG basecamp docs cloud-files update --quiet type=bool +FLAG basecamp docs cloud-files update --service type=string +FLAG basecamp docs cloud-files update --stats type=bool +FLAG basecamp docs cloud-files update --styled type=bool +FLAG basecamp docs cloud-files update --title type=string +FLAG basecamp docs cloud-files update --todolist type=string +FLAG basecamp docs cloud-files update --url type=string +FLAG basecamp docs cloud-files update --vault type=string +FLAG basecamp docs cloud-files update --verbose type=count FLAG basecamp docs copy --account type=string FLAG basecamp docs copy --agent type=bool FLAG basecamp docs copy --cache-dir type=string @@ -6240,6 +6392,92 @@ FLAG basecamp docs folders list --styled type=bool FLAG basecamp docs folders list --todolist type=string FLAG basecamp docs folders list --vault type=string FLAG basecamp docs folders list --verbose type=count +FLAG basecamp docs google-docs --account type=string +FLAG basecamp docs google-docs --agent type=bool +FLAG basecamp docs google-docs --cache-dir type=string +FLAG basecamp docs google-docs --count type=bool +FLAG basecamp docs google-docs --folder type=string +FLAG basecamp docs google-docs --help type=bool +FLAG basecamp docs google-docs --hints type=bool +FLAG basecamp docs google-docs --ids-only type=bool +FLAG basecamp docs google-docs --in type=string +FLAG basecamp docs google-docs --jq type=string +FLAG basecamp docs google-docs --json type=bool +FLAG basecamp docs google-docs --markdown type=bool +FLAG basecamp docs google-docs --md type=bool +FLAG basecamp docs google-docs --no-hints type=bool +FLAG basecamp docs google-docs --no-stats type=bool +FLAG basecamp docs google-docs --profile type=string +FLAG basecamp docs google-docs --project type=string +FLAG basecamp docs google-docs --quiet type=bool +FLAG basecamp docs google-docs --stats type=bool +FLAG basecamp docs google-docs --styled type=bool +FLAG basecamp docs google-docs --todolist type=string +FLAG basecamp docs google-docs --vault type=string +FLAG basecamp docs google-docs --verbose type=count +FLAG basecamp docs google-docs create --account type=string +FLAG basecamp docs google-docs create --agent type=bool +FLAG basecamp docs google-docs create --cache-dir type=string +FLAG basecamp docs google-docs create --count type=bool +FLAG basecamp docs google-docs create --description type=string +FLAG basecamp docs google-docs create --draft type=bool +FLAG basecamp docs google-docs create --folder type=string +FLAG basecamp docs google-docs create --format type=string +FLAG basecamp docs google-docs create --help type=bool +FLAG basecamp docs google-docs create --hints type=bool +FLAG basecamp docs google-docs create --ids-only type=bool +FLAG basecamp docs google-docs create --in type=string +FLAG basecamp docs google-docs create --jq type=string +FLAG basecamp docs google-docs create --json type=bool +FLAG basecamp docs google-docs create --markdown type=bool +FLAG basecamp docs google-docs create --md type=bool +FLAG basecamp docs google-docs create --no-hints type=bool +FLAG basecamp docs google-docs create --no-stats type=bool +FLAG basecamp docs google-docs create --no-subscribe type=bool +FLAG basecamp docs google-docs create --profile type=string +FLAG basecamp docs google-docs create --project type=string +FLAG basecamp docs google-docs create --quiet type=bool +FLAG basecamp docs google-docs create --stats type=bool +FLAG basecamp docs google-docs create --styled type=bool +FLAG basecamp docs google-docs create --subscribe type=string +FLAG basecamp docs google-docs create --title type=string +FLAG basecamp docs google-docs create --todolist type=string +FLAG basecamp docs google-docs create --type type=string +FLAG basecamp docs google-docs create --url type=string +FLAG basecamp docs google-docs create --vault type=string +FLAG basecamp docs google-docs create --verbose type=count +FLAG basecamp docs google-docs create --visible-to-clients type=bool +FLAG basecamp docs google-docs update --account type=string +FLAG basecamp docs google-docs update --agent type=bool +FLAG basecamp docs google-docs update --cache-dir type=string +FLAG basecamp docs google-docs update --count type=bool +FLAG basecamp docs google-docs update --description type=string +FLAG basecamp docs google-docs update --folder type=string +FLAG basecamp docs google-docs update --format type=string +FLAG basecamp docs google-docs update --help type=bool +FLAG basecamp docs google-docs update --hints type=bool +FLAG basecamp docs google-docs update --ids-only type=bool +FLAG basecamp docs google-docs update --in type=string +FLAG basecamp docs google-docs update --jq type=string +FLAG basecamp docs google-docs update --json type=bool +FLAG basecamp docs google-docs update --markdown type=bool +FLAG basecamp docs google-docs update --md type=bool +FLAG basecamp docs google-docs update --no-hints type=bool +FLAG basecamp docs google-docs update --no-stats type=bool +FLAG basecamp docs google-docs update --no-subscribe type=bool +FLAG basecamp docs google-docs update --profile type=string +FLAG basecamp docs google-docs update --project type=string +FLAG basecamp docs google-docs update --publish type=bool +FLAG basecamp docs google-docs update --quiet type=bool +FLAG basecamp docs google-docs update --stats type=bool +FLAG basecamp docs google-docs update --styled type=bool +FLAG basecamp docs google-docs update --subscribe type=string +FLAG basecamp docs google-docs update --title type=string +FLAG basecamp docs google-docs update --todolist type=string +FLAG basecamp docs google-docs update --type type=string +FLAG basecamp docs google-docs update --url type=string +FLAG basecamp docs google-docs update --vault type=string +FLAG basecamp docs google-docs update --verbose type=count FLAG basecamp docs list --account type=string FLAG basecamp docs list --agent type=bool FLAG basecamp docs list --all type=bool @@ -6848,6 +7086,88 @@ FLAG basecamp documents archive --styled type=bool FLAG basecamp documents archive --todolist type=string FLAG basecamp documents archive --vault type=string FLAG basecamp documents archive --verbose type=count +FLAG basecamp documents cloud-files --account type=string +FLAG basecamp documents cloud-files --agent type=bool +FLAG basecamp documents cloud-files --cache-dir type=string +FLAG basecamp documents cloud-files --count type=bool +FLAG basecamp documents cloud-files --folder type=string +FLAG basecamp documents cloud-files --help type=bool +FLAG basecamp documents cloud-files --hints type=bool +FLAG basecamp documents cloud-files --ids-only type=bool +FLAG basecamp documents cloud-files --in type=string +FLAG basecamp documents cloud-files --jq type=string +FLAG basecamp documents cloud-files --json type=bool +FLAG basecamp documents cloud-files --markdown type=bool +FLAG basecamp documents cloud-files --md type=bool +FLAG basecamp documents cloud-files --no-hints type=bool +FLAG basecamp documents cloud-files --no-stats type=bool +FLAG basecamp documents cloud-files --profile type=string +FLAG basecamp documents cloud-files --project type=string +FLAG basecamp documents cloud-files --quiet type=bool +FLAG basecamp documents cloud-files --stats type=bool +FLAG basecamp documents cloud-files --styled type=bool +FLAG basecamp documents cloud-files --todolist type=string +FLAG basecamp documents cloud-files --vault type=string +FLAG basecamp documents cloud-files --verbose type=count +FLAG basecamp documents cloud-files create --account type=string +FLAG basecamp documents cloud-files create --agent type=bool +FLAG basecamp documents cloud-files create --cache-dir type=string +FLAG basecamp documents cloud-files create --count type=bool +FLAG basecamp documents cloud-files create --description type=string +FLAG basecamp documents cloud-files create --folder type=string +FLAG basecamp documents cloud-files create --format type=string +FLAG basecamp documents cloud-files create --help type=bool +FLAG basecamp documents cloud-files create --hints type=bool +FLAG basecamp documents cloud-files create --ids-only type=bool +FLAG basecamp documents cloud-files create --in type=string +FLAG basecamp documents cloud-files create --jq type=string +FLAG basecamp documents cloud-files create --json type=bool +FLAG basecamp documents cloud-files create --markdown type=bool +FLAG basecamp documents cloud-files create --md type=bool +FLAG basecamp documents cloud-files create --no-hints type=bool +FLAG basecamp documents cloud-files create --no-stats type=bool +FLAG basecamp documents cloud-files create --no-subscribe type=bool +FLAG basecamp documents cloud-files create --profile type=string +FLAG basecamp documents cloud-files create --project type=string +FLAG basecamp documents cloud-files create --quiet type=bool +FLAG basecamp documents cloud-files create --service type=string +FLAG basecamp documents cloud-files create --stats type=bool +FLAG basecamp documents cloud-files create --styled type=bool +FLAG basecamp documents cloud-files create --subscribe type=string +FLAG basecamp documents cloud-files create --title type=string +FLAG basecamp documents cloud-files create --todolist type=string +FLAG basecamp documents cloud-files create --url type=string +FLAG basecamp documents cloud-files create --vault type=string +FLAG basecamp documents cloud-files create --verbose type=count +FLAG basecamp documents cloud-files create --visible-to-clients type=bool +FLAG basecamp documents cloud-files update --account type=string +FLAG basecamp documents cloud-files update --agent type=bool +FLAG basecamp documents cloud-files update --cache-dir type=string +FLAG basecamp documents cloud-files update --count type=bool +FLAG basecamp documents cloud-files update --description type=string +FLAG basecamp documents cloud-files update --folder type=string +FLAG basecamp documents cloud-files update --format type=string +FLAG basecamp documents cloud-files update --help type=bool +FLAG basecamp documents cloud-files update --hints type=bool +FLAG basecamp documents cloud-files update --ids-only type=bool +FLAG basecamp documents cloud-files update --in type=string +FLAG basecamp documents cloud-files update --jq type=string +FLAG basecamp documents cloud-files update --json type=bool +FLAG basecamp documents cloud-files update --markdown type=bool +FLAG basecamp documents cloud-files update --md type=bool +FLAG basecamp documents cloud-files update --no-hints type=bool +FLAG basecamp documents cloud-files update --no-stats type=bool +FLAG basecamp documents cloud-files update --profile type=string +FLAG basecamp documents cloud-files update --project type=string +FLAG basecamp documents cloud-files update --quiet type=bool +FLAG basecamp documents cloud-files update --service type=string +FLAG basecamp documents cloud-files update --stats type=bool +FLAG basecamp documents cloud-files update --styled type=bool +FLAG basecamp documents cloud-files update --title type=string +FLAG basecamp documents cloud-files update --todolist type=string +FLAG basecamp documents cloud-files update --url type=string +FLAG basecamp documents cloud-files update --vault type=string +FLAG basecamp documents cloud-files update --verbose type=count FLAG basecamp documents copy --account type=string FLAG basecamp documents copy --agent type=bool FLAG basecamp documents copy --cache-dir type=string @@ -7291,6 +7611,92 @@ FLAG basecamp documents folders list --styled type=bool FLAG basecamp documents folders list --todolist type=string FLAG basecamp documents folders list --vault type=string FLAG basecamp documents folders list --verbose type=count +FLAG basecamp documents google-docs --account type=string +FLAG basecamp documents google-docs --agent type=bool +FLAG basecamp documents google-docs --cache-dir type=string +FLAG basecamp documents google-docs --count type=bool +FLAG basecamp documents google-docs --folder type=string +FLAG basecamp documents google-docs --help type=bool +FLAG basecamp documents google-docs --hints type=bool +FLAG basecamp documents google-docs --ids-only type=bool +FLAG basecamp documents google-docs --in type=string +FLAG basecamp documents google-docs --jq type=string +FLAG basecamp documents google-docs --json type=bool +FLAG basecamp documents google-docs --markdown type=bool +FLAG basecamp documents google-docs --md type=bool +FLAG basecamp documents google-docs --no-hints type=bool +FLAG basecamp documents google-docs --no-stats type=bool +FLAG basecamp documents google-docs --profile type=string +FLAG basecamp documents google-docs --project type=string +FLAG basecamp documents google-docs --quiet type=bool +FLAG basecamp documents google-docs --stats type=bool +FLAG basecamp documents google-docs --styled type=bool +FLAG basecamp documents google-docs --todolist type=string +FLAG basecamp documents google-docs --vault type=string +FLAG basecamp documents google-docs --verbose type=count +FLAG basecamp documents google-docs create --account type=string +FLAG basecamp documents google-docs create --agent type=bool +FLAG basecamp documents google-docs create --cache-dir type=string +FLAG basecamp documents google-docs create --count type=bool +FLAG basecamp documents google-docs create --description type=string +FLAG basecamp documents google-docs create --draft type=bool +FLAG basecamp documents google-docs create --folder type=string +FLAG basecamp documents google-docs create --format type=string +FLAG basecamp documents google-docs create --help type=bool +FLAG basecamp documents google-docs create --hints type=bool +FLAG basecamp documents google-docs create --ids-only type=bool +FLAG basecamp documents google-docs create --in type=string +FLAG basecamp documents google-docs create --jq type=string +FLAG basecamp documents google-docs create --json type=bool +FLAG basecamp documents google-docs create --markdown type=bool +FLAG basecamp documents google-docs create --md type=bool +FLAG basecamp documents google-docs create --no-hints type=bool +FLAG basecamp documents google-docs create --no-stats type=bool +FLAG basecamp documents google-docs create --no-subscribe type=bool +FLAG basecamp documents google-docs create --profile type=string +FLAG basecamp documents google-docs create --project type=string +FLAG basecamp documents google-docs create --quiet type=bool +FLAG basecamp documents google-docs create --stats type=bool +FLAG basecamp documents google-docs create --styled type=bool +FLAG basecamp documents google-docs create --subscribe type=string +FLAG basecamp documents google-docs create --title type=string +FLAG basecamp documents google-docs create --todolist type=string +FLAG basecamp documents google-docs create --type type=string +FLAG basecamp documents google-docs create --url type=string +FLAG basecamp documents google-docs create --vault type=string +FLAG basecamp documents google-docs create --verbose type=count +FLAG basecamp documents google-docs create --visible-to-clients type=bool +FLAG basecamp documents google-docs update --account type=string +FLAG basecamp documents google-docs update --agent type=bool +FLAG basecamp documents google-docs update --cache-dir type=string +FLAG basecamp documents google-docs update --count type=bool +FLAG basecamp documents google-docs update --description type=string +FLAG basecamp documents google-docs update --folder type=string +FLAG basecamp documents google-docs update --format type=string +FLAG basecamp documents google-docs update --help type=bool +FLAG basecamp documents google-docs update --hints type=bool +FLAG basecamp documents google-docs update --ids-only type=bool +FLAG basecamp documents google-docs update --in type=string +FLAG basecamp documents google-docs update --jq type=string +FLAG basecamp documents google-docs update --json type=bool +FLAG basecamp documents google-docs update --markdown type=bool +FLAG basecamp documents google-docs update --md type=bool +FLAG basecamp documents google-docs update --no-hints type=bool +FLAG basecamp documents google-docs update --no-stats type=bool +FLAG basecamp documents google-docs update --no-subscribe type=bool +FLAG basecamp documents google-docs update --profile type=string +FLAG basecamp documents google-docs update --project type=string +FLAG basecamp documents google-docs update --publish type=bool +FLAG basecamp documents google-docs update --quiet type=bool +FLAG basecamp documents google-docs update --stats type=bool +FLAG basecamp documents google-docs update --styled type=bool +FLAG basecamp documents google-docs update --subscribe type=string +FLAG basecamp documents google-docs update --title type=string +FLAG basecamp documents google-docs update --todolist type=string +FLAG basecamp documents google-docs update --type type=string +FLAG basecamp documents google-docs update --url type=string +FLAG basecamp documents google-docs update --vault type=string +FLAG basecamp documents google-docs update --verbose type=count FLAG basecamp documents list --account type=string FLAG basecamp documents list --agent type=bool FLAG basecamp documents list --all type=bool @@ -8339,6 +8745,88 @@ FLAG basecamp file archive --styled type=bool FLAG basecamp file archive --todolist type=string FLAG basecamp file archive --vault type=string FLAG basecamp file archive --verbose type=count +FLAG basecamp file cloud-files --account type=string +FLAG basecamp file cloud-files --agent type=bool +FLAG basecamp file cloud-files --cache-dir type=string +FLAG basecamp file cloud-files --count type=bool +FLAG basecamp file cloud-files --folder type=string +FLAG basecamp file cloud-files --help type=bool +FLAG basecamp file cloud-files --hints type=bool +FLAG basecamp file cloud-files --ids-only type=bool +FLAG basecamp file cloud-files --in type=string +FLAG basecamp file cloud-files --jq type=string +FLAG basecamp file cloud-files --json type=bool +FLAG basecamp file cloud-files --markdown type=bool +FLAG basecamp file cloud-files --md type=bool +FLAG basecamp file cloud-files --no-hints type=bool +FLAG basecamp file cloud-files --no-stats type=bool +FLAG basecamp file cloud-files --profile type=string +FLAG basecamp file cloud-files --project type=string +FLAG basecamp file cloud-files --quiet type=bool +FLAG basecamp file cloud-files --stats type=bool +FLAG basecamp file cloud-files --styled type=bool +FLAG basecamp file cloud-files --todolist type=string +FLAG basecamp file cloud-files --vault type=string +FLAG basecamp file cloud-files --verbose type=count +FLAG basecamp file cloud-files create --account type=string +FLAG basecamp file cloud-files create --agent type=bool +FLAG basecamp file cloud-files create --cache-dir type=string +FLAG basecamp file cloud-files create --count type=bool +FLAG basecamp file cloud-files create --description type=string +FLAG basecamp file cloud-files create --folder type=string +FLAG basecamp file cloud-files create --format type=string +FLAG basecamp file cloud-files create --help type=bool +FLAG basecamp file cloud-files create --hints type=bool +FLAG basecamp file cloud-files create --ids-only type=bool +FLAG basecamp file cloud-files create --in type=string +FLAG basecamp file cloud-files create --jq type=string +FLAG basecamp file cloud-files create --json type=bool +FLAG basecamp file cloud-files create --markdown type=bool +FLAG basecamp file cloud-files create --md type=bool +FLAG basecamp file cloud-files create --no-hints type=bool +FLAG basecamp file cloud-files create --no-stats type=bool +FLAG basecamp file cloud-files create --no-subscribe type=bool +FLAG basecamp file cloud-files create --profile type=string +FLAG basecamp file cloud-files create --project type=string +FLAG basecamp file cloud-files create --quiet type=bool +FLAG basecamp file cloud-files create --service type=string +FLAG basecamp file cloud-files create --stats type=bool +FLAG basecamp file cloud-files create --styled type=bool +FLAG basecamp file cloud-files create --subscribe type=string +FLAG basecamp file cloud-files create --title type=string +FLAG basecamp file cloud-files create --todolist type=string +FLAG basecamp file cloud-files create --url type=string +FLAG basecamp file cloud-files create --vault type=string +FLAG basecamp file cloud-files create --verbose type=count +FLAG basecamp file cloud-files create --visible-to-clients type=bool +FLAG basecamp file cloud-files update --account type=string +FLAG basecamp file cloud-files update --agent type=bool +FLAG basecamp file cloud-files update --cache-dir type=string +FLAG basecamp file cloud-files update --count type=bool +FLAG basecamp file cloud-files update --description type=string +FLAG basecamp file cloud-files update --folder type=string +FLAG basecamp file cloud-files update --format type=string +FLAG basecamp file cloud-files update --help type=bool +FLAG basecamp file cloud-files update --hints type=bool +FLAG basecamp file cloud-files update --ids-only type=bool +FLAG basecamp file cloud-files update --in type=string +FLAG basecamp file cloud-files update --jq type=string +FLAG basecamp file cloud-files update --json type=bool +FLAG basecamp file cloud-files update --markdown type=bool +FLAG basecamp file cloud-files update --md type=bool +FLAG basecamp file cloud-files update --no-hints type=bool +FLAG basecamp file cloud-files update --no-stats type=bool +FLAG basecamp file cloud-files update --profile type=string +FLAG basecamp file cloud-files update --project type=string +FLAG basecamp file cloud-files update --quiet type=bool +FLAG basecamp file cloud-files update --service type=string +FLAG basecamp file cloud-files update --stats type=bool +FLAG basecamp file cloud-files update --styled type=bool +FLAG basecamp file cloud-files update --title type=string +FLAG basecamp file cloud-files update --todolist type=string +FLAG basecamp file cloud-files update --url type=string +FLAG basecamp file cloud-files update --vault type=string +FLAG basecamp file cloud-files update --verbose type=count FLAG basecamp file copy --account type=string FLAG basecamp file copy --agent type=bool FLAG basecamp file copy --cache-dir type=string @@ -8782,6 +9270,92 @@ FLAG basecamp file folders list --styled type=bool FLAG basecamp file folders list --todolist type=string FLAG basecamp file folders list --vault type=string FLAG basecamp file folders list --verbose type=count +FLAG basecamp file google-docs --account type=string +FLAG basecamp file google-docs --agent type=bool +FLAG basecamp file google-docs --cache-dir type=string +FLAG basecamp file google-docs --count type=bool +FLAG basecamp file google-docs --folder type=string +FLAG basecamp file google-docs --help type=bool +FLAG basecamp file google-docs --hints type=bool +FLAG basecamp file google-docs --ids-only type=bool +FLAG basecamp file google-docs --in type=string +FLAG basecamp file google-docs --jq type=string +FLAG basecamp file google-docs --json type=bool +FLAG basecamp file google-docs --markdown type=bool +FLAG basecamp file google-docs --md type=bool +FLAG basecamp file google-docs --no-hints type=bool +FLAG basecamp file google-docs --no-stats type=bool +FLAG basecamp file google-docs --profile type=string +FLAG basecamp file google-docs --project type=string +FLAG basecamp file google-docs --quiet type=bool +FLAG basecamp file google-docs --stats type=bool +FLAG basecamp file google-docs --styled type=bool +FLAG basecamp file google-docs --todolist type=string +FLAG basecamp file google-docs --vault type=string +FLAG basecamp file google-docs --verbose type=count +FLAG basecamp file google-docs create --account type=string +FLAG basecamp file google-docs create --agent type=bool +FLAG basecamp file google-docs create --cache-dir type=string +FLAG basecamp file google-docs create --count type=bool +FLAG basecamp file google-docs create --description type=string +FLAG basecamp file google-docs create --draft type=bool +FLAG basecamp file google-docs create --folder type=string +FLAG basecamp file google-docs create --format type=string +FLAG basecamp file google-docs create --help type=bool +FLAG basecamp file google-docs create --hints type=bool +FLAG basecamp file google-docs create --ids-only type=bool +FLAG basecamp file google-docs create --in type=string +FLAG basecamp file google-docs create --jq type=string +FLAG basecamp file google-docs create --json type=bool +FLAG basecamp file google-docs create --markdown type=bool +FLAG basecamp file google-docs create --md type=bool +FLAG basecamp file google-docs create --no-hints type=bool +FLAG basecamp file google-docs create --no-stats type=bool +FLAG basecamp file google-docs create --no-subscribe type=bool +FLAG basecamp file google-docs create --profile type=string +FLAG basecamp file google-docs create --project type=string +FLAG basecamp file google-docs create --quiet type=bool +FLAG basecamp file google-docs create --stats type=bool +FLAG basecamp file google-docs create --styled type=bool +FLAG basecamp file google-docs create --subscribe type=string +FLAG basecamp file google-docs create --title type=string +FLAG basecamp file google-docs create --todolist type=string +FLAG basecamp file google-docs create --type type=string +FLAG basecamp file google-docs create --url type=string +FLAG basecamp file google-docs create --vault type=string +FLAG basecamp file google-docs create --verbose type=count +FLAG basecamp file google-docs create --visible-to-clients type=bool +FLAG basecamp file google-docs update --account type=string +FLAG basecamp file google-docs update --agent type=bool +FLAG basecamp file google-docs update --cache-dir type=string +FLAG basecamp file google-docs update --count type=bool +FLAG basecamp file google-docs update --description type=string +FLAG basecamp file google-docs update --folder type=string +FLAG basecamp file google-docs update --format type=string +FLAG basecamp file google-docs update --help type=bool +FLAG basecamp file google-docs update --hints type=bool +FLAG basecamp file google-docs update --ids-only type=bool +FLAG basecamp file google-docs update --in type=string +FLAG basecamp file google-docs update --jq type=string +FLAG basecamp file google-docs update --json type=bool +FLAG basecamp file google-docs update --markdown type=bool +FLAG basecamp file google-docs update --md type=bool +FLAG basecamp file google-docs update --no-hints type=bool +FLAG basecamp file google-docs update --no-stats type=bool +FLAG basecamp file google-docs update --no-subscribe type=bool +FLAG basecamp file google-docs update --profile type=string +FLAG basecamp file google-docs update --project type=string +FLAG basecamp file google-docs update --publish type=bool +FLAG basecamp file google-docs update --quiet type=bool +FLAG basecamp file google-docs update --stats type=bool +FLAG basecamp file google-docs update --styled type=bool +FLAG basecamp file google-docs update --subscribe type=string +FLAG basecamp file google-docs update --title type=string +FLAG basecamp file google-docs update --todolist type=string +FLAG basecamp file google-docs update --type type=string +FLAG basecamp file google-docs update --url type=string +FLAG basecamp file google-docs update --vault type=string +FLAG basecamp file google-docs update --verbose type=count FLAG basecamp file list --account type=string FLAG basecamp file list --agent type=bool FLAG basecamp file list --all type=bool @@ -9369,6 +9943,88 @@ FLAG basecamp files archive --styled type=bool FLAG basecamp files archive --todolist type=string FLAG basecamp files archive --vault type=string FLAG basecamp files archive --verbose type=count +FLAG basecamp files cloud-files --account type=string +FLAG basecamp files cloud-files --agent type=bool +FLAG basecamp files cloud-files --cache-dir type=string +FLAG basecamp files cloud-files --count type=bool +FLAG basecamp files cloud-files --folder type=string +FLAG basecamp files cloud-files --help type=bool +FLAG basecamp files cloud-files --hints type=bool +FLAG basecamp files cloud-files --ids-only type=bool +FLAG basecamp files cloud-files --in type=string +FLAG basecamp files cloud-files --jq type=string +FLAG basecamp files cloud-files --json type=bool +FLAG basecamp files cloud-files --markdown type=bool +FLAG basecamp files cloud-files --md type=bool +FLAG basecamp files cloud-files --no-hints type=bool +FLAG basecamp files cloud-files --no-stats type=bool +FLAG basecamp files cloud-files --profile type=string +FLAG basecamp files cloud-files --project type=string +FLAG basecamp files cloud-files --quiet type=bool +FLAG basecamp files cloud-files --stats type=bool +FLAG basecamp files cloud-files --styled type=bool +FLAG basecamp files cloud-files --todolist type=string +FLAG basecamp files cloud-files --vault type=string +FLAG basecamp files cloud-files --verbose type=count +FLAG basecamp files cloud-files create --account type=string +FLAG basecamp files cloud-files create --agent type=bool +FLAG basecamp files cloud-files create --cache-dir type=string +FLAG basecamp files cloud-files create --count type=bool +FLAG basecamp files cloud-files create --description type=string +FLAG basecamp files cloud-files create --folder type=string +FLAG basecamp files cloud-files create --format type=string +FLAG basecamp files cloud-files create --help type=bool +FLAG basecamp files cloud-files create --hints type=bool +FLAG basecamp files cloud-files create --ids-only type=bool +FLAG basecamp files cloud-files create --in type=string +FLAG basecamp files cloud-files create --jq type=string +FLAG basecamp files cloud-files create --json type=bool +FLAG basecamp files cloud-files create --markdown type=bool +FLAG basecamp files cloud-files create --md type=bool +FLAG basecamp files cloud-files create --no-hints type=bool +FLAG basecamp files cloud-files create --no-stats type=bool +FLAG basecamp files cloud-files create --no-subscribe type=bool +FLAG basecamp files cloud-files create --profile type=string +FLAG basecamp files cloud-files create --project type=string +FLAG basecamp files cloud-files create --quiet type=bool +FLAG basecamp files cloud-files create --service type=string +FLAG basecamp files cloud-files create --stats type=bool +FLAG basecamp files cloud-files create --styled type=bool +FLAG basecamp files cloud-files create --subscribe type=string +FLAG basecamp files cloud-files create --title type=string +FLAG basecamp files cloud-files create --todolist type=string +FLAG basecamp files cloud-files create --url type=string +FLAG basecamp files cloud-files create --vault type=string +FLAG basecamp files cloud-files create --verbose type=count +FLAG basecamp files cloud-files create --visible-to-clients type=bool +FLAG basecamp files cloud-files update --account type=string +FLAG basecamp files cloud-files update --agent type=bool +FLAG basecamp files cloud-files update --cache-dir type=string +FLAG basecamp files cloud-files update --count type=bool +FLAG basecamp files cloud-files update --description type=string +FLAG basecamp files cloud-files update --folder type=string +FLAG basecamp files cloud-files update --format type=string +FLAG basecamp files cloud-files update --help type=bool +FLAG basecamp files cloud-files update --hints type=bool +FLAG basecamp files cloud-files update --ids-only type=bool +FLAG basecamp files cloud-files update --in type=string +FLAG basecamp files cloud-files update --jq type=string +FLAG basecamp files cloud-files update --json type=bool +FLAG basecamp files cloud-files update --markdown type=bool +FLAG basecamp files cloud-files update --md type=bool +FLAG basecamp files cloud-files update --no-hints type=bool +FLAG basecamp files cloud-files update --no-stats type=bool +FLAG basecamp files cloud-files update --profile type=string +FLAG basecamp files cloud-files update --project type=string +FLAG basecamp files cloud-files update --quiet type=bool +FLAG basecamp files cloud-files update --service type=string +FLAG basecamp files cloud-files update --stats type=bool +FLAG basecamp files cloud-files update --styled type=bool +FLAG basecamp files cloud-files update --title type=string +FLAG basecamp files cloud-files update --todolist type=string +FLAG basecamp files cloud-files update --url type=string +FLAG basecamp files cloud-files update --vault type=string +FLAG basecamp files cloud-files update --verbose type=count FLAG basecamp files copy --account type=string FLAG basecamp files copy --agent type=bool FLAG basecamp files copy --cache-dir type=string @@ -9812,6 +10468,92 @@ FLAG basecamp files folders list --styled type=bool FLAG basecamp files folders list --todolist type=string FLAG basecamp files folders list --vault type=string FLAG basecamp files folders list --verbose type=count +FLAG basecamp files google-docs --account type=string +FLAG basecamp files google-docs --agent type=bool +FLAG basecamp files google-docs --cache-dir type=string +FLAG basecamp files google-docs --count type=bool +FLAG basecamp files google-docs --folder type=string +FLAG basecamp files google-docs --help type=bool +FLAG basecamp files google-docs --hints type=bool +FLAG basecamp files google-docs --ids-only type=bool +FLAG basecamp files google-docs --in type=string +FLAG basecamp files google-docs --jq type=string +FLAG basecamp files google-docs --json type=bool +FLAG basecamp files google-docs --markdown type=bool +FLAG basecamp files google-docs --md type=bool +FLAG basecamp files google-docs --no-hints type=bool +FLAG basecamp files google-docs --no-stats type=bool +FLAG basecamp files google-docs --profile type=string +FLAG basecamp files google-docs --project type=string +FLAG basecamp files google-docs --quiet type=bool +FLAG basecamp files google-docs --stats type=bool +FLAG basecamp files google-docs --styled type=bool +FLAG basecamp files google-docs --todolist type=string +FLAG basecamp files google-docs --vault type=string +FLAG basecamp files google-docs --verbose type=count +FLAG basecamp files google-docs create --account type=string +FLAG basecamp files google-docs create --agent type=bool +FLAG basecamp files google-docs create --cache-dir type=string +FLAG basecamp files google-docs create --count type=bool +FLAG basecamp files google-docs create --description type=string +FLAG basecamp files google-docs create --draft type=bool +FLAG basecamp files google-docs create --folder type=string +FLAG basecamp files google-docs create --format type=string +FLAG basecamp files google-docs create --help type=bool +FLAG basecamp files google-docs create --hints type=bool +FLAG basecamp files google-docs create --ids-only type=bool +FLAG basecamp files google-docs create --in type=string +FLAG basecamp files google-docs create --jq type=string +FLAG basecamp files google-docs create --json type=bool +FLAG basecamp files google-docs create --markdown type=bool +FLAG basecamp files google-docs create --md type=bool +FLAG basecamp files google-docs create --no-hints type=bool +FLAG basecamp files google-docs create --no-stats type=bool +FLAG basecamp files google-docs create --no-subscribe type=bool +FLAG basecamp files google-docs create --profile type=string +FLAG basecamp files google-docs create --project type=string +FLAG basecamp files google-docs create --quiet type=bool +FLAG basecamp files google-docs create --stats type=bool +FLAG basecamp files google-docs create --styled type=bool +FLAG basecamp files google-docs create --subscribe type=string +FLAG basecamp files google-docs create --title type=string +FLAG basecamp files google-docs create --todolist type=string +FLAG basecamp files google-docs create --type type=string +FLAG basecamp files google-docs create --url type=string +FLAG basecamp files google-docs create --vault type=string +FLAG basecamp files google-docs create --verbose type=count +FLAG basecamp files google-docs create --visible-to-clients type=bool +FLAG basecamp files google-docs update --account type=string +FLAG basecamp files google-docs update --agent type=bool +FLAG basecamp files google-docs update --cache-dir type=string +FLAG basecamp files google-docs update --count type=bool +FLAG basecamp files google-docs update --description type=string +FLAG basecamp files google-docs update --folder type=string +FLAG basecamp files google-docs update --format type=string +FLAG basecamp files google-docs update --help type=bool +FLAG basecamp files google-docs update --hints type=bool +FLAG basecamp files google-docs update --ids-only type=bool +FLAG basecamp files google-docs update --in type=string +FLAG basecamp files google-docs update --jq type=string +FLAG basecamp files google-docs update --json type=bool +FLAG basecamp files google-docs update --markdown type=bool +FLAG basecamp files google-docs update --md type=bool +FLAG basecamp files google-docs update --no-hints type=bool +FLAG basecamp files google-docs update --no-stats type=bool +FLAG basecamp files google-docs update --no-subscribe type=bool +FLAG basecamp files google-docs update --profile type=string +FLAG basecamp files google-docs update --project type=string +FLAG basecamp files google-docs update --publish type=bool +FLAG basecamp files google-docs update --quiet type=bool +FLAG basecamp files google-docs update --stats type=bool +FLAG basecamp files google-docs update --styled type=bool +FLAG basecamp files google-docs update --subscribe type=string +FLAG basecamp files google-docs update --title type=string +FLAG basecamp files google-docs update --todolist type=string +FLAG basecamp files google-docs update --type type=string +FLAG basecamp files google-docs update --url type=string +FLAG basecamp files google-docs update --vault type=string +FLAG basecamp files google-docs update --verbose type=count FLAG basecamp files list --account type=string FLAG basecamp files list --agent type=bool FLAG basecamp files list --all type=bool @@ -10441,6 +11183,88 @@ FLAG basecamp folders archive --styled type=bool FLAG basecamp folders archive --todolist type=string FLAG basecamp folders archive --vault type=string FLAG basecamp folders archive --verbose type=count +FLAG basecamp folders cloud-files --account type=string +FLAG basecamp folders cloud-files --agent type=bool +FLAG basecamp folders cloud-files --cache-dir type=string +FLAG basecamp folders cloud-files --count type=bool +FLAG basecamp folders cloud-files --folder type=string +FLAG basecamp folders cloud-files --help type=bool +FLAG basecamp folders cloud-files --hints type=bool +FLAG basecamp folders cloud-files --ids-only type=bool +FLAG basecamp folders cloud-files --in type=string +FLAG basecamp folders cloud-files --jq type=string +FLAG basecamp folders cloud-files --json type=bool +FLAG basecamp folders cloud-files --markdown type=bool +FLAG basecamp folders cloud-files --md type=bool +FLAG basecamp folders cloud-files --no-hints type=bool +FLAG basecamp folders cloud-files --no-stats type=bool +FLAG basecamp folders cloud-files --profile type=string +FLAG basecamp folders cloud-files --project type=string +FLAG basecamp folders cloud-files --quiet type=bool +FLAG basecamp folders cloud-files --stats type=bool +FLAG basecamp folders cloud-files --styled type=bool +FLAG basecamp folders cloud-files --todolist type=string +FLAG basecamp folders cloud-files --vault type=string +FLAG basecamp folders cloud-files --verbose type=count +FLAG basecamp folders cloud-files create --account type=string +FLAG basecamp folders cloud-files create --agent type=bool +FLAG basecamp folders cloud-files create --cache-dir type=string +FLAG basecamp folders cloud-files create --count type=bool +FLAG basecamp folders cloud-files create --description type=string +FLAG basecamp folders cloud-files create --folder type=string +FLAG basecamp folders cloud-files create --format type=string +FLAG basecamp folders cloud-files create --help type=bool +FLAG basecamp folders cloud-files create --hints type=bool +FLAG basecamp folders cloud-files create --ids-only type=bool +FLAG basecamp folders cloud-files create --in type=string +FLAG basecamp folders cloud-files create --jq type=string +FLAG basecamp folders cloud-files create --json type=bool +FLAG basecamp folders cloud-files create --markdown type=bool +FLAG basecamp folders cloud-files create --md type=bool +FLAG basecamp folders cloud-files create --no-hints type=bool +FLAG basecamp folders cloud-files create --no-stats type=bool +FLAG basecamp folders cloud-files create --no-subscribe type=bool +FLAG basecamp folders cloud-files create --profile type=string +FLAG basecamp folders cloud-files create --project type=string +FLAG basecamp folders cloud-files create --quiet type=bool +FLAG basecamp folders cloud-files create --service type=string +FLAG basecamp folders cloud-files create --stats type=bool +FLAG basecamp folders cloud-files create --styled type=bool +FLAG basecamp folders cloud-files create --subscribe type=string +FLAG basecamp folders cloud-files create --title type=string +FLAG basecamp folders cloud-files create --todolist type=string +FLAG basecamp folders cloud-files create --url type=string +FLAG basecamp folders cloud-files create --vault type=string +FLAG basecamp folders cloud-files create --verbose type=count +FLAG basecamp folders cloud-files create --visible-to-clients type=bool +FLAG basecamp folders cloud-files update --account type=string +FLAG basecamp folders cloud-files update --agent type=bool +FLAG basecamp folders cloud-files update --cache-dir type=string +FLAG basecamp folders cloud-files update --count type=bool +FLAG basecamp folders cloud-files update --description type=string +FLAG basecamp folders cloud-files update --folder type=string +FLAG basecamp folders cloud-files update --format type=string +FLAG basecamp folders cloud-files update --help type=bool +FLAG basecamp folders cloud-files update --hints type=bool +FLAG basecamp folders cloud-files update --ids-only type=bool +FLAG basecamp folders cloud-files update --in type=string +FLAG basecamp folders cloud-files update --jq type=string +FLAG basecamp folders cloud-files update --json type=bool +FLAG basecamp folders cloud-files update --markdown type=bool +FLAG basecamp folders cloud-files update --md type=bool +FLAG basecamp folders cloud-files update --no-hints type=bool +FLAG basecamp folders cloud-files update --no-stats type=bool +FLAG basecamp folders cloud-files update --profile type=string +FLAG basecamp folders cloud-files update --project type=string +FLAG basecamp folders cloud-files update --quiet type=bool +FLAG basecamp folders cloud-files update --service type=string +FLAG basecamp folders cloud-files update --stats type=bool +FLAG basecamp folders cloud-files update --styled type=bool +FLAG basecamp folders cloud-files update --title type=string +FLAG basecamp folders cloud-files update --todolist type=string +FLAG basecamp folders cloud-files update --url type=string +FLAG basecamp folders cloud-files update --vault type=string +FLAG basecamp folders cloud-files update --verbose type=count FLAG basecamp folders copy --account type=string FLAG basecamp folders copy --agent type=bool FLAG basecamp folders copy --cache-dir type=string @@ -10884,6 +11708,92 @@ FLAG basecamp folders folders list --styled type=bool FLAG basecamp folders folders list --todolist type=string FLAG basecamp folders folders list --vault type=string FLAG basecamp folders folders list --verbose type=count +FLAG basecamp folders google-docs --account type=string +FLAG basecamp folders google-docs --agent type=bool +FLAG basecamp folders google-docs --cache-dir type=string +FLAG basecamp folders google-docs --count type=bool +FLAG basecamp folders google-docs --folder type=string +FLAG basecamp folders google-docs --help type=bool +FLAG basecamp folders google-docs --hints type=bool +FLAG basecamp folders google-docs --ids-only type=bool +FLAG basecamp folders google-docs --in type=string +FLAG basecamp folders google-docs --jq type=string +FLAG basecamp folders google-docs --json type=bool +FLAG basecamp folders google-docs --markdown type=bool +FLAG basecamp folders google-docs --md type=bool +FLAG basecamp folders google-docs --no-hints type=bool +FLAG basecamp folders google-docs --no-stats type=bool +FLAG basecamp folders google-docs --profile type=string +FLAG basecamp folders google-docs --project type=string +FLAG basecamp folders google-docs --quiet type=bool +FLAG basecamp folders google-docs --stats type=bool +FLAG basecamp folders google-docs --styled type=bool +FLAG basecamp folders google-docs --todolist type=string +FLAG basecamp folders google-docs --vault type=string +FLAG basecamp folders google-docs --verbose type=count +FLAG basecamp folders google-docs create --account type=string +FLAG basecamp folders google-docs create --agent type=bool +FLAG basecamp folders google-docs create --cache-dir type=string +FLAG basecamp folders google-docs create --count type=bool +FLAG basecamp folders google-docs create --description type=string +FLAG basecamp folders google-docs create --draft type=bool +FLAG basecamp folders google-docs create --folder type=string +FLAG basecamp folders google-docs create --format type=string +FLAG basecamp folders google-docs create --help type=bool +FLAG basecamp folders google-docs create --hints type=bool +FLAG basecamp folders google-docs create --ids-only type=bool +FLAG basecamp folders google-docs create --in type=string +FLAG basecamp folders google-docs create --jq type=string +FLAG basecamp folders google-docs create --json type=bool +FLAG basecamp folders google-docs create --markdown type=bool +FLAG basecamp folders google-docs create --md type=bool +FLAG basecamp folders google-docs create --no-hints type=bool +FLAG basecamp folders google-docs create --no-stats type=bool +FLAG basecamp folders google-docs create --no-subscribe type=bool +FLAG basecamp folders google-docs create --profile type=string +FLAG basecamp folders google-docs create --project type=string +FLAG basecamp folders google-docs create --quiet type=bool +FLAG basecamp folders google-docs create --stats type=bool +FLAG basecamp folders google-docs create --styled type=bool +FLAG basecamp folders google-docs create --subscribe type=string +FLAG basecamp folders google-docs create --title type=string +FLAG basecamp folders google-docs create --todolist type=string +FLAG basecamp folders google-docs create --type type=string +FLAG basecamp folders google-docs create --url type=string +FLAG basecamp folders google-docs create --vault type=string +FLAG basecamp folders google-docs create --verbose type=count +FLAG basecamp folders google-docs create --visible-to-clients type=bool +FLAG basecamp folders google-docs update --account type=string +FLAG basecamp folders google-docs update --agent type=bool +FLAG basecamp folders google-docs update --cache-dir type=string +FLAG basecamp folders google-docs update --count type=bool +FLAG basecamp folders google-docs update --description type=string +FLAG basecamp folders google-docs update --folder type=string +FLAG basecamp folders google-docs update --format type=string +FLAG basecamp folders google-docs update --help type=bool +FLAG basecamp folders google-docs update --hints type=bool +FLAG basecamp folders google-docs update --ids-only type=bool +FLAG basecamp folders google-docs update --in type=string +FLAG basecamp folders google-docs update --jq type=string +FLAG basecamp folders google-docs update --json type=bool +FLAG basecamp folders google-docs update --markdown type=bool +FLAG basecamp folders google-docs update --md type=bool +FLAG basecamp folders google-docs update --no-hints type=bool +FLAG basecamp folders google-docs update --no-stats type=bool +FLAG basecamp folders google-docs update --no-subscribe type=bool +FLAG basecamp folders google-docs update --profile type=string +FLAG basecamp folders google-docs update --project type=string +FLAG basecamp folders google-docs update --publish type=bool +FLAG basecamp folders google-docs update --quiet type=bool +FLAG basecamp folders google-docs update --stats type=bool +FLAG basecamp folders google-docs update --styled type=bool +FLAG basecamp folders google-docs update --subscribe type=string +FLAG basecamp folders google-docs update --title type=string +FLAG basecamp folders google-docs update --todolist type=string +FLAG basecamp folders google-docs update --type type=string +FLAG basecamp folders google-docs update --url type=string +FLAG basecamp folders google-docs update --vault type=string +FLAG basecamp folders google-docs update --verbose type=count FLAG basecamp folders list --account type=string FLAG basecamp folders list --agent type=bool FLAG basecamp folders list --all type=bool @@ -18897,6 +19807,88 @@ FLAG basecamp vault archive --styled type=bool FLAG basecamp vault archive --todolist type=string FLAG basecamp vault archive --vault type=string FLAG basecamp vault archive --verbose type=count +FLAG basecamp vault cloud-files --account type=string +FLAG basecamp vault cloud-files --agent type=bool +FLAG basecamp vault cloud-files --cache-dir type=string +FLAG basecamp vault cloud-files --count type=bool +FLAG basecamp vault cloud-files --folder type=string +FLAG basecamp vault cloud-files --help type=bool +FLAG basecamp vault cloud-files --hints type=bool +FLAG basecamp vault cloud-files --ids-only type=bool +FLAG basecamp vault cloud-files --in type=string +FLAG basecamp vault cloud-files --jq type=string +FLAG basecamp vault cloud-files --json type=bool +FLAG basecamp vault cloud-files --markdown type=bool +FLAG basecamp vault cloud-files --md type=bool +FLAG basecamp vault cloud-files --no-hints type=bool +FLAG basecamp vault cloud-files --no-stats type=bool +FLAG basecamp vault cloud-files --profile type=string +FLAG basecamp vault cloud-files --project type=string +FLAG basecamp vault cloud-files --quiet type=bool +FLAG basecamp vault cloud-files --stats type=bool +FLAG basecamp vault cloud-files --styled type=bool +FLAG basecamp vault cloud-files --todolist type=string +FLAG basecamp vault cloud-files --vault type=string +FLAG basecamp vault cloud-files --verbose type=count +FLAG basecamp vault cloud-files create --account type=string +FLAG basecamp vault cloud-files create --agent type=bool +FLAG basecamp vault cloud-files create --cache-dir type=string +FLAG basecamp vault cloud-files create --count type=bool +FLAG basecamp vault cloud-files create --description type=string +FLAG basecamp vault cloud-files create --folder type=string +FLAG basecamp vault cloud-files create --format type=string +FLAG basecamp vault cloud-files create --help type=bool +FLAG basecamp vault cloud-files create --hints type=bool +FLAG basecamp vault cloud-files create --ids-only type=bool +FLAG basecamp vault cloud-files create --in type=string +FLAG basecamp vault cloud-files create --jq type=string +FLAG basecamp vault cloud-files create --json type=bool +FLAG basecamp vault cloud-files create --markdown type=bool +FLAG basecamp vault cloud-files create --md type=bool +FLAG basecamp vault cloud-files create --no-hints type=bool +FLAG basecamp vault cloud-files create --no-stats type=bool +FLAG basecamp vault cloud-files create --no-subscribe type=bool +FLAG basecamp vault cloud-files create --profile type=string +FLAG basecamp vault cloud-files create --project type=string +FLAG basecamp vault cloud-files create --quiet type=bool +FLAG basecamp vault cloud-files create --service type=string +FLAG basecamp vault cloud-files create --stats type=bool +FLAG basecamp vault cloud-files create --styled type=bool +FLAG basecamp vault cloud-files create --subscribe type=string +FLAG basecamp vault cloud-files create --title type=string +FLAG basecamp vault cloud-files create --todolist type=string +FLAG basecamp vault cloud-files create --url type=string +FLAG basecamp vault cloud-files create --vault type=string +FLAG basecamp vault cloud-files create --verbose type=count +FLAG basecamp vault cloud-files create --visible-to-clients type=bool +FLAG basecamp vault cloud-files update --account type=string +FLAG basecamp vault cloud-files update --agent type=bool +FLAG basecamp vault cloud-files update --cache-dir type=string +FLAG basecamp vault cloud-files update --count type=bool +FLAG basecamp vault cloud-files update --description type=string +FLAG basecamp vault cloud-files update --folder type=string +FLAG basecamp vault cloud-files update --format type=string +FLAG basecamp vault cloud-files update --help type=bool +FLAG basecamp vault cloud-files update --hints type=bool +FLAG basecamp vault cloud-files update --ids-only type=bool +FLAG basecamp vault cloud-files update --in type=string +FLAG basecamp vault cloud-files update --jq type=string +FLAG basecamp vault cloud-files update --json type=bool +FLAG basecamp vault cloud-files update --markdown type=bool +FLAG basecamp vault cloud-files update --md type=bool +FLAG basecamp vault cloud-files update --no-hints type=bool +FLAG basecamp vault cloud-files update --no-stats type=bool +FLAG basecamp vault cloud-files update --profile type=string +FLAG basecamp vault cloud-files update --project type=string +FLAG basecamp vault cloud-files update --quiet type=bool +FLAG basecamp vault cloud-files update --service type=string +FLAG basecamp vault cloud-files update --stats type=bool +FLAG basecamp vault cloud-files update --styled type=bool +FLAG basecamp vault cloud-files update --title type=string +FLAG basecamp vault cloud-files update --todolist type=string +FLAG basecamp vault cloud-files update --url type=string +FLAG basecamp vault cloud-files update --vault type=string +FLAG basecamp vault cloud-files update --verbose type=count FLAG basecamp vault copy --account type=string FLAG basecamp vault copy --agent type=bool FLAG basecamp vault copy --cache-dir type=string @@ -19340,6 +20332,92 @@ FLAG basecamp vault folders list --styled type=bool FLAG basecamp vault folders list --todolist type=string FLAG basecamp vault folders list --vault type=string FLAG basecamp vault folders list --verbose type=count +FLAG basecamp vault google-docs --account type=string +FLAG basecamp vault google-docs --agent type=bool +FLAG basecamp vault google-docs --cache-dir type=string +FLAG basecamp vault google-docs --count type=bool +FLAG basecamp vault google-docs --folder type=string +FLAG basecamp vault google-docs --help type=bool +FLAG basecamp vault google-docs --hints type=bool +FLAG basecamp vault google-docs --ids-only type=bool +FLAG basecamp vault google-docs --in type=string +FLAG basecamp vault google-docs --jq type=string +FLAG basecamp vault google-docs --json type=bool +FLAG basecamp vault google-docs --markdown type=bool +FLAG basecamp vault google-docs --md type=bool +FLAG basecamp vault google-docs --no-hints type=bool +FLAG basecamp vault google-docs --no-stats type=bool +FLAG basecamp vault google-docs --profile type=string +FLAG basecamp vault google-docs --project type=string +FLAG basecamp vault google-docs --quiet type=bool +FLAG basecamp vault google-docs --stats type=bool +FLAG basecamp vault google-docs --styled type=bool +FLAG basecamp vault google-docs --todolist type=string +FLAG basecamp vault google-docs --vault type=string +FLAG basecamp vault google-docs --verbose type=count +FLAG basecamp vault google-docs create --account type=string +FLAG basecamp vault google-docs create --agent type=bool +FLAG basecamp vault google-docs create --cache-dir type=string +FLAG basecamp vault google-docs create --count type=bool +FLAG basecamp vault google-docs create --description type=string +FLAG basecamp vault google-docs create --draft type=bool +FLAG basecamp vault google-docs create --folder type=string +FLAG basecamp vault google-docs create --format type=string +FLAG basecamp vault google-docs create --help type=bool +FLAG basecamp vault google-docs create --hints type=bool +FLAG basecamp vault google-docs create --ids-only type=bool +FLAG basecamp vault google-docs create --in type=string +FLAG basecamp vault google-docs create --jq type=string +FLAG basecamp vault google-docs create --json type=bool +FLAG basecamp vault google-docs create --markdown type=bool +FLAG basecamp vault google-docs create --md type=bool +FLAG basecamp vault google-docs create --no-hints type=bool +FLAG basecamp vault google-docs create --no-stats type=bool +FLAG basecamp vault google-docs create --no-subscribe type=bool +FLAG basecamp vault google-docs create --profile type=string +FLAG basecamp vault google-docs create --project type=string +FLAG basecamp vault google-docs create --quiet type=bool +FLAG basecamp vault google-docs create --stats type=bool +FLAG basecamp vault google-docs create --styled type=bool +FLAG basecamp vault google-docs create --subscribe type=string +FLAG basecamp vault google-docs create --title type=string +FLAG basecamp vault google-docs create --todolist type=string +FLAG basecamp vault google-docs create --type type=string +FLAG basecamp vault google-docs create --url type=string +FLAG basecamp vault google-docs create --vault type=string +FLAG basecamp vault google-docs create --verbose type=count +FLAG basecamp vault google-docs create --visible-to-clients type=bool +FLAG basecamp vault google-docs update --account type=string +FLAG basecamp vault google-docs update --agent type=bool +FLAG basecamp vault google-docs update --cache-dir type=string +FLAG basecamp vault google-docs update --count type=bool +FLAG basecamp vault google-docs update --description type=string +FLAG basecamp vault google-docs update --folder type=string +FLAG basecamp vault google-docs update --format type=string +FLAG basecamp vault google-docs update --help type=bool +FLAG basecamp vault google-docs update --hints type=bool +FLAG basecamp vault google-docs update --ids-only type=bool +FLAG basecamp vault google-docs update --in type=string +FLAG basecamp vault google-docs update --jq type=string +FLAG basecamp vault google-docs update --json type=bool +FLAG basecamp vault google-docs update --markdown type=bool +FLAG basecamp vault google-docs update --md type=bool +FLAG basecamp vault google-docs update --no-hints type=bool +FLAG basecamp vault google-docs update --no-stats type=bool +FLAG basecamp vault google-docs update --no-subscribe type=bool +FLAG basecamp vault google-docs update --profile type=string +FLAG basecamp vault google-docs update --project type=string +FLAG basecamp vault google-docs update --publish type=bool +FLAG basecamp vault google-docs update --quiet type=bool +FLAG basecamp vault google-docs update --stats type=bool +FLAG basecamp vault google-docs update --styled type=bool +FLAG basecamp vault google-docs update --subscribe type=string +FLAG basecamp vault google-docs update --title type=string +FLAG basecamp vault google-docs update --todolist type=string +FLAG basecamp vault google-docs update --type type=string +FLAG basecamp vault google-docs update --url type=string +FLAG basecamp vault google-docs update --vault type=string +FLAG basecamp vault google-docs update --verbose type=count FLAG basecamp vault list --account type=string FLAG basecamp vault list --agent type=bool FLAG basecamp vault list --all type=bool @@ -19927,6 +21005,88 @@ FLAG basecamp vaults archive --styled type=bool FLAG basecamp vaults archive --todolist type=string FLAG basecamp vaults archive --vault type=string FLAG basecamp vaults archive --verbose type=count +FLAG basecamp vaults cloud-files --account type=string +FLAG basecamp vaults cloud-files --agent type=bool +FLAG basecamp vaults cloud-files --cache-dir type=string +FLAG basecamp vaults cloud-files --count type=bool +FLAG basecamp vaults cloud-files --folder type=string +FLAG basecamp vaults cloud-files --help type=bool +FLAG basecamp vaults cloud-files --hints type=bool +FLAG basecamp vaults cloud-files --ids-only type=bool +FLAG basecamp vaults cloud-files --in type=string +FLAG basecamp vaults cloud-files --jq type=string +FLAG basecamp vaults cloud-files --json type=bool +FLAG basecamp vaults cloud-files --markdown type=bool +FLAG basecamp vaults cloud-files --md type=bool +FLAG basecamp vaults cloud-files --no-hints type=bool +FLAG basecamp vaults cloud-files --no-stats type=bool +FLAG basecamp vaults cloud-files --profile type=string +FLAG basecamp vaults cloud-files --project type=string +FLAG basecamp vaults cloud-files --quiet type=bool +FLAG basecamp vaults cloud-files --stats type=bool +FLAG basecamp vaults cloud-files --styled type=bool +FLAG basecamp vaults cloud-files --todolist type=string +FLAG basecamp vaults cloud-files --vault type=string +FLAG basecamp vaults cloud-files --verbose type=count +FLAG basecamp vaults cloud-files create --account type=string +FLAG basecamp vaults cloud-files create --agent type=bool +FLAG basecamp vaults cloud-files create --cache-dir type=string +FLAG basecamp vaults cloud-files create --count type=bool +FLAG basecamp vaults cloud-files create --description type=string +FLAG basecamp vaults cloud-files create --folder type=string +FLAG basecamp vaults cloud-files create --format type=string +FLAG basecamp vaults cloud-files create --help type=bool +FLAG basecamp vaults cloud-files create --hints type=bool +FLAG basecamp vaults cloud-files create --ids-only type=bool +FLAG basecamp vaults cloud-files create --in type=string +FLAG basecamp vaults cloud-files create --jq type=string +FLAG basecamp vaults cloud-files create --json type=bool +FLAG basecamp vaults cloud-files create --markdown type=bool +FLAG basecamp vaults cloud-files create --md type=bool +FLAG basecamp vaults cloud-files create --no-hints type=bool +FLAG basecamp vaults cloud-files create --no-stats type=bool +FLAG basecamp vaults cloud-files create --no-subscribe type=bool +FLAG basecamp vaults cloud-files create --profile type=string +FLAG basecamp vaults cloud-files create --project type=string +FLAG basecamp vaults cloud-files create --quiet type=bool +FLAG basecamp vaults cloud-files create --service type=string +FLAG basecamp vaults cloud-files create --stats type=bool +FLAG basecamp vaults cloud-files create --styled type=bool +FLAG basecamp vaults cloud-files create --subscribe type=string +FLAG basecamp vaults cloud-files create --title type=string +FLAG basecamp vaults cloud-files create --todolist type=string +FLAG basecamp vaults cloud-files create --url type=string +FLAG basecamp vaults cloud-files create --vault type=string +FLAG basecamp vaults cloud-files create --verbose type=count +FLAG basecamp vaults cloud-files create --visible-to-clients type=bool +FLAG basecamp vaults cloud-files update --account type=string +FLAG basecamp vaults cloud-files update --agent type=bool +FLAG basecamp vaults cloud-files update --cache-dir type=string +FLAG basecamp vaults cloud-files update --count type=bool +FLAG basecamp vaults cloud-files update --description type=string +FLAG basecamp vaults cloud-files update --folder type=string +FLAG basecamp vaults cloud-files update --format type=string +FLAG basecamp vaults cloud-files update --help type=bool +FLAG basecamp vaults cloud-files update --hints type=bool +FLAG basecamp vaults cloud-files update --ids-only type=bool +FLAG basecamp vaults cloud-files update --in type=string +FLAG basecamp vaults cloud-files update --jq type=string +FLAG basecamp vaults cloud-files update --json type=bool +FLAG basecamp vaults cloud-files update --markdown type=bool +FLAG basecamp vaults cloud-files update --md type=bool +FLAG basecamp vaults cloud-files update --no-hints type=bool +FLAG basecamp vaults cloud-files update --no-stats type=bool +FLAG basecamp vaults cloud-files update --profile type=string +FLAG basecamp vaults cloud-files update --project type=string +FLAG basecamp vaults cloud-files update --quiet type=bool +FLAG basecamp vaults cloud-files update --service type=string +FLAG basecamp vaults cloud-files update --stats type=bool +FLAG basecamp vaults cloud-files update --styled type=bool +FLAG basecamp vaults cloud-files update --title type=string +FLAG basecamp vaults cloud-files update --todolist type=string +FLAG basecamp vaults cloud-files update --url type=string +FLAG basecamp vaults cloud-files update --vault type=string +FLAG basecamp vaults cloud-files update --verbose type=count FLAG basecamp vaults copy --account type=string FLAG basecamp vaults copy --agent type=bool FLAG basecamp vaults copy --cache-dir type=string @@ -20370,6 +21530,92 @@ FLAG basecamp vaults folders list --styled type=bool FLAG basecamp vaults folders list --todolist type=string FLAG basecamp vaults folders list --vault type=string FLAG basecamp vaults folders list --verbose type=count +FLAG basecamp vaults google-docs --account type=string +FLAG basecamp vaults google-docs --agent type=bool +FLAG basecamp vaults google-docs --cache-dir type=string +FLAG basecamp vaults google-docs --count type=bool +FLAG basecamp vaults google-docs --folder type=string +FLAG basecamp vaults google-docs --help type=bool +FLAG basecamp vaults google-docs --hints type=bool +FLAG basecamp vaults google-docs --ids-only type=bool +FLAG basecamp vaults google-docs --in type=string +FLAG basecamp vaults google-docs --jq type=string +FLAG basecamp vaults google-docs --json type=bool +FLAG basecamp vaults google-docs --markdown type=bool +FLAG basecamp vaults google-docs --md type=bool +FLAG basecamp vaults google-docs --no-hints type=bool +FLAG basecamp vaults google-docs --no-stats type=bool +FLAG basecamp vaults google-docs --profile type=string +FLAG basecamp vaults google-docs --project type=string +FLAG basecamp vaults google-docs --quiet type=bool +FLAG basecamp vaults google-docs --stats type=bool +FLAG basecamp vaults google-docs --styled type=bool +FLAG basecamp vaults google-docs --todolist type=string +FLAG basecamp vaults google-docs --vault type=string +FLAG basecamp vaults google-docs --verbose type=count +FLAG basecamp vaults google-docs create --account type=string +FLAG basecamp vaults google-docs create --agent type=bool +FLAG basecamp vaults google-docs create --cache-dir type=string +FLAG basecamp vaults google-docs create --count type=bool +FLAG basecamp vaults google-docs create --description type=string +FLAG basecamp vaults google-docs create --draft type=bool +FLAG basecamp vaults google-docs create --folder type=string +FLAG basecamp vaults google-docs create --format type=string +FLAG basecamp vaults google-docs create --help type=bool +FLAG basecamp vaults google-docs create --hints type=bool +FLAG basecamp vaults google-docs create --ids-only type=bool +FLAG basecamp vaults google-docs create --in type=string +FLAG basecamp vaults google-docs create --jq type=string +FLAG basecamp vaults google-docs create --json type=bool +FLAG basecamp vaults google-docs create --markdown type=bool +FLAG basecamp vaults google-docs create --md type=bool +FLAG basecamp vaults google-docs create --no-hints type=bool +FLAG basecamp vaults google-docs create --no-stats type=bool +FLAG basecamp vaults google-docs create --no-subscribe type=bool +FLAG basecamp vaults google-docs create --profile type=string +FLAG basecamp vaults google-docs create --project type=string +FLAG basecamp vaults google-docs create --quiet type=bool +FLAG basecamp vaults google-docs create --stats type=bool +FLAG basecamp vaults google-docs create --styled type=bool +FLAG basecamp vaults google-docs create --subscribe type=string +FLAG basecamp vaults google-docs create --title type=string +FLAG basecamp vaults google-docs create --todolist type=string +FLAG basecamp vaults google-docs create --type type=string +FLAG basecamp vaults google-docs create --url type=string +FLAG basecamp vaults google-docs create --vault type=string +FLAG basecamp vaults google-docs create --verbose type=count +FLAG basecamp vaults google-docs create --visible-to-clients type=bool +FLAG basecamp vaults google-docs update --account type=string +FLAG basecamp vaults google-docs update --agent type=bool +FLAG basecamp vaults google-docs update --cache-dir type=string +FLAG basecamp vaults google-docs update --count type=bool +FLAG basecamp vaults google-docs update --description type=string +FLAG basecamp vaults google-docs update --folder type=string +FLAG basecamp vaults google-docs update --format type=string +FLAG basecamp vaults google-docs update --help type=bool +FLAG basecamp vaults google-docs update --hints type=bool +FLAG basecamp vaults google-docs update --ids-only type=bool +FLAG basecamp vaults google-docs update --in type=string +FLAG basecamp vaults google-docs update --jq type=string +FLAG basecamp vaults google-docs update --json type=bool +FLAG basecamp vaults google-docs update --markdown type=bool +FLAG basecamp vaults google-docs update --md type=bool +FLAG basecamp vaults google-docs update --no-hints type=bool +FLAG basecamp vaults google-docs update --no-stats type=bool +FLAG basecamp vaults google-docs update --no-subscribe type=bool +FLAG basecamp vaults google-docs update --profile type=string +FLAG basecamp vaults google-docs update --project type=string +FLAG basecamp vaults google-docs update --publish type=bool +FLAG basecamp vaults google-docs update --quiet type=bool +FLAG basecamp vaults google-docs update --stats type=bool +FLAG basecamp vaults google-docs update --styled type=bool +FLAG basecamp vaults google-docs update --subscribe type=string +FLAG basecamp vaults google-docs update --title type=string +FLAG basecamp vaults google-docs update --todolist type=string +FLAG basecamp vaults google-docs update --type type=string +FLAG basecamp vaults google-docs update --url type=string +FLAG basecamp vaults google-docs update --vault type=string +FLAG basecamp vaults google-docs update --verbose type=count FLAG basecamp vaults list --account type=string FLAG basecamp vaults list --agent type=bool FLAG basecamp vaults list --all type=bool @@ -21386,6 +22632,9 @@ SUB basecamp config unset SUB basecamp config untrust SUB basecamp docs SUB basecamp docs archive +SUB basecamp docs cloud-files +SUB basecamp docs cloud-files create +SUB basecamp docs cloud-files update SUB basecamp docs copy SUB basecamp docs doc SUB basecamp docs doc create @@ -21403,6 +22652,9 @@ SUB basecamp docs folder list SUB basecamp docs folders SUB basecamp docs folders create SUB basecamp docs folders list +SUB basecamp docs google-docs +SUB basecamp docs google-docs create +SUB basecamp docs google-docs update SUB basecamp docs list SUB basecamp docs move SUB basecamp docs new-version @@ -21427,6 +22679,9 @@ SUB basecamp docs versions SUB basecamp doctor SUB basecamp documents SUB basecamp documents archive +SUB basecamp documents cloud-files +SUB basecamp documents cloud-files create +SUB basecamp documents cloud-files update SUB basecamp documents copy SUB basecamp documents doc SUB basecamp documents doc create @@ -21444,6 +22699,9 @@ SUB basecamp documents folder list SUB basecamp documents folders SUB basecamp documents folders create SUB basecamp documents folders list +SUB basecamp documents google-docs +SUB basecamp documents google-docs create +SUB basecamp documents google-docs update SUB basecamp documents list SUB basecamp documents move SUB basecamp documents new-version @@ -21487,6 +22745,9 @@ SUB basecamp external-links show SUB basecamp external-links update SUB basecamp file SUB basecamp file archive +SUB basecamp file cloud-files +SUB basecamp file cloud-files create +SUB basecamp file cloud-files update SUB basecamp file copy SUB basecamp file doc SUB basecamp file doc create @@ -21504,6 +22765,9 @@ SUB basecamp file folder list SUB basecamp file folders SUB basecamp file folders create SUB basecamp file folders list +SUB basecamp file google-docs +SUB basecamp file google-docs create +SUB basecamp file google-docs update SUB basecamp file list SUB basecamp file move SUB basecamp file new-version @@ -21527,6 +22791,9 @@ SUB basecamp file vaults list SUB basecamp file versions SUB basecamp files SUB basecamp files archive +SUB basecamp files cloud-files +SUB basecamp files cloud-files create +SUB basecamp files cloud-files update SUB basecamp files copy SUB basecamp files doc SUB basecamp files doc create @@ -21544,6 +22811,9 @@ SUB basecamp files folder list SUB basecamp files folders SUB basecamp files folders create SUB basecamp files folders list +SUB basecamp files google-docs +SUB basecamp files google-docs create +SUB basecamp files google-docs update SUB basecamp files list SUB basecamp files move SUB basecamp files new-version @@ -21569,6 +22839,9 @@ SUB basecamp filings SUB basecamp filings show SUB basecamp folders SUB basecamp folders archive +SUB basecamp folders cloud-files +SUB basecamp folders cloud-files create +SUB basecamp folders cloud-files update SUB basecamp folders copy SUB basecamp folders doc SUB basecamp folders doc create @@ -21586,6 +22859,9 @@ SUB basecamp folders folder list SUB basecamp folders folders SUB basecamp folders folders create SUB basecamp folders folders list +SUB basecamp folders google-docs +SUB basecamp folders google-docs create +SUB basecamp folders google-docs update SUB basecamp folders list SUB basecamp folders move SUB basecamp folders new-version @@ -21930,6 +23206,9 @@ SUB basecamp url SUB basecamp url parse SUB basecamp vault SUB basecamp vault archive +SUB basecamp vault cloud-files +SUB basecamp vault cloud-files create +SUB basecamp vault cloud-files update SUB basecamp vault copy SUB basecamp vault doc SUB basecamp vault doc create @@ -21947,6 +23226,9 @@ SUB basecamp vault folder list SUB basecamp vault folders SUB basecamp vault folders create SUB basecamp vault folders list +SUB basecamp vault google-docs +SUB basecamp vault google-docs create +SUB basecamp vault google-docs update SUB basecamp vault list SUB basecamp vault move SUB basecamp vault new-version @@ -21970,6 +23252,9 @@ SUB basecamp vault vaults list SUB basecamp vault versions SUB basecamp vaults SUB basecamp vaults archive +SUB basecamp vaults cloud-files +SUB basecamp vaults cloud-files create +SUB basecamp vaults cloud-files update SUB basecamp vaults copy SUB basecamp vaults doc SUB basecamp vaults doc create @@ -21987,6 +23272,9 @@ SUB basecamp vaults folder list SUB basecamp vaults folders SUB basecamp vaults folders create SUB basecamp vaults folders list +SUB basecamp vaults google-docs +SUB basecamp vaults google-docs create +SUB basecamp vaults google-docs update SUB basecamp vaults list SUB basecamp vaults move SUB basecamp vaults new-version diff --git a/API-COVERAGE.md b/API-COVERAGE.md index b66518a34..2585669a8 100644 --- a/API-COVERAGE.md +++ b/API-COVERAGE.md @@ -6,12 +6,16 @@ Coverage of Basecamp 3 API endpoints. Source: [bc3-api/sections](https://github. | Status | Sections | Endpoints | |--------|----------|-----------| -| ✅ Implemented | 59 | 226 | +| ✅ Implemented | 61 | 232 | | ⚠️ Blocked | 0 | 0 | | ⏭️ Out of scope | 4 | 12 | -| **Total tracked** | **63** | **238** | +| **Total tracked** | **65** | **244** | -**226 of 226 tracked in-scope endpoints.** Listing, reading, creating, updating and +**232 of 232 tracked in-scope endpoints.** Adding and editing a link to a cloud file or a +Google document in Docs & Files (`POST /buckets/:id/vaults/:id/cloud_files.json`, +`PUT /cloud_files/:id`, and their `google_documents` counterparts, in the +SDK's `CloudFiles` and `GoogleDocuments` services; `files show` already read both) lands as +`files cloud-files` and `files google-docs`. Listing, reading, creating, updating and deleting a project's external links (`GET`/`POST /buckets/:id/dock/doors.json`, `GET`/`PUT`/`DELETE /dock/doors/:id`, added by [bc3#14314](https://github.com/basecamp/bc3/pull/14314) and modelled by the @@ -277,6 +281,8 @@ cannot faithfully cover at least one endpoint for a reason outside the CLI. A | vaults | 8 | `files`, `vaults` | ✅ | BC4 | - | list, show, create | | vaults (move) | 1 | `files move` | ✅ | BC5 | - | `POST /recordings/:id/filing.json`: moves a document, upload or folder into another folder in the same project, in place (same id and comments). `--to` takes a folder ID or URL; `--position` is 1-indexed. Flat route, so no `--in`. Moves and copies into another project go through recordings (moves, copies) with `--to-project`/`--to-folder` | | documents | 8 | `files`, `docs` | ✅ | BC4 | - | list, show, create, update. Create supports `--subscribe`/`--no-subscribe`, `--visible-to-clients` (root vault only) | +| cloud_files | 3 | `files cloud-files`, `files show` | ✅ | BC5 | - | A link to a file in Dropbox, Box, OneDrive or another service, filed in Docs & Files: show (`files show`), create (`POST /vaults/:id/cloud_files.json`; `--service` inferred from the URL's host, else `other`; `--subscribe`/`--no-subscribe`, `--visible-to-clients` at the root vault), update (`PUT /cloud_files/:id`, a full replace: the command reads the cloud file and sends back every field not given). Update has no `--subscribe`: Basecamp applies subscriptions on update only to drafts, and a cloud file is never one | +| google_documents | 3 | `files google-docs`, `files show` | ✅ | BC5 | - | A link to a Google Doc, Sheet or Slides file in Docs & Files: show (`files show`), create (`POST /vaults/:id/google_documents.json`; `--type` doc, sheet, slide or other, inferred from a docs.google.com URL; published unless `--draft`; `--subscribe`/`--no-subscribe`, `--visible-to-clients`), update (`PUT /google_documents/:id`, a full replace like cloud files; `--publish` publishes a draft, and `--subscribe` applies only while it is one) | | attachments | 1 | `uploads`, `attachments` | ✅ | BC4 | - | Upload via `attach`; list embedded attachments via `attachments list` (parses `<bc-attachment>` from content) | | embeds | 2 | `embeds` | ✅ | BC5 | - | create, show. Rich-text commands also embed a URL that stands alone on its line in Markdown content, through the same create | | **Schedule** | diff --git a/e2e/files.bats b/e2e/files.bats index 4c207413c..a56c761ce 100644 --- a/e2e/files.bats +++ b/e2e/files.bats @@ -222,3 +222,46 @@ load test_helper assert_success assert_output_contains "Docs & Files" } + + +# Cloud files and Google documents: validation before any request + +@test "files cloud-files create without --url shows error" { + create_credentials + create_global_config '{"account_id": 99999, "project_id": 123}' + + run basecamp files cloud-files create "Plans" --json + assert_failure + assert_json_value '.code' 'usage' + assert_json_value '.error' '--url is required' +} + +@test "files cloud-files update without any fields shows error" { + create_credentials + create_global_config '{"account_id": 99999, "project_id": 123}' + + run basecamp files cloud-files update 456 --json + assert_failure + assert_json_value '.code' 'usage' + assert_json_value '.error' 'No update fields specified' +} + +@test "files google-docs create with an unknown --type shows error" { + create_credentials + create_global_config '{"account_id": 99999, "project_id": 123}' + + run basecamp files google-docs create "Plan" --url "https://example.com/plan" --type spreadsheet --json + assert_failure + assert_json_value '.code' 'usage' + assert_json_value '.error' 'Invalid --type: spreadsheet' +} + +@test "files google-docs update without any fields shows error" { + create_credentials + create_global_config '{"account_id": 99999, "project_id": 123}' + + run basecamp files google-docs update 789 --json + assert_failure + assert_json_value '.code' 'usage' + assert_json_value '.error' 'No update fields specified' +} diff --git a/e2e/smoke/run_smoke.sh b/e2e/smoke/run_smoke.sh index 2c182c001..8bd3e261e 100755 --- a/e2e/smoke/run_smoke.sh +++ b/e2e/smoke/run_smoke.sh @@ -95,6 +95,7 @@ level1=( "$SMOKE_DIR"/smoke_timesheet_write.bats "$SMOKE_DIR"/smoke_messages_write.bats "$SMOKE_DIR"/smoke_files_write.bats + "$SMOKE_DIR"/smoke_file_links.bats "$SMOKE_DIR"/smoke_cards_write.bats "$SMOKE_DIR"/smoke_comments.bats "$SMOKE_DIR"/smoke_campfire.bats diff --git a/e2e/smoke/smoke_file_links.bats b/e2e/smoke/smoke_file_links.bats new file mode 100644 index 000000000..c705fdc85 --- /dev/null +++ b/e2e/smoke/smoke_file_links.bats @@ -0,0 +1,60 @@ +#!/usr/bin/env bats +# smoke_file_links.bats - Level 1: Cloud files and Google documents in Docs & Files + +load smoke_helper + +setup_file() { + # Each update reads the id its create wrote. + export BATS_NO_PARALLELIZE_WITHIN_FILE=true + ensure_token || return 1 + ensure_project || return 1 +} + +@test "files cloud-files create adds a cloud file" { + run_smoke basecamp files cloud-files create "Smoke cloud file" \ + --url "https://example.com/smoke-$(date +%s)" --description "Kept" \ + --no-subscribe -p "$QA_PROJECT" --json + assert_success + assert_json_value '.ok' 'true' + assert_json_value '.data.service.code' 'other' + + echo "$output" | jq -r '.data.id' > "$BATS_FILE_TMPDIR/cloud_file_id" +} + +@test "files cloud-files update renames a cloud file and keeps the rest" { + local id_file="$BATS_FILE_TMPDIR/cloud_file_id" + [[ -f "$id_file" ]] || mark_unverifiable "No cloud file created in prior test" + local cloud_file_id + cloud_file_id=$(<"$id_file") + + run_smoke basecamp files cloud-files update "$cloud_file_id" --title "Smoke cloud file renamed" --json + assert_success + assert_json_value '.data.title' 'Smoke cloud file renamed' + assert_json_value '.data.service.code' 'other' + assert_json_value '.data.description | contains("Kept")' 'true' +} + +@test "files google-docs create adds a Google document" { + run_smoke basecamp files google-docs create "Smoke Google doc" \ + --url "https://docs.google.com/document/d/smoke-$(date +%s)/edit" \ + --draft --no-subscribe -p "$QA_PROJECT" --json + assert_success + assert_json_value '.ok' 'true' + assert_json_value '.data.document_type' 'doc' + assert_json_value '.data.status' 'drafted' + + echo "$output" | jq -r '.data.id' > "$BATS_FILE_TMPDIR/google_doc_id" +} + +@test "files google-docs update renames a Google document and keeps it a draft" { + local id_file="$BATS_FILE_TMPDIR/google_doc_id" + [[ -f "$id_file" ]] || mark_unverifiable "No Google document created in prior test" + local google_doc_id + google_doc_id=$(<"$id_file") + + run_smoke basecamp files google-docs update "$google_doc_id" --title "Smoke Google doc renamed" --json + assert_success + assert_json_value '.data.title' 'Smoke Google doc renamed' + assert_json_value '.data.document_type' 'doc' + assert_json_value '.data.status' 'drafted' +} diff --git a/e2e/smoke/smoke_lifecycle.bats b/e2e/smoke/smoke_lifecycle.bats index c425a190c..1fd1836be 100644 --- a/e2e/smoke/smoke_lifecycle.bats +++ b/e2e/smoke/smoke_lifecycle.bats @@ -324,3 +324,35 @@ load smoke_helper @test "vaults uploads list is out of scope" { mark_out_of_scope "Shares implementation with files group (tested)" } + +@test "docs cloud-files create is out of scope" { + mark_out_of_scope "Shares implementation with files group (tested)" +} + +@test "docs cloud-files update is out of scope" { + mark_out_of_scope "Shares implementation with files group (tested)" +} + +@test "docs google-docs create is out of scope" { + mark_out_of_scope "Shares implementation with files group (tested)" +} + +@test "docs google-docs update is out of scope" { + mark_out_of_scope "Shares implementation with files group (tested)" +} + +@test "vaults cloud-files create is out of scope" { + mark_out_of_scope "Shares implementation with files group (tested)" +} + +@test "vaults cloud-files update is out of scope" { + mark_out_of_scope "Shares implementation with files group (tested)" +} + +@test "vaults google-docs create is out of scope" { + mark_out_of_scope "Shares implementation with files group (tested)" +} + +@test "vaults google-docs update is out of scope" { + mark_out_of_scope "Shares implementation with files group (tested)" +} diff --git a/internal/commands/commands.go b/internal/commands/commands.go index 3b36383d6..71156bf5f 100644 --- a/internal/commands/commands.go +++ b/internal/commands/commands.go @@ -46,7 +46,7 @@ func CommandCategories() []CommandCategory { {Name: "chat", Category: "core", Description: "Chat in real-time", Actions: []string{"list", "messages", "post", "upload", "line", "update", "delete"}}, {Name: "pings", Category: "core", Description: "Talk to people directly", Actions: []string{"list", "show", "start", "messages", "post", "upload"}}, {Name: "cards", Category: "core", Description: "Manage Kanban cards", Actions: []string{"list", "show", "create", "update", "move", "copy", "done", "columns", "wormholes", "steps", "trash", "archive", "restore"}}, - {Name: "files", Category: "core", Description: "Manage files, documents, and folders", Actions: []string{"list", "show", "versions", "replace", "download", "update", "move", "copy", "trash", "archive", "restore"}}, + {Name: "files", Category: "core", Description: "Manage files, documents, and folders", Actions: []string{"list", "show", "versions", "replace", "download", "update", "move", "copy", "trash", "archive", "restore", "cloud-files", "google-docs"}}, {Name: "checkins", Category: "core", Description: "View automatic check-ins", Actions: []string{"questions", "question", "answers", "answer", "reminders"}}, {Name: "schedule", Category: "core", Description: "Manage schedule entries", Actions: []string{"show", "entries", "create", "update", "move", "copy"}}, }, diff --git a/internal/commands/files.go b/internal/commands/files.go index 236423134..179a3ec12 100644 --- a/internal/commands/files.go +++ b/internal/commands/files.go @@ -49,6 +49,8 @@ Each project has a root folder containing documents, uploads, and subfolders.`, newFoldersCmd(&project, &vaultID), newUploadsCmd(&project, &vaultID), newDocsCmd(&project, &vaultID), + newCloudFilesCmd(&project, &vaultID), + newGoogleDocsCmd(&project, &vaultID), newFilesShowCmd(), newFilesVersionsCmd(&project), newFilesReplaceCmd(&project), @@ -1546,7 +1548,20 @@ You can pass either an item ID or a Basecamp URL: summary := fmt.Sprintf("%s: %s", detectedType, title) var breadcrumbs []output.Breadcrumb - if detectedType != "cloud_file" && detectedType != "google_document" { + switch detectedType { + case "cloud_file": + breadcrumbs = append(breadcrumbs, output.Breadcrumb{ + Action: "update", + Cmd: fmt.Sprintf("basecamp files cloud-files update %s --title \"New title\"", itemIDStr), + Description: "Update cloud file", + }) + case "google_document": + breadcrumbs = append(breadcrumbs, output.Breadcrumb{ + Action: "update", + Cmd: fmt.Sprintf("basecamp files google-docs update %s --title \"New title\"", itemIDStr), + Description: "Update Google document", + }) + default: breadcrumbs = append(breadcrumbs, output.Breadcrumb{ Action: "update", Cmd: fmt.Sprintf("basecamp files update %s --in %s", itemIDStr, recordProject(bucket)), diff --git a/internal/commands/files_links.go b/internal/commands/files_links.go new file mode 100644 index 000000000..93e31e84f --- /dev/null +++ b/internal/commands/files_links.go @@ -0,0 +1,674 @@ +package commands + +import ( + "fmt" + "strconv" + "strings" + + "github.com/basecamp/basecamp-sdk/go/pkg/basecamp" + "github.com/spf13/cobra" + + "github.com/basecamp/basecamp-cli/internal/appctx" + "github.com/basecamp/basecamp-cli/internal/hostutil" + "github.com/basecamp/basecamp-cli/internal/output" + "github.com/basecamp/basecamp-cli/internal/urlarg" +) + +// Cloud files and Google documents are links to outside files that sit in +// Docs & Files beside documents and uploads. files show reads them; the +// commands here add and change them. +// +// Basecamp replaces the whole record on update (CloudFilesController#update +// and GoogleDocumentsController#update build a new recordable from the +// permitted params alone), so a field the request leaves out is erased. The +// update commands read the record first and send back every field no flag +// changes, so only what was asked for changes. + +// googleDocumentTypes are the document types Basecamp accepts. +var googleDocumentTypes = []string{"doc", "sheet", "slide", "other"} + +// inferGoogleDocumentType reads the document type from a docs.google.com +// link's path, and answers "" for anything else. +func inferGoogleDocumentType(raw string) string { + switch inferDoorService(raw) { + case "google_doc": + return "doc" + case "google_sheet": + return "sheet" + case "google_slide": + return "slide" + } + return "" +} + +// linkFolder resolves where a new cloud file or Google document goes: the +// project, and the folder (the project's Docs & Files root unless +// --vault/--folder names one). +func linkFolder(cmd *cobra.Command, app *appctx.App, project, vaultID string) (string, int64, int64, error) { + projectID := project + if projectID == "" { + projectID = app.Flags.Project + } + if projectID == "" { + projectID = app.Config.ProjectID + } + if projectID == "" { + if err := ensureProject(cmd, app); err != nil { + return "", 0, 0, err + } + projectID = app.Config.ProjectID + } + + resolvedProjectID, _, err := app.Names.ResolveProject(cmd.Context(), projectID) + if err != nil { + return "", 0, 0, err + } + bucketID, err := strconv.ParseInt(resolvedProjectID, 10, 64) + if err != nil { + return "", 0, 0, output.ErrUsage("Invalid project ID") + } + + resolvedVaultID := vaultID + if resolvedVaultID == "" { + resolvedVaultID, err = getVaultID(cmd, app, resolvedProjectID) + if err != nil { + return "", 0, 0, err + } + } + vaultIDNum, err := strconv.ParseInt(resolvedVaultID, 10, 64) + if err != nil { + return "", 0, 0, output.ErrUsage("Invalid folder ID") + } + + return resolvedProjectID, bucketID, vaultIDNum, nil +} + +// linkDescription converts a --description value (Markdown, or - for stdin) +// to the rich text Basecamp stores, uploading any local images it names. An +// empty value stays empty. +func linkDescription(cmd *cobra.Command, app *appctx.App, value string) (string, error) { + desc, err := resolveContentValue(cmd, value, -1, "--description") + if err != nil { + return "", err + } + if desc == "" { + return "", nil + } + return resolveLocalImages(cmd, app, richTextToHTML(cmd, desc)) +} + +// linkIDArg reads a cloud file's or Google document's ID, or the ID in its +// Basecamp URL, as doorIDArg does: a URL must be on a trusted Basecamp host, +// name one record of urlType (not a comment on it: a #__recording_ permalink +// names the comment, and updating its parent would write the wrong record), +// and name the configured account, whose place it takes when none is +// configured. +func linkIDArg(app *appctx.App, arg, urlType, what, hint string) (int64, error) { + idStr := arg + if urlarg.IsURL(arg) { + if !hostutil.IsTrustedBasecampHost(arg, app.Config.BaseURL) { + return 0, output.ErrUsage("refusing untrusted host in URL — expected a Basecamp URL") + } + parsed := urlarg.Parse(arg) + if parsed == nil || parsed.IsCollection || parsed.Type != urlType || parsed.RecordingID == "" || parsed.CommentID != "" { + return 0, output.ErrUsageHint("The URL does not name one "+what, hint) + } + if parsed.AccountID != "" { + switch { + case app.Config.AccountID == "": + app.Config.AccountID = parsed.AccountID + case !accountIDsEqual(parsed.AccountID, app.Config.AccountID): + return 0, output.ErrUsage(fmt.Sprintf("URL account %s does not match the configured account %s", parsed.AccountID, app.Config.AccountID)) + } + } + idStr = parsed.RecordingID + } + id, err := strconv.ParseInt(idStr, 10, 64) + if err != nil { + return 0, output.ErrUsage("Invalid " + what + " ID") + } + return id, nil +} + +// linkUpdateFlagsGiven reports whether any of the named flags was given. +func linkUpdateFlagsGiven(cmd *cobra.Command, names ...string) bool { + for _, name := range names { + if cmd.Flags().Changed(name) { + return true + } + } + return false +} + +// rejectEmptyLinkFlags refuses an empty --url, --title or --service/--type: +// Basecamp requires the url and the service or type, and an empty title would +// read back as "Untitled". +func rejectEmptyLinkFlags(cmd *cobra.Command, names ...string) error { + for _, name := range names { + if !cmd.Flags().Changed(name) { + continue + } + value, err := cmd.Flags().GetString(name) + if err == nil && strings.TrimSpace(value) == "" { + return output.ErrUsage(fmt.Sprintf("--%s cannot be empty", name)) + } + } + return nil +} + +func newCloudFilesCmd(project, vaultID *string) *cobra.Command { + cmd := &cobra.Command{ + Use: "cloud-files", + Short: "Add and change cloud files", + Long: `Add and change cloud files: links to files on an outside service (Dropbox, +Box, Figma, OneDrive, ...) kept in a project's Docs & Files. + + basecamp files cloud-files create --url https://www.dropbox.com/s/abc/plan.pdf --in MyProject + basecamp files cloud-files update 12345 --title "Plan (final)" + +files show reads one, by the ID create prints or its Basecamp URL.`, + Annotations: map[string]string{ + "agent_notes": "create needs --url and --in <project>; --service is inferred from the URL's host, other when unknown.\n" + + "--subscribe/--no-subscribe on create choose who is subscribed and notified; omitted, Basecamp's default applies.\n" + + "update reads the cloud file first and sends back every field no flag changes, because Basecamp replaces the whole record.", + }, + } + + cmd.AddCommand( + newCloudFilesCreateCmd(project, vaultID), + newCloudFilesUpdateCmd(), + ) + + return cmd +} + +func newCloudFilesCreateCmd(project, vaultID *string) *cobra.Command { + var linkURL, title, service, description, subscribe string + var noSubscribe, visibleToClients bool + + cmd := &cobra.Command{ + Use: "create [title]", + Short: "Add a cloud file to Docs & Files", + Long: `Add a cloud file to a project's Docs & Files, or to a folder with --folder. + +--url is required. --service is the service code (dropbox, box, figma, +one_drive, other, ...); without it the service is inferred from the URL's host, +and a host with no known service is added as other. Basecamp refuses a URL that +does not match the service. + +--subscribe names who is subscribed and notified; --no-subscribe notifies +nobody. --description is Markdown, converted to rich text (- reads stdin). + + basecamp files cloud-files create --url https://www.dropbox.com/s/abc/plan.pdf --title "Plan" --in MyProject + basecamp files cloud-files create "Mockups" --url https://www.figma.com/file/abc/Mockups --subscribe "Jane,Bob" --in MyProject`, + Args: cobra.MaximumNArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + if len(args) > 0 && title == "" { + title = args[0] + } + if linkURL == "" { + return output.ErrUsageHint("--url is required", + "basecamp files cloud-files create --url https://example.com/file --title \"Title\" --in <project>") + } + if service == "" { + service = inferDoorService(linkURL) + if service == "" { + service = "other" + } + } + if err := rejectSubscribeConflict(cmd.Flags().Changed("subscribe"), noSubscribe, subscribe); err != nil { + return err + } + if err := requireNumericID(*vaultID, "folder ID"); err != nil { + return err + } + + app := appctx.FromContext(cmd.Context()) + // Taken before the account is resolved or adopted from a URL, so + // the follow-ups name the account this run used. + scope := newFollowUpScope(app) + if err := ensureAccount(cmd, app); err != nil { + return err + } + + subs, err := applySubscribeFlags(cmd.Context(), app.Names, subscribe, cmd.Flags().Changed("subscribe"), noSubscribe) + if err != nil { + return err + } + + resolvedProjectID, bucketID, vaultIDNum, err := linkFolder(cmd, app, *project, *vaultID) + if err != nil { + return err + } + vis, err := resolveVaultClientVisibility(cmd, app, *vaultID, vaultIDNum, visibleToClients) + if err != nil { + return err + } + // Local images upload only once the folder is known to take them. + desc, err := linkDescription(cmd, app, description) + if err != nil { + return err + } + + cloudFile, err := app.Account().CloudFiles().Create(cmd.Context(), bucketID, vaultIDNum, &basecamp.CreateCloudFileRequest{ + URL: linkURL, + Service: service, + Title: title, + Description: desc, + Subscriptions: subs, + VisibleToClients: vis, + }) + if err != nil { + return convertSDKError(err) + } + + return app.OK(cloudFile, + output.WithSummary(fmt.Sprintf("Created cloud file #%d: %s → %s", cloudFile.ID, cloudFile.Title, cloudFile.URL)), + output.WithBreadcrumbs( + output.Breadcrumb{ + Action: "show", + Cmd: fmt.Sprintf("basecamp files show %d --type cloud_file --in %s%s", cloudFile.ID, resolvedProjectID, scope.args(app.Config.AccountID)), + Description: "View cloud file", + }, + output.Breadcrumb{ + Action: "update", + Cmd: fmt.Sprintf("basecamp files cloud-files update %d --title \"New title\"%s", cloudFile.ID, scope.args(app.Config.AccountID)), + Description: "Update cloud file", + }, + ), + ) + }, + } + + cmd.Flags().StringVar(&linkURL, "url", "", "Address of the file on the outside service (required)") + cmd.Flags().StringVar(&title, "title", "", "Title (Basecamp uses \"Untitled\" without one)") + cmd.Flags().StringVar(&service, "service", "", "Service code (dropbox, box, figma, other, ...); inferred from the URL when omitted") + cmd.Flags().StringVarP(&description, "description", "d", "", "Description (Markdown); use - to read from stdin") + cmd.Flags().StringVar(&subscribe, "subscribe", "", "Subscribe and notify specific people (comma-separated names, emails, IDs, or \"me\")") + cmd.Flags().BoolVar(&noSubscribe, "no-subscribe", false, "Don't subscribe anyone else (silent, no notifications)") + cmd.Flags().BoolVar(&visibleToClients, "visible-to-clients", false, "Make the cloud file visible to clients (root Docs & Files folder only; a nested folder inherits its folder's visibility). Omit for the server default.") + addRichTextFormatFlag(cmd) + allowDash(cmd, "flag:description") + registerDoorServiceCompletion(cmd) + + return cmd +} + +func newCloudFilesUpdateCmd() *cobra.Command { + var linkURL, title, service, description string + + cmd := &cobra.Command{ + Use: "update <id|url>", + Short: "Update a cloud file", + Long: `Update a cloud file. Only the flags given change: the cloud file is read +first and everything else is sent back as it is, because Basecamp replaces the +whole record on update. + +A new --url without --service changes the service too when the URL's host names +a known one (dropbox.com, figma.com, ...); otherwise the service stays as it is. +--description "" clears the description. + + basecamp files cloud-files update 12345 --title "Plan (final)" + basecamp files cloud-files update 12345 --url https://www.dropbox.com/s/xyz/plan-v2.pdf`, + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + if !linkUpdateFlagsGiven(cmd, "url", "title", "service", "description") { + return noChanges(cmd) + } + if err := rejectEmptyLinkFlags(cmd, "url", "title", "service"); err != nil { + return err + } + app := appctx.FromContext(cmd.Context()) + // Taken before the account is resolved or adopted from a URL, so + // the follow-ups name the account this run used. + scope := newFollowUpScope(app) + cloudFileID, err := linkIDArg(app, args[0], "cloud_files", "cloud file", + "Pass the cloud file's ID, or its URL (…/buckets/<project>/cloud_files/<id>); create prints the ID") + if err != nil { + return err + } + if err := ensureAccount(cmd, app); err != nil { + return err + } + + current, err := app.Account().CloudFiles().Get(cmd.Context(), cloudFileID) + if err != nil { + return convertSDKError(err) + } + + req := &basecamp.UpdateCloudFileRequest{ + URL: current.URL, + Service: current.Service.Code, + Title: current.Title, + Description: current.Description, + } + if cmd.Flags().Changed("url") { + req.URL = linkURL + if inferred := inferDoorService(linkURL); inferred != "" { + req.Service = inferred + } + } + if cmd.Flags().Changed("service") { + req.Service = service + } + if cmd.Flags().Changed("title") { + req.Title = title + } + if cmd.Flags().Changed("description") { + if req.Description, err = linkDescription(cmd, app, description); err != nil { + return err + } + } + + cloudFile, err := app.Account().CloudFiles().Update(cmd.Context(), current.ID, req) + if err != nil { + return convertSDKError(err) + } + + return app.OK(cloudFile, + output.WithSummary(fmt.Sprintf("Updated cloud file #%d: %s → %s", cloudFile.ID, cloudFile.Title, cloudFile.URL)), + output.WithBreadcrumbs(output.Breadcrumb{ + Action: "show", + Cmd: fmt.Sprintf("basecamp files show %d --type cloud_file%s", cloudFile.ID, scope.args(app.Config.AccountID)), + Description: "View cloud file", + }), + ) + }, + } + + cmd.Flags().StringVar(&linkURL, "url", "", "New address") + cmd.Flags().StringVar(&title, "title", "", "New title") + cmd.Flags().StringVar(&service, "service", "", "New service code (dropbox, box, figma, other, ...)") + cmd.Flags().StringVarP(&description, "description", "d", "", "New description (Markdown); \"\" clears it, - reads stdin") + addRichTextFormatFlag(cmd) + allowDash(cmd, "flag:description") + registerDoorServiceCompletion(cmd) + + return cmd +} + +func newGoogleDocsCmd(project, vaultID *string) *cobra.Command { + cmd := &cobra.Command{ + Use: "google-docs", + Short: "Add and change Google Docs", + Long: `Add and change Google Docs, Sheets and Slides linked in a project's Docs & Files. + + basecamp files google-docs create --url https://docs.google.com/document/d/abc/edit --in MyProject + basecamp files google-docs update 12345 --title "Spec (final)" + +files show reads one, by the ID create prints or its Basecamp URL.`, + Annotations: map[string]string{ + "agent_notes": "create needs --url and --in <project>; --type (doc, sheet, slide, other) is inferred from a docs.google.com URL.\n" + + "create publishes unless --draft; --subscribe/--no-subscribe choose who is subscribed and notified.\n" + + "update reads the document first and sends back every field no flag changes, because Basecamp replaces the whole record.\n" + + "update --subscribe/--no-subscribe change a draft's subscribers only; --publish publishes a draft.", + }, + } + + cmd.AddCommand( + newGoogleDocsCreateCmd(project, vaultID), + newGoogleDocsUpdateCmd(), + ) + + return cmd +} + +// googleDocumentType settles a Google document's type: --type when given, +// else what the URL says, else fallback. +func googleDocumentType(cmd *cobra.Command, docType, linkURL, fallback string) (string, error) { + if cmd.Flags().Changed("type") { + docType = strings.ToLower(strings.TrimSpace(docType)) + for _, t := range googleDocumentTypes { + if docType == t { + return docType, nil + } + } + return "", output.ErrUsageHint(fmt.Sprintf("Invalid --type: %s", docType), "Use: doc, sheet, slide, or other") + } + if inferred := inferGoogleDocumentType(linkURL); inferred != "" { + return inferred, nil + } + return fallback, nil +} + +func newGoogleDocsCreateCmd(project, vaultID *string) *cobra.Command { + var linkURL, title, docType, description, subscribe string + var draft, noSubscribe, visibleToClients bool + + cmd := &cobra.Command{ + Use: "create [title]", + Short: "Add a Google Doc to Docs & Files", + Long: `Add a Google Doc, Sheet or Slides to a project's Docs & Files, or to a folder +with --folder. + +--url is required. --type is doc, sheet, slide or other; a docs.google.com URL +says which, and anything else is other. + +It is published unless --draft is passed. --subscribe names who is subscribed +and notified; --no-subscribe notifies nobody. --description is Markdown, +converted to rich text (- reads stdin). + + basecamp files google-docs create --url https://docs.google.com/document/d/abc/edit --title "Spec" --in MyProject + basecamp files google-docs create "Budget" --url https://docs.google.com/spreadsheets/d/abc/edit --no-subscribe --in MyProject`, + Args: cobra.MaximumNArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + if len(args) > 0 && title == "" { + title = args[0] + } + if linkURL == "" { + return output.ErrUsageHint("--url is required", + "basecamp files google-docs create --url https://docs.google.com/document/d/<id>/edit --title \"Title\" --in <project>") + } + documentType, err := googleDocumentType(cmd, docType, linkURL, "other") + if err != nil { + return err + } + if err := rejectSubscribeConflict(cmd.Flags().Changed("subscribe"), noSubscribe, subscribe); err != nil { + return err + } + if err := requireNumericID(*vaultID, "folder ID"); err != nil { + return err + } + + app := appctx.FromContext(cmd.Context()) + // Taken before the account is resolved or adopted from a URL, so + // the follow-ups name the account this run used. + scope := newFollowUpScope(app) + if err := ensureAccount(cmd, app); err != nil { + return err + } + + subs, err := applySubscribeFlags(cmd.Context(), app.Names, subscribe, cmd.Flags().Changed("subscribe"), noSubscribe) + if err != nil { + return err + } + + resolvedProjectID, bucketID, vaultIDNum, err := linkFolder(cmd, app, *project, *vaultID) + if err != nil { + return err + } + vis, err := resolveVaultClientVisibility(cmd, app, *vaultID, vaultIDNum, visibleToClients) + if err != nil { + return err + } + // Local images upload only once the folder is known to take them. + desc, err := linkDescription(cmd, app, description) + if err != nil { + return err + } + + // Basecamp keeps a new Google document as a draft unless told + // otherwise; documents create publishes by default, and so does this. + status := "active" + if draft { + status = "drafted" + } + + doc, err := app.Account().GoogleDocuments().Create(cmd.Context(), bucketID, vaultIDNum, &basecamp.CreateGoogleDocumentRequest{ + URL: linkURL, + DocumentType: documentType, + Title: title, + Description: desc, + Status: status, + Subscriptions: subs, + VisibleToClients: vis, + }) + if err != nil { + return convertSDKError(err) + } + + return app.OK(doc, + output.WithSummary(fmt.Sprintf("Created Google %s #%d: %s", doc.DocumentType, doc.ID, doc.Title)), + output.WithBreadcrumbs( + output.Breadcrumb{ + Action: "show", + Cmd: fmt.Sprintf("basecamp files show %d --type google_document --in %s%s", doc.ID, resolvedProjectID, scope.args(app.Config.AccountID)), + Description: "View Google document", + }, + output.Breadcrumb{ + Action: "update", + Cmd: fmt.Sprintf("basecamp files google-docs update %d --title \"New title\"%s", doc.ID, scope.args(app.Config.AccountID)), + Description: "Update Google document", + }, + ), + ) + }, + } + + cmd.Flags().StringVar(&linkURL, "url", "", "Google Docs, Sheets or Slides link (required)") + cmd.Flags().StringVar(&title, "title", "", "Title (Basecamp uses \"Untitled\" without one)") + cmd.Flags().StringVar(&docType, "type", "", "Document type: doc, sheet, slide or other; inferred from the URL when omitted") + cmd.Flags().StringVarP(&description, "description", "d", "", "Description (Markdown); use - to read from stdin") + cmd.Flags().BoolVar(&draft, "draft", false, "Create as a draft (default: published)") + cmd.Flags().StringVar(&subscribe, "subscribe", "", "Subscribe and notify specific people (comma-separated names, emails, IDs, or \"me\")") + cmd.Flags().BoolVar(&noSubscribe, "no-subscribe", false, "Don't subscribe anyone else (silent, no notifications)") + cmd.Flags().BoolVar(&visibleToClients, "visible-to-clients", false, "Make the document visible to clients (root Docs & Files folder only; a nested folder inherits its folder's visibility). Omit for the server default.") + addRichTextFormatFlag(cmd) + allowDash(cmd, "flag:description") + registerGoogleDocumentTypeCompletion(cmd) + + return cmd +} + +func newGoogleDocsUpdateCmd() *cobra.Command { + var linkURL, title, docType, description, subscribe string + var publish, noSubscribe bool + + cmd := &cobra.Command{ + Use: "update <id|url>", + Short: "Update a Google Doc", + Long: `Update a Google document. Only the flags given change: the document is read +first and everything else is sent back as it is, because Basecamp replaces the +whole record on update. + +A new docs.google.com --url without --type changes the type to match it. +--description "" clears the description. --publish publishes a draft. + +--subscribe and --no-subscribe change who a draft's subscribers are, and so who +is notified when it is published; Basecamp leaves a published document's +subscribers alone. + + basecamp files google-docs update 12345 --title "Spec (final)" + basecamp files google-docs update 12345 --publish --subscribe "Jane,Bob"`, + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + if !linkUpdateFlagsGiven(cmd, "url", "title", "type", "description", "publish", "subscribe", "no-subscribe") { + return noChanges(cmd) + } + if err := rejectEmptyLinkFlags(cmd, "url", "title", "type"); err != nil { + return err + } + if cmd.Flags().Changed("publish") && !publish { + return output.ErrUsage("--publish=false is not supported: a published document can't go back to a draft") + } + if err := rejectSubscribeConflict(cmd.Flags().Changed("subscribe"), noSubscribe, subscribe); err != nil { + return err + } + app := appctx.FromContext(cmd.Context()) + // Taken before the account is resolved or adopted from a URL, so + // the follow-ups name the account this run used. + scope := newFollowUpScope(app) + docID, err := linkIDArg(app, args[0], "google_documents", "Google document", + "Pass the Google document's ID, or its URL (…/buckets/<project>/google_documents/<id>); create prints the ID") + if err != nil { + return err + } + if err := ensureAccount(cmd, app); err != nil { + return err + } + + subs, err := applySubscribeFlags(cmd.Context(), app.Names, subscribe, cmd.Flags().Changed("subscribe"), noSubscribe) + if err != nil { + return err + } + + current, err := app.Account().GoogleDocuments().Get(cmd.Context(), docID) + if err != nil { + return convertSDKError(err) + } + + // Status is left out unless --publish is given: Basecamp then + // keeps the document's own status. + req := &basecamp.UpdateGoogleDocumentRequest{ + URL: current.URL, + DocumentType: current.DocumentType, + Title: current.Title, + Description: current.Description, + Subscriptions: subs, + } + if cmd.Flags().Changed("url") { + req.URL = linkURL + if inferred := inferGoogleDocumentType(linkURL); inferred != "" { + req.DocumentType = inferred + } + } + if req.DocumentType, err = googleDocumentType(cmd, docType, "", req.DocumentType); err != nil { + return err + } + if cmd.Flags().Changed("title") { + req.Title = title + } + if cmd.Flags().Changed("description") { + if req.Description, err = linkDescription(cmd, app, description); err != nil { + return err + } + } + if publish { + req.Status = "active" + } + + doc, err := app.Account().GoogleDocuments().Update(cmd.Context(), current.ID, req) + if err != nil { + return convertSDKError(err) + } + + return app.OK(doc, + output.WithSummary(fmt.Sprintf("Updated Google %s #%d: %s", doc.DocumentType, doc.ID, doc.Title)), + output.WithBreadcrumbs(output.Breadcrumb{ + Action: "show", + Cmd: fmt.Sprintf("basecamp files show %d --type google_document%s", doc.ID, scope.args(app.Config.AccountID)), + Description: "View Google document", + }), + ) + }, + } + + cmd.Flags().StringVar(&linkURL, "url", "", "New Google Docs, Sheets or Slides link") + cmd.Flags().StringVar(&title, "title", "", "New title") + cmd.Flags().StringVar(&docType, "type", "", "New document type: doc, sheet, slide or other") + cmd.Flags().StringVarP(&description, "description", "d", "", "New description (Markdown); \"\" clears it, - reads stdin") + cmd.Flags().BoolVar(&publish, "publish", false, "Publish a draft") + cmd.Flags().StringVar(&subscribe, "subscribe", "", "A draft's subscribers, notified when it is published (comma-separated names, emails, IDs, or \"me\")") + cmd.Flags().BoolVar(&noSubscribe, "no-subscribe", false, "Subscribe nobody else to a draft") + addRichTextFormatFlag(cmd) + allowDash(cmd, "flag:description") + registerGoogleDocumentTypeCompletion(cmd) + + return cmd +} + +func registerGoogleDocumentTypeCompletion(cmd *cobra.Command) { + _ = cmd.RegisterFlagCompletionFunc("type", func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) { + return googleDocumentTypes, cobra.ShellCompDirectiveNoFileComp + }) +} diff --git a/internal/commands/files_links_test.go b/internal/commands/files_links_test.go new file mode 100644 index 000000000..85bdb9142 --- /dev/null +++ b/internal/commands/files_links_test.go @@ -0,0 +1,480 @@ +package commands + +import ( + "encoding/json" + "errors" + "net/http" + "os" + "path/filepath" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/basecamp/basecamp-cli/internal/output" +) + +const cloudFileJSON = `{"id":456,"status":"active","visible_to_clients":false,` + + `"created_at":"2026-11-01T10:00:00Z","updated_at":"2026-11-01T10:00:00Z",` + + `"title":"Plan","inherits_status":true,"type":"CloudFile",` + + `"url":"https://www.dropbox.com/s/abc/plan.pdf",` + + `"app_url":"https://3.basecamp.com/99999/buckets/123/cloud_files/456",` + + `"bucket":{"id":123,"name":"Test Project","type":"Project"},` + + `"creator":{"id":1,"name":"Test Person"},"description":"<div>Kept</div>",` + + `"description_attachments":[],"service":{"name":"Dropbox","code":"dropbox"}}` + +const googleDocJSON = `{"id":789,"status":"drafted","visible_to_clients":false,` + + `"created_at":"2026-11-01T10:00:00Z","updated_at":"2026-11-01T10:00:00Z",` + + `"title":"Spec","inherits_status":true,"type":"GoogleDocument",` + + `"url":"https://docs.google.com/document/d/abc/edit",` + + `"app_url":"https://3.basecamp.com/99999/buckets/123/google_documents/789",` + + `"bucket":{"id":123,"name":"Test Project","type":"Project"},` + + `"creator":{"id":1,"name":"Test Person"},"description":"<div>Kept</div>",` + + `"description_attachments":[],"document_type":"doc"}` + +// projectDockRoute serves project 123 with its Docs & Files folder, 777. +func projectDockRoute() stubRoute { + return stubRoute{ + method: http.MethodGet, + path: "/99999/projects/123.json", + status: http.StatusOK, + body: `{"id":123,"name":"Test Project","dock":[` + + `{"id":777,"name":"vault","title":"Docs & Files","enabled":true,` + + `"url":"https://3.basecampapi.com/99999/buckets/123/vaults/777.json"}]}`, + } +} + +// peopleRoute serves the people that --subscribe names resolve against. +func peopleRoute() stubRoute { + return stubRoute{ + method: http.MethodGet, + path: "/99999/people.json", + status: http.StatusOK, + body: `[{"id":11,"name":"Jane Doe","email_address":"jane@example.com"},{"id":22,"name":"Bob Roe","email_address":"bob@example.com"}]`, + } +} + +// sentBody decodes the JSON body of a recorded request. +func sentBody(t *testing.T, body string) map[string]any { + t.Helper() + var got map[string]any + require.NoError(t, json.Unmarshal([]byte(body), &got), "body: %s", body) + return got +} + +func TestCloudFilesCreateInfersServiceAndChoosesSubscribers(t *testing.T) { + app, transport := setupRecordingTestApp(t, projectsRoute(), projectDockRoute(), peopleRoute(), stubRoute{ + method: http.MethodPost, + path: "/99999/buckets/123/vaults/777/cloud_files.json", + status: http.StatusCreated, + body: cloudFileJSON, + }) + + err := executeRecordingCommand(NewFilesCmd(), app, "cloud-files", "create", "Plan", + "--url", "https://www.dropbox.com/s/abc/plan.pdf", "--subscribe", "11,22", + "--description", "**Final**", "--in", "123") + require.NoError(t, err) + + last := transport.last(t) + assert.Equal(t, http.MethodPost, last.Method) + assert.Equal(t, "/99999/buckets/123/vaults/777/cloud_files.json", last.Path) + + body := sentBody(t, last.Body) + assert.Equal(t, "https://www.dropbox.com/s/abc/plan.pdf", body["url"]) + assert.Equal(t, "dropbox", body["service"], "inferred from the host") + assert.Equal(t, "Plan", body["title"], "a positional title is the title") + assert.Equal(t, "<p><strong>Final</strong></p>", body["description"]) + assert.Equal(t, []any{float64(11), float64(22)}, body["subscriptions"]) + assert.NotContains(t, body, "visible_to_clients") +} + +func TestCloudFilesCreateNoSubscribeNotifiesNobody(t *testing.T) { + app, transport := setupRecordingTestApp(t, projectsRoute(), stubRoute{ + method: http.MethodPost, + path: "/99999/buckets/123/vaults/555/cloud_files.json", + status: http.StatusCreated, + body: cloudFileJSON, + }) + + err := executeRecordingCommand(NewFilesCmd(), app, "cloud-files", "create", + "--url", "https://example.com/plan", "--no-subscribe", "--folder", "555", "--in", "123") + require.NoError(t, err) + + body := sentBody(t, transport.last(t).Body) + assert.Equal(t, "other", body["service"], "an unknown host is other") + assert.Equal(t, []any{}, body["subscriptions"], "--no-subscribe sends an empty list") +} + +func TestCloudFilesCreateOmitsSubscriptionsByDefault(t *testing.T) { + app, transport := setupRecordingTestApp(t, projectsRoute(), stubRoute{ + method: http.MethodPost, + path: "/99999/buckets/123/vaults/555/cloud_files.json", + status: http.StatusCreated, + body: cloudFileJSON, + }) + + err := executeRecordingCommand(NewFilesCmd(), app, "cloud-files", "create", + "--url", "https://www.figma.com/file/abc/Mockups", "--folder", "555", "--in", "123") + require.NoError(t, err) + + body := sentBody(t, transport.last(t).Body) + assert.Equal(t, "figma", body["service"]) + assert.NotContains(t, body, "subscriptions", "omitted, Basecamp's default applies") +} + +func TestCloudFilesCreateRefusesBeforeAnyRequest(t *testing.T) { + for name, args := range map[string][]string{ + "no url": {"cloud-files", "create", "Plan", "--in", "123"}, + "subscribe and silent": {"cloud-files", "create", "--url", "https://example.com", "--subscribe", "11", "--no-subscribe", "--in", "123"}, + } { + t.Run(name, func(t *testing.T) { + app, transport := setupRecordingTestApp(t, projectsRoute()) + + err := executeRecordingCommand(NewFilesCmd(), app, args...) + require.Error(t, err) + var e *output.Error + require.True(t, errors.As(err, &e), "expected *output.Error, got %T: %v", err, err) + assert.Equal(t, output.CodeUsage, e.Code) + assert.Empty(t, transport.recorded()) + }) + } +} + +// Basecamp replaces the whole cloud file on update, so the fields no flag +// names go back as they were read. +func TestCloudFilesUpdateSendsBackWhatItDoesNotChange(t *testing.T) { + app, transport := setupRecordingTestApp(t, + stubRoute{method: http.MethodGet, path: "/99999/cloud_files/456", status: http.StatusOK, body: cloudFileJSON}, + stubRoute{method: http.MethodPut, path: "/99999/cloud_files/456", status: http.StatusOK, body: cloudFileJSON}, + ) + + err := executeRecordingCommand(NewFilesCmd(), app, "cloud-files", "update", "456", "--title", "Plan (final)") + require.NoError(t, err) + + last := transport.last(t) + assert.Equal(t, http.MethodPut, last.Method) + assert.Equal(t, map[string]any{ + "url": "https://www.dropbox.com/s/abc/plan.pdf", + "service": "dropbox", + "title": "Plan (final)", + "description": "<div>Kept</div>", + }, sentBody(t, last.Body)) +} + +func TestCloudFilesUpdateURLInfersAKnownServiceOnly(t *testing.T) { + for url, service := range map[string]string{ + "https://www.figma.com/file/xyz/New": "figma", + "https://example.com/elsewhere": "dropbox", + } { + app, transport := setupRecordingTestApp(t, + stubRoute{method: http.MethodGet, path: "/99999/cloud_files/456", status: http.StatusOK, body: cloudFileJSON}, + stubRoute{method: http.MethodPut, path: "/99999/cloud_files/456", status: http.StatusOK, body: cloudFileJSON}, + ) + + err := executeRecordingCommand(NewFilesCmd(), app, "cloud-files", "update", "456", "--url", url) + require.NoError(t, err) + + body := sentBody(t, transport.last(t).Body) + assert.Equal(t, url, body["url"]) + assert.Equal(t, service, body["service"], "url %s", url) + assert.Equal(t, "Plan", body["title"]) + } +} + +func TestCloudFilesUpdateEmptyDescriptionClearsIt(t *testing.T) { + app, transport := setupRecordingTestApp(t, + stubRoute{method: http.MethodGet, path: "/99999/cloud_files/456", status: http.StatusOK, body: cloudFileJSON}, + stubRoute{method: http.MethodPut, path: "/99999/cloud_files/456", status: http.StatusOK, body: cloudFileJSON}, + ) + + err := executeRecordingCommand(NewFilesCmd(), app, "cloud-files", "update", "456", "--description", "") + require.NoError(t, err) + + body := sentBody(t, transport.last(t).Body) + assert.NotContains(t, body, "description", "left out, Basecamp clears it") + assert.Equal(t, "Plan", body["title"]) +} + +func TestCloudFilesUpdateRefusesBeforeAnyRequest(t *testing.T) { + t.Setenv("BASECAMP_NONINTERACTIVE", "1") + for name, args := range map[string][]string{ + "no changes": {"cloud-files", "update", "456"}, + "empty title": {"cloud-files", "update", "456", "--title", ""}, + "empty url": {"cloud-files", "update", "456", "--url", " "}, + "bad id": {"cloud-files", "update", "abc", "--title", "X"}, + } { + t.Run(name, func(t *testing.T) { + app, transport := setupRecordingTestApp(t) + + err := executeRecordingCommand(NewFilesCmd(), app, args...) + require.Error(t, err) + assert.Empty(t, transport.recorded()) + }) + } +} + +func TestGoogleDocsCreatePublishesAndInfersType(t *testing.T) { + app, transport := setupRecordingTestApp(t, projectsRoute(), projectDockRoute(), peopleRoute(), stubRoute{ + method: http.MethodPost, + path: "/99999/buckets/123/vaults/777/google_documents.json", + status: http.StatusCreated, + body: googleDocJSON, + }) + + err := executeRecordingCommand(NewFilesCmd(), app, "google-docs", "create", "Budget", + "--url", "https://docs.google.com/spreadsheets/d/abc/edit", "--subscribe", "11", "--in", "123") + require.NoError(t, err) + + last := transport.last(t) + assert.Equal(t, "/99999/buckets/123/vaults/777/google_documents.json", last.Path) + body := sentBody(t, last.Body) + assert.Equal(t, "sheet", body["document_type"], "inferred from the docs.google.com path") + assert.Equal(t, "active", body["status"], "published unless --draft") + assert.Equal(t, "Budget", body["title"]) + assert.Equal(t, []any{float64(11)}, body["subscriptions"]) +} + +func TestGoogleDocsCreateDraftOtherTypeAndNoSubscribe(t *testing.T) { + app, transport := setupRecordingTestApp(t, projectsRoute(), stubRoute{ + method: http.MethodPost, + path: "/99999/buckets/123/vaults/555/google_documents.json", + status: http.StatusCreated, + body: googleDocJSON, + }) + + err := executeRecordingCommand(NewFilesCmd(), app, "google-docs", "create", + "--url", "https://drive.google.com/file/d/abc/view", "--draft", "--no-subscribe", + "--folder", "555", "--in", "123") + require.NoError(t, err) + + body := sentBody(t, transport.last(t).Body) + assert.Equal(t, "other", body["document_type"], "a link off docs.google.com is other") + assert.Equal(t, "drafted", body["status"]) + assert.Equal(t, []any{}, body["subscriptions"]) +} + +func TestGoogleDocsCreateRefusesAnUnknownType(t *testing.T) { + app, transport := setupRecordingTestApp(t, projectsRoute()) + + err := executeRecordingCommand(NewFilesCmd(), app, "google-docs", "create", + "--url", "https://docs.google.com/document/d/abc/edit", "--type", "pdf", "--in", "123") + require.Error(t, err) + var e *output.Error + require.True(t, errors.As(err, &e), "expected *output.Error, got %T: %v", err, err) + assert.Equal(t, "Invalid --type: pdf", e.Message) + assert.Empty(t, transport.recorded()) +} + +func TestGoogleDocsUpdateSendsBackWhatItDoesNotChange(t *testing.T) { + app, transport := setupRecordingTestApp(t, + stubRoute{method: http.MethodGet, path: "/99999/google_documents/789", status: http.StatusOK, body: googleDocJSON}, + stubRoute{method: http.MethodPut, path: "/99999/google_documents/789", status: http.StatusOK, body: googleDocJSON}, + ) + + err := executeRecordingCommand(NewFilesCmd(), app, "google-docs", "update", "789", "--title", "Spec (final)") + require.NoError(t, err) + + last := transport.last(t) + assert.Equal(t, http.MethodPut, last.Method) + assert.Equal(t, map[string]any{ + "url": "https://docs.google.com/document/d/abc/edit", + "document_type": "doc", + "title": "Spec (final)", + "description": "<div>Kept</div>", + }, sentBody(t, last.Body), "no status, so the draft stays a draft; no subscriptions, so its subscribers stay") +} + +func TestGoogleDocsUpdatePublishesWithSubscribers(t *testing.T) { + app, transport := setupRecordingTestApp(t, peopleRoute(), + stubRoute{method: http.MethodGet, path: "/99999/google_documents/789", status: http.StatusOK, body: googleDocJSON}, + stubRoute{method: http.MethodPut, path: "/99999/google_documents/789", status: http.StatusOK, body: googleDocJSON}, + ) + + err := executeRecordingCommand(NewFilesCmd(), app, "google-docs", "update", "789", + "--publish", "--subscribe", "11,22", "--url", "https://docs.google.com/presentation/d/xyz/edit") + require.NoError(t, err) + + body := sentBody(t, transport.last(t).Body) + assert.Equal(t, "active", body["status"]) + assert.Equal(t, []any{float64(11), float64(22)}, body["subscriptions"]) + assert.Equal(t, "slide", body["document_type"], "a new docs.google.com url brings its type") + assert.Equal(t, "Spec", body["title"]) +} + +func TestGoogleDocsUpdateExplicitTypeWinsOverTheURL(t *testing.T) { + app, transport := setupRecordingTestApp(t, + stubRoute{method: http.MethodGet, path: "/99999/google_documents/789", status: http.StatusOK, body: googleDocJSON}, + stubRoute{method: http.MethodPut, path: "/99999/google_documents/789", status: http.StatusOK, body: googleDocJSON}, + ) + + err := executeRecordingCommand(NewFilesCmd(), app, "google-docs", "update", "789", + "--url", "https://docs.google.com/spreadsheets/d/xyz/edit", "--type", "other") + require.NoError(t, err) + + assert.Equal(t, "other", sentBody(t, transport.last(t).Body)["document_type"]) +} + +func TestGoogleDocsUpdateRefusesBeforeAnyRequest(t *testing.T) { + t.Setenv("BASECAMP_NONINTERACTIVE", "1") + for name, args := range map[string][]string{ + "no changes": {"google-docs", "update", "789"}, + "unpublish": {"google-docs", "update", "789", "--publish=false"}, + "subscribe and silent": {"google-docs", "update", "789", "--subscribe", "11", "--no-subscribe"}, + "empty type": {"google-docs", "update", "789", "--type", ""}, + } { + t.Run(name, func(t *testing.T) { + app, transport := setupRecordingTestApp(t) + + err := executeRecordingCommand(NewFilesCmd(), app, args...) + require.Error(t, err) + assert.Empty(t, transport.recorded()) + }) + } +} + +func TestInferGoogleDocumentType(t *testing.T) { + for raw, want := range map[string]string{ + "https://docs.google.com/document/d/abc/edit": "doc", + "https://docs.google.com/spreadsheets/d/abc/edit": "sheet", + "docs.google.com/presentation/d/abc/edit": "slide", + "https://docs.google.com/forms/d/abc/edit": "", + "https://drive.google.com/file/d/abc/view": "", + "https://example.com/document/d/abc": "", + } { + assert.Equal(t, want, inferGoogleDocumentType(raw), raw) + } +} + +func TestLinkUpdatesTakeTheirOwnBasecampURL(t *testing.T) { + for name, tc := range map[string]struct { + args []string + path string + }{ + "cloud file": { + args: []string{"cloud-files", "update", "https://3.basecamp.com/99999/buckets/123/cloud_files/456", "--title", "Plan (final)"}, + path: "/99999/cloud_files/456", + }, + "Google document": { + args: []string{"google-docs", "update", "https://3.basecamp.com/99999/buckets/123/vaults/777/google_documents/789", "--title", "Spec (final)"}, + path: "/99999/google_documents/789", + }, + } { + t.Run(name, func(t *testing.T) { + body := cloudFileJSON + if tc.path == "/99999/google_documents/789" { + body = googleDocJSON + } + app, transport := setupRecordingTestApp(t, + stubRoute{method: http.MethodGet, path: tc.path, status: http.StatusOK, body: body}, + stubRoute{method: http.MethodPut, path: tc.path, status: http.StatusOK, body: body}, + ) + + err := executeRecordingCommand(NewFilesCmd(), app, tc.args...) + require.NoError(t, err) + assert.Equal(t, tc.path, transport.last(t).Path) + }) + } +} + +func TestLinkUpdatesRefuseAnotherURLBeforeAnyRequest(t *testing.T) { + for name, args := range map[string][]string{ + "a Google document's URL to cloud-files": {"cloud-files", "update", "https://3.basecamp.com/99999/buckets/123/google_documents/789", "--title", "X"}, + "a cloud file's URL to google-docs": {"google-docs", "update", "https://3.basecamp.com/99999/buckets/123/cloud_files/456", "--title", "X"}, + "a look-alike host": {"cloud-files", "update", "https://evil.example/99999/buckets/123/cloud_files/456", "--title", "X"}, + "another account": {"cloud-files", "update", "https://3.basecamp.com/11111/buckets/123/cloud_files/456", "--title", "X"}, + "a collection": {"google-docs", "update", "https://3.basecamp.com/99999/buckets/123/vaults/777", "--title", "X"}, + "a comment on a cloud file": {"cloud-files", "update", "https://3.basecamp.com/99999/buckets/123/cloud_files/456#__recording_901", "--title", "X"}, + "a comment on a Google document": {"google-docs", "update", "https://3.basecamp.com/99999/buckets/123/vaults/777/google_documents/789#__recording_901", "--title", "X"}, + } { + t.Run(name, func(t *testing.T) { + app, transport := setupRecordingTestApp(t) + + err := executeRecordingCommand(NewFilesCmd(), app, args...) + require.Error(t, err) + var e *output.Error + require.True(t, errors.As(err, &e), "expected *output.Error, got %T: %v", err, err) + assert.Equal(t, output.CodeUsage, e.Code) + assert.Empty(t, transport.recorded()) + }) + } +} + +func TestCloudFilesUpdateResolvesLocalImagesInTheDescription(t *testing.T) { + app, transport := setupRecordingTestApp(t, + stubRoute{method: http.MethodGet, path: "/99999/cloud_files/456", status: http.StatusOK, body: cloudFileJSON}, + stubRoute{method: http.MethodPut, path: "/99999/cloud_files/456", status: http.StatusOK, body: cloudFileJSON}, + ) + + // A local image that isn't there is refused rather than sent as a path. + err := executeRecordingCommand(NewFilesCmd(), app, "cloud-files", "update", "456", + "--description", "![preview](./no-such-preview.png)") + require.Error(t, err) + for _, req := range transport.recorded() { + assert.NotEqual(t, http.MethodPut, req.Method, "nothing is written") + } +} + +func TestGoogleDocsCreateUploadsALocalImageInTheDescription(t *testing.T) { + dir := t.TempDir() + png := []byte{0x89, 'P', 'N', 'G', '\r', '\n', 0x1a, '\n', 0, 0, 0, 0} + require.NoError(t, os.WriteFile(filepath.Join(dir, "preview.png"), png, 0o644)) + t.Chdir(dir) + + app, transport := setupRecordingTestApp(t, projectsRoute(), stubRoute{ + method: http.MethodPost, + path: "/99999/attachments.json", + status: http.StatusCreated, + body: `{"attachable_sgid":"sgid-preview"}`, + }, stubRoute{ + method: http.MethodPost, + path: "/99999/buckets/123/vaults/555/google_documents.json", + status: http.StatusCreated, + body: googleDocJSON, + }) + + err := executeRecordingCommand(NewFilesCmd(), app, "google-docs", "create", "Spec", + "--url", "https://docs.google.com/document/d/abc/edit", "--description", "![preview](./preview.png)", + "--folder", "555", "--in", "123") + require.NoError(t, err) + + last := transport.last(t) + assert.Equal(t, "/99999/buckets/123/vaults/555/google_documents.json", last.Path) + description, _ := sentBody(t, last.Body)["description"].(string) + assert.Contains(t, description, `sgid="sgid-preview"`, "the image is uploaded and attached") + assert.NotContains(t, description, "<img", "not sent as a local path") +} + +// A follow-up copied into a fresh shell must act where this command did, so +// it names the active profile and an account that came from the URL. +func TestLinkUpdateFollowUpsCarryTheProfileAndAccount(t *testing.T) { + const cloudFileURL = "https://3.basecamp.com/99999/buckets/123/cloud_files/456" + cases := map[string]struct { + arg string + profile string + inherit bool + followUp string + }{ + "account from config": {arg: "456", inherit: true, followUp: "basecamp files show 456 --type cloud_file"}, + "profile, config account": {arg: "456", profile: "staging", inherit: true, followUp: "basecamp files show 456 --type cloud_file --profile staging"}, + "profile, account from URL": {arg: cloudFileURL, profile: "staging", followUp: "basecamp files show 456 --type cloud_file --profile staging --account 99999"}, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + app, _ := setupRecordingTestApp(t, + stubRoute{method: http.MethodGet, path: "/99999/cloud_files/456", status: http.StatusOK, body: cloudFileJSON}, + stubRoute{method: http.MethodPut, path: "/99999/cloud_files/456", status: http.StatusOK, body: cloudFileJSON}) + app.Config.ActiveProfile = c.profile + app.Config.Sources = map[string]string{} + if !c.inherit { + app.Config.AccountID = "" + } + buf := captureSpotlightOutput(app) + + require.NoError(t, executeRecordingCommand(NewFilesCmd(), app, "cloud-files", "update", c.arg, "--title", "X")) + + assert.Contains(t, decodeSpotlightEnvelope(t, buf).Breadcrumbs, output.Breadcrumb{ + Action: "show", Cmd: c.followUp, Description: "View cloud file", + }) + }) + } +}