@livetronics/wocul-domain 1.5.0 → 1.7.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.
@@ -73,8 +73,10 @@ exports.eventFactsSchema = zod_1.z
73
73
  idTaskQuestion: id.optional(),
74
74
  /** APPROVED or CHANGES_REQUESTED. */
75
75
  decision: zod_1.z.string().optional(),
76
- /** CREATE, BULK_IMPORT or ROUTINE. */
76
+ /** CREATE, BULK_IMPORT, ROUTINE or BULK_MOVE. */
77
77
  origin: zod_1.z.string().optional(),
78
+ /** When a role changed, ISO 8601: part of that email's key. */
79
+ changedAt: zod_1.z.string().optional(),
78
80
  /** Why the agent wrote a comment: AI_REPLY or ASSIGNEE_WELCOME. */
79
81
  purpose: zod_1.z.string().optional(),
80
82
  /** The one person a change is for; null when nobody is to be told. */
@@ -92,6 +94,13 @@ exports.eventFactsSchema = zod_1.z
92
94
  /** Why something stopped (a paused routine), and when. */
93
95
  reasonCode: zod_1.z.string().optional(),
94
96
  pausedAt: zod_1.z.string().optional(),
97
+ /** The routine a pause is of. */
98
+ idTaskRoutine: id.optional(),
99
+ /** The decision that asked for the AI's feedback, when there was one. */
100
+ idTaskFeedbackDecision: id.optional(),
101
+ /** A member's role before and after a role change: OWNER, MEMBER… */
102
+ roleFrom: zod_1.z.string().optional(),
103
+ roleTo: zod_1.z.string().optional(),
95
104
  /** Tasks a finished import created, or a board's open tasks. */
96
105
  count: zod_1.z.number().int().nonnegative().optional(),
97
106
  idSprint: id.optional()
