@doist/comms-sdk 3.8.1 → 3.9.1
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.
|
@@ -164,16 +164,16 @@ export class UsersClient extends BaseClient {
|
|
|
164
164
|
return this.post(`${ENDPOINT_USERS}/update`, args, UserSchema);
|
|
165
165
|
}
|
|
166
166
|
/**
|
|
167
|
-
*
|
|
167
|
+
* Creates or partially updates the session user's shared status.
|
|
168
168
|
* The status belongs to the Todoist account, so it is shared with Todoist.
|
|
169
169
|
* Requires the `user:write` scope.
|
|
170
170
|
*
|
|
171
171
|
* @param args - The status to set.
|
|
172
|
-
* @param args.message - 1 to 80 characters once trimmed.
|
|
173
|
-
* @param args.emoji -
|
|
174
|
-
* @param args.activeUntil -
|
|
175
|
-
* @param args.effects -
|
|
176
|
-
*
|
|
172
|
+
* @param args.message - 1 to 80 characters once trimmed. Required when creating a status.
|
|
173
|
+
* @param args.emoji - Emoji to set; null removes it, omission preserves it.
|
|
174
|
+
* @param args.activeUntil - Future expiry (`Date` or ISO string); null removes it, omission preserves it.
|
|
175
|
+
* @param args.effects - Merge supplied effects. Omission or {} preserves effects; null clears all.
|
|
176
|
+
* An individual effect set to null is removed; {} preserves its configuration or enables defaults.
|
|
177
177
|
* @returns The updated user object.
|
|
178
178
|
*
|
|
179
179
|
* @example
|
|
@@ -16,6 +16,7 @@ export const CreateChannelArgsSchema = z.object({
|
|
|
16
16
|
color: z.number().nullable().optional(),
|
|
17
17
|
public: z.boolean().nullable().optional(),
|
|
18
18
|
description: z.string().nullable().optional(),
|
|
19
|
+
useDefaultRecipients: z.boolean().nullable().optional(),
|
|
19
20
|
defaultGroups: z.array(z.string()).nullable().optional(),
|
|
20
21
|
defaultRecipients: z.array(z.number()).nullable().optional(),
|
|
21
22
|
isFavorited: z.boolean().nullable().optional(),
|
|
@@ -27,6 +28,7 @@ export const UpdateChannelArgsSchema = z.object({
|
|
|
27
28
|
color: z.number().nullable().optional(),
|
|
28
29
|
public: z.boolean().nullable().optional(),
|
|
29
30
|
description: z.string().nullable().optional(),
|
|
31
|
+
useDefaultRecipients: z.boolean().nullable().optional(),
|
|
30
32
|
defaultGroups: z.array(z.string()).nullable().optional(),
|
|
31
33
|
defaultRecipients: z.array(z.number()).nullable().optional(),
|
|
32
34
|
isFavorited: z.boolean().nullable().optional(),
|
|
@@ -160,16 +160,16 @@ export declare class UsersClient extends BaseClient {
|
|
|
160
160
|
*/
|
|
161
161
|
update(args: UpdateUserArgs): Promise<User>;
|
|
162
162
|
/**
|
|
163
|
-
*
|
|
163
|
+
* Creates or partially updates the session user's shared status.
|
|
164
164
|
* The status belongs to the Todoist account, so it is shared with Todoist.
|
|
165
165
|
* Requires the `user:write` scope.
|
|
166
166
|
*
|
|
167
167
|
* @param args - The status to set.
|
|
168
|
-
* @param args.message - 1 to 80 characters once trimmed.
|
|
169
|
-
* @param args.emoji -
|
|
170
|
-
* @param args.activeUntil -
|
|
171
|
-
* @param args.effects -
|
|
172
|
-
*
|
|
168
|
+
* @param args.message - 1 to 80 characters once trimmed. Required when creating a status.
|
|
169
|
+
* @param args.emoji - Emoji to set; null removes it, omission preserves it.
|
|
170
|
+
* @param args.activeUntil - Future expiry (`Date` or ISO string); null removes it, omission preserves it.
|
|
171
|
+
* @param args.effects - Merge supplied effects. Omission or {} preserves effects; null clears all.
|
|
172
|
+
* An individual effect set to null is removed; {} preserves its configuration or enables defaults.
|
|
173
173
|
* @returns The updated user object.
|
|
174
174
|
*
|
|
175
175
|
* @example
|
|
@@ -15,6 +15,7 @@ export declare const CreateChannelArgsSchema: z.ZodObject<{
|
|
|
15
15
|
color: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
16
16
|
public: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
17
17
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
|
+
useDefaultRecipients: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
18
19
|
defaultGroups: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
19
20
|
defaultRecipients: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
20
21
|
isFavorited: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
@@ -27,6 +28,7 @@ export declare const UpdateChannelArgsSchema: z.ZodObject<{
|
|
|
27
28
|
color: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
28
29
|
public: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
29
30
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
|
+
useDefaultRecipients: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
30
32
|
defaultGroups: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
31
33
|
defaultRecipients: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
|
32
34
|
isFavorited: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
@@ -187,21 +189,23 @@ export type UpdateUserArgs = {
|
|
|
187
189
|
};
|
|
188
190
|
type StatusEffectArgs = {
|
|
189
191
|
scope?: {
|
|
190
|
-
mode
|
|
192
|
+
mode?: 'all';
|
|
191
193
|
};
|
|
192
194
|
};
|
|
195
|
+
/** Only supplied fields change. Null removes optional fields and effects. */
|
|
193
196
|
export type SetStatusArgs = {
|
|
194
|
-
/** 1 to 80 characters once trimmed. */
|
|
195
|
-
message
|
|
197
|
+
/** 1 to 80 characters once trimmed. Required when creating a status; omission preserves it. */
|
|
198
|
+
message?: string;
|
|
196
199
|
emoji?: string | null;
|
|
197
|
-
/**
|
|
200
|
+
/** Must be in the future; null removes expiry, omission preserves it. Dates are sent as ISO strings. */
|
|
198
201
|
activeUntil?: Date | string | null;
|
|
202
|
+
/** Supplied effects are merged; null clears all effects, omission or {} preserves them. */
|
|
199
203
|
effects?: {
|
|
200
|
-
/** Holds back Comms notifications
|
|
201
|
-
pauseNotifications?: StatusEffectArgs;
|
|
202
|
-
/**
|
|
203
|
-
pauseActivity?: StatusEffectArgs;
|
|
204
|
-
};
|
|
204
|
+
/** Holds back Comms notifications. Null removes it; {} preserves its configuration or enables it with defaults. */
|
|
205
|
+
pauseNotifications?: StatusEffectArgs | null;
|
|
206
|
+
/** Pauses Todoist Karma and streaks. Null removes it; {} preserves its configuration or enables it with defaults. */
|
|
207
|
+
pauseActivity?: StatusEffectArgs | null;
|
|
208
|
+
} | null;
|
|
205
209
|
};
|
|
206
210
|
type SearchArgsCommon = {
|
|
207
211
|
workspaceId: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/comms-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.1",
|
|
4
4
|
"description": "A TypeScript wrapper for the Comms REST API.",
|
|
5
5
|
"author": "Doist developers",
|
|
6
6
|
"homepage": "https://doist.github.io/comms-sdk-typescript/",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"semantic-release": "25.0.5",
|
|
66
66
|
"ts-node": "10.9.2",
|
|
67
67
|
"typescript": "5.9.3",
|
|
68
|
-
"vitest": "4.1.
|
|
68
|
+
"vitest": "4.1.12"
|
|
69
69
|
},
|
|
70
70
|
"husky": {
|
|
71
71
|
"hooks": {
|