@37signals/basecamp 0.23.0 → 0.25.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 (39) hide show
  1. package/dist/client.d.ts +1 -1
  2. package/dist/client.js +1 -1
  3. package/dist/generated/metadata.js +1 -1
  4. package/dist/generated/metadata.ts +1 -1
  5. package/dist/generated/openapi-stripped.json +41 -14
  6. package/dist/generated/schema.d.ts +43 -14
  7. package/dist/generated/services/boosts.d.ts +2 -2
  8. package/dist/generated/services/boosts.js +2 -2
  9. package/dist/generated/services/boosts.ts +2 -2
  10. package/dist/generated/services/card-columns.d.ts +7 -4
  11. package/dist/generated/services/card-columns.d.ts.map +1 -1
  12. package/dist/generated/services/card-columns.js +1 -1
  13. package/dist/generated/services/card-columns.js.map +1 -1
  14. package/dist/generated/services/card-columns.ts +7 -4
  15. package/dist/generated/services/checkins.d.ts +2 -4
  16. package/dist/generated/services/checkins.d.ts.map +1 -1
  17. package/dist/generated/services/checkins.js +1 -2
  18. package/dist/generated/services/checkins.js.map +1 -1
  19. package/dist/generated/services/checkins.ts +2 -5
  20. package/dist/generated/services/lineup.d.ts +8 -8
  21. package/dist/generated/services/lineup.d.ts.map +1 -1
  22. package/dist/generated/services/lineup.js +10 -8
  23. package/dist/generated/services/lineup.js.map +1 -1
  24. package/dist/generated/services/lineup.ts +12 -10
  25. package/dist/generated/services/my-notifications.d.ts +1 -1
  26. package/dist/generated/services/my-notifications.js +1 -1
  27. package/dist/generated/services/my-notifications.ts +1 -1
  28. package/dist/oauth/exchange.d.ts.map +1 -1
  29. package/dist/oauth/exchange.js +65 -23
  30. package/dist/oauth/exchange.js.map +1 -1
  31. package/package.json +1 -1
  32. package/src/generated/metadata.ts +1 -1
  33. package/src/generated/openapi-stripped.json +41 -14
  34. package/src/generated/schema.d.ts +43 -14
  35. package/src/generated/services/boosts.ts +2 -2
  36. package/src/generated/services/card-columns.ts +7 -4
  37. package/src/generated/services/checkins.ts +2 -5
  38. package/src/generated/services/lineup.ts +12 -10
  39. package/src/generated/services/my-notifications.ts +1 -1
@@ -712,7 +712,7 @@ export interface paths {
712
712
  };
713
713
  get?: never;
714
714
  put?: never;
715
- /** @description Move a column within a card table */
715
+ /** @description Move a column to a slot within its card table. target_id is the card table's own id (the same as cardTableId), not a column; position is the 1-based slot among the columns, not counting Triage, Not Now or Done. */
716
716
  post: operations["MoveCardColumn"];
717
717
  delete?: never;
718
718
  options?: never;
