@doist/todoist-sdk 9.1.0 → 9.1.2

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.
@@ -32,7 +32,7 @@ class AppClient extends base_client_1.BaseClient {
32
32
  async getApps(requestId) {
33
33
  const response = await (0, http_client_1.request)({
34
34
  httpMethod: 'GET',
35
- baseUri: this.syncApiBase,
35
+ baseUri: this.apiRootBase,
36
36
  relativePath: endpoints_1.ENDPOINT_REST_APPS,
37
37
  apiToken: this.authToken,
38
38
  customFetch: this.customFetch,
@@ -44,7 +44,7 @@ class AppClient extends base_client_1.BaseClient {
44
44
  zod_1.z.string().parse(appId);
45
45
  const response = await (0, http_client_1.request)({
46
46
  httpMethod: 'GET',
47
- baseUri: this.syncApiBase,
47
+ baseUri: this.apiRootBase,
48
48
  relativePath: (0, endpoints_1.getAppEndpoint)(appId),
49
49
  apiToken: this.authToken,
50
50
  customFetch: this.customFetch,
@@ -55,7 +55,7 @@ class AppClient extends base_client_1.BaseClient {
55
55
  async addApp(args, requestId) {
56
56
  const response = await (0, http_client_1.request)({
57
57
  httpMethod: 'POST',
58
- baseUri: this.syncApiBase,
58
+ baseUri: this.apiRootBase,
59
59
  relativePath: endpoints_1.ENDPOINT_REST_APPS,
60
60
  apiToken: this.authToken,
61
61
  customFetch: this.customFetch,
@@ -73,7 +73,7 @@ class AppClient extends base_client_1.BaseClient {
73
73
  }
74
74
  const response = await (0, http_client_1.request)({
75
75
  httpMethod: 'POST',
76
- baseUri: this.syncApiBase,
76
+ baseUri: this.apiRootBase,
77
77
  relativePath: (0, endpoints_1.getAppEndpoint)(appId),
78
78
  apiToken: this.authToken,
79
79
  customFetch: this.customFetch,
@@ -86,7 +86,7 @@ class AppClient extends base_client_1.BaseClient {
86
86
  zod_1.z.string().parse(appId);
87
87
  const response = await (0, http_client_1.request)({
88
88
  httpMethod: 'DELETE',
89
- baseUri: this.syncApiBase,
89
+ baseUri: this.apiRootBase,
90
90
  relativePath: (0, endpoints_1.getAppEndpoint)(appId),
91
91
  apiToken: this.authToken,
92
92
  customFetch: this.customFetch,
@@ -98,7 +98,7 @@ class AppClient extends base_client_1.BaseClient {
98
98
  zod_1.z.string().parse(appId);
99
99
  const response = await (0, http_client_1.request)({
100
100
  httpMethod: 'GET',
101
- baseUri: this.syncApiBase,
101
+ baseUri: this.apiRootBase,
102
102
  relativePath: (0, endpoints_1.getAppSecretsEndpoint)(appId),
103
103
  apiToken: this.authToken,
104
104
  customFetch: this.customFetch,
@@ -110,7 +110,7 @@ class AppClient extends base_client_1.BaseClient {
110
110
  zod_1.z.string().parse(appId);
111
111
  const response = await (0, http_client_1.request)({
112
112
  httpMethod: 'DELETE',
113
- baseUri: this.syncApiBase,
113
+ baseUri: this.apiRootBase,
114
114
  relativePath: (0, endpoints_1.getAppClientSecretEndpoint)(appId),
115
115
  apiToken: this.authToken,
116
116
  customFetch: this.customFetch,
@@ -122,7 +122,7 @@ class AppClient extends base_client_1.BaseClient {
122
122
  zod_1.z.string().parse(appId);
123
123
  const response = await (0, http_client_1.request)({
124
124
  httpMethod: 'DELETE',
125
- baseUri: this.syncApiBase,
125
+ baseUri: this.apiRootBase,
126
126
  relativePath: (0, endpoints_1.getAppTokensEndpoint)(appId),
127
127
  apiToken: this.authToken,
128
128
  customFetch: this.customFetch,
@@ -137,7 +137,7 @@ class AppClient extends base_client_1.BaseClient {
137
137
  }
138
138
  const size = (_a = args.size) !== null && _a !== void 0 ? _a : 'medium';
139
139
  const data = await (0, multipart_upload_1.uploadMultipartFile)({
140
- baseUrl: this.syncApiBase,
140
+ baseUrl: this.apiRootBase,
141
141
  authToken: this.authToken,
142
142
  endpoint: (0, endpoints_1.getAppIconEndpoint)(args.appId, size),
143
143
  file: args.file,
@@ -152,7 +152,7 @@ class AppClient extends base_client_1.BaseClient {
152
152
  zod_1.z.string().parse(appId);
153
153
  const response = await (0, http_client_1.request)({
154
154
  httpMethod: 'GET',
155
- baseUri: this.syncApiBase,
155
+ baseUri: this.apiRootBase,
156
156
  relativePath: (0, endpoints_1.getAppTestTokenEndpoint)(appId),
157
157
  apiToken: this.authToken,
158
158
  customFetch: this.customFetch,
@@ -164,7 +164,7 @@ class AppClient extends base_client_1.BaseClient {
164
164
  zod_1.z.string().parse(appId);
165
165
  const response = await (0, http_client_1.request)({
166
166
  httpMethod: 'PUT',
167
- baseUri: this.syncApiBase,
167
+ baseUri: this.apiRootBase,
168
168
  relativePath: (0, endpoints_1.getAppTestTokenEndpoint)(appId),
169
169
  apiToken: this.authToken,
170
170
  customFetch: this.customFetch,
@@ -176,7 +176,7 @@ class AppClient extends base_client_1.BaseClient {
176
176
  zod_1.z.string().parse(appId);
177
177
  const response = await (0, http_client_1.request)({
178
178
  httpMethod: 'GET',
179
- baseUri: this.syncApiBase,
179
+ baseUri: this.apiRootBase,
180
180
  relativePath: (0, endpoints_1.getAppDistributionTokenEndpoint)(appId),
181
181
  apiToken: this.authToken,
182
182
  customFetch: this.customFetch,
@@ -188,7 +188,7 @@ class AppClient extends base_client_1.BaseClient {
188
188
  zod_1.z.string().parse(appId);
189
189
  const response = await (0, http_client_1.request)({
190
190
  httpMethod: 'GET',
191
- baseUri: this.syncApiBase,
191
+ baseUri: this.apiRootBase,
192
192
  relativePath: (0, endpoints_1.getAppVerificationTokenEndpoint)(appId),
193
193
  apiToken: this.authToken,
194
194
  customFetch: this.customFetch,
@@ -200,7 +200,7 @@ class AppClient extends base_client_1.BaseClient {
200
200
  zod_1.z.string().parse(appId);
201
201
  const response = await (0, http_client_1.request)({
202
202
  httpMethod: 'DELETE',
203
- baseUri: this.syncApiBase,
203
+ baseUri: this.apiRootBase,
204
204
  relativePath: (0, endpoints_1.getAppVerificationTokenEndpoint)(appId),
205
205
  apiToken: this.authToken,
206
206
  customFetch: this.customFetch,
@@ -212,7 +212,7 @@ class AppClient extends base_client_1.BaseClient {
212
212
  zod_1.z.string().parse(distributionToken);
213
213
  const response = await (0, http_client_1.request)({
214
214
  httpMethod: 'GET',
215
- baseUri: this.syncApiBase,
215
+ baseUri: this.apiRootBase,
216
216
  relativePath: (0, endpoints_1.getAppByDistributionTokenEndpoint)(distributionToken),
217
217
  apiToken: this.authToken,
218
218
  customFetch: this.customFetch,
@@ -225,7 +225,7 @@ class AppClient extends base_client_1.BaseClient {
225
225
  zod_1.z.string().parse(appId);
226
226
  const response = await (0, http_client_1.request)({
227
227
  httpMethod: 'GET',
228
- baseUri: this.syncApiBase,
228
+ baseUri: this.apiRootBase,
229
229
  relativePath: (0, endpoints_1.getAppWebhookEndpoint)(appId),
230
230
  apiToken: this.authToken,
231
231
  customFetch: this.customFetch,
@@ -237,7 +237,7 @@ class AppClient extends base_client_1.BaseClient {
237
237
  const { appId, events } = args, rest = __rest(args, ["appId", "events"]);
238
238
  const response = await (0, http_client_1.request)({
239
239
  httpMethod: 'POST',
240
- baseUri: this.syncApiBase,
240
+ baseUri: this.apiRootBase,
241
241
  relativePath: (0, endpoints_1.getAppWebhookEndpoint)(appId),
242
242
  apiToken: this.authToken,
243
243
  customFetch: this.customFetch,
@@ -250,7 +250,7 @@ class AppClient extends base_client_1.BaseClient {
250
250
  zod_1.z.string().parse(appId);
251
251
  const response = await (0, http_client_1.request)({
252
252
  httpMethod: 'DELETE',
253
- baseUri: this.syncApiBase,
253
+ baseUri: this.apiRootBase,
254
254
  relativePath: (0, endpoints_1.getAppWebhookEndpoint)(appId),
255
255
  apiToken: this.authToken,
256
256
  customFetch: this.customFetch,
@@ -262,7 +262,7 @@ class AppClient extends base_client_1.BaseClient {
262
262
  async getAppInstallations(requestId) {
263
263
  const response = await (0, http_client_1.request)({
264
264
  httpMethod: 'GET',
265
- baseUri: this.syncApiBase,
265
+ baseUri: this.apiRootBase,
266
266
  relativePath: endpoints_1.ENDPOINT_REST_APPS_INSTALLATIONS,
267
267
  apiToken: this.authToken,
268
268
  customFetch: this.customFetch,
@@ -273,7 +273,7 @@ class AppClient extends base_client_1.BaseClient {
273
273
  async installApp(args, requestId) {
274
274
  const response = await (0, http_client_1.request)({
275
275
  httpMethod: 'POST',
276
- baseUri: this.syncApiBase,
276
+ baseUri: this.apiRootBase,
277
277
  relativePath: endpoints_1.ENDPOINT_REST_APPS_INSTALLATIONS,
278
278
  apiToken: this.authToken,
279
279
  customFetch: this.customFetch,
@@ -286,7 +286,7 @@ class AppClient extends base_client_1.BaseClient {
286
286
  zod_1.z.string().parse(installationId);
287
287
  const response = await (0, http_client_1.request)({
288
288
  httpMethod: 'GET',
289
- baseUri: this.syncApiBase,
289
+ baseUri: this.apiRootBase,
290
290
  relativePath: (0, endpoints_1.getAppInstallationEndpoint)(installationId),
291
291
  apiToken: this.authToken,
292
292
  customFetch: this.customFetch,
@@ -298,7 +298,7 @@ class AppClient extends base_client_1.BaseClient {
298
298
  zod_1.z.string().parse(installationId);
299
299
  const response = await (0, http_client_1.request)({
300
300
  httpMethod: 'POST',
301
- baseUri: this.syncApiBase,
301
+ baseUri: this.apiRootBase,
302
302
  relativePath: (0, endpoints_1.getAppInstallationEndpoint)(installationId),
303
303
  apiToken: this.authToken,
304
304
  customFetch: this.customFetch,
@@ -311,7 +311,7 @@ class AppClient extends base_client_1.BaseClient {
311
311
  zod_1.z.string().parse(installationId);
312
312
  const response = await (0, http_client_1.request)({
313
313
  httpMethod: 'DELETE',
314
- baseUri: this.syncApiBase,
314
+ baseUri: this.apiRootBase,
315
315
  relativePath: (0, endpoints_1.getAppInstallationEndpoint)(installationId),
316
316
  apiToken: this.authToken,
317
317
  customFetch: this.customFetch,
@@ -323,7 +323,7 @@ class AppClient extends base_client_1.BaseClient {
323
323
  async getUserAuthorizations(requestId) {
324
324
  const response = await (0, http_client_1.request)({
325
325
  httpMethod: 'GET',
326
- baseUri: this.syncApiBase,
326
+ baseUri: this.apiRootBase,
327
327
  relativePath: endpoints_1.ENDPOINT_REST_USER_AUTHORIZATIONS,
328
328
  apiToken: this.authToken,
329
329
  customFetch: this.customFetch,
@@ -334,7 +334,7 @@ class AppClient extends base_client_1.BaseClient {
334
334
  async revokeUserAuthorization(args, requestId) {
335
335
  const response = await (0, http_client_1.request)({
336
336
  httpMethod: 'POST',
337
- baseUri: this.syncApiBase,
337
+ baseUri: this.apiRootBase,
338
338
  relativePath: endpoints_1.ENDPOINT_REST_USER_AUTHORIZATIONS_DELETE,
339
339
  apiToken: this.authToken,
340
340
  customFetch: this.customFetch,
@@ -17,6 +17,7 @@ class BaseClient {
17
17
  constructor(context) {
18
18
  this.authToken = context.authToken;
19
19
  this.syncApiBase = context.syncApiBase;
20
+ this.apiRootBase = new URL('/', context.syncApiBase).toString();
20
21
  this.customFetch = context.customFetch;
21
22
  }
22
23
  get syncContext() {
@@ -20,7 +20,7 @@ class UiExtensionClient extends base_client_1.BaseClient {
20
20
  zod_1.z.string().parse(uiExtensionId);
21
21
  const response = await (0, http_client_1.request)({
22
22
  httpMethod: 'GET',
23
- baseUri: this.syncApiBase,
23
+ baseUri: this.apiRootBase,
24
24
  relativePath: (0, endpoints_1.getUiExtensionEndpoint)(uiExtensionId),
25
25
  apiToken: this.authToken,
26
26
  customFetch: this.customFetch,
@@ -31,7 +31,7 @@ class UiExtensionClient extends base_client_1.BaseClient {
31
31
  async getInstalledUiExtensions(requestId) {
32
32
  const response = await (0, http_client_1.request)({
33
33
  httpMethod: 'GET',
34
- baseUri: this.syncApiBase,
34
+ baseUri: this.apiRootBase,
35
35
  relativePath: endpoints_1.ENDPOINT_REST_APPS_UI_EXTENSIONS_INSTALLED,
36
36
  apiToken: this.authToken,
37
37
  customFetch: this.customFetch,
@@ -43,7 +43,7 @@ class UiExtensionClient extends base_client_1.BaseClient {
43
43
  zod_1.z.string().parse(appId);
44
44
  const response = await (0, http_client_1.request)({
45
45
  httpMethod: 'GET',
46
- baseUri: this.syncApiBase,
46
+ baseUri: this.apiRootBase,
47
47
  relativePath: (0, endpoints_1.getUiExtensionsByIntegrationEndpoint)(appId),
48
48
  apiToken: this.authToken,
49
49
  customFetch: this.customFetch,
@@ -54,7 +54,7 @@ class UiExtensionClient extends base_client_1.BaseClient {
54
54
  async addUiExtension(args, requestId) {
55
55
  const response = await (0, http_client_1.request)({
56
56
  httpMethod: 'POST',
57
- baseUri: this.syncApiBase,
57
+ baseUri: this.apiRootBase,
58
58
  relativePath: endpoints_1.ENDPOINT_REST_APPS_UI_EXTENSIONS,
59
59
  apiToken: this.authToken,
60
60
  customFetch: this.customFetch,
@@ -67,7 +67,7 @@ class UiExtensionClient extends base_client_1.BaseClient {
67
67
  zod_1.z.string().parse(uiExtensionId);
68
68
  const response = await (0, http_client_1.request)({
69
69
  httpMethod: 'PATCH',
70
- baseUri: this.syncApiBase,
70
+ baseUri: this.apiRootBase,
71
71
  relativePath: (0, endpoints_1.getUiExtensionEndpoint)(uiExtensionId),
72
72
  apiToken: this.authToken,
73
73
  customFetch: this.customFetch,
@@ -80,7 +80,7 @@ class UiExtensionClient extends base_client_1.BaseClient {
80
80
  zod_1.z.string().parse(uiExtensionId);
81
81
  const response = await (0, http_client_1.request)({
82
82
  httpMethod: 'DELETE',
83
- baseUri: this.syncApiBase,
83
+ baseUri: this.apiRootBase,
84
84
  relativePath: (0, endpoints_1.getUiExtensionEndpoint)(uiExtensionId),
85
85
  apiToken: this.authToken,
86
86
  customFetch: this.customFetch,
@@ -94,7 +94,7 @@ class UiExtensionClient extends base_client_1.BaseClient {
94
94
  throw new Error('Cannot upload empty image file');
95
95
  }
96
96
  const data = await (0, multipart_upload_1.uploadMultipartFile)({
97
- baseUrl: this.syncApiBase,
97
+ baseUrl: this.apiRootBase,
98
98
  authToken: this.authToken,
99
99
  endpoint: (0, endpoints_1.getUiExtensionIconEndpoint)(args.uiExtensionId),
100
100
  file: args.file,
@@ -3,6 +3,7 @@ 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
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
+ exports.getApiRootBaseUri = getApiRootBaseUri;
6
7
  exports.getAuthBaseUri = getAuthBaseUri;
7
8
  exports.getWorkspaceInvitationAcceptEndpoint = getWorkspaceInvitationAcceptEndpoint;
8
9
  exports.getWorkspaceInvitationRejectEndpoint = getWorkspaceInvitationRejectEndpoint;
@@ -42,6 +43,9 @@ const API_AUTHORIZATION_BASE_URI = '/oauth/';
42
43
  function getSyncBaseUri(domainBase = BASE_URI) {
43
44
  return new URL(exports.API_BASE_URI, domainBase).toString();
44
45
  }
46
+ function getApiRootBaseUri(domainBase = BASE_URI) {
47
+ return new URL('/', domainBase).toString();
48
+ }
45
49
  function getAuthBaseUri(domainBase = TODOIST_URI) {
46
50
  return new URL(API_AUTHORIZATION_BASE_URI, domainBase).toString();
47
51
  }
@@ -27,10 +27,10 @@ exports.SyncWorkspaceSchema = zod_1.z
27
27
  id: common_1.StringOrNumberSchema,
28
28
  name: zod_1.z.string(),
29
29
  description: zod_1.z.string(),
30
- logoBig: zod_1.z.string().optional(),
31
- logoMedium: zod_1.z.string().optional(),
32
- logoSmall: zod_1.z.string().optional(),
33
- logoS640: zod_1.z.string().optional(),
30
+ logoBig: zod_1.z.string().nullish(),
31
+ logoMedium: zod_1.z.string().nullish(),
32
+ logoSmall: zod_1.z.string().nullish(),
33
+ logoS640: zod_1.z.string().nullish(),
34
34
  creatorId: common_1.StringOrNumberSchema,
35
35
  createdAt: zod_1.z.coerce.date().optional(),
36
36
  dateCreated: zod_1.z.coerce.date().optional(),
@@ -53,11 +53,11 @@ exports.SyncWorkspaceSchema = zod_1.z
53
53
  .optional(),
54
54
  currentTemplateCount: zod_1.z.number().nullable(),
55
55
  pendingInvitations: zod_1.z.array(zod_1.z.string()).nullable().optional(),
56
- domainName: zod_1.z.string().optional(),
57
- domainDiscovery: zod_1.z.boolean().optional(),
58
- restrictEmailDomains: zod_1.z.boolean().optional(),
56
+ domainName: zod_1.z.string().nullish(),
57
+ domainDiscovery: zod_1.z.boolean().nullish(),
58
+ restrictEmailDomains: zod_1.z.boolean().nullish(),
59
59
  adminSortingApplied: zod_1.z.boolean(),
60
- projectSortPreference: zod_1.z.string().optional(),
60
+ projectSortPreference: zod_1.z.string().nullish(),
61
61
  defaultCollaborators: zod_1.z
62
62
  .object({
63
63
  predefinedGroupIds: zod_1.z.array(zod_1.z.string()),
@@ -29,7 +29,7 @@ export class AppClient extends BaseClient {
29
29
  async getApps(requestId) {
30
30
  const response = await request({
31
31
  httpMethod: 'GET',
32
- baseUri: this.syncApiBase,
32
+ baseUri: this.apiRootBase,
33
33
  relativePath: ENDPOINT_REST_APPS,
34
34
  apiToken: this.authToken,
35
35
  customFetch: this.customFetch,
@@ -41,7 +41,7 @@ export class AppClient extends BaseClient {
41
41
  z.string().parse(appId);
42
42
  const response = await request({
43
43
  httpMethod: 'GET',
44
- baseUri: this.syncApiBase,
44
+ baseUri: this.apiRootBase,
45
45
  relativePath: getAppEndpoint(appId),
46
46
  apiToken: this.authToken,
47
47
  customFetch: this.customFetch,
@@ -52,7 +52,7 @@ export class AppClient extends BaseClient {
52
52
  async addApp(args, requestId) {
53
53
  const response = await request({
54
54
  httpMethod: 'POST',
55
- baseUri: this.syncApiBase,
55
+ baseUri: this.apiRootBase,
56
56
  relativePath: ENDPOINT_REST_APPS,
57
57
  apiToken: this.authToken,
58
58
  customFetch: this.customFetch,
@@ -70,7 +70,7 @@ export class AppClient extends BaseClient {
70
70
  }
71
71
  const response = await request({
72
72
  httpMethod: 'POST',
73
- baseUri: this.syncApiBase,
73
+ baseUri: this.apiRootBase,
74
74
  relativePath: getAppEndpoint(appId),
75
75
  apiToken: this.authToken,
76
76
  customFetch: this.customFetch,
@@ -83,7 +83,7 @@ export class AppClient extends BaseClient {
83
83
  z.string().parse(appId);
84
84
  const response = await request({
85
85
  httpMethod: 'DELETE',
86
- baseUri: this.syncApiBase,
86
+ baseUri: this.apiRootBase,
87
87
  relativePath: getAppEndpoint(appId),
88
88
  apiToken: this.authToken,
89
89
  customFetch: this.customFetch,
@@ -95,7 +95,7 @@ export class AppClient extends BaseClient {
95
95
  z.string().parse(appId);
96
96
  const response = await request({
97
97
  httpMethod: 'GET',
98
- baseUri: this.syncApiBase,
98
+ baseUri: this.apiRootBase,
99
99
  relativePath: getAppSecretsEndpoint(appId),
100
100
  apiToken: this.authToken,
101
101
  customFetch: this.customFetch,
@@ -107,7 +107,7 @@ export class AppClient extends BaseClient {
107
107
  z.string().parse(appId);
108
108
  const response = await request({
109
109
  httpMethod: 'DELETE',
110
- baseUri: this.syncApiBase,
110
+ baseUri: this.apiRootBase,
111
111
  relativePath: getAppClientSecretEndpoint(appId),
112
112
  apiToken: this.authToken,
113
113
  customFetch: this.customFetch,
@@ -119,7 +119,7 @@ export class AppClient extends BaseClient {
119
119
  z.string().parse(appId);
120
120
  const response = await request({
121
121
  httpMethod: 'DELETE',
122
- baseUri: this.syncApiBase,
122
+ baseUri: this.apiRootBase,
123
123
  relativePath: getAppTokensEndpoint(appId),
124
124
  apiToken: this.authToken,
125
125
  customFetch: this.customFetch,
@@ -134,7 +134,7 @@ export class AppClient extends BaseClient {
134
134
  }
135
135
  const size = (_a = args.size) !== null && _a !== void 0 ? _a : 'medium';
136
136
  const data = await uploadMultipartFile({
137
- baseUrl: this.syncApiBase,
137
+ baseUrl: this.apiRootBase,
138
138
  authToken: this.authToken,
139
139
  endpoint: getAppIconEndpoint(args.appId, size),
140
140
  file: args.file,
@@ -149,7 +149,7 @@ export class AppClient extends BaseClient {
149
149
  z.string().parse(appId);
150
150
  const response = await request({
151
151
  httpMethod: 'GET',
152
- baseUri: this.syncApiBase,
152
+ baseUri: this.apiRootBase,
153
153
  relativePath: getAppTestTokenEndpoint(appId),
154
154
  apiToken: this.authToken,
155
155
  customFetch: this.customFetch,
@@ -161,7 +161,7 @@ export class AppClient extends BaseClient {
161
161
  z.string().parse(appId);
162
162
  const response = await request({
163
163
  httpMethod: 'PUT',
164
- baseUri: this.syncApiBase,
164
+ baseUri: this.apiRootBase,
165
165
  relativePath: getAppTestTokenEndpoint(appId),
166
166
  apiToken: this.authToken,
167
167
  customFetch: this.customFetch,
@@ -173,7 +173,7 @@ export class AppClient extends BaseClient {
173
173
  z.string().parse(appId);
174
174
  const response = await request({
175
175
  httpMethod: 'GET',
176
- baseUri: this.syncApiBase,
176
+ baseUri: this.apiRootBase,
177
177
  relativePath: getAppDistributionTokenEndpoint(appId),
178
178
  apiToken: this.authToken,
179
179
  customFetch: this.customFetch,
@@ -185,7 +185,7 @@ export class AppClient extends BaseClient {
185
185
  z.string().parse(appId);
186
186
  const response = await request({
187
187
  httpMethod: 'GET',
188
- baseUri: this.syncApiBase,
188
+ baseUri: this.apiRootBase,
189
189
  relativePath: getAppVerificationTokenEndpoint(appId),
190
190
  apiToken: this.authToken,
191
191
  customFetch: this.customFetch,
@@ -197,7 +197,7 @@ export class AppClient extends BaseClient {
197
197
  z.string().parse(appId);
198
198
  const response = await request({
199
199
  httpMethod: 'DELETE',
200
- baseUri: this.syncApiBase,
200
+ baseUri: this.apiRootBase,
201
201
  relativePath: getAppVerificationTokenEndpoint(appId),
202
202
  apiToken: this.authToken,
203
203
  customFetch: this.customFetch,
@@ -209,7 +209,7 @@ export class AppClient extends BaseClient {
209
209
  z.string().parse(distributionToken);
210
210
  const response = await request({
211
211
  httpMethod: 'GET',
212
- baseUri: this.syncApiBase,
212
+ baseUri: this.apiRootBase,
213
213
  relativePath: getAppByDistributionTokenEndpoint(distributionToken),
214
214
  apiToken: this.authToken,
215
215
  customFetch: this.customFetch,
@@ -222,7 +222,7 @@ export class AppClient extends BaseClient {
222
222
  z.string().parse(appId);
223
223
  const response = await request({
224
224
  httpMethod: 'GET',
225
- baseUri: this.syncApiBase,
225
+ baseUri: this.apiRootBase,
226
226
  relativePath: getAppWebhookEndpoint(appId),
227
227
  apiToken: this.authToken,
228
228
  customFetch: this.customFetch,
@@ -234,7 +234,7 @@ export class AppClient extends BaseClient {
234
234
  const { appId, events } = args, rest = __rest(args, ["appId", "events"]);
235
235
  const response = await request({
236
236
  httpMethod: 'POST',
237
- baseUri: this.syncApiBase,
237
+ baseUri: this.apiRootBase,
238
238
  relativePath: getAppWebhookEndpoint(appId),
239
239
  apiToken: this.authToken,
240
240
  customFetch: this.customFetch,
@@ -247,7 +247,7 @@ export class AppClient extends BaseClient {
247
247
  z.string().parse(appId);
248
248
  const response = await request({
249
249
  httpMethod: 'DELETE',
250
- baseUri: this.syncApiBase,
250
+ baseUri: this.apiRootBase,
251
251
  relativePath: getAppWebhookEndpoint(appId),
252
252
  apiToken: this.authToken,
253
253
  customFetch: this.customFetch,
@@ -259,7 +259,7 @@ export class AppClient extends BaseClient {
259
259
  async getAppInstallations(requestId) {
260
260
  const response = await request({
261
261
  httpMethod: 'GET',
262
- baseUri: this.syncApiBase,
262
+ baseUri: this.apiRootBase,
263
263
  relativePath: ENDPOINT_REST_APPS_INSTALLATIONS,
264
264
  apiToken: this.authToken,
265
265
  customFetch: this.customFetch,
@@ -270,7 +270,7 @@ export class AppClient extends BaseClient {
270
270
  async installApp(args, requestId) {
271
271
  const response = await request({
272
272
  httpMethod: 'POST',
273
- baseUri: this.syncApiBase,
273
+ baseUri: this.apiRootBase,
274
274
  relativePath: ENDPOINT_REST_APPS_INSTALLATIONS,
275
275
  apiToken: this.authToken,
276
276
  customFetch: this.customFetch,
@@ -283,7 +283,7 @@ export class AppClient extends BaseClient {
283
283
  z.string().parse(installationId);
284
284
  const response = await request({
285
285
  httpMethod: 'GET',
286
- baseUri: this.syncApiBase,
286
+ baseUri: this.apiRootBase,
287
287
  relativePath: getAppInstallationEndpoint(installationId),
288
288
  apiToken: this.authToken,
289
289
  customFetch: this.customFetch,
@@ -295,7 +295,7 @@ export class AppClient extends BaseClient {
295
295
  z.string().parse(installationId);
296
296
  const response = await request({
297
297
  httpMethod: 'POST',
298
- baseUri: this.syncApiBase,
298
+ baseUri: this.apiRootBase,
299
299
  relativePath: getAppInstallationEndpoint(installationId),
300
300
  apiToken: this.authToken,
301
301
  customFetch: this.customFetch,
@@ -308,7 +308,7 @@ export class AppClient extends BaseClient {
308
308
  z.string().parse(installationId);
309
309
  const response = await request({
310
310
  httpMethod: 'DELETE',
311
- baseUri: this.syncApiBase,
311
+ baseUri: this.apiRootBase,
312
312
  relativePath: getAppInstallationEndpoint(installationId),
313
313
  apiToken: this.authToken,
314
314
  customFetch: this.customFetch,
@@ -320,7 +320,7 @@ export class AppClient extends BaseClient {
320
320
  async getUserAuthorizations(requestId) {
321
321
  const response = await request({
322
322
  httpMethod: 'GET',
323
- baseUri: this.syncApiBase,
323
+ baseUri: this.apiRootBase,
324
324
  relativePath: ENDPOINT_REST_USER_AUTHORIZATIONS,
325
325
  apiToken: this.authToken,
326
326
  customFetch: this.customFetch,
@@ -331,7 +331,7 @@ export class AppClient extends BaseClient {
331
331
  async revokeUserAuthorization(args, requestId) {
332
332
  const response = await request({
333
333
  httpMethod: 'POST',
334
- baseUri: this.syncApiBase,
334
+ baseUri: this.apiRootBase,
335
335
  relativePath: ENDPOINT_REST_USER_AUTHORIZATIONS_DELETE,
336
336
  apiToken: this.authToken,
337
337
  customFetch: this.customFetch,
@@ -14,6 +14,7 @@ export class BaseClient {
14
14
  constructor(context) {
15
15
  this.authToken = context.authToken;
16
16
  this.syncApiBase = context.syncApiBase;
17
+ this.apiRootBase = new URL('/', context.syncApiBase).toString();
17
18
  this.customFetch = context.customFetch;
18
19
  }
19
20
  get syncContext() {
@@ -17,7 +17,7 @@ export class UiExtensionClient extends BaseClient {
17
17
  z.string().parse(uiExtensionId);
18
18
  const response = await request({
19
19
  httpMethod: 'GET',
20
- baseUri: this.syncApiBase,
20
+ baseUri: this.apiRootBase,
21
21
  relativePath: getUiExtensionEndpoint(uiExtensionId),
22
22
  apiToken: this.authToken,
23
23
  customFetch: this.customFetch,
@@ -28,7 +28,7 @@ export class UiExtensionClient extends BaseClient {
28
28
  async getInstalledUiExtensions(requestId) {
29
29
  const response = await request({
30
30
  httpMethod: 'GET',
31
- baseUri: this.syncApiBase,
31
+ baseUri: this.apiRootBase,
32
32
  relativePath: ENDPOINT_REST_APPS_UI_EXTENSIONS_INSTALLED,
33
33
  apiToken: this.authToken,
34
34
  customFetch: this.customFetch,
@@ -40,7 +40,7 @@ export class UiExtensionClient extends BaseClient {
40
40
  z.string().parse(appId);
41
41
  const response = await request({
42
42
  httpMethod: 'GET',
43
- baseUri: this.syncApiBase,
43
+ baseUri: this.apiRootBase,
44
44
  relativePath: getUiExtensionsByIntegrationEndpoint(appId),
45
45
  apiToken: this.authToken,
46
46
  customFetch: this.customFetch,
@@ -51,7 +51,7 @@ export class UiExtensionClient extends BaseClient {
51
51
  async addUiExtension(args, requestId) {
52
52
  const response = await request({
53
53
  httpMethod: 'POST',
54
- baseUri: this.syncApiBase,
54
+ baseUri: this.apiRootBase,
55
55
  relativePath: ENDPOINT_REST_APPS_UI_EXTENSIONS,
56
56
  apiToken: this.authToken,
57
57
  customFetch: this.customFetch,
@@ -64,7 +64,7 @@ export class UiExtensionClient extends BaseClient {
64
64
  z.string().parse(uiExtensionId);
65
65
  const response = await request({
66
66
  httpMethod: 'PATCH',
67
- baseUri: this.syncApiBase,
67
+ baseUri: this.apiRootBase,
68
68
  relativePath: getUiExtensionEndpoint(uiExtensionId),
69
69
  apiToken: this.authToken,
70
70
  customFetch: this.customFetch,
@@ -77,7 +77,7 @@ export class UiExtensionClient extends BaseClient {
77
77
  z.string().parse(uiExtensionId);
78
78
  const response = await request({
79
79
  httpMethod: 'DELETE',
80
- baseUri: this.syncApiBase,
80
+ baseUri: this.apiRootBase,
81
81
  relativePath: getUiExtensionEndpoint(uiExtensionId),
82
82
  apiToken: this.authToken,
83
83
  customFetch: this.customFetch,
@@ -91,7 +91,7 @@ export class UiExtensionClient extends BaseClient {
91
91
  throw new Error('Cannot upload empty image file');
92
92
  }
93
93
  const data = await uploadMultipartFile({
94
- baseUrl: this.syncApiBase,
94
+ baseUrl: this.apiRootBase,
95
95
  authToken: this.authToken,
96
96
  endpoint: getUiExtensionIconEndpoint(args.uiExtensionId),
97
97
  file: args.file,
@@ -9,6 +9,9 @@ const API_AUTHORIZATION_BASE_URI = '/oauth/';
9
9
  export function getSyncBaseUri(domainBase = BASE_URI) {
10
10
  return new URL(API_BASE_URI, domainBase).toString();
11
11
  }
12
+ export function getApiRootBaseUri(domainBase = BASE_URI) {
13
+ return new URL('/', domainBase).toString();
14
+ }
12
15
  export function getAuthBaseUri(domainBase = TODOIST_URI) {
13
16
  return new URL(API_AUTHORIZATION_BASE_URI, domainBase).toString();
14
17
  }
@@ -24,10 +24,10 @@ export const SyncWorkspaceSchema = z
24
24
  id: StringOrNumberSchema,
25
25
  name: z.string(),
26
26
  description: z.string(),
27
- logoBig: z.string().optional(),
28
- logoMedium: z.string().optional(),
29
- logoSmall: z.string().optional(),
30
- logoS640: z.string().optional(),
27
+ logoBig: z.string().nullish(),
28
+ logoMedium: z.string().nullish(),
29
+ logoSmall: z.string().nullish(),
30
+ logoS640: z.string().nullish(),
31
31
  creatorId: StringOrNumberSchema,
32
32
  createdAt: z.coerce.date().optional(),
33
33
  dateCreated: z.coerce.date().optional(),
@@ -50,11 +50,11 @@ export const SyncWorkspaceSchema = z
50
50
  .optional(),
51
51
  currentTemplateCount: z.number().nullable(),
52
52
  pendingInvitations: z.array(z.string()).nullable().optional(),
53
- domainName: z.string().optional(),
54
- domainDiscovery: z.boolean().optional(),
55
- restrictEmailDomains: z.boolean().optional(),
53
+ domainName: z.string().nullish(),
54
+ domainDiscovery: z.boolean().nullish(),
55
+ restrictEmailDomains: z.boolean().nullish(),
56
56
  adminSortingApplied: z.boolean(),
57
- projectSortPreference: z.string().optional(),
57
+ projectSortPreference: z.string().nullish(),
58
58
  defaultCollaborators: z
59
59
  .object({
60
60
  predefinedGroupIds: z.array(z.string()),
@@ -15,6 +15,7 @@ import type { CustomFetch } from '../types/http.js';
15
15
  export declare abstract class BaseClient {
16
16
  protected readonly authToken: string;
17
17
  protected readonly syncApiBase: string;
18
+ protected readonly apiRootBase: string;
18
19
  protected readonly customFetch?: CustomFetch;
19
20
  constructor(context: SyncRequestContext);
20
21
  protected get syncContext(): SyncRequestContext;
@@ -2,6 +2,7 @@ export declare const TODOIST_WEB_URI = "https://app.todoist.com/app";
2
2
  export declare const API_VERSION = "v1";
3
3
  export declare const API_BASE_URI = "/api/v1/";
4
4
  export declare function getSyncBaseUri(domainBase?: string): string;
5
+ export declare function getApiRootBaseUri(domainBase?: string): string;
5
6
  export declare function getAuthBaseUri(domainBase?: string): string;
6
7
  export declare const ENDPOINT_REST_TASKS = "tasks";
7
8
  export declare const ENDPOINT_REST_TASKS_FILTER: string;
@@ -10,10 +10,10 @@ export declare const SyncWorkspaceSchema: z.ZodPipe<z.ZodObject<{
10
10
  id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
11
11
  name: z.ZodString;
12
12
  description: z.ZodString;
13
- logoBig: z.ZodOptional<z.ZodString>;
14
- logoMedium: z.ZodOptional<z.ZodString>;
15
- logoSmall: z.ZodOptional<z.ZodString>;
16
- logoS640: z.ZodOptional<z.ZodString>;
13
+ logoBig: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ logoMedium: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ logoSmall: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ logoS640: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
17
  creatorId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
18
18
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
19
19
  dateCreated: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -44,11 +44,11 @@ export declare const SyncWorkspaceSchema: z.ZodPipe<z.ZodObject<{
44
44
  }, z.core.$strip>>;
45
45
  currentTemplateCount: z.ZodNullable<z.ZodNumber>;
46
46
  pendingInvitations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
47
- domainName: z.ZodOptional<z.ZodString>;
48
- domainDiscovery: z.ZodOptional<z.ZodBoolean>;
49
- restrictEmailDomains: z.ZodOptional<z.ZodBoolean>;
47
+ domainName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
+ domainDiscovery: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
49
+ restrictEmailDomains: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
50
50
  adminSortingApplied: z.ZodBoolean;
51
- projectSortPreference: z.ZodOptional<z.ZodString>;
51
+ projectSortPreference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
52
  defaultCollaborators: z.ZodOptional<z.ZodObject<{
53
53
  predefinedGroupIds: z.ZodArray<z.ZodString>;
54
54
  userIds: z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
@@ -67,10 +67,10 @@ export declare const SyncWorkspaceSchema: z.ZodPipe<z.ZodObject<{
67
67
  currentMemberCount: number | null;
68
68
  currentTemplateCount: number | null;
69
69
  adminSortingApplied: boolean;
70
- logoBig?: string | undefined;
71
- logoMedium?: string | undefined;
72
- logoSmall?: string | undefined;
73
- logoS640?: string | undefined;
70
+ logoBig?: string | null | undefined;
71
+ logoMedium?: string | null | undefined;
72
+ logoSmall?: string | null | undefined;
73
+ logoS640?: string | null | undefined;
74
74
  role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
75
75
  limits?: {
76
76
  [x: string]: any;
@@ -86,10 +86,10 @@ export declare const SyncWorkspaceSchema: z.ZodPipe<z.ZodObject<{
86
86
  memberCount: number;
87
87
  } | undefined;
88
88
  pendingInvitations?: string[] | null | undefined;
89
- domainName?: string | undefined;
90
- domainDiscovery?: boolean | undefined;
91
- restrictEmailDomains?: boolean | undefined;
92
- projectSortPreference?: string | undefined;
89
+ domainName?: string | null | undefined;
90
+ domainDiscovery?: boolean | null | undefined;
91
+ restrictEmailDomains?: boolean | null | undefined;
92
+ projectSortPreference?: string | null | undefined;
93
93
  defaultCollaborators?: {
94
94
  predefinedGroupIds: string[];
95
95
  userIds: string[];
@@ -108,10 +108,10 @@ export declare const SyncWorkspaceSchema: z.ZodPipe<z.ZodObject<{
108
108
  currentMemberCount: number | null;
109
109
  currentTemplateCount: number | null;
110
110
  adminSortingApplied: boolean;
111
- logoBig?: string | undefined;
112
- logoMedium?: string | undefined;
113
- logoSmall?: string | undefined;
114
- logoS640?: string | undefined;
111
+ logoBig?: string | null | undefined;
112
+ logoMedium?: string | null | undefined;
113
+ logoSmall?: string | null | undefined;
114
+ logoS640?: string | null | undefined;
115
115
  createdAt?: Date | undefined;
116
116
  dateCreated?: Date | undefined;
117
117
  role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
@@ -129,10 +129,10 @@ export declare const SyncWorkspaceSchema: z.ZodPipe<z.ZodObject<{
129
129
  memberCount: number;
130
130
  } | undefined;
131
131
  pendingInvitations?: string[] | null | undefined;
132
- domainName?: string | undefined;
133
- domainDiscovery?: boolean | undefined;
134
- restrictEmailDomains?: boolean | undefined;
135
- projectSortPreference?: string | undefined;
132
+ domainName?: string | null | undefined;
133
+ domainDiscovery?: boolean | null | undefined;
134
+ restrictEmailDomains?: boolean | null | undefined;
135
+ projectSortPreference?: string | null | undefined;
136
136
  defaultCollaborators?: {
137
137
  predefinedGroupIds: string[];
138
138
  userIds: string[];
@@ -574,10 +574,10 @@ export declare const SyncResponseSchema: z.ZodObject<{
574
574
  id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
575
575
  name: z.ZodString;
576
576
  description: z.ZodString;
577
- logoBig: z.ZodOptional<z.ZodString>;
578
- logoMedium: z.ZodOptional<z.ZodString>;
579
- logoSmall: z.ZodOptional<z.ZodString>;
580
- logoS640: z.ZodOptional<z.ZodString>;
577
+ logoBig: z.ZodOptional<z.ZodNullable<z.ZodString>>;
578
+ logoMedium: z.ZodOptional<z.ZodNullable<z.ZodString>>;
579
+ logoSmall: z.ZodOptional<z.ZodNullable<z.ZodString>>;
580
+ logoS640: z.ZodOptional<z.ZodNullable<z.ZodString>>;
581
581
  creatorId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
582
582
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
583
583
  dateCreated: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -608,11 +608,11 @@ export declare const SyncResponseSchema: z.ZodObject<{
608
608
  }, z.core.$strip>>;
609
609
  currentTemplateCount: z.ZodNullable<z.ZodNumber>;
610
610
  pendingInvitations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
611
- domainName: z.ZodOptional<z.ZodString>;
612
- domainDiscovery: z.ZodOptional<z.ZodBoolean>;
613
- restrictEmailDomains: z.ZodOptional<z.ZodBoolean>;
611
+ domainName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
612
+ domainDiscovery: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
613
+ restrictEmailDomains: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
614
614
  adminSortingApplied: z.ZodBoolean;
615
- projectSortPreference: z.ZodOptional<z.ZodString>;
615
+ projectSortPreference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
616
616
  defaultCollaborators: z.ZodOptional<z.ZodObject<{
617
617
  predefinedGroupIds: z.ZodArray<z.ZodString>;
618
618
  userIds: z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
@@ -631,10 +631,10 @@ export declare const SyncResponseSchema: z.ZodObject<{
631
631
  currentMemberCount: number | null;
632
632
  currentTemplateCount: number | null;
633
633
  adminSortingApplied: boolean;
634
- logoBig?: string | undefined;
635
- logoMedium?: string | undefined;
636
- logoSmall?: string | undefined;
637
- logoS640?: string | undefined;
634
+ logoBig?: string | null | undefined;
635
+ logoMedium?: string | null | undefined;
636
+ logoSmall?: string | null | undefined;
637
+ logoS640?: string | null | undefined;
638
638
  role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
639
639
  limits?: {
640
640
  [x: string]: any;
@@ -650,10 +650,10 @@ export declare const SyncResponseSchema: z.ZodObject<{
650
650
  memberCount: number;
651
651
  } | undefined;
652
652
  pendingInvitations?: string[] | null | undefined;
653
- domainName?: string | undefined;
654
- domainDiscovery?: boolean | undefined;
655
- restrictEmailDomains?: boolean | undefined;
656
- projectSortPreference?: string | undefined;
653
+ domainName?: string | null | undefined;
654
+ domainDiscovery?: boolean | null | undefined;
655
+ restrictEmailDomains?: boolean | null | undefined;
656
+ projectSortPreference?: string | null | undefined;
657
657
  defaultCollaborators?: {
658
658
  predefinedGroupIds: string[];
659
659
  userIds: string[];
@@ -672,10 +672,10 @@ export declare const SyncResponseSchema: z.ZodObject<{
672
672
  currentMemberCount: number | null;
673
673
  currentTemplateCount: number | null;
674
674
  adminSortingApplied: boolean;
675
- logoBig?: string | undefined;
676
- logoMedium?: string | undefined;
677
- logoSmall?: string | undefined;
678
- logoS640?: string | undefined;
675
+ logoBig?: string | null | undefined;
676
+ logoMedium?: string | null | undefined;
677
+ logoSmall?: string | null | undefined;
678
+ logoS640?: string | null | undefined;
679
679
  createdAt?: Date | undefined;
680
680
  dateCreated?: Date | undefined;
681
681
  role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
@@ -693,10 +693,10 @@ export declare const SyncResponseSchema: z.ZodObject<{
693
693
  memberCount: number;
694
694
  } | undefined;
695
695
  pendingInvitations?: string[] | null | undefined;
696
- domainName?: string | undefined;
697
- domainDiscovery?: boolean | undefined;
698
- restrictEmailDomains?: boolean | undefined;
699
- projectSortPreference?: string | undefined;
696
+ domainName?: string | null | undefined;
697
+ domainDiscovery?: boolean | null | undefined;
698
+ restrictEmailDomains?: boolean | null | undefined;
699
+ projectSortPreference?: string | null | undefined;
700
700
  defaultCollaborators?: {
701
701
  predefinedGroupIds: string[];
702
702
  userIds: string[];
@@ -1268,10 +1268,10 @@ export declare const validateSyncWorkspace: (input: unknown) => {
1268
1268
  currentMemberCount: number | null;
1269
1269
  currentTemplateCount: number | null;
1270
1270
  adminSortingApplied: boolean;
1271
- logoBig?: string | undefined;
1272
- logoMedium?: string | undefined;
1273
- logoSmall?: string | undefined;
1274
- logoS640?: string | undefined;
1271
+ logoBig?: string | null | undefined;
1272
+ logoMedium?: string | null | undefined;
1273
+ logoSmall?: string | null | undefined;
1274
+ logoS640?: string | null | undefined;
1275
1275
  role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
1276
1276
  limits?: {
1277
1277
  [x: string]: any;
@@ -1287,10 +1287,10 @@ export declare const validateSyncWorkspace: (input: unknown) => {
1287
1287
  memberCount: number;
1288
1288
  } | undefined;
1289
1289
  pendingInvitations?: string[] | null | undefined;
1290
- domainName?: string | undefined;
1291
- domainDiscovery?: boolean | undefined;
1292
- restrictEmailDomains?: boolean | undefined;
1293
- projectSortPreference?: string | undefined;
1290
+ domainName?: string | null | undefined;
1291
+ domainDiscovery?: boolean | null | undefined;
1292
+ restrictEmailDomains?: boolean | null | undefined;
1293
+ projectSortPreference?: string | null | undefined;
1294
1294
  defaultCollaborators?: {
1295
1295
  predefinedGroupIds: string[];
1296
1296
  userIds: string[];
@@ -1309,10 +1309,10 @@ export declare const validateSyncWorkspace: (input: unknown) => {
1309
1309
  currentMemberCount: number | null;
1310
1310
  currentTemplateCount: number | null;
1311
1311
  adminSortingApplied: boolean;
1312
- logoBig?: string | undefined;
1313
- logoMedium?: string | undefined;
1314
- logoSmall?: string | undefined;
1315
- logoS640?: string | undefined;
1312
+ logoBig?: string | null | undefined;
1313
+ logoMedium?: string | null | undefined;
1314
+ logoSmall?: string | null | undefined;
1315
+ logoS640?: string | null | undefined;
1316
1316
  role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
1317
1317
  limits?: {
1318
1318
  [x: string]: any;
@@ -1328,10 +1328,10 @@ export declare const validateSyncWorkspace: (input: unknown) => {
1328
1328
  memberCount: number;
1329
1329
  } | undefined;
1330
1330
  pendingInvitations?: string[] | null | undefined;
1331
- domainName?: string | undefined;
1332
- domainDiscovery?: boolean | undefined;
1333
- restrictEmailDomains?: boolean | undefined;
1334
- projectSortPreference?: string | undefined;
1331
+ domainName?: string | null | undefined;
1332
+ domainDiscovery?: boolean | null | undefined;
1333
+ restrictEmailDomains?: boolean | null | undefined;
1334
+ projectSortPreference?: string | null | undefined;
1335
1335
  defaultCollaborators?: {
1336
1336
  predefinedGroupIds: string[];
1337
1337
  userIds: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doist/todoist-sdk",
3
- "version": "9.1.0",
3
+ "version": "9.1.2",
4
4
  "description": "The official TypeScript SDK for the Todoist REST API.",
5
5
  "author": "Doist developers",
6
6
  "repository": "https://github.com/Doist/todoist-sdk-typescript",
@@ -58,7 +58,7 @@
58
58
  "devDependencies": {
59
59
  "@semantic-release/changelog": "6.0.3",
60
60
  "@semantic-release/git": "10.0.1",
61
- "conventional-changelog-conventionalcommits": "9.3.0",
61
+ "conventional-changelog-conventionalcommits": "9.3.1",
62
62
  "dotenv": "17.3.1",
63
63
  "husky": "9.1.7",
64
64
  "lint-staged": "16.2.7",