@doist/todoist-sdk 9.5.0 → 9.6.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,10 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SectionSchema = void 0;
3
+ exports.SectionSchema = exports.SectionBaseSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const url_helpers_1 = require("../../utils/url-helpers");
6
- exports.SectionSchema = zod_1.z
7
- .object({
6
+ /**
7
+ * Raw section fields (the persisted shape). Exposed so schemas that extend
8
+ * or override a field — notably the webhook variant — can reuse the base
9
+ * without duplicating every field.
10
+ */
11
+ exports.SectionBaseSchema = zod_1.z.object({
8
12
  id: zod_1.z.string(),
9
13
  userId: zod_1.z.string(),
10
14
  projectId: zod_1.z.string(),
@@ -16,7 +20,5 @@ exports.SectionSchema = zod_1.z
16
20
  isArchived: zod_1.z.boolean(),
17
21
  isDeleted: zod_1.z.boolean(),
18
22
  isCollapsed: zod_1.z.boolean(),
19
- })
20
- .transform((data) => {
21
- return Object.assign(Object.assign({}, data), { url: (0, url_helpers_1.getSectionUrl)(data.id, data.name) });
22
23
  });
24
+ exports.SectionSchema = exports.SectionBaseSchema.transform((data) => (Object.assign(Object.assign({}, data), { url: (0, url_helpers_1.getSectionUrl)(data.id, data.name) })));
@@ -17,5 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./comments"), exports);
18
18
  __exportStar(require("./envelope"), exports);
19
19
  __exportStar(require("./labels"), exports);
20
+ __exportStar(require("./projects"), exports);
21
+ __exportStar(require("./sections"), exports);
20
22
  __exportStar(require("./tasks"), exports);
21
23
  __exportStar(require("./types"), exports);
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectUnarchivedPayloadSchema = exports.ProjectArchivedPayloadSchema = exports.ProjectDeletedPayloadSchema = exports.ProjectUpdatedPayloadSchema = exports.ProjectAddedPayloadSchema = exports.PROJECT_WEBHOOK_EVENTS = exports.ProjectWebhookEventEnum = void 0;
4
+ const zod_1 = require("zod");
5
+ const types_1 = require("../projects/types");
6
+ const envelope_1 = require("./envelope");
7
+ /**
8
+ * Enum-like object of project (`project:*`) webhook event names. Single
9
+ * source of truth for the discriminator values — `PROJECT_WEBHOOK_EVENTS`
10
+ * and every `z.literal()` below derive from it.
11
+ */
12
+ exports.ProjectWebhookEventEnum = {
13
+ Added: 'project:added',
14
+ Updated: 'project:updated',
15
+ Deleted: 'project:deleted',
16
+ Archived: 'project:archived',
17
+ Unarchived: 'project:unarchived',
18
+ };
19
+ /** Webhook events that carry a project as their `eventData`. */
20
+ exports.PROJECT_WEBHOOK_EVENTS = [
21
+ exports.ProjectWebhookEventEnum.Added,
22
+ exports.ProjectWebhookEventEnum.Updated,
23
+ exports.ProjectWebhookEventEnum.Deleted,
24
+ exports.ProjectWebhookEventEnum.Archived,
25
+ exports.ProjectWebhookEventEnum.Unarchived,
26
+ ];
27
+ /**
28
+ * Webhook project payloads match the shape of the shared {@link Project}
29
+ * resource — either a personal or a workspace project. No webhook-specific
30
+ * schema is needed; `ProjectSchema` already dispatches on `workspaceId`.
31
+ */
32
+ exports.ProjectAddedPayloadSchema = zod_1.z.object(Object.assign(Object.assign({}, envelope_1.BaseWebhookEnvelopeShape), { eventName: zod_1.z.literal(exports.ProjectWebhookEventEnum.Added), eventData: types_1.ProjectSchema }));
33
+ exports.ProjectUpdatedPayloadSchema = zod_1.z.object(Object.assign(Object.assign({}, envelope_1.BaseWebhookEnvelopeShape), { eventName: zod_1.z.literal(exports.ProjectWebhookEventEnum.Updated), eventData: types_1.ProjectSchema }));
34
+ exports.ProjectDeletedPayloadSchema = zod_1.z.object(Object.assign(Object.assign({}, envelope_1.BaseWebhookEnvelopeShape), { eventName: zod_1.z.literal(exports.ProjectWebhookEventEnum.Deleted), eventData: types_1.ProjectSchema }));
35
+ exports.ProjectArchivedPayloadSchema = zod_1.z.object(Object.assign(Object.assign({}, envelope_1.BaseWebhookEnvelopeShape), { eventName: zod_1.z.literal(exports.ProjectWebhookEventEnum.Archived), eventData: types_1.ProjectSchema }));
36
+ exports.ProjectUnarchivedPayloadSchema = zod_1.z.object(Object.assign(Object.assign({}, envelope_1.BaseWebhookEnvelopeShape), { eventName: zod_1.z.literal(exports.ProjectWebhookEventEnum.Unarchived), eventData: types_1.ProjectSchema }));
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SectionUnarchivedPayloadSchema = exports.SectionArchivedPayloadSchema = exports.SectionDeletedPayloadSchema = exports.SectionUpdatedPayloadSchema = exports.SectionAddedPayloadSchema = exports.WebhookSectionSchema = exports.SECTION_WEBHOOK_EVENTS = exports.SectionWebhookEventEnum = void 0;
4
+ const zod_1 = require("zod");
5
+ const url_helpers_1 = require("../../utils/url-helpers");
6
+ const types_1 = require("../sections/types");
7
+ const envelope_1 = require("./envelope");
8
+ /**
9
+ * Enum-like object of section (`section:*`) webhook event names. Single
10
+ * source of truth for the discriminator values — `SECTION_WEBHOOK_EVENTS`
11
+ * and every `z.literal()` below derive from it.
12
+ */
13
+ exports.SectionWebhookEventEnum = {
14
+ Added: 'section:added',
15
+ Updated: 'section:updated',
16
+ Deleted: 'section:deleted',
17
+ Archived: 'section:archived',
18
+ Unarchived: 'section:unarchived',
19
+ };
20
+ /** Webhook events that carry a section as their `eventData`. */
21
+ exports.SECTION_WEBHOOK_EVENTS = [
22
+ exports.SectionWebhookEventEnum.Added,
23
+ exports.SectionWebhookEventEnum.Updated,
24
+ exports.SectionWebhookEventEnum.Deleted,
25
+ exports.SectionWebhookEventEnum.Archived,
26
+ exports.SectionWebhookEventEnum.Unarchived,
27
+ ];
28
+ /**
29
+ * A section as delivered in a webhook payload.
30
+ *
31
+ * Reuses {@link SectionBaseSchema} and overrides `updatedAt` to tolerate
32
+ * payloads that deliver it as `null` or omit the key entirely — tombstones
33
+ * and never-updated sections come through without an `updated_at` value.
34
+ * The result is normalised to `Date | null` so consumers don't have to
35
+ * handle three shapes. Surfaces the computed `url` so the exposed shape
36
+ * matches {@link Section}.
37
+ */
38
+ exports.WebhookSectionSchema = types_1.SectionBaseSchema.extend({
39
+ updatedAt: zod_1.z.coerce
40
+ .date()
41
+ .nullish()
42
+ .transform((value) => value !== null && value !== void 0 ? value : null),
43
+ }).transform((data) => (Object.assign(Object.assign({}, data), { url: (0, url_helpers_1.getSectionUrl)(data.id, data.name) })));
44
+ exports.SectionAddedPayloadSchema = zod_1.z.object(Object.assign(Object.assign({}, envelope_1.BaseWebhookEnvelopeShape), { eventName: zod_1.z.literal(exports.SectionWebhookEventEnum.Added), eventData: exports.WebhookSectionSchema }));
45
+ exports.SectionUpdatedPayloadSchema = zod_1.z.object(Object.assign(Object.assign({}, envelope_1.BaseWebhookEnvelopeShape), { eventName: zod_1.z.literal(exports.SectionWebhookEventEnum.Updated), eventData: exports.WebhookSectionSchema }));
46
+ exports.SectionDeletedPayloadSchema = zod_1.z.object(Object.assign(Object.assign({}, envelope_1.BaseWebhookEnvelopeShape), { eventName: zod_1.z.literal(exports.SectionWebhookEventEnum.Deleted), eventData: exports.WebhookSectionSchema }));
47
+ exports.SectionArchivedPayloadSchema = zod_1.z.object(Object.assign(Object.assign({}, envelope_1.BaseWebhookEnvelopeShape), { eventName: zod_1.z.literal(exports.SectionWebhookEventEnum.Archived), eventData: exports.WebhookSectionSchema }));
48
+ exports.SectionUnarchivedPayloadSchema = zod_1.z.object(Object.assign(Object.assign({}, envelope_1.BaseWebhookEnvelopeShape), { eventName: zod_1.z.literal(exports.SectionWebhookEventEnum.Unarchived), eventData: exports.WebhookSectionSchema }));
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "WebhookEventSchema", { enumerable: true, get: fu
7
7
  const comments_1 = require("./comments");
8
8
  const envelope_1 = require("./envelope");
9
9
  const labels_1 = require("./labels");
10
+ const projects_1 = require("./projects");
11
+ const sections_1 = require("./sections");
10
12
  const tasks_1 = require("./tasks");
11
13
  /**
12
14
  * Events whose payloads have been narrowed per resource. Each phase adds to
@@ -17,12 +19,14 @@ const TYPED_WEBHOOK_EVENTS = [
17
19
  ...tasks_1.TASK_WEBHOOK_EVENTS,
18
20
  ...comments_1.COMMENT_WEBHOOK_EVENTS,
19
21
  ...labels_1.LABEL_WEBHOOK_EVENTS,
22
+ ...projects_1.PROJECT_WEBHOOK_EVENTS,
23
+ ...sections_1.SECTION_WEBHOOK_EVENTS,
20
24
  ];
21
25
  const untypedEventNames = types_1.WEBHOOK_EVENTS.filter((event) => !TYPED_WEBHOOK_EVENTS.includes(event));
22
26
  /**
23
27
  * A single branch covering every event whose payload has not yet been typed
24
28
  * per resource. Follow-up PRs will replace slices of this with dedicated
25
- * variants (projects, sections, filters, reminders).
29
+ * variants (filters, reminders).
26
30
  */
27
31
  exports.UntypedWebhookPayloadSchema = zod_1.z.object(Object.assign(Object.assign({}, envelope_1.BaseWebhookEnvelopeShape), { eventName: zod_1.z.enum(untypedEventNames), eventData: zod_1.z.unknown(), eventDataExtra: zod_1.z.unknown().optional() }));
28
32
  /**
@@ -34,9 +38,10 @@ exports.UntypedWebhookPayloadSchema = zod_1.z.object(Object.assign(Object.assign
34
38
  *
35
39
  * Typed today: `item:*` events carry a parsed {@link Task}; `note:*` events
36
40
  * carry a parsed comment (item-comment or project-comment); `label:*` events
37
- * carry a parsed label. Other events still expose `eventData` as `unknown`;
38
- * they will be narrowed in follow-up PRs (projects, sections, filters,
39
- * reminders).
41
+ * carry a parsed label; `project:*` events carry a parsed {@link Project}
42
+ * (personal or workspace); `section:*` events carry a parsed
43
+ * {@link WebhookSection}. Other events still expose `eventData` as
44
+ * `unknown`; they will be narrowed in follow-up PRs (filters, reminders).
40
45
  */
41
46
  exports.WebhookPayloadSchema = zod_1.z.discriminatedUnion('eventName', [
42
47
  tasks_1.TaskAddedPayloadSchema,
@@ -50,5 +55,15 @@ exports.WebhookPayloadSchema = zod_1.z.discriminatedUnion('eventName', [
50
55
  labels_1.LabelAddedPayloadSchema,
51
56
  labels_1.LabelUpdatedPayloadSchema,
52
57
  labels_1.LabelDeletedPayloadSchema,
58
+ projects_1.ProjectAddedPayloadSchema,
59
+ projects_1.ProjectUpdatedPayloadSchema,
60
+ projects_1.ProjectDeletedPayloadSchema,
61
+ projects_1.ProjectArchivedPayloadSchema,
62
+ projects_1.ProjectUnarchivedPayloadSchema,
63
+ sections_1.SectionAddedPayloadSchema,
64
+ sections_1.SectionUpdatedPayloadSchema,
65
+ sections_1.SectionDeletedPayloadSchema,
66
+ sections_1.SectionArchivedPayloadSchema,
67
+ sections_1.SectionUnarchivedPayloadSchema,
53
68
  exports.UntypedWebhookPayloadSchema,
54
69
  ]);
@@ -1,7 +1,11 @@
1
1
  import { z } from 'zod';
2
2
  import { getSectionUrl } from '../../utils/url-helpers.js';
3
- export const SectionSchema = z
4
- .object({
3
+ /**
4
+ * Raw section fields (the persisted shape). Exposed so schemas that extend
5
+ * or override a field — notably the webhook variant — can reuse the base
6
+ * without duplicating every field.
7
+ */
8
+ export const SectionBaseSchema = z.object({
5
9
  id: z.string(),
6
10
  userId: z.string(),
7
11
  projectId: z.string(),
@@ -13,7 +17,5 @@ export const SectionSchema = z
13
17
  isArchived: z.boolean(),
14
18
  isDeleted: z.boolean(),
15
19
  isCollapsed: z.boolean(),
16
- })
17
- .transform((data) => {
18
- return Object.assign(Object.assign({}, data), { url: getSectionUrl(data.id, data.name) });
19
20
  });
21
+ export const SectionSchema = SectionBaseSchema.transform((data) => (Object.assign(Object.assign({}, data), { url: getSectionUrl(data.id, data.name) })));
@@ -1,5 +1,7 @@
1
1
  export * from './comments.js';
2
2
  export * from './envelope.js';
3
3
  export * from './labels.js';
4
+ export * from './projects.js';
5
+ export * from './sections.js';
4
6
  export * from './tasks.js';
5
7
  export * from './types.js';
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ import { ProjectSchema } from '../projects/types.js';
3
+ import { BaseWebhookEnvelopeShape } from './envelope.js';
4
+ /**
5
+ * Enum-like object of project (`project:*`) webhook event names. Single
6
+ * source of truth for the discriminator values — `PROJECT_WEBHOOK_EVENTS`
7
+ * and every `z.literal()` below derive from it.
8
+ */
9
+ export const ProjectWebhookEventEnum = {
10
+ Added: 'project:added',
11
+ Updated: 'project:updated',
12
+ Deleted: 'project:deleted',
13
+ Archived: 'project:archived',
14
+ Unarchived: 'project:unarchived',
15
+ };
16
+ /** Webhook events that carry a project as their `eventData`. */
17
+ export const PROJECT_WEBHOOK_EVENTS = [
18
+ ProjectWebhookEventEnum.Added,
19
+ ProjectWebhookEventEnum.Updated,
20
+ ProjectWebhookEventEnum.Deleted,
21
+ ProjectWebhookEventEnum.Archived,
22
+ ProjectWebhookEventEnum.Unarchived,
23
+ ];
24
+ /**
25
+ * Webhook project payloads match the shape of the shared {@link Project}
26
+ * resource — either a personal or a workspace project. No webhook-specific
27
+ * schema is needed; `ProjectSchema` already dispatches on `workspaceId`.
28
+ */
29
+ export const ProjectAddedPayloadSchema = z.object(Object.assign(Object.assign({}, BaseWebhookEnvelopeShape), { eventName: z.literal(ProjectWebhookEventEnum.Added), eventData: ProjectSchema }));
30
+ export const ProjectUpdatedPayloadSchema = z.object(Object.assign(Object.assign({}, BaseWebhookEnvelopeShape), { eventName: z.literal(ProjectWebhookEventEnum.Updated), eventData: ProjectSchema }));
31
+ export const ProjectDeletedPayloadSchema = z.object(Object.assign(Object.assign({}, BaseWebhookEnvelopeShape), { eventName: z.literal(ProjectWebhookEventEnum.Deleted), eventData: ProjectSchema }));
32
+ export const ProjectArchivedPayloadSchema = z.object(Object.assign(Object.assign({}, BaseWebhookEnvelopeShape), { eventName: z.literal(ProjectWebhookEventEnum.Archived), eventData: ProjectSchema }));
33
+ export const ProjectUnarchivedPayloadSchema = z.object(Object.assign(Object.assign({}, BaseWebhookEnvelopeShape), { eventName: z.literal(ProjectWebhookEventEnum.Unarchived), eventData: ProjectSchema }));
@@ -0,0 +1,45 @@
1
+ import { z } from 'zod';
2
+ import { getSectionUrl } from '../../utils/url-helpers.js';
3
+ import { SectionBaseSchema } from '../sections/types.js';
4
+ import { BaseWebhookEnvelopeShape } from './envelope.js';
5
+ /**
6
+ * Enum-like object of section (`section:*`) webhook event names. Single
7
+ * source of truth for the discriminator values — `SECTION_WEBHOOK_EVENTS`
8
+ * and every `z.literal()` below derive from it.
9
+ */
10
+ export const SectionWebhookEventEnum = {
11
+ Added: 'section:added',
12
+ Updated: 'section:updated',
13
+ Deleted: 'section:deleted',
14
+ Archived: 'section:archived',
15
+ Unarchived: 'section:unarchived',
16
+ };
17
+ /** Webhook events that carry a section as their `eventData`. */
18
+ export const SECTION_WEBHOOK_EVENTS = [
19
+ SectionWebhookEventEnum.Added,
20
+ SectionWebhookEventEnum.Updated,
21
+ SectionWebhookEventEnum.Deleted,
22
+ SectionWebhookEventEnum.Archived,
23
+ SectionWebhookEventEnum.Unarchived,
24
+ ];
25
+ /**
26
+ * A section as delivered in a webhook payload.
27
+ *
28
+ * Reuses {@link SectionBaseSchema} and overrides `updatedAt` to tolerate
29
+ * payloads that deliver it as `null` or omit the key entirely — tombstones
30
+ * and never-updated sections come through without an `updated_at` value.
31
+ * The result is normalised to `Date | null` so consumers don't have to
32
+ * handle three shapes. Surfaces the computed `url` so the exposed shape
33
+ * matches {@link Section}.
34
+ */
35
+ export const WebhookSectionSchema = SectionBaseSchema.extend({
36
+ updatedAt: z.coerce
37
+ .date()
38
+ .nullish()
39
+ .transform((value) => value !== null && value !== void 0 ? value : null),
40
+ }).transform((data) => (Object.assign(Object.assign({}, data), { url: getSectionUrl(data.id, data.name) })));
41
+ export const SectionAddedPayloadSchema = z.object(Object.assign(Object.assign({}, BaseWebhookEnvelopeShape), { eventName: z.literal(SectionWebhookEventEnum.Added), eventData: WebhookSectionSchema }));
42
+ export const SectionUpdatedPayloadSchema = z.object(Object.assign(Object.assign({}, BaseWebhookEnvelopeShape), { eventName: z.literal(SectionWebhookEventEnum.Updated), eventData: WebhookSectionSchema }));
43
+ export const SectionDeletedPayloadSchema = z.object(Object.assign(Object.assign({}, BaseWebhookEnvelopeShape), { eventName: z.literal(SectionWebhookEventEnum.Deleted), eventData: WebhookSectionSchema }));
44
+ export const SectionArchivedPayloadSchema = z.object(Object.assign(Object.assign({}, BaseWebhookEnvelopeShape), { eventName: z.literal(SectionWebhookEventEnum.Archived), eventData: WebhookSectionSchema }));
45
+ export const SectionUnarchivedPayloadSchema = z.object(Object.assign(Object.assign({}, BaseWebhookEnvelopeShape), { eventName: z.literal(SectionWebhookEventEnum.Unarchived), eventData: WebhookSectionSchema }));
@@ -3,6 +3,8 @@ import { WEBHOOK_EVENTS, WebhookEventSchema } from '../apps/types.js';
3
3
  import { COMMENT_WEBHOOK_EVENTS, CommentAddedPayloadSchema, CommentDeletedPayloadSchema, CommentUpdatedPayloadSchema, } from './comments.js';
4
4
  import { BaseWebhookEnvelopeShape } from './envelope.js';
5
5
  import { LABEL_WEBHOOK_EVENTS, LabelAddedPayloadSchema, LabelDeletedPayloadSchema, LabelUpdatedPayloadSchema, } from './labels.js';
6
+ import { PROJECT_WEBHOOK_EVENTS, ProjectAddedPayloadSchema, ProjectArchivedPayloadSchema, ProjectDeletedPayloadSchema, ProjectUnarchivedPayloadSchema, ProjectUpdatedPayloadSchema, } from './projects.js';
7
+ import { SECTION_WEBHOOK_EVENTS, SectionAddedPayloadSchema, SectionArchivedPayloadSchema, SectionDeletedPayloadSchema, SectionUnarchivedPayloadSchema, SectionUpdatedPayloadSchema, } from './sections.js';
6
8
  import { TASK_WEBHOOK_EVENTS, TaskAddedPayloadSchema, TaskCompletedPayloadSchema, TaskDeletedPayloadSchema, TaskUncompletedPayloadSchema, TaskUpdatedPayloadSchema, } from './tasks.js';
7
9
  /**
8
10
  * Events whose payloads have been narrowed per resource. Each phase adds to
@@ -13,12 +15,14 @@ const TYPED_WEBHOOK_EVENTS = [
13
15
  ...TASK_WEBHOOK_EVENTS,
14
16
  ...COMMENT_WEBHOOK_EVENTS,
15
17
  ...LABEL_WEBHOOK_EVENTS,
18
+ ...PROJECT_WEBHOOK_EVENTS,
19
+ ...SECTION_WEBHOOK_EVENTS,
16
20
  ];
17
21
  const untypedEventNames = WEBHOOK_EVENTS.filter((event) => !TYPED_WEBHOOK_EVENTS.includes(event));
18
22
  /**
19
23
  * A single branch covering every event whose payload has not yet been typed
20
24
  * per resource. Follow-up PRs will replace slices of this with dedicated
21
- * variants (projects, sections, filters, reminders).
25
+ * variants (filters, reminders).
22
26
  */
23
27
  export const UntypedWebhookPayloadSchema = z.object(Object.assign(Object.assign({}, BaseWebhookEnvelopeShape), { eventName: z.enum(untypedEventNames), eventData: z.unknown(), eventDataExtra: z.unknown().optional() }));
24
28
  /**
@@ -30,9 +34,10 @@ export const UntypedWebhookPayloadSchema = z.object(Object.assign(Object.assign(
30
34
  *
31
35
  * Typed today: `item:*` events carry a parsed {@link Task}; `note:*` events
32
36
  * carry a parsed comment (item-comment or project-comment); `label:*` events
33
- * carry a parsed label. Other events still expose `eventData` as `unknown`;
34
- * they will be narrowed in follow-up PRs (projects, sections, filters,
35
- * reminders).
37
+ * carry a parsed label; `project:*` events carry a parsed {@link Project}
38
+ * (personal or workspace); `section:*` events carry a parsed
39
+ * {@link WebhookSection}. Other events still expose `eventData` as
40
+ * `unknown`; they will be narrowed in follow-up PRs (filters, reminders).
36
41
  */
37
42
  export const WebhookPayloadSchema = z.discriminatedUnion('eventName', [
38
43
  TaskAddedPayloadSchema,
@@ -46,6 +51,16 @@ export const WebhookPayloadSchema = z.discriminatedUnion('eventName', [
46
51
  LabelAddedPayloadSchema,
47
52
  LabelUpdatedPayloadSchema,
48
53
  LabelDeletedPayloadSchema,
54
+ ProjectAddedPayloadSchema,
55
+ ProjectUpdatedPayloadSchema,
56
+ ProjectDeletedPayloadSchema,
57
+ ProjectArchivedPayloadSchema,
58
+ ProjectUnarchivedPayloadSchema,
59
+ SectionAddedPayloadSchema,
60
+ SectionUpdatedPayloadSchema,
61
+ SectionDeletedPayloadSchema,
62
+ SectionArchivedPayloadSchema,
63
+ SectionUnarchivedPayloadSchema,
49
64
  UntypedWebhookPayloadSchema,
50
65
  ]);
51
66
  export { WebhookEventSchema };
@@ -1,4 +1,22 @@
1
1
  import { z } from 'zod';
2
+ /**
3
+ * Raw section fields (the persisted shape). Exposed so schemas that extend
4
+ * or override a field — notably the webhook variant — can reuse the base
5
+ * without duplicating every field.
6
+ */
7
+ export declare const SectionBaseSchema: z.ZodObject<{
8
+ id: z.ZodString;
9
+ userId: z.ZodString;
10
+ projectId: z.ZodString;
11
+ addedAt: z.ZodCoercedDate<unknown>;
12
+ updatedAt: z.ZodCoercedDate<unknown>;
13
+ archivedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
14
+ name: z.ZodString;
15
+ sectionOrder: z.ZodNumber;
16
+ isArchived: z.ZodBoolean;
17
+ isDeleted: z.ZodBoolean;
18
+ isCollapsed: z.ZodBoolean;
19
+ }, z.core.$strip>;
2
20
  export declare const SectionSchema: z.ZodPipe<z.ZodObject<{
3
21
  id: z.ZodString;
4
22
  userId: z.ZodString;
@@ -1,5 +1,7 @@
1
1
  export * from './comments.js';
2
2
  export * from './envelope.js';
3
3
  export * from './labels.js';
4
+ export * from './projects.js';
5
+ export * from './sections.js';
4
6
  export * from './tasks.js';
5
7
  export * from './types.js';