@doist/todoist-sdk 14.0.1 → 14.1.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/cjs/clients/view-options-client.js +25 -0
- package/dist/cjs/todoist-api.js +30 -0
- package/dist/cjs/types/sync/resources/live-notifications.js +5 -4
- package/dist/cjs/types/sync/resources/view-options.js +13 -4
- package/dist/cjs/utils/index.js +2 -0
- package/dist/cjs/utils/task-sorting.js +281 -0
- package/dist/cjs/utils/view-options.js +19 -0
- package/dist/esm/clients/view-options-client.js +21 -0
- package/dist/esm/todoist-api.js +30 -0
- package/dist/esm/types/sync/resources/live-notifications.js +5 -4
- package/dist/esm/types/sync/resources/view-options.js +12 -3
- package/dist/esm/utils/index.js +2 -0
- package/dist/esm/utils/task-sorting.js +277 -0
- package/dist/esm/utils/view-options.js +15 -0
- package/dist/types/clients/view-options-client.d.ts +8 -0
- package/dist/types/todoist-api.d.ts +24 -1
- package/dist/types/types/sync/commands/project-view-options.d.ts +1 -4
- package/dist/types/types/sync/commands/view-options.d.ts +2 -1
- package/dist/types/types/sync/resources/live-notifications.d.ts +4 -4
- package/dist/types/types/sync/resources/view-options.d.ts +37 -7
- package/dist/types/types/sync/response.d.ts +28 -9
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/task-sorting.d.ts +38 -0
- package/dist/types/utils/validators.d.ts +30 -12
- package/dist/types/utils/view-options.d.ts +11 -0
- package/package.json +1 -1
|
@@ -1153,23 +1153,37 @@ export declare const validateCompletedInfo: (input: unknown) => {
|
|
|
1153
1153
|
export declare const validateViewOptions: (input: unknown) => {
|
|
1154
1154
|
[x: string]: unknown;
|
|
1155
1155
|
viewType: "PROJECT" | "TODAY" | "UPCOMING" | "LABEL" | "FILTER" | "WORKSPACE_FILTER" | "SEARCH" | "TEMPLATE_PREVIEW" | "TASK_DETAIL" | "AUTOMATION" | "ASSIGNED" | "OVERDUE" | "WORKSPACE_OVERVIEW";
|
|
1156
|
-
objectId?: string | undefined;
|
|
1156
|
+
objectId?: string | null | undefined;
|
|
1157
1157
|
groupedBy?: "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | null | undefined;
|
|
1158
1158
|
filteredBy?: string | null | undefined;
|
|
1159
|
-
viewMode?: "LIST" | "BOARD" | "CALENDAR" | undefined;
|
|
1159
|
+
viewMode?: "LIST" | "BOARD" | "CALENDAR" | null | undefined;
|
|
1160
1160
|
showCompletedTasks?: boolean | undefined;
|
|
1161
1161
|
sortedBy?: "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
|
|
1162
1162
|
sortOrder?: "ASC" | "DESC" | null | undefined;
|
|
1163
|
+
calendarSettings?: {
|
|
1164
|
+
[x: string]: unknown;
|
|
1165
|
+
layout?: "WEEK" | "MONTH" | null | undefined;
|
|
1166
|
+
visibleDayCount?: 3 | 1 | 7 | null | undefined;
|
|
1167
|
+
color?: "PROJECT" | "LABEL" | "PRIORITY" | null | undefined;
|
|
1168
|
+
} | null | undefined;
|
|
1169
|
+
isDeleted?: boolean | undefined;
|
|
1163
1170
|
}, validateViewOptionsArray: (input: unknown) => {
|
|
1164
1171
|
[x: string]: unknown;
|
|
1165
1172
|
viewType: "PROJECT" | "TODAY" | "UPCOMING" | "LABEL" | "FILTER" | "WORKSPACE_FILTER" | "SEARCH" | "TEMPLATE_PREVIEW" | "TASK_DETAIL" | "AUTOMATION" | "ASSIGNED" | "OVERDUE" | "WORKSPACE_OVERVIEW";
|
|
1166
|
-
objectId?: string | undefined;
|
|
1173
|
+
objectId?: string | null | undefined;
|
|
1167
1174
|
groupedBy?: "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | null | undefined;
|
|
1168
1175
|
filteredBy?: string | null | undefined;
|
|
1169
|
-
viewMode?: "LIST" | "BOARD" | "CALENDAR" | undefined;
|
|
1176
|
+
viewMode?: "LIST" | "BOARD" | "CALENDAR" | null | undefined;
|
|
1170
1177
|
showCompletedTasks?: boolean | undefined;
|
|
1171
1178
|
sortedBy?: "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
|
|
1172
1179
|
sortOrder?: "ASC" | "DESC" | null | undefined;
|
|
1180
|
+
calendarSettings?: {
|
|
1181
|
+
[x: string]: unknown;
|
|
1182
|
+
layout?: "WEEK" | "MONTH" | null | undefined;
|
|
1183
|
+
visibleDayCount?: 3 | 1 | 7 | null | undefined;
|
|
1184
|
+
color?: "PROJECT" | "LABEL" | "PRIORITY" | null | undefined;
|
|
1185
|
+
} | null | undefined;
|
|
1186
|
+
isDeleted?: boolean | undefined;
|
|
1173
1187
|
}[];
|
|
1174
1188
|
export declare const validateProjectViewOptionsDefaults: (input: unknown) => {
|
|
1175
1189
|
[x: string]: unknown;
|
|
@@ -1182,7 +1196,9 @@ export declare const validateProjectViewOptionsDefaults: (input: unknown) => {
|
|
|
1182
1196
|
filteredBy?: string | null | undefined;
|
|
1183
1197
|
calendarSettings?: {
|
|
1184
1198
|
[x: string]: unknown;
|
|
1185
|
-
layout?: "WEEK" | "MONTH" | undefined;
|
|
1199
|
+
layout?: "WEEK" | "MONTH" | null | undefined;
|
|
1200
|
+
visibleDayCount?: 3 | 1 | 7 | null | undefined;
|
|
1201
|
+
color?: "PROJECT" | "LABEL" | "PRIORITY" | null | undefined;
|
|
1186
1202
|
} | null | undefined;
|
|
1187
1203
|
}, validateProjectViewOptionsDefaultsArray: (input: unknown) => {
|
|
1188
1204
|
[x: string]: unknown;
|
|
@@ -1195,7 +1211,9 @@ export declare const validateProjectViewOptionsDefaults: (input: unknown) => {
|
|
|
1195
1211
|
filteredBy?: string | null | undefined;
|
|
1196
1212
|
calendarSettings?: {
|
|
1197
1213
|
[x: string]: unknown;
|
|
1198
|
-
layout?: "WEEK" | "MONTH" | undefined;
|
|
1214
|
+
layout?: "WEEK" | "MONTH" | null | undefined;
|
|
1215
|
+
visibleDayCount?: 3 | 1 | 7 | null | undefined;
|
|
1216
|
+
color?: "PROJECT" | "LABEL" | "PRIORITY" | null | undefined;
|
|
1199
1217
|
} | null | undefined;
|
|
1200
1218
|
}[];
|
|
1201
1219
|
export declare const validateUserPlanLimits: (input: unknown) => {
|
|
@@ -1231,15 +1249,15 @@ export declare const validateLiveNotification: (input: unknown) => {
|
|
|
1231
1249
|
[x: string]: unknown;
|
|
1232
1250
|
id: string;
|
|
1233
1251
|
createdAt: Date;
|
|
1234
|
-
fromUid: string;
|
|
1235
1252
|
notificationType: string;
|
|
1236
1253
|
isUnread: boolean;
|
|
1254
|
+
fromUid?: string | undefined;
|
|
1237
1255
|
projectId?: string | undefined;
|
|
1238
1256
|
invitationId?: string | undefined;
|
|
1239
1257
|
itemId?: string | undefined;
|
|
1240
1258
|
itemContent?: string | undefined;
|
|
1241
|
-
responsibleUid?: string | undefined;
|
|
1242
|
-
assignedByUid?: string | undefined;
|
|
1259
|
+
responsibleUid?: string | null | undefined;
|
|
1260
|
+
assignedByUid?: string | null | undefined;
|
|
1243
1261
|
fromUser?: {
|
|
1244
1262
|
email: string;
|
|
1245
1263
|
fullName: string;
|
|
@@ -1253,15 +1271,15 @@ export declare const validateLiveNotification: (input: unknown) => {
|
|
|
1253
1271
|
[x: string]: unknown;
|
|
1254
1272
|
id: string;
|
|
1255
1273
|
createdAt: Date;
|
|
1256
|
-
fromUid: string;
|
|
1257
1274
|
notificationType: string;
|
|
1258
1275
|
isUnread: boolean;
|
|
1276
|
+
fromUid?: string | undefined;
|
|
1259
1277
|
projectId?: string | undefined;
|
|
1260
1278
|
invitationId?: string | undefined;
|
|
1261
1279
|
itemId?: string | undefined;
|
|
1262
1280
|
itemContent?: string | undefined;
|
|
1263
|
-
responsibleUid?: string | undefined;
|
|
1264
|
-
assignedByUid?: string | undefined;
|
|
1281
|
+
responsibleUid?: string | null | undefined;
|
|
1282
|
+
assignedByUid?: string | null | undefined;
|
|
1265
1283
|
fromUser?: {
|
|
1266
1284
|
email: string;
|
|
1267
1285
|
fullName: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ViewOptions, ViewType } from '../types/sync/index.js';
|
|
2
|
+
export type FindViewOptionsArgs = {
|
|
3
|
+
/** View types that identify the logical view. */
|
|
4
|
+
viewTypes: readonly ViewType[];
|
|
5
|
+
/** Object ID for object-backed views. Omit for singleton views. */
|
|
6
|
+
objectId?: string | null;
|
|
7
|
+
};
|
|
8
|
+
/** Returns whether saved view options are active rather than a deletion tombstone. */
|
|
9
|
+
export declare function isActiveViewOption(options: ViewOptions): boolean;
|
|
10
|
+
/** Finds the active saved options for one logical view. */
|
|
11
|
+
export declare function findViewOptions(options: readonly ViewOptions[], args: FindViewOptionsArgs): ViewOptions | undefined;
|
package/package.json
CHANGED