@doist/todoist-sdk 14.0.0 → 14.0.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.
@@ -57,7 +57,7 @@ class CommentClient extends base_client_1.BaseClient {
57
57
  relativePath: endpoints_1.ENDPOINT_REST_COMMENTS,
58
58
  apiToken: this.authToken,
59
59
  customFetch: this.customFetch,
60
- payload: Object.assign(Object.assign({}, rest), (uidsToNotify ? { uidsToNotify: uidsToNotify.join(',') } : {})),
60
+ payload: Object.assign(Object.assign({}, rest), ((uidsToNotify === null || uidsToNotify === void 0 ? void 0 : uidsToNotify.length) ? { uidsToNotify } : {})),
61
61
  requestId: requestId,
62
62
  });
63
63
  return (0, validators_1.validateComment)(response.data);
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LiveNotificationSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
5
6
  /**
6
7
  * Live notification resource from the Sync API.
7
8
  *
@@ -13,7 +14,7 @@ const zod_1 = require("zod");
13
14
  exports.LiveNotificationSchema = zod_1.z.looseObject({
14
15
  id: zod_1.z.string(),
15
16
  createdAt: zod_1.z.coerce.date(),
16
- fromUid: zod_1.z.string(),
17
+ fromUid: zod_1.z.string().optional(),
17
18
  notificationType: zod_1.z.string(),
18
19
  isUnread: zod_1.z.boolean(),
19
20
  // Commonly present optional fields
@@ -21,13 +22,13 @@ exports.LiveNotificationSchema = zod_1.z.looseObject({
21
22
  invitationId: zod_1.z.string().optional(),
22
23
  itemId: zod_1.z.string().optional(),
23
24
  itemContent: zod_1.z.string().optional(),
24
- responsibleUid: zod_1.z.string().optional(),
25
- assignedByUid: zod_1.z.string().optional(),
25
+ responsibleUid: zod_1.z.string().nullable().optional(),
26
+ assignedByUid: zod_1.z.string().nullable().optional(),
26
27
  fromUser: zod_1.z
27
28
  .object({
28
29
  email: zod_1.z.string(),
29
30
  fullName: zod_1.z.string(),
30
- id: zod_1.z.string(),
31
+ id: common_1.StringOrNumberSchema,
31
32
  imageId: zod_1.z.string().nullable(),
32
33
  })
33
34
  .optional(),
@@ -54,7 +54,7 @@ export class CommentClient extends BaseClient {
54
54
  relativePath: ENDPOINT_REST_COMMENTS,
55
55
  apiToken: this.authToken,
56
56
  customFetch: this.customFetch,
57
- payload: Object.assign(Object.assign({}, rest), (uidsToNotify ? { uidsToNotify: uidsToNotify.join(',') } : {})),
57
+ payload: Object.assign(Object.assign({}, rest), ((uidsToNotify === null || uidsToNotify === void 0 ? void 0 : uidsToNotify.length) ? { uidsToNotify } : {})),
58
58
  requestId: requestId,
59
59
  });
60
60
  return validateComment(response.data);
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { StringOrNumberSchema } from '../../common.js';
2
3
  /**
3
4
  * Live notification resource from the Sync API.
4
5
  *
@@ -10,7 +11,7 @@ import { z } from 'zod';
10
11
  export const LiveNotificationSchema = z.looseObject({
11
12
  id: z.string(),
12
13
  createdAt: z.coerce.date(),
13
- fromUid: z.string(),
14
+ fromUid: z.string().optional(),
14
15
  notificationType: z.string(),
15
16
  isUnread: z.boolean(),
16
17
  // Commonly present optional fields
@@ -18,13 +19,13 @@ export const LiveNotificationSchema = z.looseObject({
18
19
  invitationId: z.string().optional(),
19
20
  itemId: z.string().optional(),
20
21
  itemContent: z.string().optional(),
21
- responsibleUid: z.string().optional(),
22
- assignedByUid: z.string().optional(),
22
+ responsibleUid: z.string().nullable().optional(),
23
+ assignedByUid: z.string().nullable().optional(),
23
24
  fromUser: z
24
25
  .object({
25
26
  email: z.string(),
26
27
  fullName: z.string(),
27
- id: z.string(),
28
+ id: StringOrNumberSchema,
28
29
  imageId: z.string().nullable(),
29
30
  })
30
31
  .optional(),
@@ -10,19 +10,19 @@ import { z } from 'zod';
10
10
  export declare const LiveNotificationSchema: z.ZodObject<{
11
11
  id: z.ZodString;
12
12
  createdAt: z.ZodCoercedDate<unknown>;
13
- fromUid: z.ZodString;
13
+ fromUid: z.ZodOptional<z.ZodString>;
14
14
  notificationType: z.ZodString;
15
15
  isUnread: z.ZodBoolean;
16
16
  projectId: z.ZodOptional<z.ZodString>;
17
17
  invitationId: z.ZodOptional<z.ZodString>;
18
18
  itemId: z.ZodOptional<z.ZodString>;
19
19
  itemContent: z.ZodOptional<z.ZodString>;
20
- responsibleUid: z.ZodOptional<z.ZodString>;
21
- assignedByUid: z.ZodOptional<z.ZodString>;
20
+ responsibleUid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
+ assignedByUid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
22
  fromUser: z.ZodOptional<z.ZodObject<{
23
23
  email: z.ZodString;
24
24
  fullName: z.ZodString;
25
- id: z.ZodString;
25
+ id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
26
26
  imageId: z.ZodNullable<z.ZodString>;
27
27
  }, z.core.$strip>>;
28
28
  projectName: z.ZodOptional<z.ZodString>;
@@ -465,19 +465,19 @@ export declare const SyncResponseSchema: z.ZodObject<{
465
465
  liveNotifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
466
466
  id: z.ZodString;
467
467
  createdAt: z.ZodCoercedDate<unknown>;
468
- fromUid: z.ZodString;
468
+ fromUid: z.ZodOptional<z.ZodString>;
469
469
  notificationType: z.ZodString;
470
470
  isUnread: z.ZodBoolean;
471
471
  projectId: z.ZodOptional<z.ZodString>;
472
472
  invitationId: z.ZodOptional<z.ZodString>;
473
473
  itemId: z.ZodOptional<z.ZodString>;
474
474
  itemContent: z.ZodOptional<z.ZodString>;
475
- responsibleUid: z.ZodOptional<z.ZodString>;
476
- assignedByUid: z.ZodOptional<z.ZodString>;
475
+ responsibleUid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
476
+ assignedByUid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
477
477
  fromUser: z.ZodOptional<z.ZodObject<{
478
478
  email: z.ZodString;
479
479
  fullName: z.ZodString;
480
- id: z.ZodString;
480
+ id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
481
481
  imageId: z.ZodNullable<z.ZodString>;
482
482
  }, z.core.$strip>>;
483
483
  projectName: z.ZodOptional<z.ZodString>;
@@ -1231,15 +1231,15 @@ export declare const validateLiveNotification: (input: unknown) => {
1231
1231
  [x: string]: unknown;
1232
1232
  id: string;
1233
1233
  createdAt: Date;
1234
- fromUid: string;
1235
1234
  notificationType: string;
1236
1235
  isUnread: boolean;
1236
+ fromUid?: string | undefined;
1237
1237
  projectId?: string | undefined;
1238
1238
  invitationId?: string | undefined;
1239
1239
  itemId?: string | undefined;
1240
1240
  itemContent?: string | undefined;
1241
- responsibleUid?: string | undefined;
1242
- assignedByUid?: string | undefined;
1241
+ responsibleUid?: string | null | undefined;
1242
+ assignedByUid?: string | null | undefined;
1243
1243
  fromUser?: {
1244
1244
  email: string;
1245
1245
  fullName: string;
@@ -1253,15 +1253,15 @@ export declare const validateLiveNotification: (input: unknown) => {
1253
1253
  [x: string]: unknown;
1254
1254
  id: string;
1255
1255
  createdAt: Date;
1256
- fromUid: string;
1257
1256
  notificationType: string;
1258
1257
  isUnread: boolean;
1258
+ fromUid?: string | undefined;
1259
1259
  projectId?: string | undefined;
1260
1260
  invitationId?: string | undefined;
1261
1261
  itemId?: string | undefined;
1262
1262
  itemContent?: string | undefined;
1263
- responsibleUid?: string | undefined;
1264
- assignedByUid?: string | undefined;
1263
+ responsibleUid?: string | null | undefined;
1264
+ assignedByUid?: string | null | undefined;
1265
1265
  fromUser?: {
1266
1266
  email: string;
1267
1267
  fullName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doist/todoist-sdk",
3
- "version": "14.0.0",
3
+ "version": "14.0.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",