@doist/todoist-sdk 9.2.0-next.1 → 9.2.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/app-client.js +24 -25
- package/dist/cjs/clients/comment-client.js +3 -3
- package/dist/cjs/clients/folder-client.js +3 -3
- package/dist/cjs/clients/insights-client.js +6 -6
- package/dist/cjs/clients/label-client.js +3 -3
- package/dist/cjs/clients/project-client.js +8 -8
- package/dist/cjs/clients/section-client.js +5 -5
- package/dist/cjs/clients/task-client.js +6 -6
- package/dist/cjs/clients/ui-extension-client.js +4 -4
- package/dist/cjs/clients/workspace-client.js +3 -3
- package/dist/cjs/consts/endpoints.js +1 -6
- package/dist/cjs/test-utils/test-defaults.js +3 -26
- package/dist/cjs/todoist-api.js +0 -33
- package/dist/cjs/types/apps/types.js +1 -0
- package/dist/cjs/types/index.js +0 -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/utils/validators.js +51 -53
- package/dist/esm/clients/app-client.js +24 -25
- package/dist/esm/clients/comment-client.js +3 -3
- package/dist/esm/clients/folder-client.js +3 -3
- package/dist/esm/clients/insights-client.js +6 -6
- package/dist/esm/clients/label-client.js +3 -3
- package/dist/esm/clients/project-client.js +8 -8
- package/dist/esm/clients/section-client.js +5 -5
- package/dist/esm/clients/task-client.js +6 -6
- package/dist/esm/clients/ui-extension-client.js +4 -4
- package/dist/esm/clients/workspace-client.js +3 -3
- package/dist/esm/consts/endpoints.js +0 -5
- package/dist/esm/test-utils/test-defaults.js +1 -24
- package/dist/esm/todoist-api.js +0 -33
- package/dist/esm/types/apps/types.js +1 -0
- package/dist/esm/types/index.js +0 -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/utils/validators.js +0 -2
- package/dist/types/clients/app-client.d.ts +1 -1
- 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 -12
- package/dist/types/types/apps/types.d.ts +4 -0
- package/dist/types/types/index.d.ts +0 -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/view-options.d.ts +6 -6
- package/dist/types/types/sync/response.d.ts +4 -29
- package/dist/types/types/tasks/requests.d.ts +0 -1
- package/dist/types/utils/validators.d.ts +13 -55
- package/package.json +1 -1
- package/dist/cjs/clients/goals-client.js +0 -145
- 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/esm/clients/goals-client.js +0 -141
- 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/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
|
@@ -41,7 +41,7 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
41
41
|
return (0, validators_1.validateAppArray)(response.data);
|
|
42
42
|
}
|
|
43
43
|
async getApp(appId, requestId) {
|
|
44
|
-
zod_1.z.string().parse(appId);
|
|
44
|
+
zod_1.z.string().min(1).parse(appId);
|
|
45
45
|
const response = await (0, http_client_1.request)({
|
|
46
46
|
httpMethod: 'GET',
|
|
47
47
|
baseUri: this.apiRootBase,
|
|
@@ -65,7 +65,7 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
65
65
|
return (0, validators_1.validateApp)(response.data);
|
|
66
66
|
}
|
|
67
67
|
async updateApp(appId, args, requestId) {
|
|
68
|
-
zod_1.z.string().parse(appId);
|
|
68
|
+
zod_1.z.string().min(1).parse(appId);
|
|
69
69
|
const { appTokenScopes } = args, rest = __rest(args, ["appTokenScopes"]);
|
|
70
70
|
const payload = Object.assign({}, rest);
|
|
71
71
|
if (appTokenScopes !== undefined) {
|
|
@@ -83,7 +83,7 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
83
83
|
return (0, validators_1.validateAppWithUserCount)(response.data);
|
|
84
84
|
}
|
|
85
85
|
async deleteApp(appId, requestId) {
|
|
86
|
-
zod_1.z.string().parse(appId);
|
|
86
|
+
zod_1.z.string().min(1).parse(appId);
|
|
87
87
|
const response = await (0, http_client_1.request)({
|
|
88
88
|
httpMethod: 'DELETE',
|
|
89
89
|
baseUri: this.apiRootBase,
|
|
@@ -95,7 +95,7 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
95
95
|
return (0, http_client_1.isSuccess)(response);
|
|
96
96
|
}
|
|
97
97
|
async getAppSecrets(appId, requestId) {
|
|
98
|
-
zod_1.z.string().parse(appId);
|
|
98
|
+
zod_1.z.string().min(1).parse(appId);
|
|
99
99
|
const response = await (0, http_client_1.request)({
|
|
100
100
|
httpMethod: 'GET',
|
|
101
101
|
baseUri: this.apiRootBase,
|
|
@@ -107,7 +107,7 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
107
107
|
return (0, validators_1.validateAppSecrets)(response.data);
|
|
108
108
|
}
|
|
109
109
|
async resetAppClientSecret(appId, requestId) {
|
|
110
|
-
zod_1.z.string().parse(appId);
|
|
110
|
+
zod_1.z.string().min(1).parse(appId);
|
|
111
111
|
const response = await (0, http_client_1.request)({
|
|
112
112
|
httpMethod: 'DELETE',
|
|
113
113
|
baseUri: this.apiRootBase,
|
|
@@ -119,7 +119,7 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
119
119
|
return (0, validators_1.validateAppWithUserCount)(response.data);
|
|
120
120
|
}
|
|
121
121
|
async revokeAppTokens(appId, requestId) {
|
|
122
|
-
zod_1.z.string().parse(appId);
|
|
122
|
+
zod_1.z.string().min(1).parse(appId);
|
|
123
123
|
const response = await (0, http_client_1.request)({
|
|
124
124
|
httpMethod: 'DELETE',
|
|
125
125
|
baseUri: this.apiRootBase,
|
|
@@ -130,26 +130,25 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
130
130
|
});
|
|
131
131
|
return (0, validators_1.validateAppWithUserCount)(response.data);
|
|
132
132
|
}
|
|
133
|
-
async uploadAppIcon(
|
|
134
|
-
|
|
135
|
-
if (Buffer.isBuffer(
|
|
133
|
+
async uploadAppIcon({ appId, file, fileName = '', size = 'medium' }, requestId) {
|
|
134
|
+
zod_1.z.string().min(1).parse(appId);
|
|
135
|
+
if (Buffer.isBuffer(file) && file.length === 0) {
|
|
136
136
|
throw new Error('Cannot upload empty image file');
|
|
137
137
|
}
|
|
138
|
-
const size = (_a = args.size) !== null && _a !== void 0 ? _a : 'medium';
|
|
139
138
|
const data = await (0, multipart_upload_1.uploadMultipartFile)({
|
|
140
139
|
baseUrl: this.apiRootBase,
|
|
141
140
|
authToken: this.authToken,
|
|
142
|
-
endpoint: (0, endpoints_1.getAppIconEndpoint)(
|
|
143
|
-
file
|
|
144
|
-
fileName
|
|
145
|
-
additionalFields: { file_name:
|
|
141
|
+
endpoint: (0, endpoints_1.getAppIconEndpoint)(appId, size),
|
|
142
|
+
file,
|
|
143
|
+
fileName,
|
|
144
|
+
additionalFields: { file_name: fileName },
|
|
146
145
|
requestId: requestId,
|
|
147
146
|
customFetch: this.customFetch,
|
|
148
147
|
});
|
|
149
148
|
return (0, validators_1.validateAppWithUserCount)((0, case_conversion_1.camelCaseKeys)(data));
|
|
150
149
|
}
|
|
151
150
|
async getAppTestToken(appId, requestId) {
|
|
152
|
-
zod_1.z.string().parse(appId);
|
|
151
|
+
zod_1.z.string().min(1).parse(appId);
|
|
153
152
|
const response = await (0, http_client_1.request)({
|
|
154
153
|
httpMethod: 'GET',
|
|
155
154
|
baseUri: this.apiRootBase,
|
|
@@ -161,7 +160,7 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
161
160
|
return (0, validators_1.validateAppTestToken)(response.data);
|
|
162
161
|
}
|
|
163
162
|
async createAppTestToken(appId, requestId) {
|
|
164
|
-
zod_1.z.string().parse(appId);
|
|
163
|
+
zod_1.z.string().min(1).parse(appId);
|
|
165
164
|
const response = await (0, http_client_1.request)({
|
|
166
165
|
httpMethod: 'PUT',
|
|
167
166
|
baseUri: this.apiRootBase,
|
|
@@ -173,7 +172,7 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
173
172
|
return (0, validators_1.validateAppTestToken)(response.data);
|
|
174
173
|
}
|
|
175
174
|
async getAppDistributionToken(appId, requestId) {
|
|
176
|
-
zod_1.z.string().parse(appId);
|
|
175
|
+
zod_1.z.string().min(1).parse(appId);
|
|
177
176
|
const response = await (0, http_client_1.request)({
|
|
178
177
|
httpMethod: 'GET',
|
|
179
178
|
baseUri: this.apiRootBase,
|
|
@@ -185,7 +184,7 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
185
184
|
return (0, validators_1.validateAppDistributionToken)(response.data);
|
|
186
185
|
}
|
|
187
186
|
async getAppVerificationToken(appId, requestId) {
|
|
188
|
-
zod_1.z.string().parse(appId);
|
|
187
|
+
zod_1.z.string().min(1).parse(appId);
|
|
189
188
|
const response = await (0, http_client_1.request)({
|
|
190
189
|
httpMethod: 'GET',
|
|
191
190
|
baseUri: this.apiRootBase,
|
|
@@ -197,7 +196,7 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
197
196
|
return (0, validators_1.validateAppVerificationToken)(response.data);
|
|
198
197
|
}
|
|
199
198
|
async resetAppVerificationToken(appId, requestId) {
|
|
200
|
-
zod_1.z.string().parse(appId);
|
|
199
|
+
zod_1.z.string().min(1).parse(appId);
|
|
201
200
|
const response = await (0, http_client_1.request)({
|
|
202
201
|
httpMethod: 'DELETE',
|
|
203
202
|
baseUri: this.apiRootBase,
|
|
@@ -209,7 +208,7 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
209
208
|
return (0, validators_1.validateAppVerificationToken)(response.data);
|
|
210
209
|
}
|
|
211
210
|
async getAppByDistributionToken(distributionToken, requestId) {
|
|
212
|
-
zod_1.z.string().parse(distributionToken);
|
|
211
|
+
zod_1.z.string().min(1).parse(distributionToken);
|
|
213
212
|
const response = await (0, http_client_1.request)({
|
|
214
213
|
httpMethod: 'GET',
|
|
215
214
|
baseUri: this.apiRootBase,
|
|
@@ -222,7 +221,7 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
222
221
|
}
|
|
223
222
|
// --- App webhooks ---
|
|
224
223
|
async getAppWebhook(appId, requestId) {
|
|
225
|
-
zod_1.z.string().parse(appId);
|
|
224
|
+
zod_1.z.string().min(1).parse(appId);
|
|
226
225
|
const response = await (0, http_client_1.request)({
|
|
227
226
|
httpMethod: 'GET',
|
|
228
227
|
baseUri: this.apiRootBase,
|
|
@@ -247,7 +246,7 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
247
246
|
return (0, validators_1.validateAppWebhook)(response.data);
|
|
248
247
|
}
|
|
249
248
|
async deleteAppWebhook(appId, requestId) {
|
|
250
|
-
zod_1.z.string().parse(appId);
|
|
249
|
+
zod_1.z.string().min(1).parse(appId);
|
|
251
250
|
const response = await (0, http_client_1.request)({
|
|
252
251
|
httpMethod: 'DELETE',
|
|
253
252
|
baseUri: this.apiRootBase,
|
|
@@ -283,7 +282,7 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
283
282
|
return (0, validators_1.validateAppInstallation)(response.data);
|
|
284
283
|
}
|
|
285
284
|
async getAppInstallation(installationId, requestId) {
|
|
286
|
-
zod_1.z.string().parse(installationId);
|
|
285
|
+
zod_1.z.string().min(1).parse(installationId);
|
|
287
286
|
const response = await (0, http_client_1.request)({
|
|
288
287
|
httpMethod: 'GET',
|
|
289
288
|
baseUri: this.apiRootBase,
|
|
@@ -295,7 +294,7 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
295
294
|
return (0, validators_1.validateAppInstallation)(response.data);
|
|
296
295
|
}
|
|
297
296
|
async updateAppInstallation(installationId, args, requestId) {
|
|
298
|
-
zod_1.z.string().parse(installationId);
|
|
297
|
+
zod_1.z.string().min(1).parse(installationId);
|
|
299
298
|
const response = await (0, http_client_1.request)({
|
|
300
299
|
httpMethod: 'POST',
|
|
301
300
|
baseUri: this.apiRootBase,
|
|
@@ -308,7 +307,7 @@ class AppClient extends base_client_1.BaseClient {
|
|
|
308
307
|
return (0, validators_1.validateAppInstallation)(response.data);
|
|
309
308
|
}
|
|
310
309
|
async uninstallApp(installationId, requestId) {
|
|
311
|
-
zod_1.z.string().parse(installationId);
|
|
310
|
+
zod_1.z.string().min(1).parse(installationId);
|
|
312
311
|
const response = await (0, http_client_1.request)({
|
|
313
312
|
httpMethod: 'DELETE',
|
|
314
313
|
baseUri: this.apiRootBase,
|
|
@@ -40,7 +40,7 @@ class CommentClient extends base_client_1.BaseClient {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
async getComment(id) {
|
|
43
|
-
zod_1.z.string().parse(id);
|
|
43
|
+
zod_1.z.string().min(1).parse(id);
|
|
44
44
|
const response = await (0, http_client_1.request)({
|
|
45
45
|
httpMethod: 'GET',
|
|
46
46
|
baseUri: this.syncApiBase,
|
|
@@ -64,7 +64,7 @@ class CommentClient extends base_client_1.BaseClient {
|
|
|
64
64
|
return (0, validators_1.validateComment)(response.data);
|
|
65
65
|
}
|
|
66
66
|
async updateComment(id, args, requestId) {
|
|
67
|
-
zod_1.z.string().parse(id);
|
|
67
|
+
zod_1.z.string().min(1).parse(id);
|
|
68
68
|
const response = await (0, http_client_1.request)({
|
|
69
69
|
httpMethod: 'POST',
|
|
70
70
|
baseUri: this.syncApiBase,
|
|
@@ -77,7 +77,7 @@ class CommentClient extends base_client_1.BaseClient {
|
|
|
77
77
|
return (0, validators_1.validateComment)(response.data);
|
|
78
78
|
}
|
|
79
79
|
async deleteComment(id, requestId) {
|
|
80
|
-
zod_1.z.string().parse(id);
|
|
80
|
+
zod_1.z.string().min(1).parse(id);
|
|
81
81
|
const response = await (0, http_client_1.request)({
|
|
82
82
|
httpMethod: 'DELETE',
|
|
83
83
|
baseUri: this.syncApiBase,
|
|
@@ -29,7 +29,7 @@ class FolderClient extends base_client_1.BaseClient {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
async getFolder(id) {
|
|
32
|
-
zod_1.z.string().parse(id);
|
|
32
|
+
zod_1.z.string().min(1).parse(id);
|
|
33
33
|
const response = await (0, http_client_1.request)({
|
|
34
34
|
httpMethod: 'GET',
|
|
35
35
|
baseUri: this.syncApiBase,
|
|
@@ -52,7 +52,7 @@ class FolderClient extends base_client_1.BaseClient {
|
|
|
52
52
|
return (0, validators_1.validateFolder)(response.data);
|
|
53
53
|
}
|
|
54
54
|
async updateFolder(id, args, requestId) {
|
|
55
|
-
zod_1.z.string().parse(id);
|
|
55
|
+
zod_1.z.string().min(1).parse(id);
|
|
56
56
|
const response = await (0, http_client_1.request)({
|
|
57
57
|
httpMethod: 'POST',
|
|
58
58
|
baseUri: this.syncApiBase,
|
|
@@ -65,7 +65,7 @@ class FolderClient extends base_client_1.BaseClient {
|
|
|
65
65
|
return (0, validators_1.validateFolder)(response.data);
|
|
66
66
|
}
|
|
67
67
|
async deleteFolder(id, requestId) {
|
|
68
|
-
zod_1.z.string().parse(id);
|
|
68
|
+
zod_1.z.string().min(1).parse(id);
|
|
69
69
|
const response = await (0, http_client_1.request)({
|
|
70
70
|
httpMethod: 'DELETE',
|
|
71
71
|
baseUri: this.syncApiBase,
|
|
@@ -16,7 +16,7 @@ const base_client_1 = require("./base-client");
|
|
|
16
16
|
*/
|
|
17
17
|
class InsightsClient extends base_client_1.BaseClient {
|
|
18
18
|
async getProjectActivityStats(projectId, args = {}) {
|
|
19
|
-
zod_1.z.string().parse(projectId);
|
|
19
|
+
zod_1.z.string().min(1).parse(projectId);
|
|
20
20
|
const response = await (0, http_client_1.request)({
|
|
21
21
|
httpMethod: 'GET',
|
|
22
22
|
baseUri: this.syncApiBase,
|
|
@@ -28,7 +28,7 @@ class InsightsClient extends base_client_1.BaseClient {
|
|
|
28
28
|
return (0, validators_1.validateProjectActivityStats)(response.data);
|
|
29
29
|
}
|
|
30
30
|
async getProjectHealth(projectId) {
|
|
31
|
-
zod_1.z.string().parse(projectId);
|
|
31
|
+
zod_1.z.string().min(1).parse(projectId);
|
|
32
32
|
const response = await (0, http_client_1.request)({
|
|
33
33
|
httpMethod: 'GET',
|
|
34
34
|
baseUri: this.syncApiBase,
|
|
@@ -39,7 +39,7 @@ class InsightsClient extends base_client_1.BaseClient {
|
|
|
39
39
|
return (0, validators_1.validateProjectHealth)(response.data);
|
|
40
40
|
}
|
|
41
41
|
async getProjectHealthContext(projectId) {
|
|
42
|
-
zod_1.z.string().parse(projectId);
|
|
42
|
+
zod_1.z.string().min(1).parse(projectId);
|
|
43
43
|
const response = await (0, http_client_1.request)({
|
|
44
44
|
httpMethod: 'GET',
|
|
45
45
|
baseUri: this.syncApiBase,
|
|
@@ -50,7 +50,7 @@ class InsightsClient extends base_client_1.BaseClient {
|
|
|
50
50
|
return (0, validators_1.validateProjectHealthContext)(response.data);
|
|
51
51
|
}
|
|
52
52
|
async getProjectProgress(projectId) {
|
|
53
|
-
zod_1.z.string().parse(projectId);
|
|
53
|
+
zod_1.z.string().min(1).parse(projectId);
|
|
54
54
|
const response = await (0, http_client_1.request)({
|
|
55
55
|
httpMethod: 'GET',
|
|
56
56
|
baseUri: this.syncApiBase,
|
|
@@ -61,7 +61,7 @@ class InsightsClient extends base_client_1.BaseClient {
|
|
|
61
61
|
return (0, validators_1.validateProjectProgress)(response.data);
|
|
62
62
|
}
|
|
63
63
|
async getWorkspaceInsights(workspaceId, args = {}) {
|
|
64
|
-
zod_1.z.string().parse(workspaceId);
|
|
64
|
+
zod_1.z.string().min(1).parse(workspaceId);
|
|
65
65
|
const response = await (0, http_client_1.request)({
|
|
66
66
|
httpMethod: 'GET',
|
|
67
67
|
baseUri: this.syncApiBase,
|
|
@@ -73,7 +73,7 @@ class InsightsClient extends base_client_1.BaseClient {
|
|
|
73
73
|
return (0, validators_1.validateWorkspaceInsights)(response.data);
|
|
74
74
|
}
|
|
75
75
|
async analyzeProjectHealth(projectId, requestId) {
|
|
76
|
-
zod_1.z.string().parse(projectId);
|
|
76
|
+
zod_1.z.string().min(1).parse(projectId);
|
|
77
77
|
const response = await (0, http_client_1.request)({
|
|
78
78
|
httpMethod: 'POST',
|
|
79
79
|
baseUri: this.syncApiBase,
|
|
@@ -15,7 +15,7 @@ const base_client_1 = require("./base-client");
|
|
|
15
15
|
*/
|
|
16
16
|
class LabelClient extends base_client_1.BaseClient {
|
|
17
17
|
async getLabel(id) {
|
|
18
|
-
zod_1.z.string().parse(id);
|
|
18
|
+
zod_1.z.string().min(1).parse(id);
|
|
19
19
|
const response = await (0, http_client_1.request)({
|
|
20
20
|
httpMethod: 'GET',
|
|
21
21
|
baseUri: this.syncApiBase,
|
|
@@ -66,7 +66,7 @@ class LabelClient extends base_client_1.BaseClient {
|
|
|
66
66
|
return (0, validators_1.validateLabel)(response.data);
|
|
67
67
|
}
|
|
68
68
|
async updateLabel(id, args, requestId) {
|
|
69
|
-
zod_1.z.string().parse(id);
|
|
69
|
+
zod_1.z.string().min(1).parse(id);
|
|
70
70
|
const response = await (0, http_client_1.request)({
|
|
71
71
|
httpMethod: 'POST',
|
|
72
72
|
baseUri: this.syncApiBase,
|
|
@@ -79,7 +79,7 @@ class LabelClient extends base_client_1.BaseClient {
|
|
|
79
79
|
return (0, validators_1.validateLabel)(response.data);
|
|
80
80
|
}
|
|
81
81
|
async deleteLabel(id, requestId) {
|
|
82
|
-
zod_1.z.string().parse(id);
|
|
82
|
+
zod_1.z.string().min(1).parse(id);
|
|
83
83
|
const response = await (0, http_client_1.request)({
|
|
84
84
|
httpMethod: 'DELETE',
|
|
85
85
|
baseUri: this.syncApiBase,
|
|
@@ -15,7 +15,7 @@ const base_client_1 = require("./base-client");
|
|
|
15
15
|
*/
|
|
16
16
|
class ProjectClient extends base_client_1.BaseClient {
|
|
17
17
|
async getProject(id) {
|
|
18
|
-
zod_1.z.string().parse(id);
|
|
18
|
+
zod_1.z.string().min(1).parse(id);
|
|
19
19
|
const response = await (0, http_client_1.request)({
|
|
20
20
|
httpMethod: 'GET',
|
|
21
21
|
baseUri: this.syncApiBase,
|
|
@@ -80,7 +80,7 @@ class ProjectClient extends base_client_1.BaseClient {
|
|
|
80
80
|
return (0, validators_1.validateProject)(response.data);
|
|
81
81
|
}
|
|
82
82
|
async updateProject(id, args, requestId) {
|
|
83
|
-
zod_1.z.string().parse(id);
|
|
83
|
+
zod_1.z.string().min(1).parse(id);
|
|
84
84
|
const response = await (0, http_client_1.request)({
|
|
85
85
|
httpMethod: 'POST',
|
|
86
86
|
baseUri: this.syncApiBase,
|
|
@@ -93,7 +93,7 @@ class ProjectClient extends base_client_1.BaseClient {
|
|
|
93
93
|
return (0, validators_1.validateProject)(response.data);
|
|
94
94
|
}
|
|
95
95
|
async deleteProject(id, requestId) {
|
|
96
|
-
zod_1.z.string().parse(id);
|
|
96
|
+
zod_1.z.string().min(1).parse(id);
|
|
97
97
|
const response = await (0, http_client_1.request)({
|
|
98
98
|
httpMethod: 'DELETE',
|
|
99
99
|
baseUri: this.syncApiBase,
|
|
@@ -105,7 +105,7 @@ class ProjectClient extends base_client_1.BaseClient {
|
|
|
105
105
|
return (0, http_client_1.isSuccess)(response);
|
|
106
106
|
}
|
|
107
107
|
async archiveProject(id, requestId) {
|
|
108
|
-
zod_1.z.string().parse(id);
|
|
108
|
+
zod_1.z.string().min(1).parse(id);
|
|
109
109
|
const response = await (0, http_client_1.request)({
|
|
110
110
|
httpMethod: 'POST',
|
|
111
111
|
baseUri: this.syncApiBase,
|
|
@@ -117,7 +117,7 @@ class ProjectClient extends base_client_1.BaseClient {
|
|
|
117
117
|
return (0, validators_1.validateProject)(response.data);
|
|
118
118
|
}
|
|
119
119
|
async unarchiveProject(id, requestId) {
|
|
120
|
-
zod_1.z.string().parse(id);
|
|
120
|
+
zod_1.z.string().min(1).parse(id);
|
|
121
121
|
const response = await (0, http_client_1.request)({
|
|
122
122
|
httpMethod: 'POST',
|
|
123
123
|
baseUri: this.syncApiBase,
|
|
@@ -174,7 +174,7 @@ class ProjectClient extends base_client_1.BaseClient {
|
|
|
174
174
|
return data;
|
|
175
175
|
}
|
|
176
176
|
async getFullProject(id, args = {}) {
|
|
177
|
-
zod_1.z.string().parse(id);
|
|
177
|
+
zod_1.z.string().min(1).parse(id);
|
|
178
178
|
const { data } = await (0, http_client_1.request)({
|
|
179
179
|
httpMethod: 'GET',
|
|
180
180
|
baseUri: this.syncApiBase,
|
|
@@ -193,7 +193,7 @@ class ProjectClient extends base_client_1.BaseClient {
|
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
195
|
async joinProject(id, requestId) {
|
|
196
|
-
zod_1.z.string().parse(id);
|
|
196
|
+
zod_1.z.string().min(1).parse(id);
|
|
197
197
|
const { data } = await (0, http_client_1.request)({
|
|
198
198
|
httpMethod: 'POST',
|
|
199
199
|
baseUri: this.syncApiBase,
|
|
@@ -214,7 +214,7 @@ class ProjectClient extends base_client_1.BaseClient {
|
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
216
|
async getProjectCollaborators(projectId, args = {}) {
|
|
217
|
-
zod_1.z.string().parse(projectId);
|
|
217
|
+
zod_1.z.string().min(1).parse(projectId);
|
|
218
218
|
const { data: { results, nextCursor }, } = await (0, http_client_1.request)({
|
|
219
219
|
httpMethod: 'GET',
|
|
220
220
|
baseUri: this.syncApiBase,
|
|
@@ -43,7 +43,7 @@ class SectionClient extends base_client_1.BaseClient {
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
async getSection(id) {
|
|
46
|
-
zod_1.z.string().parse(id);
|
|
46
|
+
zod_1.z.string().min(1).parse(id);
|
|
47
47
|
const response = await (0, http_client_1.request)({
|
|
48
48
|
httpMethod: 'GET',
|
|
49
49
|
baseUri: this.syncApiBase,
|
|
@@ -66,7 +66,7 @@ class SectionClient extends base_client_1.BaseClient {
|
|
|
66
66
|
return (0, validators_1.validateSection)(response.data);
|
|
67
67
|
}
|
|
68
68
|
async updateSection(id, args, requestId) {
|
|
69
|
-
zod_1.z.string().parse(id);
|
|
69
|
+
zod_1.z.string().min(1).parse(id);
|
|
70
70
|
const response = await (0, http_client_1.request)({
|
|
71
71
|
httpMethod: 'POST',
|
|
72
72
|
baseUri: this.syncApiBase,
|
|
@@ -79,7 +79,7 @@ class SectionClient extends base_client_1.BaseClient {
|
|
|
79
79
|
return (0, validators_1.validateSection)(response.data);
|
|
80
80
|
}
|
|
81
81
|
async deleteSection(id, requestId) {
|
|
82
|
-
zod_1.z.string().parse(id);
|
|
82
|
+
zod_1.z.string().min(1).parse(id);
|
|
83
83
|
const response = await (0, http_client_1.request)({
|
|
84
84
|
httpMethod: 'DELETE',
|
|
85
85
|
baseUri: this.syncApiBase,
|
|
@@ -91,7 +91,7 @@ class SectionClient extends base_client_1.BaseClient {
|
|
|
91
91
|
return (0, http_client_1.isSuccess)(response);
|
|
92
92
|
}
|
|
93
93
|
async archiveSection(id, requestId) {
|
|
94
|
-
zod_1.z.string().parse(id);
|
|
94
|
+
zod_1.z.string().min(1).parse(id);
|
|
95
95
|
const response = await (0, http_client_1.request)({
|
|
96
96
|
httpMethod: 'POST',
|
|
97
97
|
baseUri: this.syncApiBase,
|
|
@@ -103,7 +103,7 @@ class SectionClient extends base_client_1.BaseClient {
|
|
|
103
103
|
return (0, validators_1.validateSection)(response.data);
|
|
104
104
|
}
|
|
105
105
|
async unarchiveSection(id, requestId) {
|
|
106
|
-
zod_1.z.string().parse(id);
|
|
106
|
+
zod_1.z.string().min(1).parse(id);
|
|
107
107
|
const response = await (0, http_client_1.request)({
|
|
108
108
|
httpMethod: 'POST',
|
|
109
109
|
baseUri: this.syncApiBase,
|
|
@@ -31,7 +31,7 @@ const MAX_COMMAND_COUNT = 100;
|
|
|
31
31
|
*/
|
|
32
32
|
class TaskClient extends base_client_1.BaseClient {
|
|
33
33
|
async getTask(id) {
|
|
34
|
-
zod_1.z.string().parse(id);
|
|
34
|
+
zod_1.z.string().min(1).parse(id);
|
|
35
35
|
const response = await (0, http_client_1.request)({
|
|
36
36
|
httpMethod: 'GET',
|
|
37
37
|
baseUri: this.syncApiBase,
|
|
@@ -155,7 +155,7 @@ class TaskClient extends base_client_1.BaseClient {
|
|
|
155
155
|
return (0, validators_1.validateTask)(response.data);
|
|
156
156
|
}
|
|
157
157
|
async updateTask(id, args, requestId) {
|
|
158
|
-
zod_1.z.string().parse(id);
|
|
158
|
+
zod_1.z.string().min(1).parse(id);
|
|
159
159
|
// Translate SDK alias for due-date clearing to Todoist's accepted payload value.
|
|
160
160
|
const normalizedArgs = args.dueString === null ? Object.assign(Object.assign({}, args), { dueString: 'no date' }) : args;
|
|
161
161
|
// Process content if both content and isUncompletable are provided
|
|
@@ -203,7 +203,7 @@ class TaskClient extends base_client_1.BaseClient {
|
|
|
203
203
|
return (0, validators_1.validateTaskArray)(syncTasks);
|
|
204
204
|
}
|
|
205
205
|
async moveTask(id, args, requestId) {
|
|
206
|
-
zod_1.z.string().parse(id);
|
|
206
|
+
zod_1.z.string().min(1).parse(id);
|
|
207
207
|
const response = await (0, http_client_1.request)({
|
|
208
208
|
httpMethod: 'POST',
|
|
209
209
|
baseUri: this.syncApiBase,
|
|
@@ -216,7 +216,7 @@ class TaskClient extends base_client_1.BaseClient {
|
|
|
216
216
|
return (0, validators_1.validateTask)(response.data);
|
|
217
217
|
}
|
|
218
218
|
async closeTask(id, requestId) {
|
|
219
|
-
zod_1.z.string().parse(id);
|
|
219
|
+
zod_1.z.string().min(1).parse(id);
|
|
220
220
|
const response = await (0, http_client_1.request)({
|
|
221
221
|
httpMethod: 'POST',
|
|
222
222
|
baseUri: this.syncApiBase,
|
|
@@ -228,7 +228,7 @@ class TaskClient extends base_client_1.BaseClient {
|
|
|
228
228
|
return (0, http_client_1.isSuccess)(response);
|
|
229
229
|
}
|
|
230
230
|
async reopenTask(id, requestId) {
|
|
231
|
-
zod_1.z.string().parse(id);
|
|
231
|
+
zod_1.z.string().min(1).parse(id);
|
|
232
232
|
const response = await (0, http_client_1.request)({
|
|
233
233
|
httpMethod: 'POST',
|
|
234
234
|
baseUri: this.syncApiBase,
|
|
@@ -240,7 +240,7 @@ class TaskClient extends base_client_1.BaseClient {
|
|
|
240
240
|
return (0, http_client_1.isSuccess)(response);
|
|
241
241
|
}
|
|
242
242
|
async deleteTask(id, requestId) {
|
|
243
|
-
zod_1.z.string().parse(id);
|
|
243
|
+
zod_1.z.string().min(1).parse(id);
|
|
244
244
|
const response = await (0, http_client_1.request)({
|
|
245
245
|
httpMethod: 'DELETE',
|
|
246
246
|
baseUri: this.syncApiBase,
|
|
@@ -17,7 +17,7 @@ const base_client_1 = require("./base-client");
|
|
|
17
17
|
*/
|
|
18
18
|
class UiExtensionClient extends base_client_1.BaseClient {
|
|
19
19
|
async getUiExtension(uiExtensionId, requestId) {
|
|
20
|
-
zod_1.z.string().parse(uiExtensionId);
|
|
20
|
+
zod_1.z.string().min(1).parse(uiExtensionId);
|
|
21
21
|
const response = await (0, http_client_1.request)({
|
|
22
22
|
httpMethod: 'GET',
|
|
23
23
|
baseUri: this.apiRootBase,
|
|
@@ -40,7 +40,7 @@ class UiExtensionClient extends base_client_1.BaseClient {
|
|
|
40
40
|
return (0, validators_1.validateUiExtensionArray)(response.data);
|
|
41
41
|
}
|
|
42
42
|
async getUiExtensionsForApp(appId, requestId) {
|
|
43
|
-
zod_1.z.string().parse(appId);
|
|
43
|
+
zod_1.z.string().min(1).parse(appId);
|
|
44
44
|
const response = await (0, http_client_1.request)({
|
|
45
45
|
httpMethod: 'GET',
|
|
46
46
|
baseUri: this.apiRootBase,
|
|
@@ -64,7 +64,7 @@ class UiExtensionClient extends base_client_1.BaseClient {
|
|
|
64
64
|
return (0, validators_1.validateUiExtension)(response.data);
|
|
65
65
|
}
|
|
66
66
|
async updateUiExtension(uiExtensionId, args, requestId) {
|
|
67
|
-
zod_1.z.string().parse(uiExtensionId);
|
|
67
|
+
zod_1.z.string().min(1).parse(uiExtensionId);
|
|
68
68
|
const response = await (0, http_client_1.request)({
|
|
69
69
|
httpMethod: 'PATCH',
|
|
70
70
|
baseUri: this.apiRootBase,
|
|
@@ -77,7 +77,7 @@ class UiExtensionClient extends base_client_1.BaseClient {
|
|
|
77
77
|
return (0, validators_1.validateUiExtension)(response.data);
|
|
78
78
|
}
|
|
79
79
|
async deleteUiExtension(uiExtensionId, requestId) {
|
|
80
|
-
zod_1.z.string().parse(uiExtensionId);
|
|
80
|
+
zod_1.z.string().min(1).parse(uiExtensionId);
|
|
81
81
|
const response = await (0, http_client_1.request)({
|
|
82
82
|
httpMethod: 'DELETE',
|
|
83
83
|
baseUri: this.apiRootBase,
|
|
@@ -199,7 +199,7 @@ class WorkspaceClient extends base_client_1.BaseClient {
|
|
|
199
199
|
return (0, validators_1.validateWorkspaceArray)(response.data);
|
|
200
200
|
}
|
|
201
201
|
async getWorkspace(id, requestId) {
|
|
202
|
-
zod_1.z.string().parse(id);
|
|
202
|
+
zod_1.z.string().min(1).parse(id);
|
|
203
203
|
const response = await (0, http_client_1.request)({
|
|
204
204
|
httpMethod: 'GET',
|
|
205
205
|
baseUri: this.syncApiBase,
|
|
@@ -223,7 +223,7 @@ class WorkspaceClient extends base_client_1.BaseClient {
|
|
|
223
223
|
return (0, validators_1.validateWorkspace)(response.data);
|
|
224
224
|
}
|
|
225
225
|
async updateWorkspace(id, args, requestId) {
|
|
226
|
-
zod_1.z.string().parse(id);
|
|
226
|
+
zod_1.z.string().min(1).parse(id);
|
|
227
227
|
const response = await (0, http_client_1.request)({
|
|
228
228
|
httpMethod: 'POST',
|
|
229
229
|
baseUri: this.syncApiBase,
|
|
@@ -236,7 +236,7 @@ class WorkspaceClient extends base_client_1.BaseClient {
|
|
|
236
236
|
return (0, validators_1.validateWorkspace)(response.data);
|
|
237
237
|
}
|
|
238
238
|
async deleteWorkspace(id, requestId) {
|
|
239
|
-
zod_1.z.string().parse(id);
|
|
239
|
+
zod_1.z.string().min(1).parse(id);
|
|
240
240
|
const response = await (0, http_client_1.request)({
|
|
241
241
|
httpMethod: 'DELETE',
|
|
242
242
|
baseUri: this.syncApiBase,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ENDPOINT_REST_ID_MAPPINGS = exports.ENDPOINT_REST_EMAILS = exports.ENDPOINT_REST_BACKUPS_DOWNLOAD = exports.ENDPOINT_REST_BACKUPS = exports.ENDPOINT_REST_ACCESS_TOKENS_MIGRATE = exports.ENDPOINT_REST_TEMPLATES_IMPORT_FROM_ID = exports.ENDPOINT_REST_TEMPLATES_IMPORT_FROM_FILE = exports.ENDPOINT_REST_TEMPLATES_CREATE_FROM_FILE = exports.ENDPOINT_REST_TEMPLATES_URL = exports.ENDPOINT_REST_TEMPLATES_FILE = exports.ENDPOINT_REST_TASKS_COMPLETED = exports.ENDPOINT_REST_PROJECTS_MOVE_TO_PERSONAL = exports.ENDPOINT_REST_PROJECTS_MOVE_TO_WORKSPACE = exports.SECTION_UNARCHIVE = exports.SECTION_ARCHIVE = exports.ENDPOINT_REST_PROJECT_JOIN = exports.ENDPOINT_REST_PROJECT_FULL = exports.ENDPOINT_REST_PROJECTS_PERMISSIONS = exports.ENDPOINT_REST_PROJECTS_ARCHIVED_COUNT = exports.PROJECT_UNARCHIVE = exports.PROJECT_ARCHIVE = exports.ENDPOINT_REST_UPLOADS = exports.ENDPOINT_REST_ACTIVITIES = exports.ENDPOINT_REST_PRODUCTIVITY = exports.ENDPOINT_REST_USER = exports.ENDPOINT_REST_PROJECT_COLLABORATORS = exports.ENDPOINT_REST_PROJECTS_ARCHIVED = exports.ENDPOINT_REST_PROJECTS_SEARCH = exports.ENDPOINT_REST_PROJECTS = exports.ENDPOINT_REST_TASK_MOVE = exports.ENDPOINT_REST_TASK_REOPEN = exports.ENDPOINT_REST_TASK_CLOSE = exports.ENDPOINT_REST_LOCATION_REMINDERS = exports.ENDPOINT_REST_REMINDERS = exports.ENDPOINT_REST_COMMENTS = exports.ENDPOINT_REST_LABELS_SHARED_REMOVE = exports.ENDPOINT_REST_LABELS_SHARED_RENAME = exports.ENDPOINT_REST_LABELS_SHARED = exports.ENDPOINT_REST_LABELS_SEARCH = exports.ENDPOINT_REST_LABELS = exports.ENDPOINT_REST_SECTIONS_SEARCH = exports.ENDPOINT_REST_SECTIONS = exports.ENDPOINT_REST_TASKS_COMPLETED_SEARCH = exports.ENDPOINT_REST_TASKS_COMPLETED_BY_DUE_DATE = exports.ENDPOINT_REST_TASKS_COMPLETED_BY_COMPLETION_DATE = exports.ENDPOINT_REST_TASKS_FILTER = exports.ENDPOINT_REST_TASKS = exports.API_BASE_URI = exports.API_VERSION = exports.TODOIST_WEB_URI = void 0;
|
|
4
|
-
exports.APP_ICON_SIZES = exports.ENDPOINT_REST_USER_AUTHORIZATIONS_DELETE = exports.ENDPOINT_REST_USER_AUTHORIZATIONS = exports.ENDPOINT_REST_APPS_UI_EXTENSIONS_INSTALLED = exports.ENDPOINT_REST_APPS_UI_EXTENSIONS = exports.ENDPOINT_REST_APPS_INSTALLATIONS = exports.ENDPOINT_REST_APPS = exports.ENDPOINT_WORKSPACE_MEMBERS = exports.ENDPOINT_WORKSPACE_USERS = exports.ENDPOINT_WORKSPACE_PLAN_DETAILS = exports.ENDPOINT_WORKSPACE_LOGO = exports.ENDPOINT_WORKSPACE_JOIN = exports.ENDPOINT_WORKSPACE_INVITATIONS_DELETE = exports.ENDPOINT_WORKSPACE_INVITATIONS_ALL = exports.ENDPOINT_WORKSPACE_INVITATIONS = exports.ENDPOINT_REST_WORKSPACES = exports.
|
|
4
|
+
exports.APP_ICON_SIZES = exports.ENDPOINT_REST_USER_AUTHORIZATIONS_DELETE = exports.ENDPOINT_REST_USER_AUTHORIZATIONS = exports.ENDPOINT_REST_APPS_UI_EXTENSIONS_INSTALLED = exports.ENDPOINT_REST_APPS_UI_EXTENSIONS = exports.ENDPOINT_REST_APPS_INSTALLATIONS = exports.ENDPOINT_REST_APPS = exports.ENDPOINT_WORKSPACE_MEMBERS = exports.ENDPOINT_WORKSPACE_USERS = exports.ENDPOINT_WORKSPACE_PLAN_DETAILS = exports.ENDPOINT_WORKSPACE_LOGO = exports.ENDPOINT_WORKSPACE_JOIN = exports.ENDPOINT_WORKSPACE_INVITATIONS_DELETE = exports.ENDPOINT_WORKSPACE_INVITATIONS_ALL = exports.ENDPOINT_WORKSPACE_INVITATIONS = exports.ENDPOINT_REST_WORKSPACES = exports.ENDPOINT_REST_FOLDERS = exports.ENDPOINT_REGISTER = exports.ENDPOINT_REVOKE = exports.ENDPOINT_GET_TOKEN = exports.ENDPOINT_AUTHORIZATION = exports.ENDPOINT_SYNC = exports.ENDPOINT_SYNC_QUICK_ADD = exports.ENDPOINT_REST_MOVED_IDS = void 0;
|
|
5
5
|
exports.getSyncBaseUri = getSyncBaseUri;
|
|
6
6
|
exports.getApiRootBaseUri = getApiRootBaseUri;
|
|
7
7
|
exports.getAuthBaseUri = getAuthBaseUri;
|
|
@@ -104,11 +104,6 @@ exports.ENDPOINT_GET_TOKEN = 'access_token';
|
|
|
104
104
|
exports.ENDPOINT_REVOKE = 'revoke';
|
|
105
105
|
exports.ENDPOINT_REGISTER = 'register';
|
|
106
106
|
exports.ENDPOINT_REST_FOLDERS = 'folders';
|
|
107
|
-
exports.ENDPOINT_REST_GOALS = 'goals';
|
|
108
|
-
exports.ENDPOINT_REST_GOALS_SEARCH = exports.ENDPOINT_REST_GOALS + '/search';
|
|
109
|
-
exports.GOAL_COMPLETE = 'complete';
|
|
110
|
-
exports.GOAL_UNCOMPLETE = 'uncomplete';
|
|
111
|
-
exports.GOAL_TASKS = 'items';
|
|
112
107
|
// Workspace endpoints
|
|
113
108
|
exports.ENDPOINT_REST_WORKSPACES = 'workspaces';
|
|
114
109
|
exports.ENDPOINT_WORKSPACE_INVITATIONS = 'workspaces/invitations';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.DEFAULT_NOTE = exports.DEFAULT_UI_EXTENSION = exports.DEFAULT_USER_AUTHORIZATION = exports.DEFAULT_APP_INSTALLATION = exports.DEFAULT_APP_WEBHOOK = exports.DEFAULT_APP_DISTRIBUTION_TOKEN = exports.DEFAULT_APP_TEST_TOKEN = exports.DEFAULT_APP_VERIFICATION_TOKEN = exports.DEFAULT_APP_SECRETS = exports.DEFAULT_APP_WITH_USER_COUNT = exports.DEFAULT_APP =
|
|
3
|
+
exports.DEFAULT_ACCESS_TOKEN_ID = exports.DEFAULT_DISTRIBUTION_TOKEN = exports.DEFAULT_UI_EXTENSION_ID = exports.DEFAULT_INSTALLATION_ID = exports.DEFAULT_APP_ID = exports.DEFAULT_COLLABORATOR_STATE = exports.DEFAULT_COLLABORATOR = exports.DEFAULT_FOLDER = exports.COMMENT_WITH_OPTIONALS_AS_NULL_PROJECT = exports.RAW_COMMENT_WITH_OPTIONALS_AS_NULL_PROJECT = exports.COMMENT_WITH_ATTACHMENT_WITH_OPTIONALS_AS_NULL = exports.RAW_COMMENT_WITH_ATTACHMENT_WITH_OPTIONALS_AS_NULL = exports.COMMENT_WITH_OPTIONALS_AS_NULL_TASK = exports.RAW_COMMENT_WITH_OPTIONALS_AS_NULL_TASK = exports.INVALID_COMMENT = exports.DEFAULT_LOCATION_REMINDER = exports.DEFAULT_ABSOLUTE_REMINDER = exports.DEFAULT_RELATIVE_REMINDER = exports.DEFAULT_REMINDER_ID = exports.DEFAULT_COMMENT = exports.DEFAULT_RAW_COMMENT = exports.INVALID_ATTACHMENT = exports.DEFAULT_ATTACHMENT = exports.INVALID_USER = exports.DEFAULT_USER = exports.INVALID_LABEL = exports.DEFAULT_LABEL = exports.INVALID_SECTION = exports.DEFAULT_SECTION = exports.DEFAULT_WORKSPACE_PROJECT = exports.PROJECT_WITH_OPTIONALS_AS_NULL = exports.INVALID_PROJECT = exports.DEFAULT_PROJECT = exports.TASK_WITH_OPTIONALS_AS_NULL = exports.INVALID_TASK = exports.DEFAULT_TASK = exports.DEFAULT_DEADLINE = exports.DEFAULT_DURATION = exports.DEFAULT_DUE_DATE = exports.INVALID_ENTITY_ID = exports.DEFAULT_REQUEST_ID = exports.DEFAULT_AUTH_TOKEN = exports.DEFAULT_PROJECT_VIEW_STYLE = exports.DEFAULT_PROJECT_NAME = exports.DEFAULT_PROJECT_ID = exports.DEFAULT_ORDER = exports.DEFAULT_TASK_PRIORITY = exports.DEFAULT_TASK_DESCRIPTION = exports.DEFAULT_TASK_CONTENT = exports.DEFAULT_TASK_ID = void 0;
|
|
4
|
+
exports.DEFAULT_NOTE = exports.DEFAULT_UI_EXTENSION = exports.DEFAULT_USER_AUTHORIZATION = exports.DEFAULT_APP_INSTALLATION = exports.DEFAULT_APP_WEBHOOK = exports.DEFAULT_APP_DISTRIBUTION_TOKEN = exports.DEFAULT_APP_TEST_TOKEN = exports.DEFAULT_APP_VERIFICATION_TOKEN = exports.DEFAULT_APP_SECRETS = exports.DEFAULT_APP_WITH_USER_COUNT = exports.DEFAULT_APP = void 0;
|
|
5
5
|
const url_helpers_1 = require("../utils/url-helpers");
|
|
6
6
|
exports.DEFAULT_TASK_ID = '1234';
|
|
7
7
|
exports.DEFAULT_TASK_CONTENT = 'This is a task';
|
|
@@ -281,30 +281,6 @@ exports.DEFAULT_COLLABORATOR_STATE = {
|
|
|
281
281
|
state: 'active',
|
|
282
282
|
isDeleted: false,
|
|
283
283
|
};
|
|
284
|
-
exports.DEFAULT_GOAL_ID = '550e8400-e29b-41d4-a716-446655440000';
|
|
285
|
-
exports.DEFAULT_GOAL = {
|
|
286
|
-
id: exports.DEFAULT_GOAL_ID,
|
|
287
|
-
ownerType: 'USER',
|
|
288
|
-
ownerId: DEFAULT_USER_ID,
|
|
289
|
-
name: 'Ship v2',
|
|
290
|
-
description: 'Launch the new version',
|
|
291
|
-
deadline: '2026-04-03',
|
|
292
|
-
parentGoalId: null,
|
|
293
|
-
childOrder: 0,
|
|
294
|
-
isCompleted: false,
|
|
295
|
-
completedAt: null,
|
|
296
|
-
responsibleUid: null,
|
|
297
|
-
isDeleted: false,
|
|
298
|
-
progress: {
|
|
299
|
-
totalTaskCount: 5,
|
|
300
|
-
completedTaskCount: 2,
|
|
301
|
-
percentage: 40,
|
|
302
|
-
},
|
|
303
|
-
creatorUid: DEFAULT_USER_ID,
|
|
304
|
-
createdAt: defaultDate(),
|
|
305
|
-
updatedAt: defaultDate(),
|
|
306
|
-
};
|
|
307
|
-
exports.DEFAULT_GOAL_NO_PROGRESS = Object.assign(Object.assign({}, exports.DEFAULT_GOAL), { id: 'e5f6g7h8-e29b-41d4-a716-446655440001', progress: undefined });
|
|
308
284
|
exports.DEFAULT_APP_ID = '42';
|
|
309
285
|
exports.DEFAULT_INSTALLATION_ID = '1001';
|
|
310
286
|
exports.DEFAULT_UI_EXTENSION_ID = '2002';
|
|
@@ -312,6 +288,7 @@ exports.DEFAULT_DISTRIBUTION_TOKEN = 'dist-token-abc';
|
|
|
312
288
|
exports.DEFAULT_ACCESS_TOKEN_ID = '3003';
|
|
313
289
|
exports.DEFAULT_APP = {
|
|
314
290
|
id: exports.DEFAULT_APP_ID,
|
|
291
|
+
clientId: 'client-id-xyz',
|
|
315
292
|
status: 'public',
|
|
316
293
|
displayName: 'Sample App',
|
|
317
294
|
userId: DEFAULT_USER_ID,
|