@37signals/basecamp 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (356) hide show
  1. package/README.md +600 -0
  2. package/dist/auth-strategy.d.ts +36 -0
  3. package/dist/auth-strategy.d.ts.map +1 -0
  4. package/dist/auth-strategy.js +33 -0
  5. package/dist/auth-strategy.js.map +1 -0
  6. package/dist/client.d.ts +224 -0
  7. package/dist/client.d.ts.map +1 -0
  8. package/dist/client.js +715 -0
  9. package/dist/client.js.map +1 -0
  10. package/dist/errors.d.ts +137 -0
  11. package/dist/errors.d.ts.map +1 -0
  12. package/dist/errors.js +269 -0
  13. package/dist/errors.js.map +1 -0
  14. package/dist/generated/metadata.json +2281 -0
  15. package/dist/generated/openapi-stripped.json +21268 -0
  16. package/dist/generated/path-mapping.d.ts +8 -0
  17. package/dist/generated/path-mapping.d.ts.map +1 -0
  18. package/dist/generated/path-mapping.js +192 -0
  19. package/dist/generated/path-mapping.js.map +1 -0
  20. package/dist/generated/path-mapping.ts +199 -0
  21. package/dist/generated/schema.d.ts +14883 -0
  22. package/dist/generated/services/attachments.d.ts +27 -0
  23. package/dist/generated/services/attachments.d.ts.map +1 -0
  24. package/dist/generated/services/attachments.js +49 -0
  25. package/dist/generated/services/attachments.js.map +1 -0
  26. package/dist/generated/services/attachments.ts +59 -0
  27. package/dist/generated/services/boosts.d.ts +114 -0
  28. package/dist/generated/services/boosts.d.ts.map +1 -0
  29. package/dist/generated/services/boosts.js +179 -0
  30. package/dist/generated/services/boosts.js.map +1 -0
  31. package/dist/generated/services/boosts.ts +250 -0
  32. package/dist/generated/services/campfires.d.ts +202 -0
  33. package/dist/generated/services/campfires.d.ts.map +1 -0
  34. package/dist/generated/services/campfires.js +309 -0
  35. package/dist/generated/services/campfires.js.map +1 -0
  36. package/dist/generated/services/campfires.ts +433 -0
  37. package/dist/generated/services/card-columns.d.ts +163 -0
  38. package/dist/generated/services/card-columns.d.ts.map +1 -0
  39. package/dist/generated/services/card-columns.js +264 -0
  40. package/dist/generated/services/card-columns.js.map +1 -0
  41. package/dist/generated/services/card-columns.ts +360 -0
  42. package/dist/generated/services/card-steps.d.ts +105 -0
  43. package/dist/generated/services/card-steps.d.ts.map +1 -0
  44. package/dist/generated/services/card-steps.js +148 -0
  45. package/dist/generated/services/card-steps.js.map +1 -0
  46. package/dist/generated/services/card-steps.ts +221 -0
  47. package/dist/generated/services/card-tables.d.ts +27 -0
  48. package/dist/generated/services/card-tables.d.ts.map +1 -0
  49. package/dist/generated/services/card-tables.js +40 -0
  50. package/dist/generated/services/card-tables.js.map +1 -0
  51. package/dist/generated/services/card-tables.ts +55 -0
  52. package/dist/generated/services/cards.d.ts +118 -0
  53. package/dist/generated/services/cards.d.ts.map +1 -0
  54. package/dist/generated/services/cards.js +166 -0
  55. package/dist/generated/services/cards.js.map +1 -0
  56. package/dist/generated/services/cards.ts +247 -0
  57. package/dist/generated/services/checkins.d.ts +278 -0
  58. package/dist/generated/services/checkins.d.ts.map +1 -0
  59. package/dist/generated/services/checkins.js +420 -0
  60. package/dist/generated/services/checkins.js.map +1 -0
  61. package/dist/generated/services/checkins.ts +600 -0
  62. package/dist/generated/services/client-approvals.d.ts +45 -0
  63. package/dist/generated/services/client-approvals.d.ts.map +1 -0
  64. package/dist/generated/services/client-approvals.js +58 -0
  65. package/dist/generated/services/client-approvals.js.map +1 -0
  66. package/dist/generated/services/client-approvals.ts +89 -0
  67. package/dist/generated/services/client-correspondences.d.ts +45 -0
  68. package/dist/generated/services/client-correspondences.d.ts.map +1 -0
  69. package/dist/generated/services/client-correspondences.js +58 -0
  70. package/dist/generated/services/client-correspondences.js.map +1 -0
  71. package/dist/generated/services/client-correspondences.ts +89 -0
  72. package/dist/generated/services/client-replies.d.ts +47 -0
  73. package/dist/generated/services/client-replies.d.ts.map +1 -0
  74. package/dist/generated/services/client-replies.js +65 -0
  75. package/dist/generated/services/client-replies.js.map +1 -0
  76. package/dist/generated/services/client-replies.ts +95 -0
  77. package/dist/generated/services/client-visibility.d.ts +35 -0
  78. package/dist/generated/services/client-visibility.d.ts.map +1 -0
  79. package/dist/generated/services/client-visibility.js +44 -0
  80. package/dist/generated/services/client-visibility.js.map +1 -0
  81. package/dist/generated/services/client-visibility.ts +68 -0
  82. package/dist/generated/services/comments.d.ts +86 -0
  83. package/dist/generated/services/comments.d.ts.map +1 -0
  84. package/dist/generated/services/comments.js +129 -0
  85. package/dist/generated/services/comments.js.map +1 -0
  86. package/dist/generated/services/comments.ts +185 -0
  87. package/dist/generated/services/documents.d.ts +92 -0
  88. package/dist/generated/services/documents.d.ts.map +1 -0
  89. package/dist/generated/services/documents.js +129 -0
  90. package/dist/generated/services/documents.js.map +1 -0
  91. package/dist/generated/services/documents.ts +191 -0
  92. package/dist/generated/services/events.d.ts +34 -0
  93. package/dist/generated/services/events.d.ts.map +1 -0
  94. package/dist/generated/services/events.js +39 -0
  95. package/dist/generated/services/events.js.map +1 -0
  96. package/dist/generated/services/events.ts +64 -0
  97. package/dist/generated/services/forwards.d.ts +112 -0
  98. package/dist/generated/services/forwards.d.ts.map +1 -0
  99. package/dist/generated/services/forwards.js +172 -0
  100. package/dist/generated/services/forwards.js.map +1 -0
  101. package/dist/generated/services/forwards.ts +241 -0
  102. package/dist/generated/services/index.d.ts +39 -0
  103. package/dist/generated/services/index.d.ts.map +1 -0
  104. package/dist/generated/services/index.js +39 -0
  105. package/dist/generated/services/index.js.map +1 -0
  106. package/dist/generated/services/index.ts +38 -0
  107. package/dist/generated/services/lineup.d.ts +67 -0
  108. package/dist/generated/services/lineup.d.ts.map +1 -0
  109. package/dist/generated/services/lineup.js +99 -0
  110. package/dist/generated/services/lineup.js.map +1 -0
  111. package/dist/generated/services/lineup.ts +143 -0
  112. package/dist/generated/services/message-boards.d.ts +27 -0
  113. package/dist/generated/services/message-boards.d.ts.map +1 -0
  114. package/dist/generated/services/message-boards.js +40 -0
  115. package/dist/generated/services/message-boards.js.map +1 -0
  116. package/dist/generated/services/message-boards.ts +55 -0
  117. package/dist/generated/services/message-types.d.ts +100 -0
  118. package/dist/generated/services/message-types.d.ts.map +1 -0
  119. package/dist/generated/services/message-types.js +144 -0
  120. package/dist/generated/services/message-types.js.map +1 -0
  121. package/dist/generated/services/message-types.ts +210 -0
  122. package/dist/generated/services/messages.d.ts +122 -0
  123. package/dist/generated/services/messages.d.ts.map +1 -0
  124. package/dist/generated/services/messages.js +180 -0
  125. package/dist/generated/services/messages.js.map +1 -0
  126. package/dist/generated/services/messages.ts +258 -0
  127. package/dist/generated/services/people.d.ts +122 -0
  128. package/dist/generated/services/people.d.ts.map +1 -0
  129. package/dist/generated/services/people.js +167 -0
  130. package/dist/generated/services/people.js.map +1 -0
  131. package/dist/generated/services/people.ts +252 -0
  132. package/dist/generated/services/projects.d.ts +109 -0
  133. package/dist/generated/services/projects.d.ts.map +1 -0
  134. package/dist/generated/services/projects.js +153 -0
  135. package/dist/generated/services/projects.js.map +1 -0
  136. package/dist/generated/services/projects.ts +224 -0
  137. package/dist/generated/services/recordings.d.ts +93 -0
  138. package/dist/generated/services/recordings.d.ts.map +1 -0
  139. package/dist/generated/services/recordings.js +138 -0
  140. package/dist/generated/services/recordings.js.map +1 -0
  141. package/dist/generated/services/recordings.ts +191 -0
  142. package/dist/generated/services/reports.d.ts +90 -0
  143. package/dist/generated/services/reports.d.ts.map +1 -0
  144. package/dist/generated/services/reports.js +124 -0
  145. package/dist/generated/services/reports.js.map +1 -0
  146. package/dist/generated/services/reports.ts +187 -0
  147. package/dist/generated/services/schedules.d.ts +162 -0
  148. package/dist/generated/services/schedules.d.ts.map +1 -0
  149. package/dist/generated/services/schedules.js +228 -0
  150. package/dist/generated/services/schedules.js.map +1 -0
  151. package/dist/generated/services/schedules.ts +335 -0
  152. package/dist/generated/services/search.d.ts +45 -0
  153. package/dist/generated/services/search.d.ts.map +1 -0
  154. package/dist/generated/services/search.js +56 -0
  155. package/dist/generated/services/search.js.map +1 -0
  156. package/dist/generated/services/search.ts +89 -0
  157. package/dist/generated/services/subscriptions.d.ts +73 -0
  158. package/dist/generated/services/subscriptions.d.ts.map +1 -0
  159. package/dist/generated/services/subscriptions.js +119 -0
  160. package/dist/generated/services/subscriptions.js.map +1 -0
  161. package/dist/generated/services/subscriptions.ts +160 -0
  162. package/dist/generated/services/templates.d.ts +140 -0
  163. package/dist/generated/services/templates.d.ts.map +1 -0
  164. package/dist/generated/services/templates.js +207 -0
  165. package/dist/generated/services/templates.js.map +1 -0
  166. package/dist/generated/services/templates.ts +294 -0
  167. package/dist/generated/services/timeline.d.ts +31 -0
  168. package/dist/generated/services/timeline.d.ts.map +1 -0
  169. package/dist/generated/services/timeline.js +39 -0
  170. package/dist/generated/services/timeline.js.map +1 -0
  171. package/dist/generated/services/timeline.ts +62 -0
  172. package/dist/generated/services/timesheets.d.ts +145 -0
  173. package/dist/generated/services/timesheets.d.ts.map +1 -0
  174. package/dist/generated/services/timesheets.js +186 -0
  175. package/dist/generated/services/timesheets.js.map +1 -0
  176. package/dist/generated/services/timesheets.ts +289 -0
  177. package/dist/generated/services/todolist-groups.d.ts +74 -0
  178. package/dist/generated/services/todolist-groups.d.ts.map +1 -0
  179. package/dist/generated/services/todolist-groups.js +100 -0
  180. package/dist/generated/services/todolist-groups.js.map +1 -0
  181. package/dist/generated/services/todolist-groups.ts +151 -0
  182. package/dist/generated/services/todolists.d.ts +95 -0
  183. package/dist/generated/services/todolists.d.ts.map +1 -0
  184. package/dist/generated/services/todolists.js +130 -0
  185. package/dist/generated/services/todolists.js.map +1 -0
  186. package/dist/generated/services/todolists.ts +192 -0
  187. package/dist/generated/services/todos.d.ts +175 -0
  188. package/dist/generated/services/todos.d.ts.map +1 -0
  189. package/dist/generated/services/todos.js +255 -0
  190. package/dist/generated/services/todos.js.map +1 -0
  191. package/dist/generated/services/todos.ts +369 -0
  192. package/dist/generated/services/todosets.d.ts +27 -0
  193. package/dist/generated/services/todosets.d.ts.map +1 -0
  194. package/dist/generated/services/todosets.js +40 -0
  195. package/dist/generated/services/todosets.js.map +1 -0
  196. package/dist/generated/services/todosets.ts +55 -0
  197. package/dist/generated/services/tools.d.ts +122 -0
  198. package/dist/generated/services/tools.d.ts.map +1 -0
  199. package/dist/generated/services/tools.js +197 -0
  200. package/dist/generated/services/tools.js.map +1 -0
  201. package/dist/generated/services/tools.ts +267 -0
  202. package/dist/generated/services/uploads.d.ts +109 -0
  203. package/dist/generated/services/uploads.d.ts.map +1 -0
  204. package/dist/generated/services/uploads.js +153 -0
  205. package/dist/generated/services/uploads.js.map +1 -0
  206. package/dist/generated/services/uploads.ts +227 -0
  207. package/dist/generated/services/vaults.d.ts +86 -0
  208. package/dist/generated/services/vaults.d.ts.map +1 -0
  209. package/dist/generated/services/vaults.js +126 -0
  210. package/dist/generated/services/vaults.js.map +1 -0
  211. package/dist/generated/services/vaults.ts +182 -0
  212. package/dist/generated/services/webhooks.d.ts +106 -0
  213. package/dist/generated/services/webhooks.d.ts.map +1 -0
  214. package/dist/generated/services/webhooks.js +157 -0
  215. package/dist/generated/services/webhooks.js.map +1 -0
  216. package/dist/generated/services/webhooks.ts +226 -0
  217. package/dist/hooks/otel.d.ts +136 -0
  218. package/dist/hooks/otel.d.ts.map +1 -0
  219. package/dist/hooks/otel.js +240 -0
  220. package/dist/hooks/otel.js.map +1 -0
  221. package/dist/hooks.d.ts +171 -0
  222. package/dist/hooks.d.ts.map +1 -0
  223. package/dist/hooks.js +196 -0
  224. package/dist/hooks.js.map +1 -0
  225. package/dist/index.d.ts +90 -0
  226. package/dist/index.d.ts.map +1 -0
  227. package/dist/index.js +122 -0
  228. package/dist/index.js.map +1 -0
  229. package/dist/oauth/authorize.d.ts +48 -0
  230. package/dist/oauth/authorize.d.ts.map +1 -0
  231. package/dist/oauth/authorize.js +56 -0
  232. package/dist/oauth/authorize.js.map +1 -0
  233. package/dist/oauth/callback-server.d.ts +56 -0
  234. package/dist/oauth/callback-server.d.ts.map +1 -0
  235. package/dist/oauth/callback-server.js +150 -0
  236. package/dist/oauth/callback-server.js.map +1 -0
  237. package/dist/oauth/discovery.d.ts +54 -0
  238. package/dist/oauth/discovery.d.ts.map +1 -0
  239. package/dist/oauth/discovery.js +116 -0
  240. package/dist/oauth/discovery.js.map +1 -0
  241. package/dist/oauth/exchange.d.ts +96 -0
  242. package/dist/oauth/exchange.d.ts.map +1 -0
  243. package/dist/oauth/exchange.js +324 -0
  244. package/dist/oauth/exchange.js.map +1 -0
  245. package/dist/oauth/identity.d.ts +30 -0
  246. package/dist/oauth/identity.d.ts.map +1 -0
  247. package/dist/oauth/identity.js +82 -0
  248. package/dist/oauth/identity.js.map +1 -0
  249. package/dist/oauth/index.d.ts +50 -0
  250. package/dist/oauth/index.d.ts.map +1 -0
  251. package/dist/oauth/index.js +58 -0
  252. package/dist/oauth/index.js.map +1 -0
  253. package/dist/oauth/interactive-login.d.ts +62 -0
  254. package/dist/oauth/interactive-login.d.ts.map +1 -0
  255. package/dist/oauth/interactive-login.js +106 -0
  256. package/dist/oauth/interactive-login.js.map +1 -0
  257. package/dist/oauth/pkce.d.ts +68 -0
  258. package/dist/oauth/pkce.d.ts.map +1 -0
  259. package/dist/oauth/pkce.js +80 -0
  260. package/dist/oauth/pkce.js.map +1 -0
  261. package/dist/oauth/token-manager.d.ts +92 -0
  262. package/dist/oauth/token-manager.d.ts.map +1 -0
  263. package/dist/oauth/token-manager.js +126 -0
  264. package/dist/oauth/token-manager.js.map +1 -0
  265. package/dist/oauth/token-store.d.ts +45 -0
  266. package/dist/oauth/token-store.d.ts.map +1 -0
  267. package/dist/oauth/token-store.js +105 -0
  268. package/dist/oauth/token-store.js.map +1 -0
  269. package/dist/oauth/types.d.ts +98 -0
  270. package/dist/oauth/types.d.ts.map +1 -0
  271. package/dist/oauth/types.js +8 -0
  272. package/dist/oauth/types.js.map +1 -0
  273. package/dist/pagination-utils.d.ts +27 -0
  274. package/dist/pagination-utils.d.ts.map +1 -0
  275. package/dist/pagination-utils.js +54 -0
  276. package/dist/pagination-utils.js.map +1 -0
  277. package/dist/pagination.d.ts +56 -0
  278. package/dist/pagination.d.ts.map +1 -0
  279. package/dist/pagination.js +57 -0
  280. package/dist/pagination.js.map +1 -0
  281. package/dist/security.d.ts +68 -0
  282. package/dist/security.d.ts.map +1 -0
  283. package/dist/security.js +107 -0
  284. package/dist/security.js.map +1 -0
  285. package/dist/services/authorization.d.ts +124 -0
  286. package/dist/services/authorization.d.ts.map +1 -0
  287. package/dist/services/authorization.js +117 -0
  288. package/dist/services/authorization.js.map +1 -0
  289. package/dist/services/base.d.ts +102 -0
  290. package/dist/services/base.d.ts.map +1 -0
  291. package/dist/services/base.js +230 -0
  292. package/dist/services/base.js.map +1 -0
  293. package/dist/webhooks/adapters/node-http.d.ts +14 -0
  294. package/dist/webhooks/adapters/node-http.d.ts.map +1 -0
  295. package/dist/webhooks/adapters/node-http.js +60 -0
  296. package/dist/webhooks/adapters/node-http.js.map +1 -0
  297. package/dist/webhooks/events.d.ts +52 -0
  298. package/dist/webhooks/events.d.ts.map +1 -0
  299. package/dist/webhooks/events.js +52 -0
  300. package/dist/webhooks/events.js.map +1 -0
  301. package/dist/webhooks/handler.d.ts +62 -0
  302. package/dist/webhooks/handler.d.ts.map +1 -0
  303. package/dist/webhooks/handler.js +226 -0
  304. package/dist/webhooks/handler.js.map +1 -0
  305. package/dist/webhooks/index.d.ts +5 -0
  306. package/dist/webhooks/index.d.ts.map +1 -0
  307. package/dist/webhooks/index.js +5 -0
  308. package/dist/webhooks/index.js.map +1 -0
  309. package/dist/webhooks/verify.d.ts +11 -0
  310. package/dist/webhooks/verify.d.ts.map +1 -0
  311. package/dist/webhooks/verify.js +25 -0
  312. package/dist/webhooks/verify.js.map +1 -0
  313. package/package.json +70 -0
  314. package/src/generated/metadata.json +2281 -0
  315. package/src/generated/openapi-stripped.json +21268 -0
  316. package/src/generated/path-mapping.ts +199 -0
  317. package/src/generated/schema.d.ts +14883 -0
  318. package/src/generated/services/attachments.ts +59 -0
  319. package/src/generated/services/boosts.ts +250 -0
  320. package/src/generated/services/campfires.ts +433 -0
  321. package/src/generated/services/card-columns.ts +360 -0
  322. package/src/generated/services/card-steps.ts +221 -0
  323. package/src/generated/services/card-tables.ts +55 -0
  324. package/src/generated/services/cards.ts +247 -0
  325. package/src/generated/services/checkins.ts +600 -0
  326. package/src/generated/services/client-approvals.ts +89 -0
  327. package/src/generated/services/client-correspondences.ts +89 -0
  328. package/src/generated/services/client-replies.ts +95 -0
  329. package/src/generated/services/client-visibility.ts +68 -0
  330. package/src/generated/services/comments.ts +185 -0
  331. package/src/generated/services/documents.ts +191 -0
  332. package/src/generated/services/events.ts +64 -0
  333. package/src/generated/services/forwards.ts +241 -0
  334. package/src/generated/services/index.ts +38 -0
  335. package/src/generated/services/lineup.ts +143 -0
  336. package/src/generated/services/message-boards.ts +55 -0
  337. package/src/generated/services/message-types.ts +210 -0
  338. package/src/generated/services/messages.ts +258 -0
  339. package/src/generated/services/people.ts +252 -0
  340. package/src/generated/services/projects.ts +224 -0
  341. package/src/generated/services/recordings.ts +191 -0
  342. package/src/generated/services/reports.ts +187 -0
  343. package/src/generated/services/schedules.ts +335 -0
  344. package/src/generated/services/search.ts +89 -0
  345. package/src/generated/services/subscriptions.ts +160 -0
  346. package/src/generated/services/templates.ts +294 -0
  347. package/src/generated/services/timeline.ts +62 -0
  348. package/src/generated/services/timesheets.ts +289 -0
  349. package/src/generated/services/todolist-groups.ts +151 -0
  350. package/src/generated/services/todolists.ts +192 -0
  351. package/src/generated/services/todos.ts +369 -0
  352. package/src/generated/services/todosets.ts +55 -0
  353. package/src/generated/services/tools.ts +267 -0
  354. package/src/generated/services/uploads.ts +227 -0
  355. package/src/generated/services/vaults.ts +182 -0
  356. package/src/generated/services/webhooks.ts +226 -0
