@doist/todoist-sdk 15.3.2 → 15.4.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.
@@ -1,4 +1,24 @@
1
1
  import { z } from 'zod';
2
+ /**
3
+ * Known activity object types, using modern names (`task`, `comment`) rather
4
+ * than legacy API names (`item`, `note`).
5
+ */
6
+ export const ACTIVITY_OBJECT_TYPES = ['task', 'comment', 'project'];
7
+ /**
8
+ * Known activity event types.
9
+ */
10
+ export const ACTIVITY_EVENT_TYPES = [
11
+ 'added',
12
+ 'updated',
13
+ 'deleted',
14
+ 'completed',
15
+ 'uncompleted',
16
+ 'archived',
17
+ 'unarchived',
18
+ 'shared',
19
+ 'left',
20
+ 'moved',
21
+ ];
2
22
  /**
3
23
  * Flexible object containing event-specific data.
4
24
  * Uses z.record to accept any properties for forward compatibility.
@@ -1,13 +1,21 @@
1
1
  import { z } from 'zod';
2
+ /**
3
+ * Known activity object types, using modern names (`task`, `comment`) rather
4
+ * than legacy API names (`item`, `note`).
5
+ */
6
+ export declare const ACTIVITY_OBJECT_TYPES: readonly ["task", "comment", "project"];
7
+ /**
8
+ * Known activity event types.
9
+ */
10
+ export declare const ACTIVITY_EVENT_TYPES: readonly ["added", "updated", "deleted", "completed", "uncompleted", "archived", "unarchived", "shared", "left", "moved"];
2
11
  /**
3
12
  * Type hints for known object types. Accepts any string for forward compatibility.
4
13
  */
5
- export type ActivityObjectType = 'task' | 'comment' | 'project' | (string & Record<string, never>);
14
+ export type ActivityObjectType = (typeof ACTIVITY_OBJECT_TYPES)[number] | (string & Record<string, never>);
6
15
  /**
7
16
  * Type hints for known event types. Accepts any string for forward compatibility.
8
17
  */
9
- export type ActivityEventType = 'added' | 'updated' | 'deleted' | 'completed' | 'uncompleted' | 'archived' | 'unarchived' | 'shared' | 'left' | (string & Record<string, never>);
10
- type ModernActivityObjectType = 'task' | 'comment' | 'project' | (string & Record<string, never>);
18
+ export type ActivityEventType = (typeof ACTIVITY_EVENT_TYPES)[number] | (string & Record<string, never>);
11
19
  /**
12
20
  * Combined object:event filter string for the `objectEventTypes` parameter of `getActivityLogs`.
13
21
  *
@@ -21,7 +29,7 @@ type ModernActivityObjectType = 'task' | 'comment' | 'project' | (string & Recor
21
29
  * to be passed for forward compatibility, while still providing autocomplete for
22
30
  * the known combinations above.
23
31
  */
24
- export type ActivityObjectEventType = `${ModernActivityObjectType}:${ActivityEventType}` | `${ModernActivityObjectType}:` | `:${ActivityEventType}` | (string & Record<string, never>);
32
+ export type ActivityObjectEventType = `${ActivityObjectType}:${ActivityEventType}` | `${ActivityObjectType}:` | `:${ActivityEventType}` | (string & Record<string, never>);
25
33
  /**
26
34
  * Flexible object containing event-specific data.
27
35
  * Uses z.record to accept any properties for forward compatibility.
@@ -46,4 +54,3 @@ export declare const ActivityEventSchema: z.ZodObject<{
46
54
  * Represents an activity log event in Todoist.
47
55
  */
48
56
  export type ActivityEvent = z.infer<typeof ActivityEventSchema>;
49
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doist/todoist-sdk",
3
- "version": "15.3.2",
3
+ "version": "15.4.0",
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",