@livetronics/wocul-domain 1.0.0 → 1.1.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.
@@ -2,6 +2,8 @@ import { z } from 'zod';
2
2
  import type { RealtimeEventType } from './types';
3
3
  export declare const eventDataSchemas: {
4
4
  'task.created': z.ZodObject<{
5
+ idSprint: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
6
+ idTaskParent: z.ZodOptional<z.ZodNumber>;
5
7
  /** The log category, e.g. ASSIGNEE_CHANGE, STATUS_CHANGE, WATCHERS. */
6
8
  category: z.ZodOptional<z.ZodString>;
7
9
  /** The log template, e.g. Task-Reassigned. */
@@ -10,6 +12,8 @@ export declare const eventDataSchemas: {
10
12
  staff: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
11
13
  idTask: z.ZodNumber;
12
14
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
15
+ idSprint: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
16
+ idTaskParent: z.ZodOptional<z.ZodNumber>;
13
17
  /** The log category, e.g. ASSIGNEE_CHANGE, STATUS_CHANGE, WATCHERS. */
14
18
  category: z.ZodOptional<z.ZodString>;
15
19
  /** The log template, e.g. Task-Reassigned. */
@@ -18,6 +22,8 @@ export declare const eventDataSchemas: {
18
22
  staff: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
19
23
  idTask: z.ZodNumber;
20
24
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
25
+ idSprint: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
26
+ idTaskParent: z.ZodOptional<z.ZodNumber>;
21
27
  /** The log category, e.g. ASSIGNEE_CHANGE, STATUS_CHANGE, WATCHERS. */
22
28
  category: z.ZodOptional<z.ZodString>;
23
29
  /** The log template, e.g. Task-Reassigned. */
@@ -29,6 +35,8 @@ export declare const eventDataSchemas: {
29
35
  'task.changed': z.ZodObject<{
30
36
  idAssignee: z.ZodOptional<z.ZodNumber>;
31
37
  idTaskComment: z.ZodOptional<z.ZodNumber>;
38
+ idSprint: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
39
+ idTaskParent: z.ZodOptional<z.ZodNumber>;
32
40
  /** The log category, e.g. ASSIGNEE_CHANGE, STATUS_CHANGE, WATCHERS. */
33
41
  category: z.ZodOptional<z.ZodString>;
34
42
  /** The log template, e.g. Task-Reassigned. */
@@ -39,6 +47,8 @@ export declare const eventDataSchemas: {
39
47
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
40
48
  idAssignee: z.ZodOptional<z.ZodNumber>;
41
49
  idTaskComment: z.ZodOptional<z.ZodNumber>;
50
+ idSprint: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
51
+ idTaskParent: z.ZodOptional<z.ZodNumber>;
42
52
  /** The log category, e.g. ASSIGNEE_CHANGE, STATUS_CHANGE, WATCHERS. */
43
53
  category: z.ZodOptional<z.ZodString>;
44
54
  /** The log template, e.g. Task-Reassigned. */
@@ -49,6 +59,8 @@ export declare const eventDataSchemas: {
49
59
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
50
60
  idAssignee: z.ZodOptional<z.ZodNumber>;
51
61
  idTaskComment: z.ZodOptional<z.ZodNumber>;
62
+ idSprint: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
63
+ idTaskParent: z.ZodOptional<z.ZodNumber>;
52
64
  /** The log category, e.g. ASSIGNEE_CHANGE, STATUS_CHANGE, WATCHERS. */
53
65
  category: z.ZodOptional<z.ZodString>;
54
66
  /** The log template, e.g. Task-Reassigned. */
@@ -58,6 +70,8 @@ export declare const eventDataSchemas: {
58
70
  idTask: z.ZodNumber;
59
71
  }, z.ZodTypeAny, "passthrough">>;
60
72
  'task.removed': z.ZodObject<{
73
+ idSprint: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
74
+ idTaskParent: z.ZodOptional<z.ZodNumber>;
61
75
  /** The log category, e.g. ASSIGNEE_CHANGE, STATUS_CHANGE, WATCHERS. */
62
76
  category: z.ZodOptional<z.ZodString>;
63
77
  /** The log template, e.g. Task-Reassigned. */
@@ -66,6 +80,8 @@ export declare const eventDataSchemas: {
66
80
  staff: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
67
81
  idTask: z.ZodNumber;
68
82
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
83
+ idSprint: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
84
+ idTaskParent: z.ZodOptional<z.ZodNumber>;
69
85
  /** The log category, e.g. ASSIGNEE_CHANGE, STATUS_CHANGE, WATCHERS. */
70
86
  category: z.ZodOptional<z.ZodString>;
71
87
  /** The log template, e.g. Task-Reassigned. */
@@ -74,6 +90,8 @@ export declare const eventDataSchemas: {
74
90
  staff: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
75
91
  idTask: z.ZodNumber;
76
92
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
93
+ idSprint: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
94
+ idTaskParent: z.ZodOptional<z.ZodNumber>;
77
95
  /** The log category, e.g. ASSIGNEE_CHANGE, STATUS_CHANGE, WATCHERS. */
78
96
  category: z.ZodOptional<z.ZodString>;
79
97
  /** The log template, e.g. Task-Reassigned. */
@@ -27,17 +27,36 @@ const logged = {
27
27
  /** People whose own lists change, told on staff:<id>. */
28
28
  staff: staff.optional()
29
29
  };
30
+ /**
31
+ * A sub-task's parent. A sub-task's task.* event is also published on
32
+ * task:<idTaskParent>, where the parent's panel lists its sub-tasks.
33
+ */
34
+ const subTaskOf = { idTaskParent: id.optional() };
35
+ /**
36
+ * The board the task is on as the event goes out, or null when it is on
37
+ * none. Absent from producers before core 4.2: a board treats a missing
38
+ * value as possibly its own. A task that left a board (moved, removed,
39
+ * deleted) names its new board or null; the board it left knows it by the
40
+ * id among the tasks it shows.
41
+ */
42
+ const onBoard = { idSprint: id.nullable().optional() };
30
43
  exports.eventDataSchemas = {
31
- 'task.created': zod_1.z.object({ idTask: id, ...logged }).passthrough(),
44
+ 'task.created': zod_1.z
45
+ .object({ idTask: id, ...logged, ...subTaskOf, ...onBoard })
46
+ .passthrough(),
32
47
  'task.changed': zod_1.z
33
48
  .object({
34
49
  idTask: id,
35
50
  ...logged,
51
+ ...subTaskOf,
52
+ ...onBoard,
36
53
  idAssignee: id.optional(),
37
54
  idTaskComment: id.optional()
38
55
  })
39
56
  .passthrough(),
40
- 'task.removed': zod_1.z.object({ idTask: id, ...logged }).passthrough(),
57
+ 'task.removed': zod_1.z
58
+ .object({ idTask: id, ...logged, ...subTaskOf, ...onBoard })
59
+ .passthrough(),
41
60
  'comment.changed': zod_1.z
42
61
  .object({ idTask: id, idTaskComment: id, ...logged })
43
62
  .passthrough(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livetronics/wocul-domain",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Shared Wocul domain contracts: realtime event and intent schemas, channel names, and Core API types generated from the OpenAPI spec",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",