@@ -0,0 +1,224 @@
1
+ /**
2
+ * Projects service for the Basecamp API.
3
+ *
4
+ * @generated from OpenAPI spec - do not edit directly
5
+ */
6
+
7
+ import { BaseService } from "../../services/base.js";
8
+ import type { components } from "../schema.js";
9
+ import { ListResult } from "../../pagination.js";
10
+ import type { PaginationOptions } from "../../pagination.js";
11
+ import { Errors } from "../../errors.js";
12
+
13
+ // =============================================================================
14
+ // Types
15
+ // =============================================================================
16
+
17
+ /** Project entity from the Basecamp API. */
18
+ export type Project = components["schemas"]["Project"];
19
+
20
+ /**
21
+ * Options for list.
22
+ */
23
+ export interface ListProjectOptions extends PaginationOptions {
24
+ /** Filter by status */
25
+ status?: "active" | "archived" | "trashed";
26
+ }
27
+
28
+ /**
29
+ * Request parameters for create.
30
+ */
31
+ export interface CreateProjectRequest {
32
+ /** Display name */
33
+ name: string;
34
+ /** Rich text description (HTML) */
35
+ description?: string;
36
+ }
37
+
38
+ /**
39
+ * Request parameters for update.
40
+ */
41
+ export interface UpdateProjectRequest {
42
+ /** Display name */
43
+ name: string;
44
+ /** Rich text description (HTML) */
45
+ description?: string;
46
+ /** Admissions */
47
+ admissions?: "invite" | "employee" | "team";
48
+ /** Schedule date range settings */
49
+ scheduleAttributes?: components["schemas"]["ScheduleAttributes"];
50
+ }
51
+
52
+
53
+ // =============================================================================
54
+ // Service
55
+ // =============================================================================
56
+
57
+ /**
58
+ * Service for Projects operations.
59
+ */
60
+ export class ProjectsService extends BaseService {
61
+
62
+ /**
63
+ * List projects (active by default; optionally archived/trashed)
64
+ * @param options - Optional query parameters
65
+ * @returns All Project across all pages, with .meta.totalCount
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const result = await client.projects.list();
70
+ *
71
+ * // With options
72
+ * const filtered = await client.projects.list({ status: "active" });
73
+ * ```
74
+ */
75
+ async list(options?: ListProjectOptions): Promise<ListResult<Project>> {
76
+ return this.requestPaginated(
77
+ {
78
+ service: "Projects",
79
+ operation: "ListProjects",
80
+ resourceType: "project",
81
+ isMutation: false,
82
+ },
83
+ () =>
84
+ this.client.GET("/projects.json", {
85
+ params: {
86
+ query: { status: options?.status },
87
+ },
88
+ })
89
+ , options
90
+ );
91
+ }
92
+
93
+ /**
94
+ * Create a new project
95
+ * @param req - Project creation parameters
96
+ * @returns The Project
97
+ * @throws {BasecampError} If required fields are missing or invalid
98
+ *
99
+ * @example
100
+ * ```ts
101
+ * const result = await client.projects.create({ name: "My example" });
102
+ * ```
103
+ */
104
+ async create(req: CreateProjectRequest): Promise<Project> {
105
+ if (!req.name) {
106
+ throw Errors.validation("Name is required");
107
+ }
108
+ const response = await this.request(
109
+ {
110
+ service: "Projects",
111
+ operation: "CreateProject",
112
+ resourceType: "project",
113
+ isMutation: true,
114
+ },
115
+ () =>
116
+ this.client.POST("/projects.json", {
117
+ body: {
118
+ name: req.name,
119
+ description: req.description,
120
+ },
121
+ })
122
+ );
123
+ return response;
124
+ }
125
+
126
+ /**
127
+ * Get a single project by id
128
+ * @param projectId - The project ID
129
+ * @returns The Project
130
+ * @throws {BasecampError} If the resource is not found
131
+ *
132
+ * @example
133
+ * ```ts
134
+ * const result = await client.projects.get(123);
135
+ * ```
136
+ */
137
+ async get(projectId: number): Promise<Project> {
138
+ const response = await this.request(
139
+ {
140
+ service: "Projects",
141
+ operation: "GetProject",
142
+ resourceType: "project",
143
+ isMutation: false,
144
+ projectId,
145
+ },
146
+ () =>
147
+ this.client.GET("/projects/{projectId}", {
148
+ params: {
149
+ path: { projectId },
150
+ },
151
+ })
152
+ );
153
+ return response;
154
+ }
155
+
156
+ /**
157
+ * Update an existing project
158
+ * @param projectId - The project ID
159
+ * @param req - Project update parameters
160
+ * @returns The Project
161
+ * @throws {BasecampError} If the resource is not found or fields are invalid
162
+ *
163
+ * @example
164
+ * ```ts
165
+ * const result = await client.projects.update(123, { name: "My example" });
166
+ * ```
167
+ */
168
+ async update(projectId: number, req: UpdateProjectRequest): Promise<Project> {
169
+ if (!req.name) {
170
+ throw Errors.validation("Name is required");
171
+ }
172
+ const response = await this.request(
173
+ {
174
+ service: "Projects",
175
+ operation: "UpdateProject",
176
+ resourceType: "project",
177
+ isMutation: true,
178
+ projectId,
179
+ },
180
+ () =>
181
+ this.client.PUT("/projects/{projectId}", {
182
+ params: {
183
+ path: { projectId },
184
+ },
185
+ body: {
186
+ name: req.name,
187
+ description: req.description,
188
+ admissions: req.admissions,
189
+ schedule_attributes: req.scheduleAttributes,
190
+ },
191
+ })
192
+ );
193
+ return response;
194
+ }
195
+
196
+ /**
197
+ * Trash a project. Trashed items can be recovered.
198
+ * @param projectId - The project ID
199
+ * @returns void
200
+ * @throws {BasecampError} If the request fails
201
+ *
202
+ * @example
203
+ * ```ts
204
+ * await client.projects.trash(123);
205
+ * ```
206
+ */
207
+ async trash(projectId: number): Promise<void> {
208
+ await this.request(
209
+ {
210
+ service: "Projects",
211
+ operation: "TrashProject",
212
+ resourceType: "project",
213
+ isMutation: true,
214
+ projectId,
215
+ },
216
+ () =>
217
+ this.client.DELETE("/projects/{projectId}", {
218
+ params: {
219
+ path: { projectId },
220
+ },
221
+ })
222
+ );
223
+ }
224
+ }
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Recordings service for the Basecamp API.
3
+ *
4
+ * @generated from OpenAPI spec - do not edit directly
5
+ */
6
+ import { BaseService } from "../../services/base.js";
7
+ import type { components } from "../schema.js";
8
+ import { ListResult } from "../../pagination.js";
9
+ import type { PaginationOptions } from "../../pagination.js";
10
+ /** Recording entity from the Basecamp API. */
11
+ export type Recording = components["schemas"]["Recording"];
12
+ /**
13
+ * Options for list.
14
+ */
15
+ export interface ListRecordingOptions extends PaginationOptions {
16
+ /** Project IDs to filter by */
17
+ bucket?: number[];
18
+ /** Filter by status */
19
+ status?: "active" | "archived" | "trashed";
20
+ /** Filter by sort */
21
+ sort?: "created_at" | "updated_at";
22
+ /** Filter by direction */
23
+ direction?: "asc" | "desc";
24
+ }
25
+ /**
26
+ * Service for Recordings operations.
27
+ */
28
+ export declare class RecordingsService extends BaseService {
29
+ /**
30
+ * List recordings of a given type across projects
31
+ * @param type - Comment|Document|Kanban::Card|Kanban::Step|Message|Question::Answer|Schedule::Entry|Todo|Todolist|Upload|Vault
32
+ * @param options - Optional query parameters
33
+ * @returns All Recording across all pages, with .meta.totalCount
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * const result = await client.recordings.list("type");
38
+ *
39
+ * // With options
40
+ * const filtered = await client.recordings.list("type", { bucket: [123] });
41
+ * ```
42
+ */
43
+ list(type: "Comment" | "Document" | "Kanban::Card" | "Kanban::Step" | "Message" | "Question::Answer" | "Schedule::Entry" | "Todo" | "Todolist" | "Upload" | "Vault", options?: ListRecordingOptions): Promise<ListResult<Recording>>;
44
+ /**
45
+ * Get a single recording by id
46
+ * @param recordingId - The recording ID
47
+ * @returns The Recording
48
+ * @throws {BasecampError} If the resource is not found
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * const result = await client.recordings.get(123);
53
+ * ```
54
+ */
55
+ get(recordingId: number): Promise<Recording>;
56
+ /**
57
+ * Unarchive a recording (restore to active status)
58
+ * @param recordingId - The recording ID
59
+ * @returns void
60
+ * @throws {BasecampError} If the request fails
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * await client.recordings.unarchive(123);
65
+ * ```
66
+ */
67
+ unarchive(recordingId: number): Promise<void>;
68
+ /**
69
+ * Archive a recording
70
+ * @param recordingId - The recording ID
71
+ * @returns void
72
+ * @throws {BasecampError} If the request fails
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * await client.recordings.archive(123);
77
+ * ```
78
+ */
79
+ archive(recordingId: number): Promise<void>;
80
+ /**
81
+ * Trash a recording. Trashed items can be recovered.
82
+ * @param recordingId - The recording ID
83
+ * @returns void
84
+ * @throws {BasecampError} If the request fails
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * await client.recordings.trash(123);
89
+ * ```
90
+ */
91
+ trash(recordingId: number): Promise<void>;
92
+ }
93
+ //# sourceMappingURL=recordings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recordings.d.ts","sourceRoot":"","sources":["../../../src/generated/services/recordings.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAM7D,8CAA8C;AAC9C,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,uBAAuB;IACvB,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IAC3C,qBAAqB;IACrB,IAAI,CAAC,EAAE,YAAY,GAAG,YAAY,CAAC;IACnC,0BAA0B;IAC1B,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CAC5B;AAOD;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;IAEhD;;;;;;;;;;;;;OAaG;IACG,IAAI,CAAC,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,cAAc,GAAG,cAAc,GAAG,SAAS,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAkB1O;;;;;;;;;;OAUG;IACG,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAmBlD;;;;;;;;;;OAUG;IACG,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBnD;;;;;;;;;;OAUG;IACG,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBjD;;;;;;;;;;OAUG;IACG,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAiBhD"}
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Recordings service for the Basecamp API.
3
+ *
4
+ * @generated from OpenAPI spec - do not edit directly
5
+ */
6
+ import { BaseService } from "../../services/base.js";
7
+ // =============================================================================
8
+ // Service
9
+ // =============================================================================
10
+ /**
11
+ * Service for Recordings operations.
12
+ */
13
+ export class RecordingsService extends BaseService {
14
+ /**
15
+ * List recordings of a given type across projects
16
+ * @param type - Comment|Document|Kanban::Card|Kanban::Step|Message|Question::Answer|Schedule::Entry|Todo|Todolist|Upload|Vault
17
+ * @param options - Optional query parameters
18
+ * @returns All Recording across all pages, with .meta.totalCount
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const result = await client.recordings.list("type");
23
+ *
24
+ * // With options
25
+ * const filtered = await client.recordings.list("type", { bucket: [123] });
26
+ * ```
27
+ */
28
+ async list(type, options) {
29
+ return this.requestPaginated({
30
+ service: "Recordings",
31
+ operation: "ListRecordings",
32
+ resourceType: "recording",
33
+ isMutation: false,
34
+ }, () => this.client.GET("/projects/recordings.json", {
35
+ params: {
36
+ query: { type: type, bucket: options?.bucket?.join(","), status: options?.status, sort: options?.sort, direction: options?.direction },
37
+ },
38
+ }), options);
39
+ }
40
+ /**
41
+ * Get a single recording by id
42
+ * @param recordingId - The recording ID
43
+ * @returns The Recording
44
+ * @throws {BasecampError} If the resource is not found
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * const result = await client.recordings.get(123);
49
+ * ```
50
+ */
51
+ async get(recordingId) {
52
+ const response = await this.request({
53
+ service: "Recordings",
54
+ operation: "GetRecording",
55
+ resourceType: "recording",
56
+ isMutation: false,
57
+ resourceId: recordingId,
58
+ }, () => this.client.GET("/recordings/{recordingId}", {
59
+ params: {
60
+ path: { recordingId },
61
+ },
62
+ }));
63
+ return response;
64
+ }
65
+ /**
66
+ * Unarchive a recording (restore to active status)
67
+ * @param recordingId - The recording ID
68
+ * @returns void
69
+ * @throws {BasecampError} If the request fails
70
+ *
71
+ * @example
72
+ * ```ts
73
+ * await client.recordings.unarchive(123);
74
+ * ```
75
+ */
76
+ async unarchive(recordingId) {
77
+ await this.request({
78
+ service: "Recordings",
79
+ operation: "UnarchiveRecording",
80
+ resourceType: "recording",
81
+ isMutation: true,
82
+ resourceId: recordingId,
83
+ }, () => this.client.PUT("/recordings/{recordingId}/status/active.json", {
84
+ params: {
85
+ path: { recordingId },
86
+ },
87
+ }));
88
+ }
89
+ /**
90
+ * Archive a recording
91
+ * @param recordingId - The recording ID
92
+ * @returns void
93
+ * @throws {BasecampError} If the request fails
94
+ *
95
+ * @example
96
+ * ```ts
97
+ * await client.recordings.archive(123);
98
+ * ```
99
+ */
100
+ async archive(recordingId) {
101
+ await this.request({
102
+ service: "Recordings",
103
+ operation: "ArchiveRecording",
104
+ resourceType: "recording",
105
+ isMutation: true,
106
+ resourceId: recordingId,
107
+ }, () => this.client.PUT("/recordings/{recordingId}/status/archived.json", {
108
+ params: {
109
+ path: { recordingId },
110
+ },
111
+ }));
112
+ }
113
+ /**
114
+ * Trash a recording. Trashed items can be recovered.
115
+ * @param recordingId - The recording ID
116
+ * @returns void
117
+ * @throws {BasecampError} If the request fails
118
+ *
119
+ * @example
120
+ * ```ts
121
+ * await client.recordings.trash(123);
122
+ * ```
123
+ */
124
+ async trash(recordingId) {
125
+ await this.request({
126
+ service: "Recordings",
127
+ operation: "TrashRecording",
128
+ resourceType: "recording",
129
+ isMutation: true,
130
+ resourceId: recordingId,
131
+ }, () => this.client.PUT("/recordings/{recordingId}/status/trashed.json", {
132
+ params: {
133
+ path: { recordingId },
134
+ },
135
+ }));
136
+ }
137
+ }
138
+ //# sourceMappingURL=recordings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recordings.js","sourceRoot":"","sources":["../../../src/generated/services/recordings.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,191 @@
1
+ /**
2
+ * Recordings service for the Basecamp API.
3
+ *
4
+ * @generated from OpenAPI spec - do not edit directly
5
+ */
6
+
7
+ import { BaseService } from "../../services/base.js";
8
+ import type { components } from "../schema.js";
9
+ import { ListResult } from "../../pagination.js";
10
+ import type { PaginationOptions } from "../../pagination.js";
11
+
12
+ // =============================================================================
13
+ // Types
14
+ // =============================================================================
15
+
16
+ /** Recording entity from the Basecamp API. */
17
+ export type Recording = components["schemas"]["Recording"];
18
+
19
+ /**
20
+ * Options for list.
21
+ */
22
+ export interface ListRecordingOptions extends PaginationOptions {
23
+ /** Project IDs to filter by */
24
+ bucket?: number[];
25
+ /** Filter by status */
26
+ status?: "active" | "archived" | "trashed";
27
+ /** Filter by sort */
28
+ sort?: "created_at" | "updated_at";
29
+ /** Filter by direction */
30
+ direction?: "asc" | "desc";
31
+ }
32
+
33
+
34
+ // =============================================================================
35
+ // Service
36
+ // =============================================================================
37
+
38
+ /**
39
+ * Service for Recordings operations.
40
+ */
41
+ export class RecordingsService extends BaseService {
42
+
43
+ /**
44
+ * List recordings of a given type across projects
45
+ * @param type - Comment|Document|Kanban::Card|Kanban::Step|Message|Question::Answer|Schedule::Entry|Todo|Todolist|Upload|Vault
46
+ * @param options - Optional query parameters
47
+ * @returns All Recording across all pages, with .meta.totalCount
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * const result = await client.recordings.list("type");
52
+ *
53
+ * // With options
54
+ * const filtered = await client.recordings.list("type", { bucket: [123] });
55
+ * ```
56
+ */
57
+ async list(type: "Comment" | "Document" | "Kanban::Card" | "Kanban::Step" | "Message" | "Question::Answer" | "Schedule::Entry" | "Todo" | "Todolist" | "Upload" | "Vault", options?: ListRecordingOptions): Promise<ListResult<Recording>> {
58
+ return this.requestPaginated(
59
+ {
60
+ service: "Recordings",
61
+ operation: "ListRecordings",
62
+ resourceType: "recording",
63
+ isMutation: false,
64
+ },
65
+ () =>
66
+ this.client.GET("/projects/recordings.json", {
67
+ params: {
68
+ query: { type: type, bucket: options?.bucket?.join(","), status: options?.status, sort: options?.sort, direction: options?.direction },
69
+ },
70
+ })
71
+ , options
72
+ );
73
+ }
74
+
75
+ /**
76
+ * Get a single recording by id
77
+ * @param recordingId - The recording ID
78
+ * @returns The Recording
79
+ * @throws {BasecampError} If the resource is not found
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * const result = await client.recordings.get(123);
84
+ * ```
85
+ */
86
+ async get(recordingId: number): Promise<Recording> {
87
+ const response = await this.request(
88
+ {
89
+ service: "Recordings",
90
+ operation: "GetRecording",
91
+ resourceType: "recording",
92
+ isMutation: false,
93
+ resourceId: recordingId,
94
+ },
95
+ () =>
96
+ this.client.GET("/recordings/{recordingId}", {
97
+ params: {
98
+ path: { recordingId },
99
+ },
100
+ })
101
+ );
102
+ return response;
103
+ }
104
+
105
+ /**
106
+ * Unarchive a recording (restore to active status)
107
+ * @param recordingId - The recording ID
108
+ * @returns void
109
+ * @throws {BasecampError} If the request fails
110
+ *
111
+ * @example
112
+ * ```ts
113
+ * await client.recordings.unarchive(123);
114
+ * ```
115
+ */
116
+ async unarchive(recordingId: number): Promise<void> {
117
+ await this.request(
118
+ {
119
+ service: "Recordings",
120
+ operation: "UnarchiveRecording",
121
+ resourceType: "recording",
122
+ isMutation: true,
123
+ resourceId: recordingId,
124
+ },
125
+ () =>
126
+ this.client.PUT("/recordings/{recordingId}/status/active.json", {
127
+ params: {
128
+ path: { recordingId },
129
+ },
130
+ })
131
+ );
132
+ }
133
+
134
+ /**
135
+ * Archive a recording
136
+ * @param recordingId - The recording ID
137
+ * @returns void
138
+ * @throws {BasecampError} If the request fails
139
+ *
140
+ * @example
141
+ * ```ts
142
+ * await client.recordings.archive(123);
143
+ * ```
144
+ */
145
+ async archive(recordingId: number): Promise<void> {
146
+ await this.request(
147
+ {
148
+ service: "Recordings",
149
+ operation: "ArchiveRecording",
150
+ resourceType: "recording",
151
+ isMutation: true,
152
+ resourceId: recordingId,
153
+ },
154
+ () =>
155
+ this.client.PUT("/recordings/{recordingId}/status/archived.json", {
156
+ params: {
157
+ path: { recordingId },
158
+ },
159
+ })
160
+ );
161
+ }
162
+
163
+ /**
164
+ * Trash a recording. Trashed items can be recovered.
165
+ * @param recordingId - The recording ID
166
+ * @returns void
167
+ * @throws {BasecampError} If the request fails
168
+ *
169
+ * @example
170
+ * ```ts
171
+ * await client.recordings.trash(123);
172
+ * ```
173
+ */
174
+ async trash(recordingId: number): Promise<void> {
175
+ await this.request(
176
+ {
177
+ service: "Recordings",
178
+ operation: "TrashRecording",
179
+ resourceType: "recording",
180
+ isMutation: true,
181
+ resourceId: recordingId,
182
+ },
183
+ () =>
184
+ this.client.PUT("/recordings/{recordingId}/status/trashed.json", {
185
+ params: {
186
+ path: { recordingId },
187
+ },
188
+ })
189
+ );
190
+ }
191
+ }