@servicetitan/toolbelt-shared-registry 1.7.4 → 1.7.5

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.
@@ -43,6 +43,11 @@ interface PanelEntityData {
43
43
  link?: string;
44
44
  /** Optional subtitle text for the entity */
45
45
  subtitle?: string;
46
+ /** Optional root entity reference for related comms feed */
47
+ rootEntity?: {
48
+ type: string;
49
+ id: string;
50
+ };
46
51
  /** Optional additional data associated with the entity */
47
52
  data?: Record<string, JSON>;
48
53
  }
@@ -1 +1 @@
1
- {"version":3,"file":"comm-hub-registry.d.ts","sourceRoot":"","sources":["../src/comm-hub-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EACH,cAAc,EACd,eAAe,EACf,cAAc,EACjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAExE,eAAO,MAAM,iBAAiB,kCAAkC,CAAC;AAEjE,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AAEvD,MAAM,MAAM,sBAAsB,GAC5B,cAAc,GACd,aAAa,GACb,cAAc,GACd,aAAa,GACb,cAAc,GACd,OAAO,CAAC;AAEd,UAAU,oBAAoB;IAC1B,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED,UAAU,mBAAmB;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE;QAChB,cAAc,EAAE,MAAM,CAAC;QACvB,oBAAoB,EAAE,MAAM,CAAC;KAChC,CAAC;IACF,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,oBAAoB;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE;QACjB,cAAc,EAAE,MAAM,CAAC;QACvB,oBAAoB,EAAE,MAAM,CAAC;KAChC,CAAC;IACF,mBAAm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an/web-components';\nimport { injectable, provide, useDependencies } from '@servicetitan/react-ioc';\nimport {\n RegistryReader,\n RegistryService,\n RegistryWriter,\n} from '@servicetitan/shared-data-registry';\nimport { RegistryStore } from '@servicetitan/shared-data-registry/mobx';\n\nexport const commHubRegistryId = 'toolbelt:comm-hub-registry-id';\n\nexport const CommHubActivePanelItemId = 'active-panel';\n\nexport type CommHubActivePanelType =\n | 'chat:channel'\n | 'chat:thread'\n | 'chat:mention'\n | 'chat:entity'\n | 'email:entity'\n | 'email';\n\ninterface ChatPanelChannelData {\n conversationId: string;\n}\n\ninterface ChatPanelThreadData {\n conversationId: string;\n parentConversation: {\n conversationId: string;\n conversationThreadId: string;\n };\n chatMessageId: string;\n}\n\ninterface ChatPanelMentionData {\n conversationId: string;\n mentionMessageChatId: string;\n parentConversation?: {\n conversationId: string;\n conversationThreadId: string;\n };\n parentMessageChatId?: string;\n}\n\n/**\n * Data structure for entity panel information in the communication hub.\n * Used for both chat and email entity panels.\n */\ninterface PanelEntityData {\n /** Unique identifier for the entity */\n id: string;\n /** Display name of the entity */\n name: string;\n /** Entity type identifier */\n type: string;\n /** Human-readable type name */\n typeName: string;\n /** Panel title text (including id, type name and name) */\n title: string;\n /** Optional URL link to the entity */\n link?: string;\n /** Optional subtitle text for the entity */\n subtitle?: string;\n /** Optional additional data associated with the entity */\n data?: Record<string, JSON>;\n}\n\ninterface EmailPanelData {\n conversationId: string;\n}\n\nexport interface CommHubRegistryItem<T extends CommHubActivePanelType> {\n type: T;\n data: T extends 'chat:channel'\n ? ChatPanelChannelData\n : T extends 'chat:thread'\n ? ChatPanelThreadData\n : T extends 'chat:mention'\n ? ChatPanelMentionData\n : T extends 'chat:entity'\n ? PanelEntityData\n : T extends 'email:entity'\n ? PanelEntityData\n : EmailPanelData;\n}\n\n@injectable()\nexport class CommHubRegistry<T extends CommHubActivePanelType> extends RegistryService<\n CommHubRegistryItem<T>\n> {\n constructor() {\n super(commHubRegistryId);\n }\n}\n\n@injectable()\nexport class CommHubRegistryReader<T extends CommHubActivePanelType> extends RegistryReader<\n CommHubRegistryItem<T>\n> {\n constructor() {\n super(commHubRegistryId);\n }\n}\n\n@injectable()\nexport class CommHubRegistryWriter<T extends CommHubActivePanelType> extends RegistryWriter<\n CommHubRegistryItem<T>\n> {\n constructor() {\n super(commHubRegistryId);\n }\n}\n\n@injectable()\nexport class CommHubRegistryStore<T extends CommHubActivePanelType> extends RegistryStore<\n CommHubRegistryItem<T>\n> {\n constructor() {\n super(commHubRegistryId);\n }\n}\n\nexport const CommHubRegistryProvider = provide({\n singletons: [CommHubRegistry, CommHubRegistryWriter, CommHubRegistryReader],\n})(({ children }) => {\n useDependencies(CommHubRegistry);\n\n return children;\n});\n"],"names":["injectable","provide","useDependencies","RegistryReader","RegistryService","RegistryWriter","RegistryStore","commHubRegistryId","CommHubActivePanelItemId","CommHubRegistry","CommHubRegistryReader","CommHubRegistryWriter","CommHubRegistryStore","CommHubRegistryProvider","singletons","children"],"mappings":";;;;;;;;;AACA,SAASA,UAAU,EAAEC,OAAO,EAAEC,eAAe,QAAQ,0BAA0B;AAC/E,SACIC,cAAc,EACdC,eAAe,EACfC,cAAc,QACX,qCAAqC;AAC5C,SAASC,aAAa,QAAQ,0CAA0C;AAExE,OAAO,MAAMC,oBAAoB,gCAAgC;AAEjE,OAAO,MAAMC,2BAA2B,eAAe;AA4EvD,OAAO,MAAMC,wBAA0DL;IAGnE,aAAc;QACV,KAAK,CAACG;IACV;AACJ;;;;;;AAGA,OAAO,MAAMG,8BAAgEP;IAGzE,aAAc;QACV,KAAK,CAACI;IACV;AACJ;;;;;;AAGA,OAAO,MAAMI,8BAAgEN;IAGzE,aAAc;QACV,KAAK,CAACE;IACV;AACJ;;;;;;AAGA,OAAO,MAAMK,6BAA+DN;IAGxE,aAAc;QACV,KAAK,CAACC;IACV;AACJ;;;;;;AAEA,OAAO,MAAMM,0BAA0BZ,QAAQ;IAC3Ca,YAAY;QAACL;QAAiBE;QAAuBD;KAAsB;AAC/E,GAAG,CAAC,EAAEK,QAAQ,EAAE;IACZb,gBAAgBO;IAEhB,OAAOM;AACX,GAAG"}
1
+ {"version":3,"sources":["../src/comm-hub-registry.ts"],"sourcesContent":["import type { JSON } from '@servicetitan/web-components';\nimport { injectable, provide, useDependencies } from '@servicetitan/react-ioc';\nimport {\n RegistryReader,\n RegistryService,\n RegistryWriter,\n} from '@servicetitan/shared-data-registry';\nimport { RegistryStore } from '@servicetitan/shared-data-registry/mobx';\n\nexport const commHubRegistryId = 'toolbelt:comm-hub-registry-id';\n\nexport const CommHubActivePanelItemId = 'active-panel';\n\nexport type CommHubActivePanelType =\n | 'chat:channel'\n | 'chat:thread'\n | 'chat:mention'\n | 'chat:entity'\n | 'email:entity'\n | 'email';\n\ninterface ChatPanelChannelData {\n conversationId: string;\n}\n\ninterface ChatPanelThreadData {\n conversationId: string;\n parentConversation: {\n conversationId: string;\n conversationThreadId: string;\n };\n chatMessageId: string;\n}\n\ninterface ChatPanelMentionData {\n conversationId: string;\n mentionMessageChatId: string;\n parentConversation?: {\n conversationId: string;\n conversationThreadId: string;\n };\n parentMessageChatId?: string;\n}\n\n/**\n * Data structure for entity panel information in the communication hub.\n * Used for both chat and email entity panels.\n */\ninterface PanelEntityData {\n /** Unique identifier for the entity */\n id: string;\n /** Display name of the entity */\n name: string;\n /** Entity type identifier */\n type: string;\n /** Human-readable type name */\n typeName: string;\n /** Panel title text (including id, type name and name) */\n title: string;\n /** Optional URL link to the entity */\n link?: string;\n /** Optional subtitle text for the entity */\n subtitle?: string;\n /** Optional root entity reference for related comms feed */\n rootEntity?: {\n type: string;\n id: string;\n };\n /** Optional additional data associated with the entity */\n data?: Record<string, JSON>;\n}\n\ninterface EmailPanelData {\n conversationId: string;\n}\n\nexport interface CommHubRegistryItem<T extends CommHubActivePanelType> {\n type: T;\n data: T extends 'chat:channel'\n ? ChatPanelChannelData\n : T extends 'chat:thread'\n ? ChatPanelThreadData\n : T extends 'chat:mention'\n ? ChatPanelMentionData\n : T extends 'chat:entity'\n ? PanelEntityData\n : T extends 'email:entity'\n ? PanelEntityData\n : EmailPanelData;\n}\n\n@injectable()\nexport class CommHubRegistry<T extends CommHubActivePanelType> extends RegistryService<\n CommHubRegistryItem<T>\n> {\n constructor() {\n super(commHubRegistryId);\n }\n}\n\n@injectable()\nexport class CommHubRegistryReader<T extends CommHubActivePanelType> extends RegistryReader<\n CommHubRegistryItem<T>\n> {\n constructor() {\n super(commHubRegistryId);\n }\n}\n\n@injectable()\nexport class CommHubRegistryWriter<T extends CommHubActivePanelType> extends RegistryWriter<\n CommHubRegistryItem<T>\n> {\n constructor() {\n super(commHubRegistryId);\n }\n}\n\n@injectable()\nexport class CommHubRegistryStore<T extends CommHubActivePanelType> extends RegistryStore<\n CommHubRegistryItem<T>\n> {\n constructor() {\n super(commHubRegistryId);\n }\n}\n\nexport const CommHubRegistryProvider = provide({\n singletons: [CommHubRegistry, CommHubRegistryWriter, CommHubRegistryReader],\n})(({ children }) => {\n useDependencies(CommHubRegistry);\n\n return children;\n});\n"],"names":["injectable","provide","useDependencies","RegistryReader","RegistryService","RegistryWriter","RegistryStore","commHubRegistryId","CommHubActivePanelItemId","CommHubRegistry","CommHubRegistryReader","CommHubRegistryWriter","CommHubRegistryStore","CommHubRegistryProvider","singletons","children"],"mappings":";;;;;;;;;AACA,SAASA,UAAU,EAAEC,OAAO,EAAEC,eAAe,QAAQ,0BAA0B;AAC/E,SACIC,cAAc,EACdC,eAAe,EACfC,cAAc,QACX,qCAAqC;AAC5C,SAASC,aAAa,QAAQ,0CAA0C;AAExE,OAAO,MAAMC,oBAAoB,gCAAgC;AAEjE,OAAO,MAAMC,2BAA2B,eAAe;AAiFvD,OAAO,MAAMC,wBAA0DL;IAGnE,aAAc;QACV,KAAK,CAACG;IACV;AACJ;;;;;;AAGA,OAAO,MAAMG,8BAAgEP;IAGzE,aAAc;QACV,KAAK,CAACI;IACV;AACJ;;;;;;AAGA,OAAO,MAAMI,8BAAgEN;IAGzE,aAAc;QACV,KAAK,CAACE;IACV;AACJ;;;;;;AAGA,OAAO,MAAMK,6BAA+DN;IAGxE,aAAc;QACV,KAAK,CAACC;IACV;AACJ;;;;;;AAEA,OAAO,MAAMM,0BAA0BZ,QAAQ;IAC3Ca,YAAY;QAACL;QAAiBE;QAAuBD;KAAsB;AAC/E,GAAG,CAAC,EAAEK,QAAQ,EAAE;IACZb,gBAAgBO;IAEhB,OAAOM;AACX,GAAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/toolbelt-shared-registry",
3
- "version": "1.7.4",
3
+ "version": "1.7.5",
4
4
  "description": "",
5
5
  "files": [
6
6
  "dist",
@@ -26,5 +26,5 @@
26
26
  "cli": {
27
27
  "webpack": false
28
28
  },
29
- "gitHead": "259955fa283a26cbdf6436b0a23b47134a82c461"
29
+ "gitHead": "ab1469ec715e6873644a3e90c2cb006e35e41e6d"
30
30
  }
@@ -61,6 +61,11 @@ interface PanelEntityData {
61
61
  link?: string;
62
62
  /** Optional subtitle text for the entity */
63
63
  subtitle?: string;
64
+ /** Optional root entity reference for related comms feed */
65
+ rootEntity?: {
66
+ type: string;
67
+ id: string;
68
+ };
64
69
  /** Optional additional data associated with the entity */
65
70
  data?: Record<string, JSON>;
66
71
  }