@doist/todoist-sdk 10.5.1 → 11.0.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/consts/endpoints.js +1 -6
- package/dist/cjs/test-utils/test-defaults.js +2 -26
- package/dist/cjs/test-utils/webhook-fixtures.js +1 -1
- package/dist/cjs/todoist-api.js +0 -101
- package/dist/cjs/types/index.js +0 -1
- package/dist/cjs/types/sync/commands/index.js +0 -2
- package/dist/cjs/types/sync/resource-types.js +0 -2
- package/dist/cjs/types/sync/resources/index.js +0 -1
- package/dist/cjs/types/sync/response.js +10 -13
- package/dist/cjs/utils/validators.js +50 -54
- package/dist/esm/consts/endpoints.js +0 -5
- package/dist/esm/test-utils/test-defaults.js +0 -24
- package/dist/esm/test-utils/webhook-fixtures.js +1 -1
- package/dist/esm/todoist-api.js +0 -101
- package/dist/esm/types/index.js +0 -1
- package/dist/esm/types/sync/commands/index.js +0 -2
- package/dist/esm/types/sync/resource-types.js +0 -2
- package/dist/esm/types/sync/resources/index.js +0 -1
- package/dist/esm/types/sync/response.js +1 -4
- package/dist/esm/utils/validators.js +1 -4
- package/dist/types/consts/endpoints.d.ts +0 -5
- package/dist/types/test-utils/test-defaults.d.ts +1 -4
- package/dist/types/todoist-api.d.ts +0 -80
- package/dist/types/types/index.d.ts +0 -1
- package/dist/types/types/sync/commands/index.d.ts +0 -16
- package/dist/types/types/sync/resource-types.d.ts +1 -1
- package/dist/types/types/sync/resources/index.d.ts +0 -1
- package/dist/types/types/sync/resources/view-options.d.ts +6 -6
- package/dist/types/types/sync/response.d.ts +4 -45
- package/dist/types/types/tasks/requests.d.ts +0 -1
- package/dist/types/utils/validators.d.ts +8 -90
- package/package.json +1 -1
- package/dist/cjs/clients/goals-client.js +0 -144
- package/dist/cjs/types/goals/index.js +0 -18
- package/dist/cjs/types/goals/requests.js +0 -2
- package/dist/cjs/types/goals/types.js +0 -56
- package/dist/cjs/types/sync/commands/goals.js +0 -2
- package/dist/cjs/types/sync/commands/workspace-goals.js +0 -2
- package/dist/cjs/types/sync/resources/workspace-goals.js +0 -26
- package/dist/esm/clients/goals-client.js +0 -140
- package/dist/esm/types/goals/index.js +0 -2
- package/dist/esm/types/goals/requests.js +0 -1
- package/dist/esm/types/goals/types.js +0 -53
- package/dist/esm/types/sync/commands/goals.js +0 -1
- package/dist/esm/types/sync/commands/workspace-goals.js +0 -1
- package/dist/esm/types/sync/resources/workspace-goals.js +0 -23
- package/dist/types/clients/goals-client.d.ts +0 -20
- package/dist/types/types/goals/index.d.ts +0 -2
- package/dist/types/types/goals/requests.d.ts +0 -33
- package/dist/types/types/goals/types.d.ts +0 -51
- package/dist/types/types/sync/commands/goals.d.ts +0 -33
- package/dist/types/types/sync/commands/workspace-goals.d.ts +0 -24
- package/dist/types/types/sync/resources/workspace-goals.d.ts +0 -29
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { SearchArgs } from '../common.js';
|
|
2
|
-
import type { Workspace } from '../workspaces/index.js';
|
|
3
|
-
import type { Goal, GoalOwnerType } from './types.js';
|
|
4
|
-
export type GetGoalsArgs = {
|
|
5
|
-
ownerType?: GoalOwnerType;
|
|
6
|
-
workspaceId?: Workspace['id'];
|
|
7
|
-
cursor?: string | null;
|
|
8
|
-
limit?: number;
|
|
9
|
-
};
|
|
10
|
-
export type SearchGoalsArgs = SearchArgs & {
|
|
11
|
-
ownerType?: GoalOwnerType;
|
|
12
|
-
};
|
|
13
|
-
export type GetGoalsResponse = {
|
|
14
|
-
results: Goal[];
|
|
15
|
-
nextCursor: string | null;
|
|
16
|
-
};
|
|
17
|
-
export type AddGoalArgs = {
|
|
18
|
-
name: string;
|
|
19
|
-
workspaceId?: string;
|
|
20
|
-
description?: string | null;
|
|
21
|
-
deadline?: string | null;
|
|
22
|
-
responsibleUid?: string | null;
|
|
23
|
-
};
|
|
24
|
-
export type UpdateGoalArgs = {
|
|
25
|
-
name?: string;
|
|
26
|
-
description?: string | null;
|
|
27
|
-
deadline?: string | null;
|
|
28
|
-
responsibleUid?: string | null;
|
|
29
|
-
};
|
|
30
|
-
export type TaskLinkingArgs = {
|
|
31
|
-
goalId: string;
|
|
32
|
-
taskId: string;
|
|
33
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/** Available goal owner types. */
|
|
3
|
-
export declare const GOAL_OWNER_TYPES: readonly ["USER", "WORKSPACE"];
|
|
4
|
-
/** Goal owner type. */
|
|
5
|
-
export type GoalOwnerType = (typeof GOAL_OWNER_TYPES)[number];
|
|
6
|
-
/**
|
|
7
|
-
* Progress of a {@link Goal}.
|
|
8
|
-
*
|
|
9
|
-
* The REST API returns these counts under `total_item_count` / `completed_item_count`,
|
|
10
|
-
* reflecting the backend's generic "item" terminology. The SDK normalizes them to
|
|
11
|
-
* `totalTaskCount` / `completedTaskCount` so the public surface consistently speaks
|
|
12
|
-
* in "tasks" (matching the rest of the SDK). The `preprocess` step below performs
|
|
13
|
-
* that rename after the transport layer's snake_case → camelCase conversion — do not
|
|
14
|
-
* remove it without also changing the downstream field names.
|
|
15
|
-
*/
|
|
16
|
-
export declare const GoalProgressSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
17
|
-
totalTaskCount: z.ZodNumber;
|
|
18
|
-
completedTaskCount: z.ZodNumber;
|
|
19
|
-
percentage: z.ZodNumber;
|
|
20
|
-
}, z.core.$loose>>;
|
|
21
|
-
export type GoalProgress = z.infer<typeof GoalProgressSchema>;
|
|
22
|
-
export declare const GoalSchema: z.ZodObject<{
|
|
23
|
-
id: z.ZodString;
|
|
24
|
-
ownerType: z.ZodEnum<{
|
|
25
|
-
USER: "USER";
|
|
26
|
-
WORKSPACE: "WORKSPACE";
|
|
27
|
-
}>;
|
|
28
|
-
ownerId: z.ZodString;
|
|
29
|
-
name: z.ZodString;
|
|
30
|
-
description: z.ZodNullable<z.ZodString>;
|
|
31
|
-
deadline: z.ZodNullable<z.ZodString>;
|
|
32
|
-
parentGoalId: z.ZodNullable<z.ZodString>;
|
|
33
|
-
childOrder: z.ZodNumber;
|
|
34
|
-
isCompleted: z.ZodBoolean;
|
|
35
|
-
completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
36
|
-
responsibleUid: z.ZodNullable<z.ZodString>;
|
|
37
|
-
isDeleted: z.ZodBoolean;
|
|
38
|
-
progress: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
39
|
-
totalTaskCount: z.ZodNumber;
|
|
40
|
-
completedTaskCount: z.ZodNumber;
|
|
41
|
-
percentage: z.ZodNumber;
|
|
42
|
-
}, z.core.$loose>>>;
|
|
43
|
-
creatorUid: z.ZodString;
|
|
44
|
-
createdAt: z.ZodCoercedDate<unknown>;
|
|
45
|
-
updatedAt: z.ZodCoercedDate<unknown>;
|
|
46
|
-
}, z.core.$loose>;
|
|
47
|
-
/**
|
|
48
|
-
* Represents a goal in Todoist.
|
|
49
|
-
* Goals support dual ownership: personal (ownerType=USER) and workspace (ownerType=WORKSPACE).
|
|
50
|
-
*/
|
|
51
|
-
export type Goal = z.infer<typeof GoalSchema>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { GoalOwnerType } from '../../goals/types.js';
|
|
2
|
-
export type GoalAddArgs = {
|
|
3
|
-
ownerType: GoalOwnerType;
|
|
4
|
-
ownerId: string;
|
|
5
|
-
name: string;
|
|
6
|
-
description?: string | null;
|
|
7
|
-
deadline?: string | null;
|
|
8
|
-
responsibleUid?: string | null;
|
|
9
|
-
};
|
|
10
|
-
export type GoalUpdateArgs = {
|
|
11
|
-
id: string;
|
|
12
|
-
name?: string;
|
|
13
|
-
description?: string | null;
|
|
14
|
-
deadline?: string | null;
|
|
15
|
-
responsibleUid?: string | null;
|
|
16
|
-
};
|
|
17
|
-
export type GoalCompleteArgs = {
|
|
18
|
-
id: string;
|
|
19
|
-
};
|
|
20
|
-
export type GoalUncompleteArgs = {
|
|
21
|
-
id: string;
|
|
22
|
-
};
|
|
23
|
-
export type GoalDeleteArgs = {
|
|
24
|
-
id: string;
|
|
25
|
-
};
|
|
26
|
-
export type GoalLinkItemArgs = {
|
|
27
|
-
goalId: string;
|
|
28
|
-
itemId: string;
|
|
29
|
-
};
|
|
30
|
-
export type GoalUnlinkItemArgs = {
|
|
31
|
-
goalId: string;
|
|
32
|
-
itemId: string;
|
|
33
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export type WorkspaceGoalAddArgs = {
|
|
2
|
-
workspaceId: string;
|
|
3
|
-
title: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
deadline?: string | null;
|
|
6
|
-
projectIds: string[];
|
|
7
|
-
};
|
|
8
|
-
export type WorkspaceGoalUpdateArgs = {
|
|
9
|
-
id: string;
|
|
10
|
-
title?: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
deadline?: string | null;
|
|
13
|
-
};
|
|
14
|
-
export type WorkspaceGoalDeleteArgs = {
|
|
15
|
-
id: string;
|
|
16
|
-
};
|
|
17
|
-
export type WorkspaceGoalProjectAddArgs = {
|
|
18
|
-
goalId: string;
|
|
19
|
-
projectId: string;
|
|
20
|
-
};
|
|
21
|
-
export type WorkspaceGoalProjectRemoveArgs = {
|
|
22
|
-
goalId: string;
|
|
23
|
-
projectId: string;
|
|
24
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const WorkspaceGoalMilestoneSchema: z.ZodObject<{
|
|
3
|
-
id: z.ZodString;
|
|
4
|
-
title: z.ZodString;
|
|
5
|
-
isCompleted: z.ZodBoolean;
|
|
6
|
-
}, z.core.$loose>;
|
|
7
|
-
export type WorkspaceGoalMilestone = z.infer<typeof WorkspaceGoalMilestoneSchema>;
|
|
8
|
-
export declare const WorkspaceGoalProgressSchema: z.ZodObject<{
|
|
9
|
-
completedItems: z.ZodNumber;
|
|
10
|
-
totalItems: z.ZodNumber;
|
|
11
|
-
}, z.core.$loose>;
|
|
12
|
-
export type WorkspaceGoalProgress = z.infer<typeof WorkspaceGoalProgressSchema>;
|
|
13
|
-
export declare const WorkspaceGoalSchema: z.ZodObject<{
|
|
14
|
-
id: z.ZodString;
|
|
15
|
-
workspaceId: z.ZodString;
|
|
16
|
-
title: z.ZodString;
|
|
17
|
-
description: z.ZodNullable<z.ZodString>;
|
|
18
|
-
deadline: z.ZodNullable<z.ZodString>;
|
|
19
|
-
isDeleted: z.ZodBoolean;
|
|
20
|
-
projectIds: z.ZodArray<z.ZodString>;
|
|
21
|
-
progress: z.ZodNullable<z.ZodObject<{
|
|
22
|
-
completedItems: z.ZodNumber;
|
|
23
|
-
totalItems: z.ZodNumber;
|
|
24
|
-
}, z.core.$loose>>;
|
|
25
|
-
creatorUid: z.ZodString;
|
|
26
|
-
createdAt: z.ZodCoercedDate<unknown>;
|
|
27
|
-
updatedAt: z.ZodCoercedDate<unknown>;
|
|
28
|
-
}, z.core.$loose>;
|
|
29
|
-
export type WorkspaceGoal = z.infer<typeof WorkspaceGoalSchema>;
|