@37signals/basecamp 0.10.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/README.md +146 -14
- package/dist/client.d.ts +16 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +272 -161
- 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 +178 -17
- package/dist/generated/metadata.js.map +1 -1
- package/dist/generated/metadata.ts +178 -17
- package/dist/generated/openapi-stripped.json +2126 -309
- package/dist/generated/path-mapping.d.ts.map +1 -1
- package/dist/generated/path-mapping.js +13 -1
- package/dist/generated/path-mapping.js.map +1 -1
- package/dist/generated/path-mapping.ts +13 -1
- package/dist/generated/schema.d.ts +1416 -176
- 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 -22
- package/dist/generated/services/everything.d.ts.map +1 -1
- package/dist/generated/services/everything.js +23 -35
- package/dist/generated/services/everything.js.map +1 -1
- package/dist/generated/services/everything.ts +86 -49
- package/dist/generated/services/index.d.ts +6 -2
- package/dist/generated/services/index.d.ts.map +1 -1
- package/dist/generated/services/index.js +6 -2
- package/dist/generated/services/index.js.map +1 -1
- package/dist/generated/services/index.ts +6 -2
- 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/hooks.d.ts.map +1 -1
- package/dist/hooks.js +4 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +12 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/oauth/device-errors.d.ts +29 -0
- package/dist/oauth/device-errors.d.ts.map +1 -0
- package/dist/oauth/device-errors.js +52 -0
- package/dist/oauth/device-errors.js.map +1 -0
- package/dist/oauth/device-login.d.ts +50 -0
- package/dist/oauth/device-login.d.ts.map +1 -0
- package/dist/oauth/device-login.js +118 -0
- package/dist/oauth/device-login.js.map +1 -0
- package/dist/oauth/device.d.ts +112 -0
- package/dist/oauth/device.d.ts.map +1 -0
- package/dist/oauth/device.js +746 -0
- package/dist/oauth/device.js.map +1 -0
- 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/oauth/exchange.d.ts.map +1 -1
- package/dist/oauth/exchange.js +75 -9
- package/dist/oauth/exchange.js.map +1 -1
- package/dist/oauth/index.d.ts +4 -1
- package/dist/oauth/index.d.ts.map +1 -1
- package/dist/oauth/index.js +4 -0
- package/dist/oauth/index.js.map +1 -1
- package/dist/oauth/limits.d.ts +15 -0
- package/dist/oauth/limits.d.ts.map +1 -0
- package/dist/oauth/limits.js +15 -0
- package/dist/oauth/limits.js.map +1 -0
- package/dist/oauth/token-manager.d.ts.map +1 -1
- package/dist/oauth/token-manager.js +15 -4
- package/dist/oauth/token-manager.js.map +1 -1
- package/dist/oauth/token-store.d.ts.map +1 -1
- package/dist/oauth/token-store.js +6 -0
- package/dist/oauth/token-store.js.map +1 -1
- package/dist/oauth/types.d.ts +35 -3
- package/dist/oauth/types.d.ts.map +1 -1
- package/dist/pagination.d.ts +6 -2
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +1 -1
- package/dist/pagination.js.map +1 -1
- package/dist/services/base.d.ts +3 -1
- package/dist/services/base.d.ts.map +1 -1
- package/dist/services/base.js +16 -5
- package/dist/services/base.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/metadata.ts +178 -17
- package/src/generated/openapi-stripped.json +2126 -309
- package/src/generated/path-mapping.ts +13 -1
- package/src/generated/schema.d.ts +1416 -176
- 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 -49
- package/src/generated/services/index.ts +6 -2
- 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
|
+
}
|
|
@@ -13,8 +13,6 @@ import type { PaginationOptions } from "../../pagination.js";
|
|
|
13
13
|
// Types
|
|
14
14
|
// =============================================================================
|
|
15
15
|
|
|
16
|
-
/** EverythingBoost entity from the Basecamp API. */
|
|
17
|
-
export type EverythingBoost = components["schemas"]["EverythingBoost"];
|
|
18
16
|
/** BucketCardsGroup entity from the Basecamp API. */
|
|
19
17
|
export type BucketCardsGroup = components["schemas"]["BucketCardsGroup"];
|
|
20
18
|
/** Card entity from the Basecamp API. */
|
|
@@ -28,18 +26,15 @@ export type BucketTodosGroup = components["schemas"]["BucketTodosGroup"];
|
|
|
28
26
|
/** Todo entity from the Basecamp API. */
|
|
29
27
|
export type Todo = components["schemas"]["Todo"];
|
|
30
28
|
|
|
31
|
-
/**
|
|
32
|
-
* Options for everythingBoosts.
|
|
33
|
-
*/
|
|
34
|
-
export interface EverythingBoostsEverythingOptions extends PaginationOptions {
|
|
35
|
-
/** Page number for paginating through results. Defaults to 1. */
|
|
36
|
-
page?: number;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
29
|
/**
|
|
40
30
|
* Options for everythingCompletedCards.
|
|
41
31
|
*/
|
|
42
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;
|
|
43
38
|
/** Page number for paginating through results. Defaults to 1. */
|
|
44
39
|
page?: number;
|
|
45
40
|
}
|
|
@@ -48,6 +43,11 @@ export interface EverythingCompletedCardsEverythingOptions extends PaginationOpt
|
|
|
48
43
|
* Options for everythingNoDueDateCards.
|
|
49
44
|
*/
|
|
50
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;
|
|
51
51
|
/** Page number for paginating through results. Defaults to 1. */
|
|
52
52
|
page?: number;
|
|
53
53
|
}
|
|
@@ -56,6 +56,11 @@ export interface EverythingNoDueDateCardsEverythingOptions extends PaginationOpt
|
|
|
56
56
|
* Options for everythingNotNowCards.
|
|
57
57
|
*/
|
|
58
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;
|
|
59
64
|
/** Page number for paginating through results. Defaults to 1. */
|
|
60
65
|
page?: number;
|
|
61
66
|
}
|
|
@@ -64,14 +69,35 @@ export interface EverythingNotNowCardsEverythingOptions extends PaginationOption
|
|
|
64
69
|
* Options for everythingOpenCards.
|
|
65
70
|
*/
|
|
66
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;
|
|
67
77
|
/** Page number for paginating through results. Defaults to 1. */
|
|
68
78
|
page?: number;
|
|
69
79
|
}
|
|
70
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
|
+
|
|
71
92
|
/**
|
|
72
93
|
* Options for everythingUnassignedCards.
|
|
73
94
|
*/
|
|
74
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;
|
|
75
101
|
/** Page number for paginating through results. Defaults to 1. */
|
|
76
102
|
page?: number;
|
|
77
103
|
}
|
|
@@ -124,6 +150,11 @@ export interface EverythingMessagesEverythingOptions extends PaginationOptions {
|
|
|
124
150
|
* Options for everythingCompletedTodos.
|
|
125
151
|
*/
|
|
126
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;
|
|
127
158
|
/** Page number for paginating through results. Defaults to 1. */
|
|
128
159
|
page?: number;
|
|
129
160
|
}
|
|
@@ -132,6 +163,11 @@ export interface EverythingCompletedTodosEverythingOptions extends PaginationOpt
|
|
|
132
163
|
* Options for everythingNoDueDateTodos.
|
|
133
164
|
*/
|
|
134
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;
|
|
135
171
|
/** Page number for paginating through results. Defaults to 1. */
|
|
136
172
|
page?: number;
|
|
137
173
|
}
|
|
@@ -140,14 +176,35 @@ export interface EverythingNoDueDateTodosEverythingOptions extends PaginationOpt
|
|
|
140
176
|
* Options for everythingOpenTodos.
|
|
141
177
|
*/
|
|
142
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;
|
|
143
184
|
/** Page number for paginating through results. Defaults to 1. */
|
|
144
185
|
page?: number;
|
|
145
186
|
}
|
|
146
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
|
+
|
|
147
199
|
/**
|
|
148
200
|
* Options for everythingUnassignedTodos.
|
|
149
201
|
*/
|
|
150
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;
|
|
151
208
|
/** Page number for paginating through results. Defaults to 1. */
|
|
152
209
|
page?: number;
|
|
153
210
|
}
|
|
@@ -162,34 +219,6 @@ export interface EverythingUnassignedTodosEverythingOptions extends PaginationOp
|
|
|
162
219
|
*/
|
|
163
220
|
export class EverythingService extends BaseService {
|
|
164
221
|
|
|
165
|
-
/**
|
|
166
|
-
* Get every boost across all accessible projects, newest-first (paginated).
|
|
167
|
-
* @param options - Optional query parameters
|
|
168
|
-
* @returns All EverythingBoost across all pages, with .meta.totalCount
|
|
169
|
-
*
|
|
170
|
-
* @example
|
|
171
|
-
* ```ts
|
|
172
|
-
* const result = await client.everything.everythingBoosts();
|
|
173
|
-
* ```
|
|
174
|
-
*/
|
|
175
|
-
async everythingBoosts(options?: EverythingBoostsEverythingOptions): Promise<ListResult<EverythingBoost>> {
|
|
176
|
-
return this.requestPaginated(
|
|
177
|
-
{
|
|
178
|
-
service: "Everything",
|
|
179
|
-
operation: "GetEverythingBoosts",
|
|
180
|
-
resourceType: "everything_boost",
|
|
181
|
-
isMutation: false,
|
|
182
|
-
},
|
|
183
|
-
() =>
|
|
184
|
-
this.client.GET("/boosts.json", {
|
|
185
|
-
params: {
|
|
186
|
-
query: { page: options?.page },
|
|
187
|
-
},
|
|
188
|
-
})
|
|
189
|
-
, options
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
222
|
/**
|
|
194
223
|
* Completed cards across all accessible projects, grouped by project (paginated).
|
|
195
224
|
* @param options - Optional query parameters
|
|
@@ -211,7 +240,7 @@ export class EverythingService extends BaseService {
|
|
|
211
240
|
() =>
|
|
212
241
|
this.client.GET("/cards/completed.json", {
|
|
213
242
|
params: {
|
|
214
|
-
query: { page: options?.page },
|
|
243
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
215
244
|
},
|
|
216
245
|
})
|
|
217
246
|
, options
|
|
@@ -239,7 +268,7 @@ export class EverythingService extends BaseService {
|
|
|
239
268
|
() =>
|
|
240
269
|
this.client.GET("/cards/no_due_date.json", {
|
|
241
270
|
params: {
|
|
242
|
-
query: { page: options?.page },
|
|
271
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
243
272
|
},
|
|
244
273
|
})
|
|
245
274
|
, options
|
|
@@ -267,7 +296,7 @@ export class EverythingService extends BaseService {
|
|
|
267
296
|
() =>
|
|
268
297
|
this.client.GET("/cards/not_now.json", {
|
|
269
298
|
params: {
|
|
270
|
-
query: { page: options?.page },
|
|
299
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
271
300
|
},
|
|
272
301
|
})
|
|
273
302
|
, options
|
|
@@ -295,7 +324,7 @@ export class EverythingService extends BaseService {
|
|
|
295
324
|
() =>
|
|
296
325
|
this.client.GET("/cards/open.json", {
|
|
297
326
|
params: {
|
|
298
|
-
query: { page: options?.page },
|
|
327
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
299
328
|
},
|
|
300
329
|
})
|
|
301
330
|
, options
|
|
@@ -304,6 +333,7 @@ export class EverythingService extends BaseService {
|
|
|
304
333
|
|
|
305
334
|
/**
|
|
306
335
|
* Get every overdue card across all accessible projects, oldest-due-date-first.
|
|
336
|
+
* @param options - Optional query parameters
|
|
307
337
|
* @returns Array of Card
|
|
308
338
|
*
|
|
309
339
|
* @example
|
|
@@ -311,7 +341,7 @@ export class EverythingService extends BaseService {
|
|
|
311
341
|
* const result = await client.everything.everythingOverdueCards();
|
|
312
342
|
* ```
|
|
313
343
|
*/
|
|
314
|
-
async everythingOverdueCards(): Promise<Card[]> {
|
|
344
|
+
async everythingOverdueCards(options?: EverythingOverdueCardsEverythingOptions): Promise<Card[]> {
|
|
315
345
|
const response = await this.request(
|
|
316
346
|
{
|
|
317
347
|
service: "Everything",
|
|
@@ -321,6 +351,9 @@ export class EverythingService extends BaseService {
|
|
|
321
351
|
},
|
|
322
352
|
() =>
|
|
323
353
|
this.client.GET("/cards/overdue.json", {
|
|
354
|
+
params: {
|
|
355
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due },
|
|
356
|
+
},
|
|
324
357
|
})
|
|
325
358
|
);
|
|
326
359
|
return response ?? [];
|
|
@@ -347,7 +380,7 @@ export class EverythingService extends BaseService {
|
|
|
347
380
|
() =>
|
|
348
381
|
this.client.GET("/cards/unassigned.json", {
|
|
349
382
|
params: {
|
|
350
|
-
query: { page: options?.page },
|
|
383
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
351
384
|
},
|
|
352
385
|
})
|
|
353
386
|
, options
|
|
@@ -515,7 +548,7 @@ export class EverythingService extends BaseService {
|
|
|
515
548
|
() =>
|
|
516
549
|
this.client.GET("/todos/completed.json", {
|
|
517
550
|
params: {
|
|
518
|
-
query: { page: options?.page },
|
|
551
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
519
552
|
},
|
|
520
553
|
})
|
|
521
554
|
, options
|
|
@@ -543,7 +576,7 @@ export class EverythingService extends BaseService {
|
|
|
543
576
|
() =>
|
|
544
577
|
this.client.GET("/todos/no_due_date.json", {
|
|
545
578
|
params: {
|
|
546
|
-
query: { page: options?.page },
|
|
579
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
547
580
|
},
|
|
548
581
|
})
|
|
549
582
|
, options
|
|
@@ -571,7 +604,7 @@ export class EverythingService extends BaseService {
|
|
|
571
604
|
() =>
|
|
572
605
|
this.client.GET("/todos/open.json", {
|
|
573
606
|
params: {
|
|
574
|
-
query: { page: options?.page },
|
|
607
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
575
608
|
},
|
|
576
609
|
})
|
|
577
610
|
, options
|
|
@@ -580,6 +613,7 @@ export class EverythingService extends BaseService {
|
|
|
580
613
|
|
|
581
614
|
/**
|
|
582
615
|
* Get every overdue to-do across all accessible projects, oldest-due-date-first.
|
|
616
|
+
* @param options - Optional query parameters
|
|
583
617
|
* @returns Array of Todo
|
|
584
618
|
*
|
|
585
619
|
* @example
|
|
@@ -587,7 +621,7 @@ export class EverythingService extends BaseService {
|
|
|
587
621
|
* const result = await client.everything.everythingOverdueTodos();
|
|
588
622
|
* ```
|
|
589
623
|
*/
|
|
590
|
-
async everythingOverdueTodos(): Promise<Todo[]> {
|
|
624
|
+
async everythingOverdueTodos(options?: EverythingOverdueTodosEverythingOptions): Promise<Todo[]> {
|
|
591
625
|
const response = await this.request(
|
|
592
626
|
{
|
|
593
627
|
service: "Everything",
|
|
@@ -597,6 +631,9 @@ export class EverythingService extends BaseService {
|
|
|
597
631
|
},
|
|
598
632
|
() =>
|
|
599
633
|
this.client.GET("/todos/overdue.json", {
|
|
634
|
+
params: {
|
|
635
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due },
|
|
636
|
+
},
|
|
600
637
|
})
|
|
601
638
|
);
|
|
602
639
|
return response ?? [];
|
|
@@ -623,7 +660,7 @@ export class EverythingService extends BaseService {
|
|
|
623
660
|
() =>
|
|
624
661
|
this.client.GET("/todos/unassigned.json", {
|
|
625
662
|
params: {
|
|
626
|
-
query: { page: options?.page },
|
|
663
|
+
query: { "assignee_ids[]": options?.assigneeIds, due: options?.due, page: options?.page },
|
|
627
664
|
},
|
|
628
665
|
})
|
|
629
666
|
, options
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
export { AccountService } from "./account.js";
|
|
2
2
|
export { AttachmentsService } from "./attachments.js";
|
|
3
|
-
export { EverythingService } from "./everything.js";
|
|
4
3
|
export { BoostsService } from "./boosts.js";
|
|
5
4
|
export { CardColumnsService } from "./card-columns.js";
|
|
6
5
|
export { WormholesService } from "./wormholes.js";
|
|
7
6
|
export { MessageTypesService } from "./message-types.js";
|
|
8
7
|
export { ToolsService } from "./tools.js";
|
|
8
|
+
export { TodosService } from "./todos.js";
|
|
9
9
|
export { WebhooksService } from "./webhooks.js";
|
|
10
|
+
export { CalendarsService } from "./calendars.js";
|
|
10
11
|
export { CardsService } from "./cards.js";
|
|
11
12
|
export { CardStepsService } from "./card-steps.js";
|
|
12
13
|
export { CardTablesService } from "./card-tables.js";
|
|
14
|
+
export { EverythingService } from "./everything.js";
|
|
13
15
|
export { CampfiresService } from "./campfires.js";
|
|
14
16
|
export { PeopleService } from "./people.js";
|
|
15
17
|
export { ClientApprovalsService } from "./client-approvals.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";
|