@doist/todoist-sdk 9.1.0-next.1 → 9.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/authentication.js +1 -0
- package/dist/cjs/clients/activity-client.js +63 -0
- package/dist/cjs/clients/app-client.js +347 -0
- package/dist/cjs/clients/backup-client.js +65 -0
- package/dist/cjs/clients/base-client.js +30 -0
- package/dist/cjs/clients/comment-client.js +92 -0
- package/dist/cjs/clients/email-client.js +43 -0
- package/dist/cjs/clients/folder-client.js +80 -0
- package/dist/cjs/clients/id-mapping-client.js +39 -0
- package/dist/cjs/clients/insights-client.js +88 -0
- package/dist/cjs/clients/label-client.js +127 -0
- package/dist/cjs/clients/productivity-client.js +27 -0
- package/dist/cjs/clients/project-client.js +232 -0
- package/dist/cjs/clients/reminder-client.js +198 -0
- package/dist/cjs/clients/section-client.js +118 -0
- package/dist/cjs/clients/task-client.js +255 -0
- package/dist/cjs/clients/template-client.js +89 -0
- package/dist/cjs/clients/ui-extension-client.js +109 -0
- package/dist/cjs/clients/upload-client.js +102 -0
- package/dist/cjs/clients/workspace-client.js +367 -0
- package/dist/cjs/consts/endpoints.js +66 -6
- package/dist/cjs/test-utils/test-defaults.js +77 -1
- package/dist/cjs/todoist-api.js +422 -1665
- package/dist/cjs/transport/http-client.js +1 -0
- package/dist/cjs/transport/sync-request.js +75 -0
- package/dist/cjs/types/apps/types.js +253 -0
- package/dist/cjs/types/index.js +2 -1
- package/dist/cjs/types/sync/commands/index.js +0 -1
- package/dist/cjs/types/sync/resource-types.js +0 -1
- package/dist/cjs/types/sync/response.js +10 -12
- package/dist/cjs/types/ui-extensions/index.js +18 -0
- package/dist/cjs/types/ui-extensions/types.js +77 -0
- package/dist/cjs/utils/headers.js +16 -0
- package/dist/cjs/utils/request-helpers.js +21 -0
- package/dist/cjs/utils/validators.js +45 -33
- package/dist/esm/authentication.js +1 -0
- package/dist/esm/clients/activity-client.js +59 -0
- package/dist/esm/clients/app-client.js +343 -0
- package/dist/esm/clients/backup-client.js +61 -0
- package/dist/esm/clients/base-client.js +26 -0
- package/dist/esm/clients/comment-client.js +88 -0
- package/dist/esm/clients/email-client.js +39 -0
- package/dist/esm/clients/folder-client.js +76 -0
- package/dist/esm/clients/id-mapping-client.js +35 -0
- package/dist/esm/clients/insights-client.js +84 -0
- package/dist/esm/clients/label-client.js +123 -0
- package/dist/esm/clients/productivity-client.js +23 -0
- package/dist/esm/clients/project-client.js +228 -0
- package/dist/esm/clients/reminder-client.js +194 -0
- package/dist/esm/clients/section-client.js +114 -0
- package/dist/esm/clients/task-client.js +251 -0
- package/dist/esm/clients/template-client.js +85 -0
- package/dist/esm/clients/ui-extension-client.js +105 -0
- package/dist/esm/clients/upload-client.js +98 -0
- package/dist/esm/clients/workspace-client.js +363 -0
- package/dist/esm/consts/endpoints.js +51 -5
- package/dist/esm/test-utils/test-defaults.js +75 -0
- package/dist/esm/todoist-api.js +425 -1668
- package/dist/esm/transport/http-client.js +1 -0
- package/dist/esm/transport/sync-request.js +72 -0
- package/dist/esm/types/apps/types.js +248 -0
- package/dist/esm/types/index.js +2 -1
- package/dist/esm/types/sync/commands/index.js +0 -1
- package/dist/esm/types/sync/resource-types.js +0 -1
- package/dist/esm/types/sync/response.js +0 -2
- package/dist/esm/types/ui-extensions/types.js +74 -0
- package/dist/esm/utils/headers.js +13 -0
- package/dist/esm/utils/request-helpers.js +17 -0
- package/dist/esm/utils/validators.js +14 -2
- package/dist/types/authentication.d.ts +1 -1
- package/dist/types/clients/activity-client.d.ts +12 -0
- package/dist/types/clients/app-client.d.ts +37 -0
- package/dist/types/clients/backup-client.d.ts +14 -0
- package/dist/types/clients/base-client.d.ts +21 -0
- package/dist/types/clients/comment-client.d.ts +15 -0
- package/dist/types/clients/email-client.d.ts +13 -0
- package/dist/types/clients/folder-client.d.ts +16 -0
- package/dist/types/clients/id-mapping-client.d.ts +13 -0
- package/dist/types/clients/insights-client.d.ts +18 -0
- package/dist/types/clients/label-client.d.ts +19 -0
- package/dist/types/clients/productivity-client.d.ts +12 -0
- package/dist/types/clients/project-client.d.ts +26 -0
- package/dist/types/clients/reminder-client.d.ts +25 -0
- package/dist/types/clients/section-client.d.ts +18 -0
- package/dist/types/clients/task-client.d.ts +25 -0
- package/dist/types/clients/template-client.d.ts +17 -0
- package/dist/types/clients/ui-extension-client.d.ts +18 -0
- package/dist/types/clients/upload-client.d.ts +17 -0
- package/dist/types/clients/workspace-client.d.ts +43 -0
- package/dist/types/consts/endpoints.d.ts +24 -5
- package/dist/types/test-utils/test-defaults.d.ts +16 -1
- package/dist/types/todoist-api.d.ts +238 -28
- package/dist/types/transport/sync-request.d.ts +27 -0
- package/dist/types/types/apps/index.d.ts +2 -0
- package/dist/types/types/apps/requests.d.ts +89 -0
- package/dist/types/types/apps/types.d.ts +414 -0
- package/dist/types/types/http.d.ts +8 -1
- package/dist/types/types/index.d.ts +2 -1
- package/dist/types/types/sync/commands/index.d.ts +0 -9
- package/dist/types/types/sync/resource-types.d.ts +1 -1
- package/dist/types/types/sync/resources/user.d.ts +2 -2
- package/dist/types/types/sync/resources/view-options.d.ts +6 -6
- package/dist/types/types/sync/response.d.ts +6 -31
- package/dist/types/types/sync/user-preferences.d.ts +1 -1
- package/dist/types/types/tasks/requests.d.ts +0 -1
- package/dist/types/types/ui-extensions/index.d.ts +2 -0
- package/dist/types/types/ui-extensions/requests.d.ts +108 -0
- package/dist/types/types/ui-extensions/types.d.ts +185 -0
- package/dist/types/utils/headers.d.ts +7 -0
- package/dist/types/utils/request-helpers.d.ts +13 -0
- package/dist/types/utils/validators.d.ts +231 -55
- package/package.json +1 -1
- package/dist/cjs/types/goals/types.js +0 -29
- package/dist/esm/types/goals/types.js +0 -26
- package/dist/types/types/goals/requests.d.ts +0 -33
- package/dist/types/types/goals/types.d.ts +0 -41
- package/dist/types/types/sync/commands/goals.d.ts +0 -33
- /package/dist/cjs/types/{goals → apps}/index.js +0 -0
- /package/dist/cjs/types/{goals → apps}/requests.js +0 -0
- /package/dist/cjs/types/{sync/commands/goals.js → ui-extensions/requests.js} +0 -0
- /package/dist/esm/types/{goals → apps}/index.js +0 -0
- /package/dist/esm/types/{goals → apps}/requests.js +0 -0
- /package/dist/{types/types/goals/index.d.ts → esm/types/ui-extensions/index.js} +0 -0
- /package/dist/esm/types/{sync/commands/goals.js → ui-extensions/requests.js} +0 -0
|
@@ -816,53 +816,6 @@ export declare const validateFolder: (input: unknown) => {
|
|
|
816
816
|
defaultOrder: number;
|
|
817
817
|
childOrder: number;
|
|
818
818
|
}[];
|
|
819
|
-
export declare const validateGoal: (input: unknown) => {
|
|
820
|
-
[x: string]: unknown;
|
|
821
|
-
id: string;
|
|
822
|
-
ownerType: "USER" | "WORKSPACE";
|
|
823
|
-
ownerId: string;
|
|
824
|
-
name: string;
|
|
825
|
-
description: string | null;
|
|
826
|
-
deadline: string | null;
|
|
827
|
-
parentGoalId: string | null;
|
|
828
|
-
childOrder: number;
|
|
829
|
-
isCompleted: boolean;
|
|
830
|
-
completedAt: Date | null;
|
|
831
|
-
responsibleUid: string | null;
|
|
832
|
-
isDeleted: boolean;
|
|
833
|
-
creatorUid: string;
|
|
834
|
-
createdAt: Date;
|
|
835
|
-
updatedAt: Date;
|
|
836
|
-
progress?: {
|
|
837
|
-
[x: string]: unknown;
|
|
838
|
-
totalTaskCount: number;
|
|
839
|
-
completedTaskCount: number;
|
|
840
|
-
percentage: number;
|
|
841
|
-
} | undefined;
|
|
842
|
-
}, validateGoalArray: (input: unknown) => {
|
|
843
|
-
[x: string]: unknown;
|
|
844
|
-
id: string;
|
|
845
|
-
ownerType: "USER" | "WORKSPACE";
|
|
846
|
-
ownerId: string;
|
|
847
|
-
name: string;
|
|
848
|
-
description: string | null;
|
|
849
|
-
deadline: string | null;
|
|
850
|
-
parentGoalId: string | null;
|
|
851
|
-
childOrder: number;
|
|
852
|
-
isCompleted: boolean;
|
|
853
|
-
completedAt: Date | null;
|
|
854
|
-
responsibleUid: string | null;
|
|
855
|
-
isDeleted: boolean;
|
|
856
|
-
creatorUid: string;
|
|
857
|
-
createdAt: Date;
|
|
858
|
-
updatedAt: Date;
|
|
859
|
-
progress?: {
|
|
860
|
-
[x: string]: unknown;
|
|
861
|
-
totalTaskCount: number;
|
|
862
|
-
completedTaskCount: number;
|
|
863
|
-
percentage: number;
|
|
864
|
-
} | undefined;
|
|
865
|
-
}[];
|
|
866
819
|
export declare const validateNote: (input: unknown) => {
|
|
867
820
|
[x: string]: unknown;
|
|
868
821
|
id: string;
|
|
@@ -1184,29 +1137,29 @@ export declare const validateViewOptions: (input: unknown) => {
|
|
|
1184
1137
|
[x: string]: unknown;
|
|
1185
1138
|
viewType: "PROJECT" | "TODAY" | "UPCOMING" | "LABEL" | "FILTER" | "WORKSPACE_FILTER" | "SEARCH" | "TEMPLATE_PREVIEW" | "TASK_DETAIL" | "AUTOMATION" | "ASSIGNED" | "OVERDUE" | "WORKSPACE_OVERVIEW";
|
|
1186
1139
|
objectId?: string | undefined;
|
|
1187
|
-
groupedBy?: "
|
|
1140
|
+
groupedBy?: "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | null | undefined;
|
|
1188
1141
|
filteredBy?: string | null | undefined;
|
|
1189
1142
|
viewMode?: "LIST" | "BOARD" | "CALENDAR" | undefined;
|
|
1190
1143
|
showCompletedTasks?: boolean | undefined;
|
|
1191
|
-
sortedBy?: "
|
|
1144
|
+
sortedBy?: "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
|
|
1192
1145
|
sortOrder?: "ASC" | "DESC" | null | undefined;
|
|
1193
1146
|
}, validateViewOptionsArray: (input: unknown) => {
|
|
1194
1147
|
[x: string]: unknown;
|
|
1195
1148
|
viewType: "PROJECT" | "TODAY" | "UPCOMING" | "LABEL" | "FILTER" | "WORKSPACE_FILTER" | "SEARCH" | "TEMPLATE_PREVIEW" | "TASK_DETAIL" | "AUTOMATION" | "ASSIGNED" | "OVERDUE" | "WORKSPACE_OVERVIEW";
|
|
1196
1149
|
objectId?: string | undefined;
|
|
1197
|
-
groupedBy?: "
|
|
1150
|
+
groupedBy?: "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | null | undefined;
|
|
1198
1151
|
filteredBy?: string | null | undefined;
|
|
1199
1152
|
viewMode?: "LIST" | "BOARD" | "CALENDAR" | undefined;
|
|
1200
1153
|
showCompletedTasks?: boolean | undefined;
|
|
1201
|
-
sortedBy?: "
|
|
1154
|
+
sortedBy?: "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
|
|
1202
1155
|
sortOrder?: "ASC" | "DESC" | null | undefined;
|
|
1203
1156
|
}[];
|
|
1204
1157
|
export declare const validateProjectViewOptionsDefaults: (input: unknown) => {
|
|
1205
1158
|
[x: string]: unknown;
|
|
1206
1159
|
projectId: string;
|
|
1207
1160
|
viewMode?: "LIST" | "BOARD" | "CALENDAR" | null | undefined;
|
|
1208
|
-
groupedBy?: "
|
|
1209
|
-
sortedBy?: "
|
|
1161
|
+
groupedBy?: "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | null | undefined;
|
|
1162
|
+
sortedBy?: "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
|
|
1210
1163
|
sortOrder?: "ASC" | "DESC" | null | undefined;
|
|
1211
1164
|
showCompletedTasks?: boolean | undefined;
|
|
1212
1165
|
filteredBy?: string | null | undefined;
|
|
@@ -1218,8 +1171,8 @@ export declare const validateProjectViewOptionsDefaults: (input: unknown) => {
|
|
|
1218
1171
|
[x: string]: unknown;
|
|
1219
1172
|
projectId: string;
|
|
1220
1173
|
viewMode?: "LIST" | "BOARD" | "CALENDAR" | null | undefined;
|
|
1221
|
-
groupedBy?: "
|
|
1222
|
-
sortedBy?: "
|
|
1174
|
+
groupedBy?: "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | null | undefined;
|
|
1175
|
+
sortedBy?: "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
|
|
1223
1176
|
sortOrder?: "ASC" | "DESC" | null | undefined;
|
|
1224
1177
|
showCompletedTasks?: boolean | undefined;
|
|
1225
1178
|
filteredBy?: string | null | undefined;
|
|
@@ -1567,3 +1520,226 @@ export declare const validateSuggestion: (input: unknown) => {
|
|
|
1567
1520
|
isDeleted: boolean;
|
|
1568
1521
|
})[];
|
|
1569
1522
|
export declare function parseSyncResponse(raw: Record<string, unknown>): SyncResponse;
|
|
1523
|
+
export declare const validateApp: (input: unknown) => {
|
|
1524
|
+
id: string;
|
|
1525
|
+
status: "public";
|
|
1526
|
+
displayName: string;
|
|
1527
|
+
userId: string;
|
|
1528
|
+
createdAt: Date;
|
|
1529
|
+
serviceUrl: string | null;
|
|
1530
|
+
oauthRedirectUri: string | null;
|
|
1531
|
+
description: string | null;
|
|
1532
|
+
iconSm: string | null;
|
|
1533
|
+
iconMd: string | null;
|
|
1534
|
+
iconLg: string | null;
|
|
1535
|
+
appTokenScopes: string[] | null;
|
|
1536
|
+
}, validateAppArray: (input: unknown) => {
|
|
1537
|
+
id: string;
|
|
1538
|
+
status: "public";
|
|
1539
|
+
displayName: string;
|
|
1540
|
+
userId: string;
|
|
1541
|
+
createdAt: Date;
|
|
1542
|
+
serviceUrl: string | null;
|
|
1543
|
+
oauthRedirectUri: string | null;
|
|
1544
|
+
description: string | null;
|
|
1545
|
+
iconSm: string | null;
|
|
1546
|
+
iconMd: string | null;
|
|
1547
|
+
iconLg: string | null;
|
|
1548
|
+
appTokenScopes: string[] | null;
|
|
1549
|
+
}[];
|
|
1550
|
+
export declare const validateAppWithUserCount: (input: unknown) => {
|
|
1551
|
+
id: string;
|
|
1552
|
+
status: "public";
|
|
1553
|
+
displayName: string;
|
|
1554
|
+
userId: string;
|
|
1555
|
+
createdAt: Date;
|
|
1556
|
+
serviceUrl: string | null;
|
|
1557
|
+
oauthRedirectUri: string | null;
|
|
1558
|
+
description: string | null;
|
|
1559
|
+
iconSm: string | null;
|
|
1560
|
+
iconMd: string | null;
|
|
1561
|
+
iconLg: string | null;
|
|
1562
|
+
appTokenScopes: string[] | null;
|
|
1563
|
+
userCount: number;
|
|
1564
|
+
};
|
|
1565
|
+
export declare const validateAppSecrets: (input: unknown) => {
|
|
1566
|
+
clientId: string;
|
|
1567
|
+
clientSecret: string;
|
|
1568
|
+
};
|
|
1569
|
+
export declare const validateAppVerificationToken: (input: unknown) => {
|
|
1570
|
+
verificationToken: string;
|
|
1571
|
+
};
|
|
1572
|
+
export declare const validateAppTestToken: (input: unknown) => {
|
|
1573
|
+
accessToken?: string | null | undefined;
|
|
1574
|
+
};
|
|
1575
|
+
export declare const validateAppDistributionToken: (input: unknown) => {
|
|
1576
|
+
distributionToken: string;
|
|
1577
|
+
};
|
|
1578
|
+
export declare const validateAppByDistributionToken: (input: unknown) => {
|
|
1579
|
+
id: string;
|
|
1580
|
+
displayName: string;
|
|
1581
|
+
description: string | null;
|
|
1582
|
+
iconMd: string | null;
|
|
1583
|
+
appTokenScopes: string[] | null;
|
|
1584
|
+
uiExtensions: {
|
|
1585
|
+
name: string;
|
|
1586
|
+
description: string;
|
|
1587
|
+
icon: string | null;
|
|
1588
|
+
extensionType: "context-menu" | "composer" | "settings";
|
|
1589
|
+
}[];
|
|
1590
|
+
};
|
|
1591
|
+
export declare const validateAppWebhook: (input: unknown) => {
|
|
1592
|
+
status: "active" | "invalid";
|
|
1593
|
+
callbackUrl: string;
|
|
1594
|
+
version: "1";
|
|
1595
|
+
events: ("project:added" | "project:updated" | "project:deleted" | "project:archived" | "project:unarchived" | "item:added" | "item:updated" | "item:completed" | "item:uncompleted" | "item:deleted" | "note:added" | "note:updated" | "note:deleted" | "section:added" | "section:updated" | "section:deleted" | "section:archived" | "section:unarchived" | "label:added" | "label:updated" | "label:deleted" | "filter:added" | "filter:updated" | "filter:deleted" | "reminder:fired")[];
|
|
1596
|
+
};
|
|
1597
|
+
export declare const validateAppInstallation: (input: unknown) => {
|
|
1598
|
+
id: string;
|
|
1599
|
+
creator: string;
|
|
1600
|
+
createdTs: number;
|
|
1601
|
+
installationType: "user";
|
|
1602
|
+
appTokenScopesValidated: boolean;
|
|
1603
|
+
integration: {
|
|
1604
|
+
id: string;
|
|
1605
|
+
status: "public";
|
|
1606
|
+
displayName: string;
|
|
1607
|
+
userId: string;
|
|
1608
|
+
createdAt: Date;
|
|
1609
|
+
serviceUrl: string | null;
|
|
1610
|
+
oauthRedirectUri: string | null;
|
|
1611
|
+
description: string | null;
|
|
1612
|
+
iconSm: string | null;
|
|
1613
|
+
iconMd: string | null;
|
|
1614
|
+
iconLg: string | null;
|
|
1615
|
+
appTokenScopes: string[] | null;
|
|
1616
|
+
} | null;
|
|
1617
|
+
}, validateAppInstallationArray: (input: unknown) => {
|
|
1618
|
+
id: string;
|
|
1619
|
+
creator: string;
|
|
1620
|
+
createdTs: number;
|
|
1621
|
+
installationType: "user";
|
|
1622
|
+
appTokenScopesValidated: boolean;
|
|
1623
|
+
integration: {
|
|
1624
|
+
id: string;
|
|
1625
|
+
status: "public";
|
|
1626
|
+
displayName: string;
|
|
1627
|
+
userId: string;
|
|
1628
|
+
createdAt: Date;
|
|
1629
|
+
serviceUrl: string | null;
|
|
1630
|
+
oauthRedirectUri: string | null;
|
|
1631
|
+
description: string | null;
|
|
1632
|
+
iconSm: string | null;
|
|
1633
|
+
iconMd: string | null;
|
|
1634
|
+
iconLg: string | null;
|
|
1635
|
+
appTokenScopes: string[] | null;
|
|
1636
|
+
} | null;
|
|
1637
|
+
}[];
|
|
1638
|
+
export declare const validateUserAuthorization: (input: unknown) => {
|
|
1639
|
+
accessTokenId: string;
|
|
1640
|
+
scope: string[];
|
|
1641
|
+
scopeDescriptions: string[];
|
|
1642
|
+
createdAt: Date;
|
|
1643
|
+
app: {
|
|
1644
|
+
id: string;
|
|
1645
|
+
displayName: string;
|
|
1646
|
+
description: string | null;
|
|
1647
|
+
serviceUrl: string | null;
|
|
1648
|
+
iconMd: string | null;
|
|
1649
|
+
} | null;
|
|
1650
|
+
}, validateUserAuthorizationArray: (input: unknown) => {
|
|
1651
|
+
accessTokenId: string;
|
|
1652
|
+
scope: string[];
|
|
1653
|
+
scopeDescriptions: string[];
|
|
1654
|
+
createdAt: Date;
|
|
1655
|
+
app: {
|
|
1656
|
+
id: string;
|
|
1657
|
+
displayName: string;
|
|
1658
|
+
description: string | null;
|
|
1659
|
+
serviceUrl: string | null;
|
|
1660
|
+
iconMd: string | null;
|
|
1661
|
+
} | null;
|
|
1662
|
+
}[];
|
|
1663
|
+
export declare const validateUiExtension: (input: unknown) => {
|
|
1664
|
+
id: string;
|
|
1665
|
+
integrationId: string;
|
|
1666
|
+
extensionId: string;
|
|
1667
|
+
url: string;
|
|
1668
|
+
icon: string | null;
|
|
1669
|
+
name: string;
|
|
1670
|
+
description: string;
|
|
1671
|
+
width: number | null;
|
|
1672
|
+
height: number | null;
|
|
1673
|
+
defVersion: number;
|
|
1674
|
+
minimumCardistVersion: string;
|
|
1675
|
+
extensionType: "context-menu";
|
|
1676
|
+
contextType: "task" | "project";
|
|
1677
|
+
} | {
|
|
1678
|
+
id: string;
|
|
1679
|
+
integrationId: string;
|
|
1680
|
+
extensionId: string;
|
|
1681
|
+
url: string;
|
|
1682
|
+
icon: string | null;
|
|
1683
|
+
name: string;
|
|
1684
|
+
description: string;
|
|
1685
|
+
width: number | null;
|
|
1686
|
+
height: number | null;
|
|
1687
|
+
defVersion: number;
|
|
1688
|
+
minimumCardistVersion: string;
|
|
1689
|
+
extensionType: "composer";
|
|
1690
|
+
composerType: "task" | "comment";
|
|
1691
|
+
} | {
|
|
1692
|
+
id: string;
|
|
1693
|
+
integrationId: string;
|
|
1694
|
+
extensionId: string;
|
|
1695
|
+
url: string;
|
|
1696
|
+
icon: string | null;
|
|
1697
|
+
name: string;
|
|
1698
|
+
description: string;
|
|
1699
|
+
width: number | null;
|
|
1700
|
+
height: number | null;
|
|
1701
|
+
defVersion: number;
|
|
1702
|
+
minimumCardistVersion: string;
|
|
1703
|
+
extensionType: "settings";
|
|
1704
|
+
}, validateUiExtensionArray: (input: unknown) => ({
|
|
1705
|
+
id: string;
|
|
1706
|
+
integrationId: string;
|
|
1707
|
+
extensionId: string;
|
|
1708
|
+
url: string;
|
|
1709
|
+
icon: string | null;
|
|
1710
|
+
name: string;
|
|
1711
|
+
description: string;
|
|
1712
|
+
width: number | null;
|
|
1713
|
+
height: number | null;
|
|
1714
|
+
defVersion: number;
|
|
1715
|
+
minimumCardistVersion: string;
|
|
1716
|
+
extensionType: "context-menu";
|
|
1717
|
+
contextType: "task" | "project";
|
|
1718
|
+
} | {
|
|
1719
|
+
id: string;
|
|
1720
|
+
integrationId: string;
|
|
1721
|
+
extensionId: string;
|
|
1722
|
+
url: string;
|
|
1723
|
+
icon: string | null;
|
|
1724
|
+
name: string;
|
|
1725
|
+
description: string;
|
|
1726
|
+
width: number | null;
|
|
1727
|
+
height: number | null;
|
|
1728
|
+
defVersion: number;
|
|
1729
|
+
minimumCardistVersion: string;
|
|
1730
|
+
extensionType: "composer";
|
|
1731
|
+
composerType: "task" | "comment";
|
|
1732
|
+
} | {
|
|
1733
|
+
id: string;
|
|
1734
|
+
integrationId: string;
|
|
1735
|
+
extensionId: string;
|
|
1736
|
+
url: string;
|
|
1737
|
+
icon: string | null;
|
|
1738
|
+
name: string;
|
|
1739
|
+
description: string;
|
|
1740
|
+
width: number | null;
|
|
1741
|
+
height: number | null;
|
|
1742
|
+
defVersion: number;
|
|
1743
|
+
minimumCardistVersion: string;
|
|
1744
|
+
extensionType: "settings";
|
|
1745
|
+
})[];
|
package/package.json
CHANGED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GoalSchema = exports.GoalProgressSchema = exports.GOAL_OWNER_TYPES = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
/** Available goal owner types. */
|
|
6
|
-
exports.GOAL_OWNER_TYPES = ['USER', 'WORKSPACE'];
|
|
7
|
-
exports.GoalProgressSchema = zod_1.z.looseObject({
|
|
8
|
-
totalTaskCount: zod_1.z.number().int(),
|
|
9
|
-
completedTaskCount: zod_1.z.number().int(),
|
|
10
|
-
percentage: zod_1.z.number(),
|
|
11
|
-
});
|
|
12
|
-
exports.GoalSchema = zod_1.z.looseObject({
|
|
13
|
-
id: zod_1.z.string(),
|
|
14
|
-
ownerType: zod_1.z.enum(exports.GOAL_OWNER_TYPES),
|
|
15
|
-
ownerId: zod_1.z.string(),
|
|
16
|
-
name: zod_1.z.string(),
|
|
17
|
-
description: zod_1.z.string().nullable(),
|
|
18
|
-
deadline: zod_1.z.string().nullable(),
|
|
19
|
-
parentGoalId: zod_1.z.string().nullable(),
|
|
20
|
-
childOrder: zod_1.z.number().int(),
|
|
21
|
-
isCompleted: zod_1.z.boolean(),
|
|
22
|
-
completedAt: zod_1.z.coerce.date().nullable(),
|
|
23
|
-
responsibleUid: zod_1.z.string().nullable(),
|
|
24
|
-
isDeleted: zod_1.z.boolean(),
|
|
25
|
-
progress: exports.GoalProgressSchema.optional(),
|
|
26
|
-
creatorUid: zod_1.z.string(),
|
|
27
|
-
createdAt: zod_1.z.coerce.date(),
|
|
28
|
-
updatedAt: zod_1.z.coerce.date(),
|
|
29
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/** Available goal owner types. */
|
|
3
|
-
export const GOAL_OWNER_TYPES = ['USER', 'WORKSPACE'];
|
|
4
|
-
export const GoalProgressSchema = z.looseObject({
|
|
5
|
-
totalTaskCount: z.number().int(),
|
|
6
|
-
completedTaskCount: z.number().int(),
|
|
7
|
-
percentage: z.number(),
|
|
8
|
-
});
|
|
9
|
-
export const GoalSchema = z.looseObject({
|
|
10
|
-
id: z.string(),
|
|
11
|
-
ownerType: z.enum(GOAL_OWNER_TYPES),
|
|
12
|
-
ownerId: z.string(),
|
|
13
|
-
name: z.string(),
|
|
14
|
-
description: z.string().nullable(),
|
|
15
|
-
deadline: z.string().nullable(),
|
|
16
|
-
parentGoalId: z.string().nullable(),
|
|
17
|
-
childOrder: z.number().int(),
|
|
18
|
-
isCompleted: z.boolean(),
|
|
19
|
-
completedAt: z.coerce.date().nullable(),
|
|
20
|
-
responsibleUid: z.string().nullable(),
|
|
21
|
-
isDeleted: z.boolean(),
|
|
22
|
-
progress: GoalProgressSchema.optional(),
|
|
23
|
-
creatorUid: z.string(),
|
|
24
|
-
createdAt: z.coerce.date(),
|
|
25
|
-
updatedAt: z.coerce.date(),
|
|
26
|
-
});
|
|
@@ -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,41 +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
|
-
export declare const GoalProgressSchema: z.ZodObject<{
|
|
7
|
-
totalTaskCount: z.ZodNumber;
|
|
8
|
-
completedTaskCount: z.ZodNumber;
|
|
9
|
-
percentage: z.ZodNumber;
|
|
10
|
-
}, z.core.$loose>;
|
|
11
|
-
export type GoalProgress = z.infer<typeof GoalProgressSchema>;
|
|
12
|
-
export declare const GoalSchema: z.ZodObject<{
|
|
13
|
-
id: z.ZodString;
|
|
14
|
-
ownerType: z.ZodEnum<{
|
|
15
|
-
USER: "USER";
|
|
16
|
-
WORKSPACE: "WORKSPACE";
|
|
17
|
-
}>;
|
|
18
|
-
ownerId: z.ZodString;
|
|
19
|
-
name: z.ZodString;
|
|
20
|
-
description: z.ZodNullable<z.ZodString>;
|
|
21
|
-
deadline: z.ZodNullable<z.ZodString>;
|
|
22
|
-
parentGoalId: z.ZodNullable<z.ZodString>;
|
|
23
|
-
childOrder: z.ZodNumber;
|
|
24
|
-
isCompleted: z.ZodBoolean;
|
|
25
|
-
completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
26
|
-
responsibleUid: z.ZodNullable<z.ZodString>;
|
|
27
|
-
isDeleted: z.ZodBoolean;
|
|
28
|
-
progress: z.ZodOptional<z.ZodObject<{
|
|
29
|
-
totalTaskCount: z.ZodNumber;
|
|
30
|
-
completedTaskCount: z.ZodNumber;
|
|
31
|
-
percentage: z.ZodNumber;
|
|
32
|
-
}, z.core.$loose>>;
|
|
33
|
-
creatorUid: z.ZodString;
|
|
34
|
-
createdAt: z.ZodCoercedDate<unknown>;
|
|
35
|
-
updatedAt: z.ZodCoercedDate<unknown>;
|
|
36
|
-
}, z.core.$loose>;
|
|
37
|
-
/**
|
|
38
|
-
* Represents a goal in Todoist.
|
|
39
|
-
* Goals support dual ownership: personal (ownerType=USER) and workspace (ownerType=WORKSPACE).
|
|
40
|
-
*/
|
|
41
|
-
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
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|