@ever-works/mailchimp-transactional-plugin 1.0.4 → 1.0.6

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.
package/dist/index.cjs CHANGED
@@ -101,10 +101,14 @@ var USER_SELECTABLE_WORK_KINDS = [
101
101
  "repo",
102
102
  "app"
103
103
  ];
104
- var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "default"];
104
+ var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "project", "default"];
105
105
  new Set(WORK_KINDS);
106
106
  var GOAL_KINDS = ["metric", "delivery"];
107
107
  new Set(GOAL_KINDS);
108
+ var RECORD_VISIBILITIES = ["private", "team", "organization"];
109
+ new Set(RECORD_VISIBILITIES);
110
+ var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
111
+ new Set(RECORD_LIST_VIEWS);
108
112
  var VERSION = "1.0.0";
109
113
  var GTM_SKILLS = [
110
114
  // ── research ────────────────────────────────────────────────────────
@@ -668,6 +672,49 @@ var FLEET_AGENT_CREDENTIAL_FAMILIES = [
668
672
  FLEET_AGENT_CREDENTIAL_FAMILIES.flatMap(
669
673
  (family) => family.envNames
670
674
  );
675
+ var FLEET_LINK_FRAME_KINDS = {
676
+ /** Raw bytes: terminal output/input, log lines, file chunks. */
677
+ DATA: 1,
678
+ /** `[cols u16][rows u16]`. */
679
+ RESIZE: 2,
680
+ /** `[code i32]`. */
681
+ EXIT: 3,
682
+ /** UTF-8 JSON control message. */
683
+ JSON: 10,
684
+ /** UTF-8 reason code. */
685
+ CLOSE: 11,
686
+ /** A full picture (the existing computer-frame encoding). */
687
+ FRAME: 20,
688
+ /** A pointer / key / text event (the existing computer input encoding). */
689
+ INPUT: 21,
690
+ /** Changed tiles `[w][h][count]{x,y,w,h,len,jpeg}`. */
691
+ TILES: 23,
692
+ /** `[bytes u32]` credit. */
693
+ ACK: 30,
694
+ /** End of a stream. */
695
+ END: 31,
696
+ /** UTF-8 text ≤ 256 KiB, pasted into a desktop. */
697
+ CLIP: 40
698
+ };
699
+ new Set(Object.values(FLEET_LINK_FRAME_KINDS));
700
+ var FLEET_LINK_CONTROL_TYPES = [
701
+ "link.hello",
702
+ "link.ready",
703
+ "link.ping",
704
+ "link.pong",
705
+ "link.pause",
706
+ "link.resume",
707
+ "link.drain",
708
+ "channel.open",
709
+ "channel.ready",
710
+ "channel.refused",
711
+ "channel.close",
712
+ "operation.progress",
713
+ "operation.done",
714
+ "operation.cancel"
715
+ ];
716
+ new Set(FLEET_LINK_CONTROL_TYPES);
717
+ new TextEncoder();
671
718
  var EMAIL_INBOX_CAP_FIELDS = [
672
719
  "inboxDailySends",
673
720
  "inboxBurstSends",
@@ -810,6 +857,115 @@ var ACTION_CATEGORIES = Object.freeze([
810
857
  Object.freeze(
811
858
  ACTION_CATEGORIES.filter((c) => c !== "read.internal")
812
859
  );
860
+ var DOMAIN_EVENT_CATALOG = [
861
+ // EW-P2-6 — `org:write` (and the app) create Organizations.
862
+ { type: "organization.created", domain: "organization", aggregateType: "organization", phase: "P2" },
863
+ { type: "organization.updated", domain: "organization", aggregateType: "organization", phase: "P1" },
864
+ {
865
+ type: "organization.member.added",
866
+ domain: "organization",
867
+ aggregateType: "organization",
868
+ phase: "P1",
869
+ child: "member"
870
+ },
871
+ {
872
+ type: "organization.member.updated",
873
+ domain: "organization",
874
+ aggregateType: "organization",
875
+ phase: "P1",
876
+ child: "member"
877
+ },
878
+ {
879
+ type: "organization.member.removed",
880
+ domain: "organization",
881
+ aggregateType: "organization",
882
+ phase: "P1",
883
+ child: "member"
884
+ },
885
+ { type: "agent.created", domain: "agents", aggregateType: "agent", phase: "P1" },
886
+ { type: "agent.updated", domain: "agents", aggregateType: "agent", phase: "P1" },
887
+ { type: "agent.status_changed", domain: "agents", aggregateType: "agent", phase: "P1" },
888
+ { type: "agent.archived", domain: "agents", aggregateType: "agent", phase: "P1" },
889
+ { type: "agent.deleted", domain: "agents", aggregateType: "agent", phase: "P1" },
890
+ { type: "team.created", domain: "teams", aggregateType: "team", phase: "P1" },
891
+ { type: "team.updated", domain: "teams", aggregateType: "team", phase: "P1" },
892
+ { type: "team.deleted", domain: "teams", aggregateType: "team", phase: "P1" },
893
+ { type: "team.member.added", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
894
+ { type: "team.member.updated", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
895
+ { type: "team.member.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
896
+ { type: "team.resource.added", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
897
+ { type: "team.resource.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
898
+ { type: "work.created", domain: "works", aggregateType: "work", phase: "P1" },
899
+ { type: "work.updated", domain: "works", aggregateType: "work", phase: "P1" },
900
+ { type: "work.archived", domain: "works", aggregateType: "work", phase: "P1" },
901
+ { type: "work.deleted", domain: "works", aggregateType: "work", phase: "P1" },
902
+ { type: "work.member.added", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
903
+ { type: "work.member.updated", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
904
+ { type: "work.member.removed", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
905
+ { type: "mission.created", domain: "missions", aggregateType: "mission", phase: "P2" },
906
+ { type: "mission.updated", domain: "missions", aggregateType: "mission", phase: "P2" },
907
+ { type: "mission.status_changed", domain: "missions", aggregateType: "mission", phase: "P2" },
908
+ { type: "mission.deleted", domain: "missions", aggregateType: "mission", phase: "P2" },
909
+ { type: "mission.goal.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
910
+ { type: "mission.goal.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
911
+ { type: "mission.work.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
912
+ { type: "mission.work.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
913
+ { type: "goal.created", domain: "goals", aggregateType: "goal", phase: "P2" },
914
+ { type: "goal.updated", domain: "goals", aggregateType: "goal", phase: "P2" },
915
+ { type: "goal.status_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
916
+ { type: "goal.archived", domain: "goals", aggregateType: "goal", phase: "P2" },
917
+ { type: "goal.unarchived", domain: "goals", aggregateType: "goal", phase: "P2" },
918
+ { type: "goal.deleted", domain: "goals", aggregateType: "goal", phase: "P2" },
919
+ { type: "goal.progress_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
920
+ { type: "idea.created", domain: "ideas", aggregateType: "idea", phase: "P2" },
921
+ { type: "idea.updated", domain: "ideas", aggregateType: "idea", phase: "P2" },
922
+ { type: "idea.status_changed", domain: "ideas", aggregateType: "idea", phase: "P2" },
923
+ { type: "idea.deleted", domain: "ideas", aggregateType: "idea", phase: "P2" },
924
+ { type: "task.created", domain: "tasks", aggregateType: "task", phase: "P1" },
925
+ { type: "task.updated", domain: "tasks", aggregateType: "task", phase: "P1" },
926
+ { type: "task.transitioned", domain: "tasks", aggregateType: "task", phase: "P1" },
927
+ { type: "task.deleted", domain: "tasks", aggregateType: "task", phase: "P1" },
928
+ { type: "task.assignee.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
929
+ { type: "task.assignee.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
930
+ { type: "task.watcher.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
931
+ { type: "task.watcher.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
932
+ { type: "task.block.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
933
+ { type: "task.block.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
934
+ { type: "task.relation.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
935
+ { type: "task.relation.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
936
+ { type: "task.comment.created", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
937
+ { type: "task.comment.updated", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
938
+ { type: "task.comment.deleted", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
939
+ { type: "task.attachment.added", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
940
+ { type: "task.attachment.removed", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
941
+ { type: "task.runtime_updated", domain: "tasks", aggregateType: "task", phase: "P1", optIn: true },
942
+ { type: "inbox.item.created", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
943
+ { type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
944
+ { type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
945
+ { type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
946
+ { type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
947
+ { type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
948
+ { type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
949
+ { type: "kb.document.archived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
950
+ { type: "kb.document.unarchived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
951
+ { type: "kb.document.deleted", domain: "kb", aggregateType: "kb_document", phase: "P3" },
952
+ { type: "kb.document.review_changed", domain: "kb", aggregateType: "kb_document", phase: "P3" },
953
+ { type: "kb.folder.created", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
954
+ { type: "kb.folder.updated", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
955
+ { type: "kb.folder.deleted", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
956
+ { type: "email.message.received", domain: "email", aggregateType: "email_message", phase: "P4" },
957
+ { type: "email.message.sent", domain: "email", aggregateType: "email_message", phase: "P4" },
958
+ { type: "email.message.status_changed", domain: "email", aggregateType: "email_message", phase: "P4" },
959
+ { type: "task.visibility_changed", domain: "visibility", aggregateType: "task", phase: "P1" },
960
+ { type: "agent.visibility_changed", domain: "visibility", aggregateType: "agent", phase: "P1" },
961
+ { type: "goal.visibility_changed", domain: "visibility", aggregateType: "goal", phase: "P2" },
962
+ { type: "mission.visibility_changed", domain: "visibility", aggregateType: "mission", phase: "P2" },
963
+ { type: "idea.visibility_changed", domain: "visibility", aggregateType: "idea", phase: "P2" }
964
+ ];
965
+ DOMAIN_EVENT_CATALOG.map((entry) => entry.type);
966
+ new Map(
967
+ DOMAIN_EVENT_CATALOG.map((entry) => [entry.type, entry])
968
+ );
813
969
  var PLUGIN_CAPABILITIES = {
814
970
  // Notifications v2 (EW-650) — Email Providers. Plugins MAY declare
815
971
  // `EMAIL_OUTBOUND`, `EMAIL_INBOUND`, or both. See
@@ -865,7 +1021,8 @@ var MailchimpTransactionalPlugin = class {
865
1021
  subject: input.subject,
866
1022
  text: input.bodyText,
867
1023
  html: input.bodyHtml,
868
- headers: input.replyTo ? { "Reply-To": input.replyTo } : void 0,
1024
+ // EW-P4-3 — RFC threading headers ride along with Reply-To.
1025
+ headers: input.replyTo || input.headers ? { ...input.headers ?? {}, ...input.replyTo ? { "Reply-To": input.replyTo } : {} } : void 0,
869
1026
  metadata: input.metadata,
870
1027
  attachments: input.attachments?.map((a) => ({
871
1028
  type: a.mimeType,
package/dist/index.js CHANGED
@@ -95,10 +95,14 @@ var USER_SELECTABLE_WORK_KINDS = [
95
95
  "repo",
96
96
  "app"
97
97
  ];
98
- var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "default"];
98
+ var WORK_KINDS = [...USER_SELECTABLE_WORK_KINDS, "company", "campaign", "project", "default"];
99
99
  new Set(WORK_KINDS);
100
100
  var GOAL_KINDS = ["metric", "delivery"];
101
101
  new Set(GOAL_KINDS);
102
+ var RECORD_VISIBILITIES = ["private", "team", "organization"];
103
+ new Set(RECORD_VISIBILITIES);
104
+ var RECORD_LIST_VIEWS = ["mine", "shared", "organization"];
105
+ new Set(RECORD_LIST_VIEWS);
102
106
  var VERSION = "1.0.0";
103
107
  var GTM_SKILLS = [
104
108
  // ── research ────────────────────────────────────────────────────────
@@ -662,6 +666,49 @@ var FLEET_AGENT_CREDENTIAL_FAMILIES = [
662
666
  FLEET_AGENT_CREDENTIAL_FAMILIES.flatMap(
663
667
  (family) => family.envNames
664
668
  );
669
+ var FLEET_LINK_FRAME_KINDS = {
670
+ /** Raw bytes: terminal output/input, log lines, file chunks. */
671
+ DATA: 1,
672
+ /** `[cols u16][rows u16]`. */
673
+ RESIZE: 2,
674
+ /** `[code i32]`. */
675
+ EXIT: 3,
676
+ /** UTF-8 JSON control message. */
677
+ JSON: 10,
678
+ /** UTF-8 reason code. */
679
+ CLOSE: 11,
680
+ /** A full picture (the existing computer-frame encoding). */
681
+ FRAME: 20,
682
+ /** A pointer / key / text event (the existing computer input encoding). */
683
+ INPUT: 21,
684
+ /** Changed tiles `[w][h][count]{x,y,w,h,len,jpeg}`. */
685
+ TILES: 23,
686
+ /** `[bytes u32]` credit. */
687
+ ACK: 30,
688
+ /** End of a stream. */
689
+ END: 31,
690
+ /** UTF-8 text ≤ 256 KiB, pasted into a desktop. */
691
+ CLIP: 40
692
+ };
693
+ new Set(Object.values(FLEET_LINK_FRAME_KINDS));
694
+ var FLEET_LINK_CONTROL_TYPES = [
695
+ "link.hello",
696
+ "link.ready",
697
+ "link.ping",
698
+ "link.pong",
699
+ "link.pause",
700
+ "link.resume",
701
+ "link.drain",
702
+ "channel.open",
703
+ "channel.ready",
704
+ "channel.refused",
705
+ "channel.close",
706
+ "operation.progress",
707
+ "operation.done",
708
+ "operation.cancel"
709
+ ];
710
+ new Set(FLEET_LINK_CONTROL_TYPES);
711
+ new TextEncoder();
665
712
  var EMAIL_INBOX_CAP_FIELDS = [
666
713
  "inboxDailySends",
667
714
  "inboxBurstSends",
@@ -804,6 +851,115 @@ var ACTION_CATEGORIES = Object.freeze([
804
851
  Object.freeze(
805
852
  ACTION_CATEGORIES.filter((c) => c !== "read.internal")
806
853
  );
854
+ var DOMAIN_EVENT_CATALOG = [
855
+ // EW-P2-6 — `org:write` (and the app) create Organizations.
856
+ { type: "organization.created", domain: "organization", aggregateType: "organization", phase: "P2" },
857
+ { type: "organization.updated", domain: "organization", aggregateType: "organization", phase: "P1" },
858
+ {
859
+ type: "organization.member.added",
860
+ domain: "organization",
861
+ aggregateType: "organization",
862
+ phase: "P1",
863
+ child: "member"
864
+ },
865
+ {
866
+ type: "organization.member.updated",
867
+ domain: "organization",
868
+ aggregateType: "organization",
869
+ phase: "P1",
870
+ child: "member"
871
+ },
872
+ {
873
+ type: "organization.member.removed",
874
+ domain: "organization",
875
+ aggregateType: "organization",
876
+ phase: "P1",
877
+ child: "member"
878
+ },
879
+ { type: "agent.created", domain: "agents", aggregateType: "agent", phase: "P1" },
880
+ { type: "agent.updated", domain: "agents", aggregateType: "agent", phase: "P1" },
881
+ { type: "agent.status_changed", domain: "agents", aggregateType: "agent", phase: "P1" },
882
+ { type: "agent.archived", domain: "agents", aggregateType: "agent", phase: "P1" },
883
+ { type: "agent.deleted", domain: "agents", aggregateType: "agent", phase: "P1" },
884
+ { type: "team.created", domain: "teams", aggregateType: "team", phase: "P1" },
885
+ { type: "team.updated", domain: "teams", aggregateType: "team", phase: "P1" },
886
+ { type: "team.deleted", domain: "teams", aggregateType: "team", phase: "P1" },
887
+ { type: "team.member.added", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
888
+ { type: "team.member.updated", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
889
+ { type: "team.member.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "member" },
890
+ { type: "team.resource.added", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
891
+ { type: "team.resource.removed", domain: "teams", aggregateType: "team", phase: "P1", child: "resource" },
892
+ { type: "work.created", domain: "works", aggregateType: "work", phase: "P1" },
893
+ { type: "work.updated", domain: "works", aggregateType: "work", phase: "P1" },
894
+ { type: "work.archived", domain: "works", aggregateType: "work", phase: "P1" },
895
+ { type: "work.deleted", domain: "works", aggregateType: "work", phase: "P1" },
896
+ { type: "work.member.added", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
897
+ { type: "work.member.updated", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
898
+ { type: "work.member.removed", domain: "works", aggregateType: "work", phase: "P1", child: "member" },
899
+ { type: "mission.created", domain: "missions", aggregateType: "mission", phase: "P2" },
900
+ { type: "mission.updated", domain: "missions", aggregateType: "mission", phase: "P2" },
901
+ { type: "mission.status_changed", domain: "missions", aggregateType: "mission", phase: "P2" },
902
+ { type: "mission.deleted", domain: "missions", aggregateType: "mission", phase: "P2" },
903
+ { type: "mission.goal.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
904
+ { type: "mission.goal.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "goal" },
905
+ { type: "mission.work.linked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
906
+ { type: "mission.work.unlinked", domain: "missions", aggregateType: "mission", phase: "P2", child: "work" },
907
+ { type: "goal.created", domain: "goals", aggregateType: "goal", phase: "P2" },
908
+ { type: "goal.updated", domain: "goals", aggregateType: "goal", phase: "P2" },
909
+ { type: "goal.status_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
910
+ { type: "goal.archived", domain: "goals", aggregateType: "goal", phase: "P2" },
911
+ { type: "goal.unarchived", domain: "goals", aggregateType: "goal", phase: "P2" },
912
+ { type: "goal.deleted", domain: "goals", aggregateType: "goal", phase: "P2" },
913
+ { type: "goal.progress_changed", domain: "goals", aggregateType: "goal", phase: "P2" },
914
+ { type: "idea.created", domain: "ideas", aggregateType: "idea", phase: "P2" },
915
+ { type: "idea.updated", domain: "ideas", aggregateType: "idea", phase: "P2" },
916
+ { type: "idea.status_changed", domain: "ideas", aggregateType: "idea", phase: "P2" },
917
+ { type: "idea.deleted", domain: "ideas", aggregateType: "idea", phase: "P2" },
918
+ { type: "task.created", domain: "tasks", aggregateType: "task", phase: "P1" },
919
+ { type: "task.updated", domain: "tasks", aggregateType: "task", phase: "P1" },
920
+ { type: "task.transitioned", domain: "tasks", aggregateType: "task", phase: "P1" },
921
+ { type: "task.deleted", domain: "tasks", aggregateType: "task", phase: "P1" },
922
+ { type: "task.assignee.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
923
+ { type: "task.assignee.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "assignee" },
924
+ { type: "task.watcher.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
925
+ { type: "task.watcher.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "watcher" },
926
+ { type: "task.block.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
927
+ { type: "task.block.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "block" },
928
+ { type: "task.relation.added", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
929
+ { type: "task.relation.removed", domain: "tasks", aggregateType: "task", phase: "P1", child: "relation" },
930
+ { type: "task.comment.created", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
931
+ { type: "task.comment.updated", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
932
+ { type: "task.comment.deleted", domain: "tasks", aggregateType: "task", phase: "P1", child: "comment" },
933
+ { type: "task.attachment.added", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
934
+ { type: "task.attachment.removed", domain: "tasks", aggregateType: "task", phase: "P3", child: "attachment" },
935
+ { type: "task.runtime_updated", domain: "tasks", aggregateType: "task", phase: "P1", optIn: true },
936
+ { type: "inbox.item.created", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
937
+ { type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
938
+ { type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
939
+ { type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
940
+ { type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
941
+ { type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
942
+ { type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
943
+ { type: "kb.document.archived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
944
+ { type: "kb.document.unarchived", domain: "kb", aggregateType: "kb_document", phase: "P3" },
945
+ { type: "kb.document.deleted", domain: "kb", aggregateType: "kb_document", phase: "P3" },
946
+ { type: "kb.document.review_changed", domain: "kb", aggregateType: "kb_document", phase: "P3" },
947
+ { type: "kb.folder.created", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
948
+ { type: "kb.folder.updated", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
949
+ { type: "kb.folder.deleted", domain: "kb", aggregateType: "kb_folder", phase: "P3" },
950
+ { type: "email.message.received", domain: "email", aggregateType: "email_message", phase: "P4" },
951
+ { type: "email.message.sent", domain: "email", aggregateType: "email_message", phase: "P4" },
952
+ { type: "email.message.status_changed", domain: "email", aggregateType: "email_message", phase: "P4" },
953
+ { type: "task.visibility_changed", domain: "visibility", aggregateType: "task", phase: "P1" },
954
+ { type: "agent.visibility_changed", domain: "visibility", aggregateType: "agent", phase: "P1" },
955
+ { type: "goal.visibility_changed", domain: "visibility", aggregateType: "goal", phase: "P2" },
956
+ { type: "mission.visibility_changed", domain: "visibility", aggregateType: "mission", phase: "P2" },
957
+ { type: "idea.visibility_changed", domain: "visibility", aggregateType: "idea", phase: "P2" }
958
+ ];
959
+ DOMAIN_EVENT_CATALOG.map((entry) => entry.type);
960
+ new Map(
961
+ DOMAIN_EVENT_CATALOG.map((entry) => [entry.type, entry])
962
+ );
807
963
  var PLUGIN_CAPABILITIES = {
808
964
  // Notifications v2 (EW-650) — Email Providers. Plugins MAY declare
809
965
  // `EMAIL_OUTBOUND`, `EMAIL_INBOUND`, or both. See
@@ -859,7 +1015,8 @@ var MailchimpTransactionalPlugin = class {
859
1015
  subject: input.subject,
860
1016
  text: input.bodyText,
861
1017
  html: input.bodyHtml,
862
- headers: input.replyTo ? { "Reply-To": input.replyTo } : void 0,
1018
+ // EW-P4-3 — RFC threading headers ride along with Reply-To.
1019
+ headers: input.replyTo || input.headers ? { ...input.headers ?? {}, ...input.replyTo ? { "Reply-To": input.replyTo } : {} } : void 0,
863
1020
  metadata: input.metadata,
864
1021
  attachments: input.attachments?.map((a) => ({
865
1022
  type: a.mimeType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ever-works/mailchimp-transactional-plugin",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Mailchimp Transactional (Mandrill) email provider plugin (outbound) for Ever Works platform",
5
5
  "author": {
6
6
  "name": "Ever Co. LTD",
@@ -32,14 +32,14 @@
32
32
  "test:watch": "vitest"
33
33
  },
34
34
  "dependencies": {
35
- "@ever-works/plugin": "^1.2.4",
35
+ "@ever-works/plugin": "^1.2.6",
36
36
  "@mailchimp/mailchimp_transactional": "^1.0.59"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^26.6.4",
40
40
  "tsup": "^8.0.0",
41
41
  "typescript": "^5.9.3",
42
- "vitest": "^4.1.0"
42
+ "vitest": "^5.0.5"
43
43
  },
44
44
  "everworks": {
45
45
  "plugin": {
@@ -82,8 +82,8 @@
82
82
  "url": "https://github.com/ever-works/ever-works/issues"
83
83
  },
84
84
  "everworksRelease": {
85
- "contentHash": "sha256:b969e116cb185e44d8450ee6d98536e1a60f5e948a5f1a32bc6e78cfeaa8a849",
86
- "commit": "61b8320b4ad7d30bf5161acf7ee13b250a6172b9",
87
- "source": "https://github.com/ever-works/ever-works/tree/61b8320b4ad7d30bf5161acf7ee13b250a6172b9/packages/plugins/mailchimp-transactional"
85
+ "contentHash": "sha256:44a6d974d0d907196052e2e842d625a13d39aa0578ce3e1f06e2fdb96ff22c6d",
86
+ "commit": "54552a4d2dcb0e2d5213b0a47fd3ffcbd432f73c",
87
+ "source": "https://github.com/ever-works/ever-works/tree/54552a4d2dcb0e2d5213b0a47fd3ffcbd432f73c/packages/plugins/mailchimp-transactional"
88
88
  }
89
89
  }