@todoist/comms-sdk 5.0.0 → 5.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.
|
@@ -161,7 +161,9 @@ export class UsersClient extends BaseClient {
|
|
|
161
161
|
* ```
|
|
162
162
|
*/
|
|
163
163
|
update(args) {
|
|
164
|
-
|
|
164
|
+
const { name, ...rest } = args;
|
|
165
|
+
const payload = name === undefined ? rest : { ...rest, fullName: name };
|
|
166
|
+
return this.post(`${ENDPOINT_USERS}/update`, payload, UserSchema);
|
|
165
167
|
}
|
|
166
168
|
/**
|
|
167
169
|
* Creates or partially updates the session user's shared status.
|
|
@@ -474,7 +474,14 @@ const searchResultBaseShape = {
|
|
|
474
474
|
* `threadId`, `conversationId`, `commentId`, or `messageId` to reference objects.
|
|
475
475
|
*/
|
|
476
476
|
id: z.string(),
|
|
477
|
-
|
|
477
|
+
/**
|
|
478
|
+
* Text of the match. The API can send `null` for a result with no snippet text;
|
|
479
|
+
* that arrives here as an empty string, so one such result doesn't fail the page.
|
|
480
|
+
*/
|
|
481
|
+
snippet: z
|
|
482
|
+
.string()
|
|
483
|
+
.nullable()
|
|
484
|
+
.transform((snippet) => snippet ?? ''),
|
|
478
485
|
snippetCreatorId: z.number(),
|
|
479
486
|
snippetLastUpdated: z.date(),
|
|
480
487
|
channelId: z.string().nullable().optional(),
|
|
@@ -3011,7 +3011,7 @@ export declare const ThreadSearchResultSchema: z.ZodObject<{
|
|
|
3011
3011
|
threadId: z.ZodString;
|
|
3012
3012
|
commentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3013
3013
|
id: z.ZodString;
|
|
3014
|
-
snippet: z.ZodString
|
|
3014
|
+
snippet: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string, string | null>>;
|
|
3015
3015
|
snippetCreatorId: z.ZodNumber;
|
|
3016
3016
|
snippetLastUpdated: z.ZodDate;
|
|
3017
3017
|
channelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -3027,7 +3027,7 @@ export declare const ConversationSearchResultSchema: z.ZodObject<{
|
|
|
3027
3027
|
messageId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>>;
|
|
3028
3028
|
userIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
3029
3029
|
id: z.ZodString;
|
|
3030
|
-
snippet: z.ZodString
|
|
3030
|
+
snippet: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string, string | null>>;
|
|
3031
3031
|
snippetCreatorId: z.ZodNumber;
|
|
3032
3032
|
snippetLastUpdated: z.ZodDate;
|
|
3033
3033
|
channelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -3042,7 +3042,7 @@ export declare const SearchResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3042
3042
|
threadId: z.ZodString;
|
|
3043
3043
|
commentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3044
3044
|
id: z.ZodString;
|
|
3045
|
-
snippet: z.ZodString
|
|
3045
|
+
snippet: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string, string | null>>;
|
|
3046
3046
|
snippetCreatorId: z.ZodNumber;
|
|
3047
3047
|
snippetLastUpdated: z.ZodDate;
|
|
3048
3048
|
channelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -3056,7 +3056,7 @@ export declare const SearchResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3056
3056
|
messageId: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>>;
|
|
3057
3057
|
userIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
3058
3058
|
id: z.ZodString;
|
|
3059
|
-
snippet: z.ZodString
|
|
3059
|
+
snippet: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string, string | null>>;
|
|
3060
3060
|
snippetCreatorId: z.ZodNumber;
|
|
3061
3061
|
snippetLastUpdated: z.ZodDate;
|
|
3062
3062
|
channelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|