@@ -1464,7 +1464,7 @@ export interface paths {
1464
1464
  /** @description List all lineup markers for the account */
1465
1465
  get: operations["ListLineupMarkers"];
1466
1466
  put?: never;
1467
- /** @description Create a new lineup marker */
1467
+ /** @description Create a new lineup marker. Returns the created marker. */
1468
1468
  post: operations["CreateLineupMarker"];
1469
1469
  delete?: never;
1470
1470
  options?: never;
@@ -1480,7 +1480,7 @@ export interface paths {
1480
1480
  cookie?: never;
1481
1481
  };
1482
1482
  get?: never;
1483
- /** @description Update an existing lineup marker */
1483
+ /** @description Update an existing lineup marker. Returns the updated marker. */
1484
1484
  put: operations["UpdateLineupMarker"];
1485
1485
  post?: never;
1486
1486
  /** @description Delete a lineup marker */
@@ -1846,7 +1846,7 @@ export interface paths {
1846
1846
  cookie?: never;
1847
1847
  };
1848
1848
  /**
1849
- * @description Get the current user's notification inbox (the "Hey!" menu).
1849
+ * @description Get the current user's notifications (the "Hey!" menu in Basecamp 4).
1850
1850
  * Notifications are grouped into unreads, reads, bubble-ups, and
1851
1851
  * scheduled bubble-ups (`memories` remains as an always-empty
1852
1852
  * placeholder on BC5). Reads are paginated (50 per page). Unreads are
@@ -2372,7 +2372,7 @@ export interface paths {
2372
2372
  };
2373
2373
  /** @description Get a single question by id */
2374
2374
  get: operations["GetQuestion"];
2375
- /** @description Update an existing question */
2375
+ /** @description Update an existing question's title, schedule or both. A schedule replaces the whole schedule, so send every part of it: one without frequency or time_of_day is refused, and one without start_date re-anchors the recurrence on today. Pausing and resuming are PauseQuestion and ResumeQuestion. */
2376
2376
  put: operations["UpdateQuestion"];
2377
2377
  post?: never;
2378
2378
  delete?: never;
@@ -2649,10 +2649,10 @@ export interface paths {
2649
2649
  path?: never;
2650
2650
  cookie?: never;
2651
2651
  };
2652
- /** @description List boosts on a specific event within a recording */
2652
+ /** @description List boosts on a specific event within a recording. Only boostable events carry boosts: those whose action is completed, adopted, column_changed or moved_in (their JSON includes boosts_count and boosts_url). Any other event answers 403 Forbidden; an event on a recording the person cannot see answers 404. */
2653
2653
  get: operations["ListEventBoosts"];
2654
2654
  put?: never;
2655
- /** @description Create a boost on a specific event within a recording */
2655
+ /** @description Create a boost on a specific event within a recording. Only boostable events accept one: those whose action is completed, adopted, column_changed or moved_in (their JSON includes boosts_count and boosts_url). Any other event answers 403 Forbidden, as does an event on a recording whose comments are closed; an event on a recording the person cannot see answers 404. */
2656
2656
  post: operations["CreateEventBoost"];
2657
2657
  delete?: never;
2658
2658
  options?: never;
@@ -4633,6 +4633,7 @@ export interface components {
4633
4633
  name: string;
4634
4634
  date: string;
4635
4635
  };
4636
+ CreateLineupMarkerResponseContent: components["schemas"]["LineupMarker"];
4636
4637
  CreateMessageRequestContent: {
4637
4638
  subject: string;
4638
4639
  content?: string;
@@ -5038,8 +5039,14 @@ export interface components {
5038
5039
  created_at: string;
5039
5040
  creator: components["schemas"]["Person"];
5040
5041
  performed_by?: components["schemas"]["Person"];
5041
- /** Format: int32 */
5042
+ /**
5043
+ * Format: int32
5044
+ * @description Present only on boostable events (action completed, adopted,
5045
+ * column_changed or moved_in); the event boost operations refuse any
5046
+ * other event with 403.
5047
+ */
5042
5048
  boosts_count?: number;
5049
+ /** @description Present only on boostable events; see boosts_count. */
5043
5050
  boosts_url?: string;
5044
5051
  };
5045
5052
  EventDetails: {
@@ -5855,11 +5862,23 @@ export interface components {
5855
5862
  updated_at: string;
5856
5863
  };
5857
5864
  MoveCardColumnRequestContent: {
5858
- /** Format: int64 */
5865
+ /**
5866
+ * Format: int64
5867
+ * @description The column to move.
5868
+ */
5859
5869
  source_id: number;
5860
- /** Format: int64 */
5870
+ /**
5871
+ * Format: int64
5872
+ * @description The card table the column moves within: the same id as `cardTableId`.
5873
+ * Basecamp refuses any other destination, a column included, with 422.
5874
+ */
5861
5875
  target_id: number;
5862
- /** Format: int32 */
5876
+ /**
5877
+ * Format: int32
5878
+ * @description 1-based slot among the card table's columns, not counting Triage,
5879
+ * Not Now or Done. 1 puts the column first; a slot past the last puts it
5880
+ * last. Default: 1.
5881
+ */
5863
5882
  position?: number;
5864
5883
  };
5865
5884
  MoveCardRequestContent: {
@@ -6194,6 +6213,11 @@ export interface components {
6194
6213
  start_date?: string;
6195
6214
  end_date?: string;
6196
6215
  clients_enabled?: boolean;
6216
+ /**
6217
+ * @description True when the project's timesheet is turned on. The project timesheet
6218
+ * report (GET /projects/{projectId}/timesheet.json) answers 404 until it is.
6219
+ */
6220
+ timesheet_enabled?: boolean;
6197
6221
  bookmark_url?: string;
6198
6222
  /** @description Bucket stars collection for this project (`/buckets/{id}/stars.json`). */
6199
6223
  star_url?: string;
@@ -7947,6 +7971,7 @@ export interface components {
7947
7971
  name?: string;
7948
7972
  date?: string;
7949
7973
  };
7974
+ UpdateLineupMarkerResponseContent: components["schemas"]["LineupMarker"];
7950
7975
  UpdateMessageRequestContent: {
7951
7976
  subject?: string;
7952
7977
  content?: string;
@@ -8021,9 +8046,9 @@ export interface components {
8021
8046
  subscribed?: boolean;
8022
8047
  };
8023
8048
  UpdateQuestionRequestContent: {
8049
+ /** @description The question text. An update carries a title, a schedule or both. */
8024
8050
  title?: string;
8025
8051
  schedule?: components["schemas"]["QuestionScheduleInput"];
8026
- paused?: boolean;
8027
8052
  };
8028
8053
  UpdateQuestionResponseContent: components["schemas"]["Question"];
8029
8054
  UpdateScheduleSettingsRequestContent: {
@@ -14884,7 +14909,9 @@ export interface operations {
14884
14909
  headers: {
14885
14910
  [name: string]: unknown;
14886
14911
  };
14887
- content?: never;
14912
+ content: {
14913
+ "application/json": components["schemas"]["CreateLineupMarkerResponseContent"];
14914
+ };
14888
14915
  };
14889
14916
  /** @description UnauthorizedError 401 response */
14890
14917
  401: {
@@ -14953,7 +14980,9 @@ export interface operations {
14953
14980
  headers: {
14954
14981
  [name: string]: unknown;
14955
14982
  };
14956
- content?: never;
14983
+ content: {
14984
+ "application/json": components["schemas"]["UpdateLineupMarkerResponseContent"];
14985
+ };
14957
14986
  };
14958
14987
  /** @description UnauthorizedError 401 response */
14959
14988
  401: {
@@ -190,7 +190,7 @@ export class BoostsService extends BaseService {
190
190
  }
191
191
 
192
192
  /**
193
- * List boosts on a specific event within a recording
193
+ * List boosts on a specific event within a recording. Only boostable events carry boosts: those whose action is completed, adopted, column_changed or moved_in (their JSON includes boosts_count and boosts_url). Any other event answers 403 Forbidden; an event on a recording the person cannot see answers 404.
194
194
  * @param recordingId - The recording ID
195
195
  * @param eventId - The event ID
196
196
  * @param options - Optional query parameters
@@ -225,7 +225,7 @@ export class BoostsService extends BaseService {
225
225
  }
226
226
 
227
227
  /**
228
- * Create a boost on a specific event within a recording
228
+ * Create a boost on a specific event within a recording. Only boostable events accept one: those whose action is completed, adopted, column_changed or moved_in (their JSON includes boosts_count and boosts_url). Any other event answers 403 Forbidden, as does an event on a recording whose comments are closed; an event on a recording the person cannot see answers 404.
229
229
  * @param recordingId - The recording ID
230
230
  * @param eventId - The event ID
231
231
  * @param req - Event_boost creation parameters
@@ -47,11 +47,14 @@ export interface CreateCardColumnRequest {
47
47
  * Request parameters for move.
48
48
  */
49
49
  export interface MoveCardColumnRequest {
50
- /** Source id */
50
+ /** The column to move. */
51
51
  sourceId: number;
52
- /** Target id */
52
+ /** The card table the column moves within: the same id as `cardTableId`.
53
+ Basecamp refuses any other destination, a column included, with 422. */
53
54
  targetId: number;
54
- /** Position for ordering (1-based) */
55
+ /** 1-based slot among the card table's columns, not counting Triage,
56
+ Not Now or Done. 1 puts the column first; a slot past the last puts it
57
+ last. Default: 1. */
55
58
  position?: number;
56
59
  }
57
60
 
@@ -330,7 +333,7 @@ export class CardColumnsService extends BaseService {
330
333
  }
331
334
 
332
335
  /**
333
- * Move a column within a card table
336
+ * Move a column to a slot within its card table. target_id is the card table's own id (the same as cardTableId), not a column; position is the 1-based slot among the columns, not counting Triage, Not Now or Done.
334
337
  * @param cardTableId - The card table ID
335
338
  * @param req - Card_column request parameters
336
339
  * @returns void
@@ -65,12 +65,10 @@ export interface CreateQuestionCheckinRequest {
65
65
  * Request parameters for updateQuestion.
66
66
  */
67
67
  export interface UpdateQuestionCheckinRequest {
68
- /** Title */
68
+ /** The question text. An update carries a title, a schedule or both. */
69
69
  title?: string;
70
70
  /** Schedule */
71
71
  schedule?: components["schemas"]["QuestionScheduleInput"];
72
- /** Paused */
73
- paused?: boolean;
74
72
  }
75
73
 
76
74
  /**
@@ -361,7 +359,7 @@ export class CheckinsService extends BaseService {
361
359
  }
362
360
 
363
361
  /**
364
- * Update an existing question
362
+ * Update an existing question's title, schedule or both. A schedule replaces the whole schedule, so send every part of it: one without frequency or time_of_day is refused, and one without start_date re-anchors the recurrence on today. Pausing and resuming are PauseQuestion and ResumeQuestion.
365
363
  * @param questionId - The question ID
366
364
  * @param req - Question update parameters
367
365
  * @returns The Question
@@ -389,7 +387,6 @@ export class CheckinsService extends BaseService {
389
387
  body: {
390
388
  title: req.title,
391
389
  schedule: req.schedule,
392
- paused: req.paused,
393
390
  },
394
391
  })
395
392
  );
@@ -70,24 +70,24 @@ export class LineupService extends BaseService {
70
70
  }
71
71
 
72
72
  /**
73
- * Create a new lineup marker
73
+ * Create a new lineup marker. Returns the created marker.
74
74
  * @param req - Lineup_marker creation parameters
75
- * @returns void
75
+ * @returns The LineupMarker
76
76
  * @throws {BasecampError} If required fields are missing or invalid
77
77
  *
78
78
  * @example
79
79
  * ```ts
80
- * await client.lineup.create({ name: "My example", date: "example" });
80
+ * const result = await client.lineup.create({ name: "My example", date: "example" });
81
81
  * ```
82
82
  */
83
- async create(req: CreateLineupRequest): Promise<void> {
83
+ async create(req: CreateLineupRequest): Promise<LineupMarker> {
84
84
  if (!req.name) {
85
85
  throw Errors.validation("Name is required");
86
86
  }
87
87
  if (!req.date) {
88
88
  throw Errors.validation("Date is required");
89
89
  }
90
- await this.request(
90
+ const response = await this.request(
91
91
  {
92
92
  service: "Lineup",
93
93
  operation: "CreateLineupMarker",
@@ -102,22 +102,23 @@ export class LineupService extends BaseService {
102
102
  },
103
103
  })
104
104
  );
105
+ return response;
105
106
  }
106
107
 
107
108
  /**
108
- * Update an existing lineup marker
109
+ * Update an existing lineup marker. Returns the updated marker.
109
110
  * @param markerId - The marker ID
110
111
  * @param req - Lineup_marker update parameters
111
- * @returns void
112
+ * @returns The LineupMarker
112
113
  * @throws {BasecampError} If the resource is not found or fields are invalid
113
114
  *
114
115
  * @example
115
116
  * ```ts
116
- * await client.lineup.update(123, { });
117
+ * const result = await client.lineup.update(123, { });
117
118
  * ```
118
119
  */
119
- async update(markerId: number, req: UpdateLineupRequest): Promise<void> {
120
- await this.request(
120
+ async update(markerId: number, req: UpdateLineupRequest): Promise<LineupMarker> {
121
+ const response = await this.request(
121
122
  {
122
123
  service: "Lineup",
123
124
  operation: "UpdateLineupMarker",
@@ -136,6 +137,7 @@ export class LineupService extends BaseService {
136
137
  },
137
138
  })
138
139
  );
140
+ return response;
139
141
  }
140
142
 
141
143
  /**
@@ -60,7 +60,7 @@ At most 500 per request. */
60
60
  export class MyNotificationsService extends BaseService {
61
61
 
62
62
  /**
63
- * Get the current user's notification inbox (the "Hey!" menu).
63
+ * Get the current user's notifications (the "Hey!" menu in Basecamp 4).
64
64
  * @param options - Optional query parameters
65
65
  * @returns The my_notification
66
66
  *