@37signals/basecamp 0.27.1 → 0.28.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 (40) hide show
  1. package/dist/client.d.ts +1 -1
  2. package/dist/client.js +3 -3
  3. package/dist/client.js.map +1 -1
  4. package/dist/generated/metadata.d.ts.map +1 -1
  5. package/dist/generated/metadata.js +29 -1
  6. package/dist/generated/metadata.js.map +1 -1
  7. package/dist/generated/metadata.ts +29 -1
  8. package/dist/generated/openapi-stripped.json +291 -5
  9. package/dist/generated/path-mapping.d.ts.map +1 -1
  10. package/dist/generated/path-mapping.js +2 -0
  11. package/dist/generated/path-mapping.js.map +1 -1
  12. package/dist/generated/path-mapping.ts +2 -0
  13. package/dist/generated/person-id-sites.d.ts.map +1 -1
  14. package/dist/generated/person-id-sites.js +58 -0
  15. package/dist/generated/person-id-sites.js.map +1 -1
  16. package/dist/generated/person-id-sites.ts +58 -0
  17. package/dist/generated/schema.d.ts +231 -1
  18. package/dist/generated/services/projects.d.ts +37 -0
  19. package/dist/generated/services/projects.d.ts.map +1 -1
  20. package/dist/generated/services/projects.js +50 -0
  21. package/dist/generated/services/projects.js.map +1 -1
  22. package/dist/generated/services/projects.ts +76 -0
  23. package/dist/generated/services/tools.d.ts +1 -1
  24. package/dist/generated/services/tools.js +1 -1
  25. package/dist/generated/services/tools.ts +1 -1
  26. package/dist/index.d.ts +1 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js.map +1 -1
  29. package/dist/services/base.d.ts +4 -2
  30. package/dist/services/base.d.ts.map +1 -1
  31. package/dist/services/base.js +13 -3
  32. package/dist/services/base.js.map +1 -1
  33. package/package.json +1 -1
  34. package/src/generated/metadata.ts +29 -1
  35. package/src/generated/openapi-stripped.json +291 -5
  36. package/src/generated/path-mapping.ts +2 -0
  37. package/src/generated/person-id-sites.ts +58 -0
  38. package/src/generated/schema.d.ts +231 -1
  39. package/src/generated/services/projects.ts +76 -0
  40. package/src/generated/services/tools.ts +1 -1
@@ -49,6 +49,17 @@ export interface UpdateProjectRequest {
49
49
  admissions?: "invite" | "employee" | "team";
50
50
  /** Schedule date range settings */
51
51
  scheduleAttributes?: components["schemas"]["ScheduleAttributes"];
52
+ /** How the project's wallpaper is laid out. Changes only the layout of a
53
+ wallpaper already attached; UpdateProjectWallpaper uploads one. */
54
+ wallpaperMode?: string;
55
+ }
56
+
57
+ /**
58
+ * Options for updateProjectWallpaper.
59
+ */
60
+ export interface UpdateProjectWallpaperProjectOptions {
61
+ /** How the wallpaper is laid out. Omitted, the project's current mode is kept. */
62
+ mode?: string;
52
63
  }
53
64
 
54
65
 
@@ -213,6 +224,7 @@ export class ProjectsService extends BaseService {
213
224
  description: req.description,
214
225
  admissions: req.admissions,
215
226
  schedule_attributes: req.scheduleAttributes,
227
+ wallpaper_mode: req.wallpaperMode,
216
228
  },
217
229
  })
218
230
  );
@@ -334,4 +346,68 @@ export class ProjectsService extends BaseService {
334
346
  })
335
347
  );
336
348
  }
349
+
350
+ /**
351
+ * Upload or replace the project's wallpaper.
352
+ * @param projectId - The project ID
353
+ * @param file - File or Blob to upload
354
+ * @param filename - Display name for the uploaded file
355
+ * @param options - Optional query parameters
356
+ * @returns void
357
+ * @throws {BasecampError} If the resource is not found or fields are invalid
358
+ *
359
+ * @example
360
+ * ```ts
361
+ * await client.projects.updateProjectWallpaper(123);
362
+ * ```
363
+ */
364
+ async updateProjectWallpaper(projectId: number, file: Blob | File, filename?: string, options?: UpdateProjectWallpaperProjectOptions): Promise<void> {
365
+ const url = `${this.baseUrl}` +
366
+ `/projects/${projectId}/wallpaper.json`;
367
+ return this.requestMultipartUpload(
368
+ {
369
+ service: "Projects",
370
+ operation: "UpdateProjectWallpaper",
371
+ resourceType: "project_wallpaper",
372
+ isMutation: true,
373
+ projectId,
374
+ },
375
+ url,
376
+ "PUT",
377
+ file,
378
+ "wallpaper",
379
+ filename,
380
+ { mode: options?.mode },
381
+ );
382
+ }
383
+
384
+
385
+ /**
386
+ * Remove the project's wallpaper.
387
+ * @param projectId - The project ID
388
+ * @returns void
389
+ * @throws {BasecampError} If the request fails
390
+ *
391
+ * @example
392
+ * ```ts
393
+ * await client.projects.removeProjectWallpaper(123);
394
+ * ```
395
+ */
396
+ async removeProjectWallpaper(projectId: number): Promise<void> {
397
+ await this.request(
398
+ {
399
+ service: "Projects",
400
+ operation: "RemoveProjectWallpaper",
401
+ resourceType: "project_wallpaper",
402
+ isMutation: true,
403
+ projectId,
404
+ },
405
+ () =>
406
+ this.client.DELETE("/projects/{projectId}/wallpaper.json", {
407
+ params: {
408
+ path: { projectId },
409
+ },
410
+ })
411
+ );
412
+ }
337
413
  }
@@ -160,7 +160,7 @@ export class ToolsService extends BaseService {
160
160
  }
161
161
 
162
162
  /**
163
- * Delete a tool (trash it)
163
+ * Remove a tool from the dock: deletes an external link or an empty extra tool, and disables any other tool.
164
164
  * @param toolId - The tool ID
165
165
  * @returns void
166
166
  * @throws {BasecampError} If the request fails