@37signals/basecamp 0.11.0 → 0.12.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/dist/client.d.ts +14 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +200 -162
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +1 -1
- package/dist/generated/metadata.d.ts.map +1 -1
- package/dist/generated/metadata.js +172 -1
- package/dist/generated/metadata.js.map +1 -1
- package/dist/generated/metadata.ts +172 -1
- package/dist/generated/openapi-stripped.json +2074 -134
- package/dist/generated/path-mapping.d.ts.map +1 -1
- package/dist/generated/path-mapping.js +13 -0
- package/dist/generated/path-mapping.js.map +1 -1
- package/dist/generated/path-mapping.ts +13 -0
- package/dist/generated/schema.d.ts +1361 -25
- package/dist/generated/services/bookmarks.d.ts +76 -0
- package/dist/generated/services/bookmarks.d.ts.map +1 -0
- package/dist/generated/services/bookmarks.js +114 -0
- package/dist/generated/services/bookmarks.js.map +1 -0
- package/dist/generated/services/bookmarks.ts +158 -0
- package/dist/generated/services/calendars.d.ts +47 -0
- package/dist/generated/services/calendars.d.ts.map +1 -0
- package/dist/generated/services/calendars.js +73 -0
- package/dist/generated/services/calendars.js.map +1 -0
- package/dist/generated/services/calendars.ts +102 -0
- package/dist/generated/services/drafts.d.ts +38 -0
- package/dist/generated/services/drafts.d.ts.map +1 -0
- package/dist/generated/services/drafts.js +40 -0
- package/dist/generated/services/drafts.js.map +1 -0
- package/dist/generated/services/drafts.ts +67 -0
- package/dist/generated/services/everything.d.ts +69 -2
- package/dist/generated/services/everything.d.ts.map +1 -1
- package/dist/generated/services/everything.js +23 -13
- package/dist/generated/services/everything.js.map +1 -1
- package/dist/generated/services/everything.ts +86 -11
- package/dist/generated/services/index.d.ts +5 -1
- package/dist/generated/services/index.d.ts.map +1 -1
- package/dist/generated/services/index.js +5 -1
- package/dist/generated/services/index.js.map +1 -1
- package/dist/generated/services/index.ts +5 -1
- package/dist/generated/services/my-assignments.d.ts +52 -0
- package/dist/generated/services/my-assignments.d.ts.map +1 -1
- package/dist/generated/services/my-assignments.js +71 -0
- package/dist/generated/services/my-assignments.js.map +1 -1
- package/dist/generated/services/my-assignments.ts +104 -0
- package/dist/generated/services/my-notes.d.ts +45 -0
- package/dist/generated/services/my-notes.d.ts.map +1 -0
- package/dist/generated/services/my-notes.js +62 -0
- package/dist/generated/services/my-notes.js.map +1 -0
- package/dist/generated/services/my-notes.ts +92 -0
- package/dist/generated/services/todos.d.ts +33 -0
- package/dist/generated/services/todos.d.ts.map +1 -1
- package/dist/generated/services/todos.js +46 -0
- package/dist/generated/services/todos.js.map +1 -1
- package/dist/generated/services/todos.ts +71 -0
- package/dist/hooks/otel.d.ts +1 -1
- package/dist/hooks/otel.js +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/oauth/discovery.d.ts.map +1 -1
- package/dist/oauth/discovery.js +1 -0
- package/dist/oauth/discovery.js.map +1 -1
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.js +1 -1
- package/package.json +1 -1
- package/src/generated/metadata.ts +172 -1
- package/src/generated/openapi-stripped.json +2074 -134
- package/src/generated/path-mapping.ts +13 -0
- package/src/generated/schema.d.ts +1361 -25
- package/src/generated/services/bookmarks.ts +158 -0
- package/src/generated/services/calendars.ts +102 -0
- package/src/generated/services/drafts.ts +67 -0
- package/src/generated/services/everything.ts +86 -11
- package/src/generated/services/index.ts +5 -1
- package/src/generated/services/my-assignments.ts +104 -0
- package/src/generated/services/my-notes.ts +92 -0
- package/src/generated/services/todos.ts +71 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bookmarks 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
|
+
/** Bookmark entity from the Basecamp API. */
|
|
17
|
+
export type Bookmark = components["schemas"]["Bookmark"];
|
|
18
|
+
/** BookmarkStatus entity from the Basecamp API. */
|
|
19
|
+
export type BookmarkStatus = components["schemas"]["BookmarkStatus"];
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Options for listMyBookmarks.
|
|
23
|
+
*/
|
|
24
|
+
export interface ListMyBookmarksBookmarkOptions extends PaginationOptions {
|
|
25
|
+
/** Page number for paginating through results. Defaults to 1. */
|
|
26
|
+
page?: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
// =============================================================================
|
|
31
|
+
// Service
|
|
32
|
+
// =============================================================================
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Service for Bookmarks operations.
|
|
36
|
+
*/
|
|
37
|
+
export class BookmarksService extends BaseService {
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* List the current user's bookmarks, most recently bookmarked first (paginated).
|
|
41
|
+
* @param options - Optional query parameters
|
|
42
|
+
* @returns All Bookmark across all pages, with .meta.totalCount
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const result = await client.bookmarks.listMyBookmarks();
|
|
47
|
+
*
|
|
48
|
+
* // With options
|
|
49
|
+
* const filtered = await client.bookmarks.listMyBookmarks({ page: 1 });
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
async listMyBookmarks(options?: ListMyBookmarksBookmarkOptions): Promise<ListResult<Bookmark>> {
|
|
53
|
+
return this.requestPaginated(
|
|
54
|
+
{
|
|
55
|
+
service: "Bookmarks",
|
|
56
|
+
operation: "ListMyBookmarks",
|
|
57
|
+
resourceType: "bookmark",
|
|
58
|
+
isMutation: false,
|
|
59
|
+
},
|
|
60
|
+
() =>
|
|
61
|
+
this.client.GET("/my/bookmarks.json", {
|
|
62
|
+
params: {
|
|
63
|
+
query: { page: options?.page },
|
|
64
|
+
},
|
|
65
|
+
})
|
|
66
|
+
, options
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Report whether the current user has bookmarked the recording.
|
|
72
|
+
* @param recordingId - The recording ID
|
|
73
|
+
* @returns The BookmarkStatus
|
|
74
|
+
* @throws {BasecampError} If the resource is not found
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const result = await client.bookmarks.getBookmark(123);
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
async getBookmark(recordingId: number): Promise<BookmarkStatus> {
|
|
82
|
+
const response = await this.request(
|
|
83
|
+
{
|
|
84
|
+
service: "Bookmarks",
|
|
85
|
+
operation: "GetBookmark",
|
|
86
|
+
resourceType: "bookmark",
|
|
87
|
+
isMutation: false,
|
|
88
|
+
resourceId: recordingId,
|
|
89
|
+
},
|
|
90
|
+
() =>
|
|
91
|
+
this.client.GET("/recordings/{recordingId}/bookmark.json", {
|
|
92
|
+
params: {
|
|
93
|
+
path: { recordingId },
|
|
94
|
+
},
|
|
95
|
+
})
|
|
96
|
+
);
|
|
97
|
+
return response;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Bookmark a recording for the current user.
|
|
102
|
+
* @param recordingId - The recording ID
|
|
103
|
+
* @returns The Bookmark
|
|
104
|
+
* @throws {BasecampError} If required fields are missing or invalid
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```ts
|
|
108
|
+
* const result = await client.bookmarks.createBookmark(123);
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
async createBookmark(recordingId: number): Promise<Bookmark> {
|
|
112
|
+
const response = await this.request(
|
|
113
|
+
{
|
|
114
|
+
service: "Bookmarks",
|
|
115
|
+
operation: "CreateBookmark",
|
|
116
|
+
resourceType: "bookmark",
|
|
117
|
+
isMutation: true,
|
|
118
|
+
resourceId: recordingId,
|
|
119
|
+
},
|
|
120
|
+
() =>
|
|
121
|
+
this.client.POST("/recordings/{recordingId}/bookmark.json", {
|
|
122
|
+
params: {
|
|
123
|
+
path: { recordingId },
|
|
124
|
+
},
|
|
125
|
+
})
|
|
126
|
+
);
|
|
127
|
+
return response;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Remove the current user's bookmark from a recording.
|
|
132
|
+
* @param recordingId - The recording ID
|
|
133
|
+
* @returns void
|
|
134
|
+
* @throws {BasecampError} If the request fails
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```ts
|
|
138
|
+
* await client.bookmarks.deleteBookmark(123);
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
async deleteBookmark(recordingId: number): Promise<void> {
|
|
142
|
+
await this.request(
|
|
143
|
+
{
|
|
144
|
+
service: "Bookmarks",
|
|
145
|
+
operation: "DeleteBookmark",
|
|
146
|
+
resourceType: "bookmark",
|
|
147
|
+
isMutation: true,
|
|
148
|
+
resourceId: recordingId,
|
|
149
|
+
},
|
|
150
|
+
() =>
|
|
151
|
+
this.client.DELETE("/recordings/{recordingId}/bookmark.json", {
|
|
152
|
+
params: {
|
|
153
|
+
path: { recordingId },
|
|
154
|
+
},
|
|
155
|
+
})
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calendars 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 { Errors } from "../../errors.js";
|
|
10
|
+
|
|
11
|
+
// =============================================================================
|
|
12
|
+
// Types
|
|
13
|
+
// =============================================================================
|
|
14
|
+
|
|
15
|
+
/** Calendar entity from the Basecamp API. */
|
|
16
|
+
export type Calendar = components["schemas"]["Calendar"];
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Request parameters for updateCalendar.
|
|
20
|
+
*/
|
|
21
|
+
export interface UpdateCalendarCalendarRequest {
|
|
22
|
+
/** Calendar */
|
|
23
|
+
calendar: components["schemas"]["CalendarAttributes"];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
// =============================================================================
|
|
28
|
+
// Service
|
|
29
|
+
// =============================================================================
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Service for Calendars operations.
|
|
33
|
+
*/
|
|
34
|
+
export class CalendarsService extends BaseService {
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Get a calendar by its bucket id. A Calendar is a top-level BC5 bucketable
|
|
38
|
+
* @param calendarId - The calendar ID
|
|
39
|
+
* @returns The Calendar
|
|
40
|
+
* @throws {BasecampError} If the resource is not found
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const result = await client.calendars.getCalendar(123);
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
async getCalendar(calendarId: number): Promise<Calendar> {
|
|
48
|
+
const response = await this.request(
|
|
49
|
+
{
|
|
50
|
+
service: "Calendars",
|
|
51
|
+
operation: "GetCalendar",
|
|
52
|
+
resourceType: "calendar",
|
|
53
|
+
isMutation: false,
|
|
54
|
+
resourceId: calendarId,
|
|
55
|
+
},
|
|
56
|
+
() =>
|
|
57
|
+
this.client.GET("/calendars/{calendarId}", {
|
|
58
|
+
params: {
|
|
59
|
+
path: { calendarId },
|
|
60
|
+
},
|
|
61
|
+
})
|
|
62
|
+
);
|
|
63
|
+
return response;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Update a calendar's display color. An unknown color returns 422 with a JSON
|
|
68
|
+
* @param calendarId - The calendar ID
|
|
69
|
+
* @param req - Calendar update parameters
|
|
70
|
+
* @returns The Calendar
|
|
71
|
+
* @throws {BasecampError} If the resource is not found or fields are invalid
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* const result = await client.calendars.updateCalendar(123, { calendar: { color: "example" } });
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
async updateCalendar(calendarId: number, req: UpdateCalendarCalendarRequest): Promise<Calendar> {
|
|
79
|
+
if (!req.calendar) {
|
|
80
|
+
throw Errors.validation("Calendar is required");
|
|
81
|
+
}
|
|
82
|
+
const response = await this.request(
|
|
83
|
+
{
|
|
84
|
+
service: "Calendars",
|
|
85
|
+
operation: "UpdateCalendar",
|
|
86
|
+
resourceType: "calendar",
|
|
87
|
+
isMutation: true,
|
|
88
|
+
resourceId: calendarId,
|
|
89
|
+
},
|
|
90
|
+
() =>
|
|
91
|
+
this.client.PUT("/calendars/{calendarId}", {
|
|
92
|
+
params: {
|
|
93
|
+
path: { calendarId },
|
|
94
|
+
},
|
|
95
|
+
body: {
|
|
96
|
+
calendar: req.calendar,
|
|
97
|
+
},
|
|
98
|
+
})
|
|
99
|
+
);
|
|
100
|
+
return response;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drafts 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
|
+
/** Draft entity from the Basecamp API. */
|
|
17
|
+
export type Draft = components["schemas"]["Draft"];
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Options for listMyDrafts.
|
|
21
|
+
*/
|
|
22
|
+
export interface ListMyDraftsDraftOptions extends PaginationOptions {
|
|
23
|
+
/** Page number for paginating through results. Defaults to 1. */
|
|
24
|
+
page?: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
// =============================================================================
|
|
29
|
+
// Service
|
|
30
|
+
// =============================================================================
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Service for Drafts operations.
|
|
34
|
+
*/
|
|
35
|
+
export class DraftsService extends BaseService {
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* List the current user's drafts across their active projects, most recently
|
|
39
|
+
* @param options - Optional query parameters
|
|
40
|
+
* @returns All Draft across all pages, with .meta.totalCount
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const result = await client.drafts.listMyDrafts();
|
|
45
|
+
*
|
|
46
|
+
* // With options
|
|
47
|
+
* const filtered = await client.drafts.listMyDrafts({ page: 1 });
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
async listMyDrafts(options?: ListMyDraftsDraftOptions): Promise<ListResult<Draft>> {
|
|
51
|
+
return this.requestPaginated(
|
|
52
|
+
{
|
|
53
|
+
service: "Drafts",
|
|
54
|
+
operation: "ListMyDrafts",
|
|
55
|
+
resourceType: "my_draft",
|
|
56
|
+
isMutation: false,
|
|
57
|
+
},
|
|
58
|
+
() =>
|
|
59
|
+
this.client.GET("/my/drafts.json", {
|
|
60
|
+
params: {
|
|
61
|
+
query: { page: options?.page },
|
|
62
|
+
},
|
|
63
|
+
})
|
|
64
|
+
, options
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -30,6 +30,11 @@ export type Todo = components["schemas"]["Todo"];
|
|
|
30
30
|
* Options for everythingCompletedCards.
|
|
31
31
|
*/
|
|
32
32
|
export interface EverythingCompletedCardsEverythingOptions extends PaginationOptions {
|
|
33
|
+
/** Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
34
|
+
Assignees on nested steps are not considered. */
|
|
35
|
+
assigneeIds?: number[];
|
|
36
|
+
/** Filter by due date: with, without, or overdue. Unrecognized values are ignored. */
|
|
37
|
+
due?: string;
|
|
33
38
|
/** Page number for paginating through results. Defaults to 1. */
|
|
34
39
|
page?: number;
|
|
35
40
|
}
|
|
@@ -38,6 +43,11 @@ export interface EverythingCompletedCardsEverythingOptions extends PaginationOpt
|
|
|
38
43
|
* Options for everythingNoDueDateCards.
|
|
39
44
|
*/
|
|
40
45
|
export interface EverythingNoDueDateCardsEverythingOptions extends PaginationOptions {
|
|
46
|
+
/** Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
47
|
+
Assignees on nested steps are not considered. */
|
|
48
|
+
assigneeIds?: number[];
|
|
49
|
+
/** Filter by due date: with, without, or overdue. Unrecognized values are ignored. */
|
|
50
|
+
due?: string;
|
|
41
51
|
/** Page number for paginating through results. Defaults to 1. */
|
|
42
52
|
page?: number;
|
|
43
53
|
}
|
|
@@ -46,6 +56,11 @@ export interface EverythingNoDueDateCardsEverythingOptions extends PaginationOpt
|
|
|
46
56
|
* Options for everythingNotNowCards.
|
|
47
57
|
*/
|
|
48
58
|
export interface EverythingNotNowCardsEverythingOptions extends PaginationOptions {
|
|
59
|
+
/** Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
60
|
+
Assignees on nested steps are not considered. */
|
|
61
|
+
assigneeIds?: number[];
|
|
62
|
+
/** Filter by due date: with, without, or overdue. Unrecognized values are ignored. */
|
|
63
|
+
due?: string;
|
|
49
64
|
/** Page number for paginating through results. Defaults to 1. */
|
|
50
65
|
page?: number;
|
|
51
66
|
}
|
|
@@ -54,14 +69,35 @@ export interface EverythingNotNowCardsEverythingOptions extends PaginationOption
|
|
|
54
69
|
* Options for everythingOpenCards.
|
|
55
70
|
*/
|
|
56
71
|
export interface EverythingOpenCardsEverythingOptions extends PaginationOptions {
|
|
72
|
+
/** Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
73
|
+
Assignees on nested steps are not considered. */
|
|
74
|
+
assigneeIds?: number[];
|
|
75
|
+
/** Filter by due date: with, without, or overdue. Unrecognized values are ignored. */
|
|
76
|
+
due?: string;
|
|
57
77
|
/** Page number for paginating through results. Defaults to 1. */
|
|
58
78
|
page?: number;
|
|
59
79
|
}
|
|
60
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Options for everythingOverdueCards.
|
|
83
|
+
*/
|
|
84
|
+
export interface EverythingOverdueCardsEverythingOptions {
|
|
85
|
+
/** Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
86
|
+
Assignees on nested steps are not considered. */
|
|
87
|
+
assigneeIds?: number[];
|
|
88
|
+
/** Filter by due date: with, without, or overdue. Unrecognized values are ignored. */
|
|
89
|
+
due?: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
61
92
|
/**
|
|
62
93
|
* Options for everythingUnassignedCards.
|
|
63
94
|
*/
|
|
64
95
|
export interface EverythingUnassignedCardsEverythingOptions extends PaginationOptions {
|
|
96
|
+
/** Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
97
|
+
Assignees on nested steps are not considered. */
|
|
98
|
+
assigneeIds?: number[];
|
|
99
|
+
/** Filter by due date: with, without, or overdue. Unrecognized values are ignored. */
|
|
100
|
+
due?: string;
|
|
65
101
|
/** Page number for paginating through results. Defaults to 1. */
|
|
66
102
|
page?: number;
|
|
67
103
|
}
|
|
@@ -114,6 +150,11 @@ export interface EverythingMessagesEverythingOptions extends PaginationOptions {
|
|
|
114
150
|
* Options for everythingCompletedTodos.
|
|
115
151
|
*/
|
|
116
152
|
export interface EverythingCompletedTodosEverythingOptions extends PaginationOptions {
|
|
153
|
+
/** Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
154
|
+
Assignees on nested steps are not considered. */
|
|
155
|
+
assigneeIds?: number[];
|
|
156
|
+
/** Filter by due date: with, without, or overdue. Unrecognized values are ignored. */
|
|
157
|
+
due?: string;
|
|
117
158
|
/** Page number for paginating through results. Defaults to 1. */
|
|
118
159
|
page?: number;
|
|
119
160
|
}
|
|
@@ -122,6 +163,11 @@ export interface EverythingCompletedTodosEverythingOptions extends PaginationOpt
|
|
|
122
163
|
* Options for everythingNoDueDateTodos.
|
|
123
164
|
*/
|
|
124
165
|
export interface EverythingNoDueDateTodosEverythingOptions extends PaginationOptions {
|
|
166
|
+
/** Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
167
|
+
Assignees on nested steps are not considered. */
|
|
168
|
+
assigneeIds?: number[];
|
|
169
|
+
/** Filter by due date: with, without, or overdue. Unrecognized values are ignored. */
|
|
170
|
+
due?: string;
|
|
125
171
|
/** Page number for paginating through results. Defaults to 1. */
|
|
126
172
|
page?: number;
|
|
127
173
|
}
|
|
@@ -130,14 +176,35 @@ export interface EverythingNoDueDateTodosEverythingOptions extends PaginationOpt
|
|
|
130
176
|
* Options for everythingOpenTodos.
|
|
131
177
|
*/
|
|
132
178
|
export interface EverythingOpenTodosEverythingOptions extends PaginationOptions {
|
|
179
|
+
/** Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
180
|
+
Assignees on nested steps are not considered. */
|
|
181
|
+
assigneeIds?: number[];
|
|
182
|
+
/** Filter by due date: with, without, or overdue. Unrecognized values are ignored. */
|
|
183
|
+
due?: string;
|
|
133
184
|
/** Page number for paginating through results. Defaults to 1. */
|
|
134
185
|
page?: number;
|
|
135
186
|
}
|
|
136
187
|
|
|
188
|
+
/**
|
|
189
|
+
* Options for everythingOverdueTodos.
|
|
190
|
+
*/
|
|
191
|
+
export interface EverythingOverdueTodosEverythingOptions {
|
|
192
|
+
/** Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
193
|
+
Assignees on nested steps are not considered. */
|
|
194
|
+
assigneeIds?: number[];
|
|
195
|
+
/** Filter by due date: with, without, or overdue. Unrecognized values are ignored. */
|
|
196
|
+
due?: string;
|
|
197
|
+
}
|
|
198
|
+
|
|
137
199
|
/**
|
|
138
200
|
* Options for everythingUnassignedTodos.
|
|
139
201
|
*/
|
|
140
202
|
export interface EverythingUnassignedTodosEverythingOptions extends PaginationOptions {
|
|
203
|
+
/** Restrict to tasks assigned to at least one of the given people (repeatable).
|
|
204
|
+
Assignees on nested steps are not considered. */
|
|
205
|
+
assigneeIds?: number[];
|
|
206
|
+
/** Filter by due date: with, without, or overdue. Unrecognized values are ignored. */
|
|
207
|
+
due?: string;
|
|
141
208
|
/** Page number for paginating through results. Defaults to 1. */
|
|
142
209
|
page?: number;
|
|
143
210
|
}
|
|
@@ -173,7 +240,7 @@ export class EverythingService extends BaseService {
|
|
|
173
240
|
() =>
|
|
174
241
|
this.client.GET("/cards/completed.json", {
|
|
175
242
|
params: {
|
|
176
|
-
query: { page: options?.page },
|
|
243
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
177
244
|
},
|
|
178
245
|
})
|
|
179
246
|
, options
|
|
@@ -201,7 +268,7 @@ export class EverythingService extends BaseService {
|
|
|
201
268
|
() =>
|
|
202
269
|
this.client.GET("/cards/no_due_date.json", {
|
|
203
270
|
params: {
|
|
204
|
-
query: { page: options?.page },
|
|
271
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
205
272
|
},
|
|
206
273
|
})
|
|
207
274
|
, options
|
|
@@ -229,7 +296,7 @@ export class EverythingService extends BaseService {
|
|
|
229
296
|
() =>
|
|
230
297
|
this.client.GET("/cards/not_now.json", {
|
|
231
298
|
params: {
|
|
232
|
-
query: { page: options?.page },
|
|
299
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
233
300
|
},
|
|
234
301
|
})
|
|
235
302
|
, options
|
|
@@ -257,7 +324,7 @@ export class EverythingService extends BaseService {
|
|
|
257
324
|
() =>
|
|
258
325
|
this.client.GET("/cards/open.json", {
|
|
259
326
|
params: {
|
|
260
|
-
query: { page: options?.page },
|
|
327
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
261
328
|
},
|
|
262
329
|
})
|
|
263
330
|
, options
|
|
@@ -266,6 +333,7 @@ export class EverythingService extends BaseService {
|
|
|
266
333
|
|
|
267
334
|
/**
|
|
268
335
|
* Get every overdue card across all accessible projects, oldest-due-date-first.
|
|
336
|
+
* @param options - Optional query parameters
|
|
269
337
|
* @returns Array of Card
|
|
270
338
|
*
|
|
271
339
|
* @example
|
|
@@ -273,7 +341,7 @@ export class EverythingService extends BaseService {
|
|
|
273
341
|
* const result = await client.everything.everythingOverdueCards();
|
|
274
342
|
* ```
|
|
275
343
|
*/
|
|
276
|
-
async everythingOverdueCards(): Promise<Card[]> {
|
|
344
|
+
async everythingOverdueCards(options?: EverythingOverdueCardsEverythingOptions): Promise<Card[]> {
|
|
277
345
|
const response = await this.request(
|
|
278
346
|
{
|
|
279
347
|
service: "Everything",
|
|
@@ -283,6 +351,9 @@ export class EverythingService extends BaseService {
|
|
|
283
351
|
},
|
|
284
352
|
() =>
|
|
285
353
|
this.client.GET("/cards/overdue.json", {
|
|
354
|
+
params: {
|
|
355
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due },
|
|
356
|
+
},
|
|
286
357
|
})
|
|
287
358
|
);
|
|
288
359
|
return response ?? [];
|
|
@@ -309,7 +380,7 @@ export class EverythingService extends BaseService {
|
|
|
309
380
|
() =>
|
|
310
381
|
this.client.GET("/cards/unassigned.json", {
|
|
311
382
|
params: {
|
|
312
|
-
query: { page: options?.page },
|
|
383
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
313
384
|
},
|
|
314
385
|
})
|
|
315
386
|
, options
|
|
@@ -477,7 +548,7 @@ export class EverythingService extends BaseService {
|
|
|
477
548
|
() =>
|
|
478
549
|
this.client.GET("/todos/completed.json", {
|
|
479
550
|
params: {
|
|
480
|
-
query: { page: options?.page },
|
|
551
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
481
552
|
},
|
|
482
553
|
})
|
|
483
554
|
, options
|
|
@@ -505,7 +576,7 @@ export class EverythingService extends BaseService {
|
|
|
505
576
|
() =>
|
|
506
577
|
this.client.GET("/todos/no_due_date.json", {
|
|
507
578
|
params: {
|
|
508
|
-
query: { page: options?.page },
|
|
579
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
509
580
|
},
|
|
510
581
|
})
|
|
511
582
|
, options
|
|
@@ -533,7 +604,7 @@ export class EverythingService extends BaseService {
|
|
|
533
604
|
() =>
|
|
534
605
|
this.client.GET("/todos/open.json", {
|
|
535
606
|
params: {
|
|
536
|
-
query: { page: options?.page },
|
|
607
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
537
608
|
},
|
|
538
609
|
})
|
|
539
610
|
, options
|
|
@@ -542,6 +613,7 @@ export class EverythingService extends BaseService {
|
|
|
542
613
|
|
|
543
614
|
/**
|
|
544
615
|
* Get every overdue to-do across all accessible projects, oldest-due-date-first.
|
|
616
|
+
* @param options - Optional query parameters
|
|
545
617
|
* @returns Array of Todo
|
|
546
618
|
*
|
|
547
619
|
* @example
|
|
@@ -549,7 +621,7 @@ export class EverythingService extends BaseService {
|
|
|
549
621
|
* const result = await client.everything.everythingOverdueTodos();
|
|
550
622
|
* ```
|
|
551
623
|
*/
|
|
552
|
-
async everythingOverdueTodos(): Promise<Todo[]> {
|
|
624
|
+
async everythingOverdueTodos(options?: EverythingOverdueTodosEverythingOptions): Promise<Todo[]> {
|
|
553
625
|
const response = await this.request(
|
|
554
626
|
{
|
|
555
627
|
service: "Everything",
|
|
@@ -559,6 +631,9 @@ export class EverythingService extends BaseService {
|
|
|
559
631
|
},
|
|
560
632
|
() =>
|
|
561
633
|
this.client.GET("/todos/overdue.json", {
|
|
634
|
+
params: {
|
|
635
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due },
|
|
636
|
+
},
|
|
562
637
|
})
|
|
563
638
|
);
|
|
564
639
|
return response ?? [];
|
|
@@ -585,7 +660,7 @@ export class EverythingService extends BaseService {
|
|
|
585
660
|
() =>
|
|
586
661
|
this.client.GET("/todos/unassigned.json", {
|
|
587
662
|
params: {
|
|
588
|
-
query: { page: options?.page },
|
|
663
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
589
664
|
},
|
|
590
665
|
})
|
|
591
666
|
, options
|
|
@@ -5,7 +5,9 @@ export { CardColumnsService } from "./card-columns.js";
|
|
|
5
5
|
export { WormholesService } from "./wormholes.js";
|
|
6
6
|
export { MessageTypesService } from "./message-types.js";
|
|
7
7
|
export { ToolsService } from "./tools.js";
|
|
8
|
+
export { TodosService } from "./todos.js";
|
|
8
9
|
export { WebhooksService } from "./webhooks.js";
|
|
10
|
+
export { CalendarsService } from "./calendars.js";
|
|
9
11
|
export { CardsService } from "./cards.js";
|
|
10
12
|
export { CardStepsService } from "./card-steps.js";
|
|
11
13
|
export { CardTablesService } from "./card-tables.js";
|
|
@@ -24,6 +26,9 @@ export { LineupService } from "./lineup.js";
|
|
|
24
26
|
export { MessageBoardsService } from "./message-boards.js";
|
|
25
27
|
export { MessagesService } from "./messages.js";
|
|
26
28
|
export { MyAssignmentsService } from "./my-assignments.js";
|
|
29
|
+
export { BookmarksService } from "./bookmarks.js";
|
|
30
|
+
export { DraftsService } from "./drafts.js";
|
|
31
|
+
export { MyNotesService } from "./my-notes.js";
|
|
27
32
|
export { CheckinsService } from "./checkins.js";
|
|
28
33
|
export { MyNotificationsService } from "./my-notifications.js";
|
|
29
34
|
export { ProjectsService } from "./projects.js";
|
|
@@ -39,7 +44,6 @@ export { SearchService } from "./search.js";
|
|
|
39
44
|
export { TemplatesService } from "./templates.js";
|
|
40
45
|
export { TodolistGroupsService } from "./todolist-groups.js";
|
|
41
46
|
export { TodolistsService } from "./todolists.js";
|
|
42
|
-
export { TodosService } from "./todos.js";
|
|
43
47
|
export { TodosetsService } from "./todosets.js";
|
|
44
48
|
export { HillChartsService } from "./hill-charts.js";
|
|
45
49
|
export { UploadsService } from "./uploads.js";
|