package/dist/intents.d.ts CHANGED
@@ -27,6 +27,7 @@ export declare const intentPayloadSchemas: {
27
27
  queueId: z.ZodString;
28
28
  idempotencyKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
29
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
30
+ createRow: z.ZodOptional<z.ZodLiteral<true>>;
30
31
  category: z.ZodOptional<z.ZodString>;
31
32
  eventType: z.ZodOptional<z.ZodString>;
32
33
  projectName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -50,6 +51,7 @@ export declare const intentPayloadSchemas: {
50
51
  queueId: z.ZodString;
51
52
  idempotencyKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
53
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
54
+ createRow: z.ZodOptional<z.ZodLiteral<true>>;
53
55
  category: z.ZodOptional<z.ZodString>;
54
56
  eventType: z.ZodOptional<z.ZodString>;
55
57
  projectName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -73,6 +75,7 @@ export declare const intentPayloadSchemas: {
73
75
  queueId: z.ZodString;
74
76
  idempotencyKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
75
77
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
78
+ createRow: z.ZodOptional<z.ZodLiteral<true>>;
76
79
  category: z.ZodOptional<z.ZodString>;
77
80
  eventType: z.ZodOptional<z.ZodString>;
78
81
  projectName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -97,6 +100,7 @@ export declare const intentPayloadSchemas: {
97
100
  queueId: z.ZodString;
98
101
  idempotencyKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
102
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
103
+ createRow: z.ZodOptional<z.ZodLiteral<true>>;
100
104
  category: z.ZodOptional<z.ZodString>;
101
105
  subCategory: z.ZodOptional<z.ZodString>;
102
106
  eventType: z.ZodOptional<z.ZodString>;
@@ -123,6 +127,7 @@ export declare const intentPayloadSchemas: {
123
127
  queueId: z.ZodString;
124
128
  idempotencyKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
125
129
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
130
+ createRow: z.ZodOptional<z.ZodLiteral<true>>;
126
131
  category: z.ZodOptional<z.ZodString>;
127
132
  subCategory: z.ZodOptional<z.ZodString>;
128
133
  eventType: z.ZodOptional<z.ZodString>;
@@ -149,6 +154,7 @@ export declare const intentPayloadSchemas: {
149
154
  queueId: z.ZodString;
150
155
  idempotencyKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
151
156
  truncated: z.ZodOptional<z.ZodLiteral<true>>;
157
+ createRow: z.ZodOptional<z.ZodLiteral<true>>;
152
158
  category: z.ZodOptional<z.ZodString>;
153
159
  subCategory: z.ZodOptional<z.ZodString>;
154
160
  eventType: z.ZodOptional<z.ZodString>;
package/dist/intents.js CHANGED
@@ -31,6 +31,11 @@ const queueId = zod_1.z.string().min(1);
31
31
  const idempotencyKey = zod_1.z.string().nullable().optional();
32
32
  /** core-ts drops the content of an intent over 256 KiB and sets this. */
33
33
  const truncated = zod_1.z.literal(true).optional();
34
+ /**
35
+ * core-ts wrote no queue row for a handed-over command: the consumer
36
+ * creates it from this intent, which then always carries its content.
37
+ */
38
+ const createRow = zod_1.z.literal(true).optional();
34
39
  /**
35
40
  * Intent payloads. A consumer needs only `queueId` to claim the row, so that
36
41
  * is the one required field; the content is a convenience and may be absent
@@ -42,6 +47,7 @@ exports.intentPayloadSchemas = {
42
47
  queueId,
43
48
  idempotencyKey,
44
49
  truncated,
50
+ createRow,
45
51
  category: zod_1.z.string().optional(),
46
52
  eventType: zod_1.z.string().optional(),
47
53
  projectName: zod_1.z.string().nullable().optional(),
@@ -66,6 +72,7 @@ exports.intentPayloadSchemas = {
66
72
  queueId,
67
73
  idempotencyKey,
68
74
  truncated,
75
+ createRow,
69
76
  category: zod_1.z.string().optional(),
70
77
  subCategory: zod_1.z.string().optional(),
71
78
  eventType: zod_1.z.string().optional(),
@@ -31,5 +31,14 @@ export declare const notificationGroupOf: (eventType: string, queue?: "notificat
31
31
  * rules must.
32
32
  */
33
33
  export declare const HANDED_OVER_FIELD = "handedOver";
34
+ /**
35
+ * The name on core-ts's NOTIFICATIONS_HANDED_OVER for the commands: every
36
+ * queue row type no group owns (the digest, an OTP, billing mail). core-ts
37
+ * still decides who gets one and what it says; handed over, it sends that
38
+ * as the intent alone and notification-ts writes the row.
39
+ */
40
+ export declare const HANDOVER_COMMANDS = "commands";
41
+ /** On an intent's payload: core-ts wrote no queue row, create it from this. */
42
+ export declare const INTENT_CREATE_ROW_FIELD = "createRow";
34
43
  /** The groups an event's `data` says core-ts had handed over. */
35
44
  export declare function handedOverGroups(data: unknown): NotificationGroup[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HANDED_OVER_FIELD = exports.notificationGroupOf = exports.NOTIFICATION_GROUP_OF = exports.EMAIL_TYPE_PREFIX = exports.isNotificationGroup = exports.NOTIFICATION_GROUPS = void 0;
3
+ exports.INTENT_CREATE_ROW_FIELD = exports.HANDOVER_COMMANDS = exports.HANDED_OVER_FIELD = exports.notificationGroupOf = exports.NOTIFICATION_GROUP_OF = exports.EMAIL_TYPE_PREFIX = exports.isNotificationGroup = exports.NOTIFICATION_GROUPS = void 0;
4
4
  exports.handedOverGroups = handedOverGroups;
5
5
  /**
6
6
  * Notification groups (notification-ts docs/RULES.md). core-ts's call sites
@@ -47,6 +47,7 @@ exports.NOTIFICATION_GROUP_OF = {
47
47
  'Task-Changes-Requested': 'approvals',
48
48
  'Task-Approvals-Reset': 'approvals',
49
49
  'Approval-Needed': 'approvals',
50
+ 'email:Approval-Needed': 'approvals',
50
51
  // task-details
51
52
  'Task-Title-Edited': 'task-details',
52
53
  'Task-Description-Edited': 'task-details',
@@ -116,6 +117,15 @@ exports.notificationGroupOf = notificationGroupOf;
116
117
  * rules must.
117
118
  */
118
119
  exports.HANDED_OVER_FIELD = 'handedOver';
120
+ /**
121
+ * The name on core-ts's NOTIFICATIONS_HANDED_OVER for the commands: every
122
+ * queue row type no group owns (the digest, an OTP, billing mail). core-ts
123
+ * still decides who gets one and what it says; handed over, it sends that
124
+ * as the intent alone and notification-ts writes the row.
125
+ */
126
+ exports.HANDOVER_COMMANDS = 'commands';
127
+ /** On an intent's payload: core-ts wrote no queue row, create it from this. */
128
+ exports.INTENT_CREATE_ROW_FIELD = 'createRow';
119
129
  /** The groups an event's `data` says core-ts had handed over. */
120
130
  function handedOverGroups(data) {
121
131
  const value = data?.[exports.HANDED_OVER_FIELD];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livetronics/wocul-domain",
3
- "version": "1.5.0",
3
+ "version": "1.7.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",