@37signals/basecamp 0.12.0 → 0.13.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.
- package/README.md +112 -16
- package/dist/.build-complete +0 -0
- package/dist/client.d.ts +53 -11
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +132 -150
- package/dist/client.js.map +1 -1
- package/dist/download.d.ts +7 -0
- package/dist/download.d.ts.map +1 -1
- package/dist/download.js +82 -22
- package/dist/download.js.map +1 -1
- package/dist/errors.d.ts +18 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +127 -14
- package/dist/errors.js.map +1 -1
- package/dist/generated/metadata.d.ts.map +1 -1
- package/dist/generated/metadata.js +280 -141
- package/dist/generated/metadata.js.map +1 -1
- package/dist/generated/metadata.ts +280 -141
- package/dist/generated/openapi-stripped.json +6435 -4283
- package/dist/generated/path-mapping.d.ts.map +1 -1
- package/dist/generated/path-mapping.js +27 -16
- package/dist/generated/path-mapping.js.map +1 -1
- package/dist/generated/path-mapping.ts +27 -16
- package/dist/generated/schema.d.ts +4283 -2457
- package/dist/generated/services/bookmarks.d.ts +1 -1
- package/dist/generated/services/bookmarks.d.ts.map +1 -1
- package/dist/generated/services/bookmarks.ts +1 -1
- package/dist/generated/services/boosts.d.ts +10 -0
- package/dist/generated/services/boosts.d.ts.map +1 -1
- package/dist/generated/services/boosts.js +8 -0
- package/dist/generated/services/boosts.js.map +1 -1
- package/dist/generated/services/boosts.ts +12 -0
- package/dist/generated/services/campfires.d.ts +54 -40
- package/dist/generated/services/campfires.d.ts.map +1 -1
- package/dist/generated/services/campfires.js +82 -65
- package/dist/generated/services/campfires.js.map +1 -1
- package/dist/generated/services/campfires.ts +107 -85
- package/dist/generated/services/cards.d.ts +5 -0
- package/dist/generated/services/cards.d.ts.map +1 -1
- package/dist/generated/services/cards.js +4 -0
- package/dist/generated/services/cards.js.map +1 -1
- package/dist/generated/services/cards.ts +6 -0
- package/dist/generated/services/checkins.d.ts +14 -0
- package/dist/generated/services/checkins.d.ts.map +1 -1
- package/dist/generated/services/checkins.js +14 -1
- package/dist/generated/services/checkins.js.map +1 -1
- package/dist/generated/services/checkins.ts +20 -0
- package/dist/generated/services/client-approvals.d.ts +6 -3
- package/dist/generated/services/client-approvals.d.ts.map +1 -1
- package/dist/generated/services/client-approvals.js +8 -5
- package/dist/generated/services/client-approvals.js.map +1 -1
- package/dist/generated/services/client-approvals.ts +10 -5
- package/dist/generated/services/client-correspondences.d.ts +6 -3
- package/dist/generated/services/client-correspondences.d.ts.map +1 -1
- package/dist/generated/services/client-correspondences.js +8 -5
- package/dist/generated/services/client-correspondences.js.map +1 -1
- package/dist/generated/services/client-correspondences.ts +10 -5
- package/dist/generated/services/client-replies.d.ts +11 -4
- package/dist/generated/services/client-replies.d.ts.map +1 -1
- package/dist/generated/services/client-replies.js +16 -8
- package/dist/generated/services/client-replies.js.map +1 -1
- package/dist/generated/services/client-replies.ts +18 -8
- package/dist/generated/services/cloud-files.d.ts +92 -0
- package/dist/generated/services/cloud-files.d.ts.map +1 -0
- package/dist/generated/services/cloud-files.js +121 -0
- package/dist/generated/services/cloud-files.js.map +1 -0
- package/dist/generated/services/cloud-files.ts +188 -0
- package/dist/generated/services/comments.d.ts +5 -0
- package/dist/generated/services/comments.d.ts.map +1 -1
- package/dist/generated/services/comments.js +4 -0
- package/dist/generated/services/comments.js.map +1 -1
- package/dist/generated/services/comments.ts +6 -0
- package/dist/generated/services/documents.d.ts +12 -7
- package/dist/generated/services/documents.d.ts.map +1 -1
- package/dist/generated/services/documents.js +10 -6
- package/dist/generated/services/documents.js.map +1 -1
- package/dist/generated/services/documents.ts +14 -8
- package/dist/generated/services/drafts.d.ts +1 -1
- package/dist/generated/services/drafts.d.ts.map +1 -1
- package/dist/generated/services/drafts.ts +1 -1
- package/dist/generated/services/events.d.ts +5 -0
- package/dist/generated/services/events.d.ts.map +1 -1
- package/dist/generated/services/events.js +4 -0
- package/dist/generated/services/events.js.map +1 -1
- package/dist/generated/services/events.ts +6 -0
- package/dist/generated/services/everything.d.ts +14 -14
- package/dist/generated/services/everything.d.ts.map +1 -1
- package/dist/generated/services/everything.ts +14 -14
- package/dist/generated/services/folders.d.ts +96 -0
- package/dist/generated/services/folders.d.ts.map +1 -0
- package/dist/generated/services/folders.js +140 -0
- package/dist/generated/services/folders.js.map +1 -0
- package/dist/generated/services/folders.ts +201 -0
- package/dist/generated/services/forwards.d.ts +7 -20
- package/dist/generated/services/forwards.d.ts.map +1 -1
- package/dist/generated/services/forwards.js +6 -35
- package/dist/generated/services/forwards.js.map +1 -1
- package/dist/generated/services/forwards.ts +10 -48
- package/dist/generated/services/gauges.d.ts +7 -0
- package/dist/generated/services/gauges.d.ts.map +1 -1
- package/dist/generated/services/gauges.js +5 -1
- package/dist/generated/services/gauges.js.map +1 -1
- package/dist/generated/services/gauges.ts +9 -1
- package/dist/generated/services/google-documents.d.ts +98 -0
- package/dist/generated/services/google-documents.d.ts.map +1 -0
- package/dist/generated/services/google-documents.js +123 -0
- package/dist/generated/services/google-documents.js.map +1 -0
- package/dist/generated/services/google-documents.ts +196 -0
- package/dist/generated/services/index.d.ts +7 -4
- package/dist/generated/services/index.d.ts.map +1 -1
- package/dist/generated/services/index.js +7 -4
- package/dist/generated/services/index.js.map +1 -1
- package/dist/generated/services/index.ts +7 -4
- package/dist/generated/services/messages.d.ts +2 -0
- package/dist/generated/services/messages.d.ts.map +1 -1
- package/dist/generated/services/messages.js +1 -1
- package/dist/generated/services/messages.js.map +1 -1
- package/dist/generated/services/messages.ts +3 -1
- package/dist/generated/services/my-notes.d.ts +1 -1
- package/dist/generated/services/my-notes.js +1 -1
- package/dist/generated/services/my-notes.ts +1 -1
- package/dist/generated/services/my-notifications.d.ts +4 -2
- package/dist/generated/services/my-notifications.d.ts.map +1 -1
- package/dist/generated/services/my-notifications.js.map +1 -1
- package/dist/generated/services/my-notifications.ts +4 -2
- package/dist/generated/services/people.d.ts +11 -1
- package/dist/generated/services/people.d.ts.map +1 -1
- package/dist/generated/services/people.js +13 -2
- package/dist/generated/services/people.js.map +1 -1
- package/dist/generated/services/people.ts +15 -1
- package/dist/generated/services/projects.d.ts +26 -0
- package/dist/generated/services/projects.d.ts.map +1 -1
- package/dist/generated/services/projects.js +49 -1
- package/dist/generated/services/projects.js.map +1 -1
- package/dist/generated/services/projects.ts +61 -1
- package/dist/generated/services/recordings.d.ts +2 -12
- package/dist/generated/services/recordings.d.ts.map +1 -1
- package/dist/generated/services/recordings.js +1 -26
- package/dist/generated/services/recordings.js.map +1 -1
- package/dist/generated/services/recordings.ts +3 -31
- package/dist/generated/services/reports.d.ts +8 -12
- package/dist/generated/services/reports.d.ts.map +1 -1
- package/dist/generated/services/reports.js +11 -5
- package/dist/generated/services/reports.js.map +1 -1
- package/dist/generated/services/reports.ts +13 -14
- package/dist/generated/services/schedules.d.ts +94 -15
- package/dist/generated/services/schedules.d.ts.map +1 -1
- package/dist/generated/services/schedules.js +19 -8
- package/dist/generated/services/schedules.js.map +1 -1
- package/dist/generated/services/schedules.ts +107 -17
- package/dist/generated/services/search.d.ts +2 -0
- package/dist/generated/services/search.d.ts.map +1 -1
- package/dist/generated/services/search.js +1 -1
- package/dist/generated/services/search.js.map +1 -1
- package/dist/generated/services/search.ts +3 -1
- package/dist/generated/services/templates.d.ts +2 -0
- package/dist/generated/services/templates.d.ts.map +1 -1
- package/dist/generated/services/templates.js +1 -1
- package/dist/generated/services/templates.js.map +1 -1
- package/dist/generated/services/templates.ts +3 -1
- package/dist/generated/services/timeline.d.ts +2 -0
- package/dist/generated/services/timeline.d.ts.map +1 -1
- package/dist/generated/services/timeline.js +1 -0
- package/dist/generated/services/timeline.js.map +1 -1
- package/dist/generated/services/timeline.ts +3 -0
- package/dist/generated/services/timesheets.d.ts +16 -0
- package/dist/generated/services/timesheets.d.ts.map +1 -1
- package/dist/generated/services/timesheets.js +26 -2
- package/dist/generated/services/timesheets.js.map +1 -1
- package/dist/generated/services/timesheets.ts +35 -2
- package/dist/generated/services/todolist-groups.d.ts +11 -6
- package/dist/generated/services/todolist-groups.d.ts.map +1 -1
- package/dist/generated/services/todolist-groups.js +7 -3
- package/dist/generated/services/todolist-groups.js.map +1 -1
- package/dist/generated/services/todolist-groups.ts +13 -7
- package/dist/generated/services/todolists.d.ts +15 -13
- package/dist/generated/services/todolists.d.ts.map +1 -1
- package/dist/generated/services/todolists.js +11 -8
- package/dist/generated/services/todolists.js.map +1 -1
- package/dist/generated/services/todolists.ts +19 -14
- package/dist/generated/services/todos.d.ts +2 -12
- package/dist/generated/services/todos.d.ts.map +1 -1
- package/dist/generated/services/todos.js +1 -25
- package/dist/generated/services/todos.js.map +1 -1
- package/dist/generated/services/todos.ts +3 -30
- package/dist/generated/services/uploads.d.ts +5 -0
- package/dist/generated/services/uploads.d.ts.map +1 -1
- package/dist/generated/services/uploads.js +4 -0
- package/dist/generated/services/uploads.js.map +1 -1
- package/dist/generated/services/uploads.ts +6 -0
- package/dist/generated/services/vaults.d.ts +5 -0
- package/dist/generated/services/vaults.d.ts.map +1 -1
- package/dist/generated/services/vaults.js +4 -0
- package/dist/generated/services/vaults.js.map +1 -1
- package/dist/generated/services/vaults.ts +6 -0
- package/dist/index.d.ts +15 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -8
- package/dist/index.js.map +1 -1
- package/dist/pagination-utils.d.ts +46 -0
- package/dist/pagination-utils.d.ts.map +1 -1
- package/dist/pagination-utils.js +85 -2
- package/dist/pagination-utils.js.map +1 -1
- package/dist/pagination.d.ts +11 -0
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js.map +1 -1
- package/dist/retry.d.ts +110 -0
- package/dist/retry.d.ts.map +1 -0
- package/dist/retry.js +253 -0
- package/dist/retry.js.map +1 -0
- package/dist/services/base.d.ts.map +1 -1
- package/dist/services/base.js +59 -5
- package/dist/services/base.js.map +1 -1
- package/dist/services/cards-extensions.d.ts +26 -21
- package/dist/services/cards-extensions.d.ts.map +1 -1
- package/dist/services/cards-extensions.js +28 -31
- package/dist/services/cards-extensions.js.map +1 -1
- package/dist/services/documents-extensions.d.ts +122 -0
- package/dist/services/documents-extensions.d.ts.map +1 -0
- package/dist/services/documents-extensions.js +125 -0
- package/dist/services/documents-extensions.js.map +1 -0
- package/dist/services/merge-safe.d.ts +167 -0
- package/dist/services/merge-safe.d.ts.map +1 -0
- package/dist/services/merge-safe.js +217 -0
- package/dist/services/merge-safe.js.map +1 -0
- package/dist/services/schedules-extensions.d.ts +266 -0
- package/dist/services/schedules-extensions.d.ts.map +1 -0
- package/dist/services/schedules-extensions.js +268 -0
- package/dist/services/schedules-extensions.js.map +1 -0
- package/dist/services/todolists-extensions.d.ts +110 -0
- package/dist/services/todolists-extensions.d.ts.map +1 -0
- package/dist/services/todolists-extensions.js +262 -0
- package/dist/services/todolists-extensions.js.map +1 -0
- package/dist/services/todos-extensions.d.ts +12 -1
- package/dist/services/todos-extensions.d.ts.map +1 -1
- package/dist/services/todos-extensions.js +27 -8
- package/dist/services/todos-extensions.js.map +1 -1
- package/package.json +5 -4
- package/src/generated/metadata.ts +280 -141
- package/src/generated/openapi-stripped.json +6435 -4283
- package/src/generated/path-mapping.ts +27 -16
- package/src/generated/schema.d.ts +4283 -2457
- package/src/generated/services/bookmarks.ts +1 -1
- package/src/generated/services/boosts.ts +12 -0
- package/src/generated/services/campfires.ts +107 -85
- package/src/generated/services/cards.ts +6 -0
- package/src/generated/services/checkins.ts +20 -0
- package/src/generated/services/client-approvals.ts +10 -5
- package/src/generated/services/client-correspondences.ts +10 -5
- package/src/generated/services/client-replies.ts +18 -8
- package/src/generated/services/cloud-files.ts +188 -0
- package/src/generated/services/comments.ts +6 -0
- package/src/generated/services/documents.ts +14 -8
- package/src/generated/services/drafts.ts +1 -1
- package/src/generated/services/events.ts +6 -0
- package/src/generated/services/everything.ts +14 -14
- package/src/generated/services/folders.ts +201 -0
- package/src/generated/services/forwards.ts +10 -48
- package/src/generated/services/gauges.ts +9 -1
- package/src/generated/services/google-documents.ts +196 -0
- package/src/generated/services/index.ts +7 -4
- package/src/generated/services/messages.ts +3 -1
- package/src/generated/services/my-notes.ts +1 -1
- package/src/generated/services/my-notifications.ts +4 -2
- package/src/generated/services/people.ts +15 -1
- package/src/generated/services/projects.ts +61 -1
- package/src/generated/services/recordings.ts +3 -31
- package/src/generated/services/reports.ts +13 -14
- package/src/generated/services/schedules.ts +107 -17
- package/src/generated/services/search.ts +3 -1
- package/src/generated/services/templates.ts +3 -1
- package/src/generated/services/timeline.ts +3 -0
- package/src/generated/services/timesheets.ts +35 -2
- package/src/generated/services/todolist-groups.ts +13 -7
- package/src/generated/services/todolists.ts +19 -14
- package/src/generated/services/todos.ts +3 -30
- package/src/generated/services/uploads.ts +6 -0
- package/src/generated/services/vaults.ts +6 -0
|
@@ -22,7 +22,7 @@ export type BookmarkStatus = components["schemas"]["BookmarkStatus"];
|
|
|
22
22
|
* Options for listMyBookmarks.
|
|
23
23
|
*/
|
|
24
24
|
export interface ListMyBookmarksBookmarkOptions extends PaginationOptions {
|
|
25
|
-
/** Page number for paginating through results. Defaults to 1. */
|
|
25
|
+
/** Page number for paginating through results. Defaults to 1. A positive value selects exactly that page, not a starting offset; see SPEC section 8. */
|
|
26
26
|
page?: number;
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -21,6 +21,8 @@ export type Boost = components["schemas"]["Boost"];
|
|
|
21
21
|
* Options for listForRecording.
|
|
22
22
|
*/
|
|
23
23
|
export interface ListForRecordingBoostOptions extends PaginationOptions {
|
|
24
|
+
/** Page number for paginating through results. Defaults to 1. A positive value selects exactly that page, not a starting offset; see SPEC section 8. */
|
|
25
|
+
page?: number;
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
/**
|
|
@@ -35,6 +37,8 @@ export interface CreateForRecordingBoostRequest {
|
|
|
35
37
|
* Options for listForEvent.
|
|
36
38
|
*/
|
|
37
39
|
export interface ListForEventBoostOptions extends PaginationOptions {
|
|
40
|
+
/** Page number for paginating through results. Defaults to 1. A positive value selects exactly that page, not a starting offset; see SPEC section 8. */
|
|
41
|
+
page?: number;
|
|
38
42
|
}
|
|
39
43
|
|
|
40
44
|
/**
|
|
@@ -123,6 +127,9 @@ export class BoostsService extends BaseService {
|
|
|
123
127
|
* @example
|
|
124
128
|
* ```ts
|
|
125
129
|
* const result = await client.boosts.listForRecording(123);
|
|
130
|
+
*
|
|
131
|
+
* // With options
|
|
132
|
+
* const filtered = await client.boosts.listForRecording(123, { page: 1 });
|
|
126
133
|
* ```
|
|
127
134
|
*/
|
|
128
135
|
async listForRecording(recordingId: number, options?: ListForRecordingBoostOptions): Promise<ListResult<Boost>> {
|
|
@@ -138,6 +145,7 @@ export class BoostsService extends BaseService {
|
|
|
138
145
|
this.client.GET("/recordings/{recordingId}/boosts.json", {
|
|
139
146
|
params: {
|
|
140
147
|
path: { recordingId },
|
|
148
|
+
query: { page: options?.page },
|
|
141
149
|
},
|
|
142
150
|
})
|
|
143
151
|
, options
|
|
@@ -191,6 +199,9 @@ export class BoostsService extends BaseService {
|
|
|
191
199
|
* @example
|
|
192
200
|
* ```ts
|
|
193
201
|
* const result = await client.boosts.listForEvent(123, 123);
|
|
202
|
+
*
|
|
203
|
+
* // With options
|
|
204
|
+
* const filtered = await client.boosts.listForEvent(123, 123, { page: 1 });
|
|
194
205
|
* ```
|
|
195
206
|
*/
|
|
196
207
|
async listForEvent(recordingId: number, eventId: number, options?: ListForEventBoostOptions): Promise<ListResult<Boost>> {
|
|
@@ -206,6 +217,7 @@ export class BoostsService extends BaseService {
|
|
|
206
217
|
this.client.GET("/recordings/{recordingId}/events/{eventId}/boosts.json", {
|
|
207
218
|
params: {
|
|
208
219
|
path: { recordingId, eventId },
|
|
220
|
+
query: { page: options?.page },
|
|
209
221
|
},
|
|
210
222
|
})
|
|
211
223
|
, options
|
|
@@ -14,19 +14,13 @@ import { Errors } from "../../errors.js";
|
|
|
14
14
|
// Types
|
|
15
15
|
// =============================================================================
|
|
16
16
|
|
|
17
|
-
/** Campfire entity from the Basecamp API. */
|
|
18
|
-
export type Campfire = components["schemas"]["Campfire"];
|
|
19
17
|
/** Chatbot entity from the Basecamp API. */
|
|
20
18
|
export type Chatbot = components["schemas"]["Chatbot"];
|
|
19
|
+
/** Campfire entity from the Basecamp API. */
|
|
20
|
+
export type Campfire = components["schemas"]["Campfire"];
|
|
21
21
|
/** CampfireLine entity from the Basecamp API. */
|
|
22
22
|
export type CampfireLine = components["schemas"]["CampfireLine"];
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* Options for list.
|
|
26
|
-
*/
|
|
27
|
-
export interface ListCampfireOptions extends PaginationOptions {
|
|
28
|
-
}
|
|
29
|
-
|
|
30
24
|
/**
|
|
31
25
|
* Options for listChatbots.
|
|
32
26
|
*/
|
|
@@ -53,6 +47,14 @@ export interface UpdateChatbotCampfireRequest {
|
|
|
53
47
|
commandUrl?: string;
|
|
54
48
|
}
|
|
55
49
|
|
|
50
|
+
/**
|
|
51
|
+
* Options for list.
|
|
52
|
+
*/
|
|
53
|
+
export interface ListCampfireOptions extends PaginationOptions {
|
|
54
|
+
/** Page number for paginating through results. Defaults to 1. A positive value selects exactly that page, not a starting offset; see SPEC section 8. */
|
|
55
|
+
page?: number;
|
|
56
|
+
}
|
|
57
|
+
|
|
56
58
|
/**
|
|
57
59
|
* Options for listLines.
|
|
58
60
|
*/
|
|
@@ -61,6 +63,8 @@ export interface ListLinesCampfireOptions extends PaginationOptions {
|
|
|
61
63
|
sort?: "created_at" | "updated_at";
|
|
62
64
|
/** Filter by direction */
|
|
63
65
|
direction?: "asc" | "desc";
|
|
66
|
+
/** Page number for paginating through results. Defaults to 1. A positive value selects exactly that page, not a starting offset; see SPEC section 8. */
|
|
67
|
+
page?: number;
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
/**
|
|
@@ -89,6 +93,8 @@ export interface ListUploadsCampfireOptions extends PaginationOptions {
|
|
|
89
93
|
sort?: "created_at" | "updated_at";
|
|
90
94
|
/** Filter by direction */
|
|
91
95
|
direction?: "asc" | "desc";
|
|
96
|
+
/** Page number for paginating through results. Defaults to 1. A positive value selects exactly that page, not a starting offset; see SPEC section 8. */
|
|
97
|
+
page?: number;
|
|
92
98
|
}
|
|
93
99
|
|
|
94
100
|
|
|
@@ -101,85 +107,32 @@ export interface ListUploadsCampfireOptions extends PaginationOptions {
|
|
|
101
107
|
*/
|
|
102
108
|
export class CampfiresService extends BaseService {
|
|
103
109
|
|
|
104
|
-
/**
|
|
105
|
-
* List all campfires across the account
|
|
106
|
-
* @param options - Optional query parameters
|
|
107
|
-
* @returns All Campfire across all pages, with .meta.totalCount
|
|
108
|
-
*
|
|
109
|
-
* @example
|
|
110
|
-
* ```ts
|
|
111
|
-
* const result = await client.campfires.list();
|
|
112
|
-
* ```
|
|
113
|
-
*/
|
|
114
|
-
async list(options?: ListCampfireOptions): Promise<ListResult<Campfire>> {
|
|
115
|
-
return this.requestPaginated(
|
|
116
|
-
{
|
|
117
|
-
service: "Campfires",
|
|
118
|
-
operation: "ListCampfires",
|
|
119
|
-
resourceType: "campfire",
|
|
120
|
-
isMutation: false,
|
|
121
|
-
},
|
|
122
|
-
() =>
|
|
123
|
-
this.client.GET("/chats.json", {
|
|
124
|
-
})
|
|
125
|
-
, options
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Get a campfire by ID
|
|
131
|
-
* @param campfireId - The campfire ID
|
|
132
|
-
* @returns The Campfire
|
|
133
|
-
* @throws {BasecampError} If the resource is not found
|
|
134
|
-
*
|
|
135
|
-
* @example
|
|
136
|
-
* ```ts
|
|
137
|
-
* const result = await client.campfires.get(123);
|
|
138
|
-
* ```
|
|
139
|
-
*/
|
|
140
|
-
async get(campfireId: number): Promise<Campfire> {
|
|
141
|
-
const response = await this.request(
|
|
142
|
-
{
|
|
143
|
-
service: "Campfires",
|
|
144
|
-
operation: "GetCampfire",
|
|
145
|
-
resourceType: "campfire",
|
|
146
|
-
isMutation: false,
|
|
147
|
-
resourceId: campfireId,
|
|
148
|
-
},
|
|
149
|
-
() =>
|
|
150
|
-
this.client.GET("/chats/{campfireId}", {
|
|
151
|
-
params: {
|
|
152
|
-
path: { campfireId },
|
|
153
|
-
},
|
|
154
|
-
})
|
|
155
|
-
);
|
|
156
|
-
return response;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
110
|
/**
|
|
160
111
|
* List all chatbots for a campfire
|
|
112
|
+
* @param bucketId - The bucket ID
|
|
161
113
|
* @param campfireId - The campfire ID
|
|
162
114
|
* @param options - Optional query parameters
|
|
163
115
|
* @returns All Chatbot across all pages, with .meta.totalCount
|
|
164
116
|
*
|
|
165
117
|
* @example
|
|
166
118
|
* ```ts
|
|
167
|
-
* const result = await client.campfires.listChatbots(123);
|
|
119
|
+
* const result = await client.campfires.listChatbots(123, 123);
|
|
168
120
|
* ```
|
|
169
121
|
*/
|
|
170
|
-
async listChatbots(campfireId: number, options?: ListChatbotsCampfireOptions): Promise<ListResult<Chatbot>> {
|
|
122
|
+
async listChatbots(bucketId: number, campfireId: number, options?: ListChatbotsCampfireOptions): Promise<ListResult<Chatbot>> {
|
|
171
123
|
return this.requestPaginated(
|
|
172
124
|
{
|
|
173
125
|
service: "Campfires",
|
|
174
126
|
operation: "ListChatbots",
|
|
175
127
|
resourceType: "chatbot",
|
|
176
128
|
isMutation: false,
|
|
129
|
+
projectId: bucketId,
|
|
177
130
|
resourceId: campfireId,
|
|
178
131
|
},
|
|
179
132
|
() =>
|
|
180
|
-
this.client.GET("/chats/{campfireId}/integrations.json", {
|
|
133
|
+
this.client.GET("/buckets/{bucketId}/chats/{campfireId}/integrations.json", {
|
|
181
134
|
params: {
|
|
182
|
-
path: { campfireId },
|
|
135
|
+
path: { bucketId, campfireId },
|
|
183
136
|
},
|
|
184
137
|
})
|
|
185
138
|
, options
|
|
@@ -188,6 +141,7 @@ export class CampfiresService extends BaseService {
|
|
|
188
141
|
|
|
189
142
|
/**
|
|
190
143
|
* Create a new chatbot for a campfire
|
|
144
|
+
* @param bucketId - The bucket ID
|
|
191
145
|
* @param campfireId - The campfire ID
|
|
192
146
|
* @param req - Chatbot creation parameters
|
|
193
147
|
* @returns The Chatbot
|
|
@@ -195,10 +149,10 @@ export class CampfiresService extends BaseService {
|
|
|
195
149
|
*
|
|
196
150
|
* @example
|
|
197
151
|
* ```ts
|
|
198
|
-
* const result = await client.campfires.createChatbot(123, { serviceName: "example" });
|
|
152
|
+
* const result = await client.campfires.createChatbot(123, 123, { serviceName: "example" });
|
|
199
153
|
* ```
|
|
200
154
|
*/
|
|
201
|
-
async createChatbot(campfireId: number, req: CreateChatbotCampfireRequest): Promise<Chatbot> {
|
|
155
|
+
async createChatbot(bucketId: number, campfireId: number, req: CreateChatbotCampfireRequest): Promise<Chatbot> {
|
|
202
156
|
if (!req.serviceName) {
|
|
203
157
|
throw Errors.validation("Service name is required");
|
|
204
158
|
}
|
|
@@ -208,12 +162,13 @@ export class CampfiresService extends BaseService {
|
|
|
208
162
|
operation: "CreateChatbot",
|
|
209
163
|
resourceType: "chatbot",
|
|
210
164
|
isMutation: true,
|
|
165
|
+
projectId: bucketId,
|
|
211
166
|
resourceId: campfireId,
|
|
212
167
|
},
|
|
213
168
|
() =>
|
|
214
|
-
this.client.POST("/chats/{campfireId}/integrations.json", {
|
|
169
|
+
this.client.POST("/buckets/{bucketId}/chats/{campfireId}/integrations.json", {
|
|
215
170
|
params: {
|
|
216
|
-
path: { campfireId },
|
|
171
|
+
path: { bucketId, campfireId },
|
|
217
172
|
},
|
|
218
173
|
body: {
|
|
219
174
|
service_name: req.serviceName,
|
|
@@ -226,6 +181,7 @@ export class CampfiresService extends BaseService {
|
|
|
226
181
|
|
|
227
182
|
/**
|
|
228
183
|
* Get a chatbot by ID
|
|
184
|
+
* @param bucketId - The bucket ID
|
|
229
185
|
* @param campfireId - The campfire ID
|
|
230
186
|
* @param chatbotId - The chatbot ID
|
|
231
187
|
* @returns The Chatbot
|
|
@@ -233,22 +189,23 @@ export class CampfiresService extends BaseService {
|
|
|
233
189
|
*
|
|
234
190
|
* @example
|
|
235
191
|
* ```ts
|
|
236
|
-
* const result = await client.campfires.getChatbot(123, 123);
|
|
192
|
+
* const result = await client.campfires.getChatbot(123, 123, 123);
|
|
237
193
|
* ```
|
|
238
194
|
*/
|
|
239
|
-
async getChatbot(campfireId: number, chatbotId: number): Promise<Chatbot> {
|
|
195
|
+
async getChatbot(bucketId: number, campfireId: number, chatbotId: number): Promise<Chatbot> {
|
|
240
196
|
const response = await this.request(
|
|
241
197
|
{
|
|
242
198
|
service: "Campfires",
|
|
243
199
|
operation: "GetChatbot",
|
|
244
200
|
resourceType: "chatbot",
|
|
245
201
|
isMutation: false,
|
|
202
|
+
projectId: bucketId,
|
|
246
203
|
resourceId: chatbotId,
|
|
247
204
|
},
|
|
248
205
|
() =>
|
|
249
|
-
this.client.GET("/chats/{campfireId}/integrations/{chatbotId}", {
|
|
206
|
+
this.client.GET("/buckets/{bucketId}/chats/{campfireId}/integrations/{chatbotId}", {
|
|
250
207
|
params: {
|
|
251
|
-
path: { campfireId, chatbotId },
|
|
208
|
+
path: { bucketId, campfireId, chatbotId },
|
|
252
209
|
},
|
|
253
210
|
})
|
|
254
211
|
);
|
|
@@ -257,6 +214,7 @@ export class CampfiresService extends BaseService {
|
|
|
257
214
|
|
|
258
215
|
/**
|
|
259
216
|
* Update an existing chatbot
|
|
217
|
+
* @param bucketId - The bucket ID
|
|
260
218
|
* @param campfireId - The campfire ID
|
|
261
219
|
* @param chatbotId - The chatbot ID
|
|
262
220
|
* @param req - Chatbot update parameters
|
|
@@ -265,10 +223,10 @@ export class CampfiresService extends BaseService {
|
|
|
265
223
|
*
|
|
266
224
|
* @example
|
|
267
225
|
* ```ts
|
|
268
|
-
* const result = await client.campfires.updateChatbot(123, 123, { serviceName: "example" });
|
|
226
|
+
* const result = await client.campfires.updateChatbot(123, 123, 123, { serviceName: "example" });
|
|
269
227
|
* ```
|
|
270
228
|
*/
|
|
271
|
-
async updateChatbot(campfireId: number, chatbotId: number, req: UpdateChatbotCampfireRequest): Promise<Chatbot> {
|
|
229
|
+
async updateChatbot(bucketId: number, campfireId: number, chatbotId: number, req: UpdateChatbotCampfireRequest): Promise<Chatbot> {
|
|
272
230
|
if (!req.serviceName) {
|
|
273
231
|
throw Errors.validation("Service name is required");
|
|
274
232
|
}
|
|
@@ -278,12 +236,13 @@ export class CampfiresService extends BaseService {
|
|
|
278
236
|
operation: "UpdateChatbot",
|
|
279
237
|
resourceType: "chatbot",
|
|
280
238
|
isMutation: true,
|
|
239
|
+
projectId: bucketId,
|
|
281
240
|
resourceId: chatbotId,
|
|
282
241
|
},
|
|
283
242
|
() =>
|
|
284
|
-
this.client.PUT("/chats/{campfireId}/integrations/{chatbotId}", {
|
|
243
|
+
this.client.PUT("/buckets/{bucketId}/chats/{campfireId}/integrations/{chatbotId}", {
|
|
285
244
|
params: {
|
|
286
|
-
path: { campfireId, chatbotId },
|
|
245
|
+
path: { bucketId, campfireId, chatbotId },
|
|
287
246
|
},
|
|
288
247
|
body: {
|
|
289
248
|
service_name: req.serviceName,
|
|
@@ -296,6 +255,7 @@ export class CampfiresService extends BaseService {
|
|
|
296
255
|
|
|
297
256
|
/**
|
|
298
257
|
* Delete a chatbot
|
|
258
|
+
* @param bucketId - The bucket ID
|
|
299
259
|
* @param campfireId - The campfire ID
|
|
300
260
|
* @param chatbotId - The chatbot ID
|
|
301
261
|
* @returns void
|
|
@@ -303,27 +263,89 @@ export class CampfiresService extends BaseService {
|
|
|
303
263
|
*
|
|
304
264
|
* @example
|
|
305
265
|
* ```ts
|
|
306
|
-
* await client.campfires.deleteChatbot(123, 123);
|
|
266
|
+
* await client.campfires.deleteChatbot(123, 123, 123);
|
|
307
267
|
* ```
|
|
308
268
|
*/
|
|
309
|
-
async deleteChatbot(campfireId: number, chatbotId: number): Promise<void> {
|
|
269
|
+
async deleteChatbot(bucketId: number, campfireId: number, chatbotId: number): Promise<void> {
|
|
310
270
|
await this.request(
|
|
311
271
|
{
|
|
312
272
|
service: "Campfires",
|
|
313
273
|
operation: "DeleteChatbot",
|
|
314
274
|
resourceType: "chatbot",
|
|
315
275
|
isMutation: true,
|
|
276
|
+
projectId: bucketId,
|
|
316
277
|
resourceId: chatbotId,
|
|
317
278
|
},
|
|
318
279
|
() =>
|
|
319
|
-
this.client.DELETE("/chats/{campfireId}/integrations/{chatbotId}", {
|
|
280
|
+
this.client.DELETE("/buckets/{bucketId}/chats/{campfireId}/integrations/{chatbotId}", {
|
|
281
|
+
params: {
|
|
282
|
+
path: { bucketId, campfireId, chatbotId },
|
|
283
|
+
},
|
|
284
|
+
})
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* List all campfires across the account
|
|
290
|
+
* @param options - Optional query parameters
|
|
291
|
+
* @returns All Campfire across all pages, with .meta.totalCount
|
|
292
|
+
*
|
|
293
|
+
* @example
|
|
294
|
+
* ```ts
|
|
295
|
+
* const result = await client.campfires.list();
|
|
296
|
+
*
|
|
297
|
+
* // With options
|
|
298
|
+
* const filtered = await client.campfires.list({ page: 1 });
|
|
299
|
+
* ```
|
|
300
|
+
*/
|
|
301
|
+
async list(options?: ListCampfireOptions): Promise<ListResult<Campfire>> {
|
|
302
|
+
return this.requestPaginated(
|
|
303
|
+
{
|
|
304
|
+
service: "Campfires",
|
|
305
|
+
operation: "ListCampfires",
|
|
306
|
+
resourceType: "campfire",
|
|
307
|
+
isMutation: false,
|
|
308
|
+
},
|
|
309
|
+
() =>
|
|
310
|
+
this.client.GET("/chats.json", {
|
|
320
311
|
params: {
|
|
321
|
-
|
|
312
|
+
query: { page: options?.page },
|
|
322
313
|
},
|
|
323
314
|
})
|
|
315
|
+
, options
|
|
324
316
|
);
|
|
325
317
|
}
|
|
326
318
|
|
|
319
|
+
/**
|
|
320
|
+
* Get a campfire by ID
|
|
321
|
+
* @param campfireId - The campfire ID
|
|
322
|
+
* @returns The Campfire
|
|
323
|
+
* @throws {BasecampError} If the resource is not found
|
|
324
|
+
*
|
|
325
|
+
* @example
|
|
326
|
+
* ```ts
|
|
327
|
+
* const result = await client.campfires.get(123);
|
|
328
|
+
* ```
|
|
329
|
+
*/
|
|
330
|
+
async get(campfireId: number): Promise<Campfire> {
|
|
331
|
+
const response = await this.request(
|
|
332
|
+
{
|
|
333
|
+
service: "Campfires",
|
|
334
|
+
operation: "GetCampfire",
|
|
335
|
+
resourceType: "campfire",
|
|
336
|
+
isMutation: false,
|
|
337
|
+
resourceId: campfireId,
|
|
338
|
+
},
|
|
339
|
+
() =>
|
|
340
|
+
this.client.GET("/chats/{campfireId}", {
|
|
341
|
+
params: {
|
|
342
|
+
path: { campfireId },
|
|
343
|
+
},
|
|
344
|
+
})
|
|
345
|
+
);
|
|
346
|
+
return response;
|
|
347
|
+
}
|
|
348
|
+
|
|
327
349
|
/**
|
|
328
350
|
* List all lines (messages) in a campfire
|
|
329
351
|
* @param campfireId - The campfire ID
|
|
@@ -351,7 +373,7 @@ export class CampfiresService extends BaseService {
|
|
|
351
373
|
this.client.GET("/chats/{campfireId}/lines.json", {
|
|
352
374
|
params: {
|
|
353
375
|
path: { campfireId },
|
|
354
|
-
query: { sort: options?.sort, direction: options?.direction },
|
|
376
|
+
query: { sort: options?.sort, direction: options?.direction, page: options?.page },
|
|
355
377
|
},
|
|
356
378
|
})
|
|
357
379
|
, options
|
|
@@ -521,7 +543,7 @@ export class CampfiresService extends BaseService {
|
|
|
521
543
|
this.client.GET("/chats/{campfireId}/uploads.json", {
|
|
522
544
|
params: {
|
|
523
545
|
path: { campfireId },
|
|
524
|
-
query: { sort: options?.sort, direction: options?.direction },
|
|
546
|
+
query: { sort: options?.sort, direction: options?.direction, page: options?.page },
|
|
525
547
|
},
|
|
526
548
|
})
|
|
527
549
|
, options
|
|
@@ -45,6 +45,8 @@ export interface MoveCardRequest {
|
|
|
45
45
|
* Options for list.
|
|
46
46
|
*/
|
|
47
47
|
export interface ListCardOptions extends PaginationOptions {
|
|
48
|
+
/** Page number for paginating through results. Defaults to 1. A positive value selects exactly that page, not a starting offset; see SPEC section 8. */
|
|
49
|
+
page?: number;
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
/**
|
|
@@ -184,6 +186,9 @@ export class CardsService extends BaseService {
|
|
|
184
186
|
* @example
|
|
185
187
|
* ```ts
|
|
186
188
|
* const result = await client.cards.list(123);
|
|
189
|
+
*
|
|
190
|
+
* // With options
|
|
191
|
+
* const filtered = await client.cards.list(123, { page: 1 });
|
|
187
192
|
* ```
|
|
188
193
|
*/
|
|
189
194
|
async list(columnId: number, options?: ListCardOptions): Promise<ListResult<Card>> {
|
|
@@ -199,6 +204,7 @@ export class CardsService extends BaseService {
|
|
|
199
204
|
this.client.GET("/card_tables/lists/{columnId}/cards.json", {
|
|
200
205
|
params: {
|
|
201
206
|
path: { columnId },
|
|
207
|
+
query: { page: options?.page },
|
|
202
208
|
},
|
|
203
209
|
})
|
|
204
210
|
, options
|
|
@@ -27,6 +27,8 @@ export type Person = components["schemas"]["Person"];
|
|
|
27
27
|
* Options for reminders.
|
|
28
28
|
*/
|
|
29
29
|
export interface RemindersCheckinOptions extends PaginationOptions {
|
|
30
|
+
/** Page number for paginating through results. Defaults to 1. A positive value selects exactly that page, not a starting offset; see SPEC section 8. */
|
|
31
|
+
page?: number;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
/**
|
|
@@ -43,6 +45,8 @@ export interface UpdateAnswerCheckinRequest {
|
|
|
43
45
|
* Options for listQuestions.
|
|
44
46
|
*/
|
|
45
47
|
export interface ListQuestionsCheckinOptions extends PaginationOptions {
|
|
48
|
+
/** Page number for paginating through results. Defaults to 1. A positive value selects exactly that page, not a starting offset; see SPEC section 8. */
|
|
49
|
+
page?: number;
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
/**
|
|
@@ -73,6 +77,8 @@ export interface UpdateQuestionCheckinRequest {
|
|
|
73
77
|
* Options for listAnswers.
|
|
74
78
|
*/
|
|
75
79
|
export interface ListAnswersCheckinOptions extends PaginationOptions {
|
|
80
|
+
/** Page number for paginating through results. Defaults to 1. A positive value selects exactly that page, not a starting offset; see SPEC section 8. */
|
|
81
|
+
page?: number;
|
|
76
82
|
}
|
|
77
83
|
|
|
78
84
|
/**
|
|
@@ -95,6 +101,8 @@ export interface AnswerersCheckinOptions extends PaginationOptions {
|
|
|
95
101
|
* Options for byPerson.
|
|
96
102
|
*/
|
|
97
103
|
export interface ByPersonCheckinOptions extends PaginationOptions {
|
|
104
|
+
/** Page number for paginating through results. Defaults to 1. A positive value selects exactly that page, not a starting offset; see SPEC section 8. */
|
|
105
|
+
page?: number;
|
|
98
106
|
}
|
|
99
107
|
|
|
100
108
|
/**
|
|
@@ -137,6 +145,9 @@ export class CheckinsService extends BaseService {
|
|
|
137
145
|
},
|
|
138
146
|
() =>
|
|
139
147
|
this.client.GET("/my/question_reminders.json", {
|
|
148
|
+
params: {
|
|
149
|
+
query: { page: options?.page },
|
|
150
|
+
},
|
|
140
151
|
})
|
|
141
152
|
, options
|
|
142
153
|
);
|
|
@@ -251,6 +262,9 @@ export class CheckinsService extends BaseService {
|
|
|
251
262
|
* @example
|
|
252
263
|
* ```ts
|
|
253
264
|
* const result = await client.checkins.listQuestions(123);
|
|
265
|
+
*
|
|
266
|
+
* // With options
|
|
267
|
+
* const filtered = await client.checkins.listQuestions(123, { page: 1 });
|
|
254
268
|
* ```
|
|
255
269
|
*/
|
|
256
270
|
async listQuestions(questionnaireId: number, options?: ListQuestionsCheckinOptions): Promise<ListResult<Question>> {
|
|
@@ -266,6 +280,7 @@ export class CheckinsService extends BaseService {
|
|
|
266
280
|
this.client.GET("/questionnaires/{questionnaireId}/questions.json", {
|
|
267
281
|
params: {
|
|
268
282
|
path: { questionnaireId },
|
|
283
|
+
query: { page: options?.page },
|
|
269
284
|
},
|
|
270
285
|
})
|
|
271
286
|
, options
|
|
@@ -389,6 +404,9 @@ export class CheckinsService extends BaseService {
|
|
|
389
404
|
* @example
|
|
390
405
|
* ```ts
|
|
391
406
|
* const result = await client.checkins.listAnswers(123);
|
|
407
|
+
*
|
|
408
|
+
* // With options
|
|
409
|
+
* const filtered = await client.checkins.listAnswers(123, { page: 1 });
|
|
392
410
|
* ```
|
|
393
411
|
*/
|
|
394
412
|
async listAnswers(questionId: number, options?: ListAnswersCheckinOptions): Promise<ListResult<Answer>> {
|
|
@@ -404,6 +422,7 @@ export class CheckinsService extends BaseService {
|
|
|
404
422
|
this.client.GET("/questions/{questionId}/answers.json", {
|
|
405
423
|
params: {
|
|
406
424
|
path: { questionId },
|
|
425
|
+
query: { page: options?.page },
|
|
407
426
|
},
|
|
408
427
|
})
|
|
409
428
|
, options
|
|
@@ -506,6 +525,7 @@ export class CheckinsService extends BaseService {
|
|
|
506
525
|
this.client.GET("/questions/{questionId}/answers/by/{personId}", {
|
|
507
526
|
params: {
|
|
508
527
|
path: { questionId, personId },
|
|
528
|
+
query: { page: options?.page },
|
|
509
529
|
},
|
|
510
530
|
})
|
|
511
531
|
, options
|
|
@@ -24,6 +24,8 @@ export interface ListClientApprovalOptions extends PaginationOptions {
|
|
|
24
24
|
sort?: "created_at" | "updated_at";
|
|
25
25
|
/** Filter by direction */
|
|
26
26
|
direction?: "asc" | "desc";
|
|
27
|
+
/** Page number for paginating through results. Defaults to 1. A positive value selects exactly that page, not a starting offset; see SPEC section 8. */
|
|
28
|
+
page?: number;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
|
|
@@ -38,29 +40,32 @@ export class ClientApprovalsService extends BaseService {
|
|
|
38
40
|
|
|
39
41
|
/**
|
|
40
42
|
* List all client approvals in a project
|
|
43
|
+
* @param bucketId - The bucket ID
|
|
41
44
|
* @param options - Optional query parameters
|
|
42
45
|
* @returns All ClientApproval across all pages, with .meta.totalCount
|
|
43
46
|
*
|
|
44
47
|
* @example
|
|
45
48
|
* ```ts
|
|
46
|
-
* const result = await client.clientApprovals.list();
|
|
49
|
+
* const result = await client.clientApprovals.list(123);
|
|
47
50
|
*
|
|
48
51
|
* // With options
|
|
49
|
-
* const filtered = await client.clientApprovals.list({ sort: "created_at" });
|
|
52
|
+
* const filtered = await client.clientApprovals.list(123, { sort: "created_at" });
|
|
50
53
|
* ```
|
|
51
54
|
*/
|
|
52
|
-
async list(options?: ListClientApprovalOptions): Promise<ListResult<ClientApproval>> {
|
|
55
|
+
async list(bucketId: number, options?: ListClientApprovalOptions): Promise<ListResult<ClientApproval>> {
|
|
53
56
|
return this.requestPaginated(
|
|
54
57
|
{
|
|
55
58
|
service: "ClientApprovals",
|
|
56
59
|
operation: "ListClientApprovals",
|
|
57
60
|
resourceType: "client_approval",
|
|
58
61
|
isMutation: false,
|
|
62
|
+
projectId: bucketId,
|
|
59
63
|
},
|
|
60
64
|
() =>
|
|
61
|
-
this.client.GET("/client/approvals.json", {
|
|
65
|
+
this.client.GET("/buckets/{bucketId}/client/approvals.json", {
|
|
62
66
|
params: {
|
|
63
|
-
|
|
67
|
+
path: { bucketId },
|
|
68
|
+
query: { sort: options?.sort, direction: options?.direction, page: options?.page },
|
|
64
69
|
},
|
|
65
70
|
})
|
|
66
71
|
, options
|
|
@@ -24,6 +24,8 @@ export interface ListClientCorrespondenceOptions extends PaginationOptions {
|
|
|
24
24
|
sort?: "created_at" | "updated_at";
|
|
25
25
|
/** Filter by direction */
|
|
26
26
|
direction?: "asc" | "desc";
|
|
27
|
+
/** Page number for paginating through results. Defaults to 1. A positive value selects exactly that page, not a starting offset; see SPEC section 8. */
|
|
28
|
+
page?: number;
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
|
|
@@ -38,29 +40,32 @@ export class ClientCorrespondencesService extends BaseService {
|
|
|
38
40
|
|
|
39
41
|
/**
|
|
40
42
|
* List all client correspondences in a project
|
|
43
|
+
* @param bucketId - The bucket ID
|
|
41
44
|
* @param options - Optional query parameters
|
|
42
45
|
* @returns All ClientCorrespondence across all pages, with .meta.totalCount
|
|
43
46
|
*
|
|
44
47
|
* @example
|
|
45
48
|
* ```ts
|
|
46
|
-
* const result = await client.clientCorrespondences.list();
|
|
49
|
+
* const result = await client.clientCorrespondences.list(123);
|
|
47
50
|
*
|
|
48
51
|
* // With options
|
|
49
|
-
* const filtered = await client.clientCorrespondences.list({ sort: "created_at" });
|
|
52
|
+
* const filtered = await client.clientCorrespondences.list(123, { sort: "created_at" });
|
|
50
53
|
* ```
|
|
51
54
|
*/
|
|
52
|
-
async list(options?: ListClientCorrespondenceOptions): Promise<ListResult<ClientCorrespondence>> {
|
|
55
|
+
async list(bucketId: number, options?: ListClientCorrespondenceOptions): Promise<ListResult<ClientCorrespondence>> {
|
|
53
56
|
return this.requestPaginated(
|
|
54
57
|
{
|
|
55
58
|
service: "ClientCorrespondences",
|
|
56
59
|
operation: "ListClientCorrespondences",
|
|
57
60
|
resourceType: "client_correspondence",
|
|
58
61
|
isMutation: false,
|
|
62
|
+
projectId: bucketId,
|
|
59
63
|
},
|
|
60
64
|
() =>
|
|
61
|
-
this.client.GET("/client/correspondences.json", {
|
|
65
|
+
this.client.GET("/buckets/{bucketId}/client/correspondences.json", {
|
|
62
66
|
params: {
|
|
63
|
-
|
|
67
|
+
path: { bucketId },
|
|
68
|
+
query: { sort: options?.sort, direction: options?.direction, page: options?.page },
|
|
64
69
|
},
|
|
65
70
|
})
|
|
66
71
|
, options
|