@aglyn/plugins-crm 1.0.0-beta.143

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.
Files changed (669) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +7 -0
  3. package/package.json +57 -0
  4. package/src/index.d.ts +21 -0
  5. package/src/index.js +29 -0
  6. package/src/index.js.map +1 -0
  7. package/src/lib/components/activity-list.d.ts +98 -0
  8. package/src/lib/components/activity-list.js +321 -0
  9. package/src/lib/components/activity-list.js.map +1 -0
  10. package/src/lib/components/activity-queries.d.ts +117 -0
  11. package/src/lib/components/activity-queries.js +198 -0
  12. package/src/lib/components/activity-queries.js.map +1 -0
  13. package/src/lib/components/add-to-list-button.d.ts +25 -0
  14. package/src/lib/components/add-to-list-button.js +64 -0
  15. package/src/lib/components/add-to-list-button.js.map +1 -0
  16. package/src/lib/components/add-to-list-dialog.d.ts +24 -0
  17. package/src/lib/components/add-to-list-dialog.js +327 -0
  18. package/src/lib/components/add-to-list-dialog.js.map +1 -0
  19. package/src/lib/components/assignment-rule-drawer.d.ts +43 -0
  20. package/src/lib/components/assignment-rule-drawer.js +293 -0
  21. package/src/lib/components/assignment-rule-drawer.js.map +1 -0
  22. package/src/lib/components/companies-bulk-bar.d.ts +29 -0
  23. package/src/lib/components/companies-bulk-bar.js +274 -0
  24. package/src/lib/components/companies-bulk-bar.js.map +1 -0
  25. package/src/lib/components/companies-section.d.ts +54 -0
  26. package/src/lib/components/companies-section.js +522 -0
  27. package/src/lib/components/companies-section.js.map +1 -0
  28. package/src/lib/components/company-contacts-card.d.ts +49 -0
  29. package/src/lib/components/company-contacts-card.js +435 -0
  30. package/src/lib/components/company-contacts-card.js.map +1 -0
  31. package/src/lib/components/company-deals-card.d.ts +20 -0
  32. package/src/lib/components/company-deals-card.js +38 -0
  33. package/src/lib/components/company-deals-card.js.map +1 -0
  34. package/src/lib/components/company-detail-page.d.ts +20 -0
  35. package/src/lib/components/company-detail-page.js +165 -0
  36. package/src/lib/components/company-detail-page.js.map +1 -0
  37. package/src/lib/components/company-edit-drawer.d.ts +65 -0
  38. package/src/lib/components/company-edit-drawer.js +433 -0
  39. package/src/lib/components/company-edit-drawer.js.map +1 -0
  40. package/src/lib/components/company-import-drawer.d.ts +42 -0
  41. package/src/lib/components/company-import-drawer.js +99 -0
  42. package/src/lib/components/company-import-drawer.js.map +1 -0
  43. package/src/lib/components/company-picker.d.ts +127 -0
  44. package/src/lib/components/company-picker.js +323 -0
  45. package/src/lib/components/company-picker.js.map +1 -0
  46. package/src/lib/components/company-properties-card.d.ts +47 -0
  47. package/src/lib/components/company-properties-card.js +289 -0
  48. package/src/lib/components/company-properties-card.js.map +1 -0
  49. package/src/lib/components/contact-address-fields.d.ts +29 -0
  50. package/src/lib/components/contact-address-fields.js +149 -0
  51. package/src/lib/components/contact-address-fields.js.map +1 -0
  52. package/src/lib/components/contact-associations-card.d.ts +72 -0
  53. package/src/lib/components/contact-associations-card.js +296 -0
  54. package/src/lib/components/contact-associations-card.js.map +1 -0
  55. package/src/lib/components/contact-custom-columns.d.ts +38 -0
  56. package/src/lib/components/contact-custom-columns.js +102 -0
  57. package/src/lib/components/contact-custom-columns.js.map +1 -0
  58. package/src/lib/components/contact-custom-fields-card.d.ts +39 -0
  59. package/src/lib/components/contact-custom-fields-card.js +204 -0
  60. package/src/lib/components/contact-custom-fields-card.js.map +1 -0
  61. package/src/lib/components/contact-deals-card.d.ts +20 -0
  62. package/src/lib/components/contact-deals-card.js +38 -0
  63. package/src/lib/components/contact-deals-card.js.map +1 -0
  64. package/src/lib/components/contact-detail-page.d.ts +46 -0
  65. package/src/lib/components/contact-detail-page.js +535 -0
  66. package/src/lib/components/contact-detail-page.js.map +1 -0
  67. package/src/lib/components/contact-duplicates-card.d.ts +42 -0
  68. package/src/lib/components/contact-duplicates-card.js +167 -0
  69. package/src/lib/components/contact-duplicates-card.js.map +1 -0
  70. package/src/lib/components/contact-field-drawer.d.ts +64 -0
  71. package/src/lib/components/contact-field-drawer.js +251 -0
  72. package/src/lib/components/contact-field-drawer.js.map +1 -0
  73. package/src/lib/components/contact-import-drawer.d.ts +46 -0
  74. package/src/lib/components/contact-import-drawer.js +149 -0
  75. package/src/lib/components/contact-import-drawer.js.map +1 -0
  76. package/src/lib/components/contact-known-by-card.d.ts +39 -0
  77. package/src/lib/components/contact-known-by-card.js +142 -0
  78. package/src/lib/components/contact-known-by-card.js.map +1 -0
  79. package/src/lib/components/contact-list-columns.d.ts +53 -0
  80. package/src/lib/components/contact-list-columns.js +288 -0
  81. package/src/lib/components/contact-list-columns.js.map +1 -0
  82. package/src/lib/components/contact-merge-dialog.d.ts +79 -0
  83. package/src/lib/components/contact-merge-dialog.js +405 -0
  84. package/src/lib/components/contact-merge-dialog.js.map +1 -0
  85. package/src/lib/components/contact-properties-card.d.ts +89 -0
  86. package/src/lib/components/contact-properties-card.js +492 -0
  87. package/src/lib/components/contact-properties-card.js.map +1 -0
  88. package/src/lib/components/contact-timeline-card.d.ts +68 -0
  89. package/src/lib/components/contact-timeline-card.js +435 -0
  90. package/src/lib/components/contact-timeline-card.js.map +1 -0
  91. package/src/lib/components/contacts-bulk-bar.d.ts +91 -0
  92. package/src/lib/components/contacts-bulk-bar.js +493 -0
  93. package/src/lib/components/contacts-bulk-bar.js.map +1 -0
  94. package/src/lib/components/contacts-section.d.ts +26 -0
  95. package/src/lib/components/contacts-section.js +1025 -0
  96. package/src/lib/components/contacts-section.js.map +1 -0
  97. package/src/lib/components/copy-capture-address-button.d.ts +33 -0
  98. package/src/lib/components/copy-capture-address-button.js +60 -0
  99. package/src/lib/components/copy-capture-address-button.js.map +1 -0
  100. package/src/lib/components/crm-attribution-zone.d.ts +38 -0
  101. package/src/lib/components/crm-attribution-zone.js +36 -0
  102. package/src/lib/components/crm-attribution-zone.js.map +1 -0
  103. package/src/lib/components/crm-booking-zone.d.ts +61 -0
  104. package/src/lib/components/crm-booking-zone.js +50 -0
  105. package/src/lib/components/crm-booking-zone.js.map +1 -0
  106. package/src/lib/components/crm-bulk-bar-frame.d.ts +47 -0
  107. package/src/lib/components/crm-bulk-bar-frame.js +137 -0
  108. package/src/lib/components/crm-bulk-bar-frame.js.map +1 -0
  109. package/src/lib/components/crm-call-actions.d.ts +65 -0
  110. package/src/lib/components/crm-call-actions.js +110 -0
  111. package/src/lib/components/crm-call-actions.js.map +1 -0
  112. package/src/lib/components/crm-column-menu.d.ts +21 -0
  113. package/src/lib/components/crm-column-menu.js +103 -0
  114. package/src/lib/components/crm-column-menu.js.map +1 -0
  115. package/src/lib/components/crm-console-page.d.ts +19 -0
  116. package/src/lib/components/crm-console-page.js +151 -0
  117. package/src/lib/components/crm-console-page.js.map +1 -0
  118. package/src/lib/components/crm-console-sections.d.ts +52 -0
  119. package/src/lib/components/crm-console-sections.js +83 -0
  120. package/src/lib/components/crm-console-sections.js.map +1 -0
  121. package/src/lib/components/crm-custom-field-control.d.ts +26 -0
  122. package/src/lib/components/crm-custom-field-control.js +131 -0
  123. package/src/lib/components/crm-custom-field-control.js.map +1 -0
  124. package/src/lib/components/crm-email-template-tools.d.ts +69 -0
  125. package/src/lib/components/crm-email-template-tools.js +240 -0
  126. package/src/lib/components/crm-email-template-tools.js.map +1 -0
  127. package/src/lib/components/crm-export-all-button.d.ts +39 -0
  128. package/src/lib/components/crm-export-all-button.js +98 -0
  129. package/src/lib/components/crm-export-all-button.js.map +1 -0
  130. package/src/lib/components/crm-filter-bar.d.ts +53 -0
  131. package/src/lib/components/crm-filter-bar.js +294 -0
  132. package/src/lib/components/crm-filter-bar.js.map +1 -0
  133. package/src/lib/components/crm-glance-card.d.ts +54 -0
  134. package/src/lib/components/crm-glance-card.js +219 -0
  135. package/src/lib/components/crm-glance-card.js.map +1 -0
  136. package/src/lib/components/crm-next-activity-column.d.ts +35 -0
  137. package/src/lib/components/crm-next-activity-column.js +100 -0
  138. package/src/lib/components/crm-next-activity-column.js.map +1 -0
  139. package/src/lib/components/crm-record-header.d.ts +97 -0
  140. package/src/lib/components/crm-record-header.js +160 -0
  141. package/src/lib/components/crm-record-header.js.map +1 -0
  142. package/src/lib/components/crm-record-insights-zone.d.ts +50 -0
  143. package/src/lib/components/crm-record-insights-zone.js +169 -0
  144. package/src/lib/components/crm-record-insights-zone.js.map +1 -0
  145. package/src/lib/components/crm-record-picker.d.ts +42 -0
  146. package/src/lib/components/crm-record-picker.js +104 -0
  147. package/src/lib/components/crm-record-picker.js.map +1 -0
  148. package/src/lib/components/crm-send-email-button.d.ts +39 -0
  149. package/src/lib/components/crm-send-email-button.js +81 -0
  150. package/src/lib/components/crm-send-email-button.js.map +1 -0
  151. package/src/lib/components/crm-send-email-dialog.d.ts +61 -0
  152. package/src/lib/components/crm-send-email-dialog.js +851 -0
  153. package/src/lib/components/crm-send-email-dialog.js.map +1 -0
  154. package/src/lib/components/crm-site-picker.d.ts +61 -0
  155. package/src/lib/components/crm-site-picker.js +99 -0
  156. package/src/lib/components/crm-site-picker.js.map +1 -0
  157. package/src/lib/components/crm-suite-lock.d.ts +29 -0
  158. package/src/lib/components/crm-suite-lock.js +114 -0
  159. package/src/lib/components/crm-suite-lock.js.map +1 -0
  160. package/src/lib/components/crm-tasks-due-card.d.ts +42 -0
  161. package/src/lib/components/crm-tasks-due-card.js +225 -0
  162. package/src/lib/components/crm-tasks-due-card.js.map +1 -0
  163. package/src/lib/components/crm-views-control.d.ts +65 -0
  164. package/src/lib/components/crm-views-control.js +518 -0
  165. package/src/lib/components/crm-views-control.js.map +1 -0
  166. package/src/lib/components/csv-import-drawer.d.ts +132 -0
  167. package/src/lib/components/csv-import-drawer.js +746 -0
  168. package/src/lib/components/csv-import-drawer.js.map +1 -0
  169. package/src/lib/components/deal-board.d.ts +70 -0
  170. package/src/lib/components/deal-board.js +478 -0
  171. package/src/lib/components/deal-board.js.map +1 -0
  172. package/src/lib/components/deal-detail-page.d.ts +18 -0
  173. package/src/lib/components/deal-detail-page.js +323 -0
  174. package/src/lib/components/deal-detail-page.js.map +1 -0
  175. package/src/lib/components/deal-edit-drawer.d.ts +59 -0
  176. package/src/lib/components/deal-edit-drawer.js +640 -0
  177. package/src/lib/components/deal-edit-drawer.js.map +1 -0
  178. package/src/lib/components/deal-import-drawer.d.ts +24 -0
  179. package/src/lib/components/deal-import-drawer.js +83 -0
  180. package/src/lib/components/deal-import-drawer.js.map +1 -0
  181. package/src/lib/components/deal-products-card.d.ts +48 -0
  182. package/src/lib/components/deal-products-card.js +614 -0
  183. package/src/lib/components/deal-products-card.js.map +1 -0
  184. package/src/lib/components/deal-properties-card.d.ts +29 -0
  185. package/src/lib/components/deal-properties-card.js +144 -0
  186. package/src/lib/components/deal-properties-card.js.map +1 -0
  187. package/src/lib/components/deal-stage-card.d.ts +24 -0
  188. package/src/lib/components/deal-stage-card.js +199 -0
  189. package/src/lib/components/deal-stage-card.js.map +1 -0
  190. package/src/lib/components/deals-bulk-bar.d.ts +31 -0
  191. package/src/lib/components/deals-bulk-bar.js +340 -0
  192. package/src/lib/components/deals-bulk-bar.js.map +1 -0
  193. package/src/lib/components/deals-section.d.ts +49 -0
  194. package/src/lib/components/deals-section.js +767 -0
  195. package/src/lib/components/deals-section.js.map +1 -0
  196. package/src/lib/components/email-capture-card.d.ts +42 -0
  197. package/src/lib/components/email-capture-card.js +134 -0
  198. package/src/lib/components/email-capture-card.js.map +1 -0
  199. package/src/lib/components/email-template-drawer.d.ts +33 -0
  200. package/src/lib/components/email-template-drawer.js +209 -0
  201. package/src/lib/components/email-template-drawer.js.map +1 -0
  202. package/src/lib/components/email-templates-card.d.ts +33 -0
  203. package/src/lib/components/email-templates-card.js +370 -0
  204. package/src/lib/components/email-templates-card.js.map +1 -0
  205. package/src/lib/components/erase-person-action.d.ts +92 -0
  206. package/src/lib/components/erase-person-action.js +261 -0
  207. package/src/lib/components/erase-person-action.js.map +1 -0
  208. package/src/lib/components/fields-section.d.ts +37 -0
  209. package/src/lib/components/fields-section.js +641 -0
  210. package/src/lib/components/fields-section.js.map +1 -0
  211. package/src/lib/components/form-contact-fields-card.d.ts +46 -0
  212. package/src/lib/components/form-contact-fields-card.js +253 -0
  213. package/src/lib/components/form-contact-fields-card.js.map +1 -0
  214. package/src/lib/components/insert-link-at-caret.d.ts +28 -0
  215. package/src/lib/components/insert-link-at-caret.js +37 -0
  216. package/src/lib/components/insert-link-at-caret.js.map +1 -0
  217. package/src/lib/components/lead-convert-dialog.d.ts +32 -0
  218. package/src/lib/components/lead-convert-dialog.js +493 -0
  219. package/src/lib/components/lead-convert-dialog.js.map +1 -0
  220. package/src/lib/components/lead-detail-page.d.ts +16 -0
  221. package/src/lib/components/lead-detail-page.js +163 -0
  222. package/src/lib/components/lead-detail-page.js.map +1 -0
  223. package/src/lib/components/lead-history-card.d.ts +32 -0
  224. package/src/lib/components/lead-history-card.js +165 -0
  225. package/src/lib/components/lead-history-card.js.map +1 -0
  226. package/src/lib/components/lead-import-drawer.d.ts +24 -0
  227. package/src/lib/components/lead-import-drawer.js +95 -0
  228. package/src/lib/components/lead-import-drawer.js.map +1 -0
  229. package/src/lib/components/lead-owner-select.d.ts +35 -0
  230. package/src/lib/components/lead-owner-select.js +91 -0
  231. package/src/lib/components/lead-owner-select.js.map +1 -0
  232. package/src/lib/components/lead-properties-card.d.ts +61 -0
  233. package/src/lib/components/lead-properties-card.js +395 -0
  234. package/src/lib/components/lead-properties-card.js.map +1 -0
  235. package/src/lib/components/lead-status-chip.d.ts +12 -0
  236. package/src/lib/components/lead-status-chip.js +43 -0
  237. package/src/lib/components/lead-status-chip.js.map +1 -0
  238. package/src/lib/components/lead-surfaces-note.d.ts +126 -0
  239. package/src/lib/components/lead-surfaces-note.js +262 -0
  240. package/src/lib/components/lead-surfaces-note.js.map +1 -0
  241. package/src/lib/components/lead-unqualify-dialog.d.ts +24 -0
  242. package/src/lib/components/lead-unqualify-dialog.js +125 -0
  243. package/src/lib/components/lead-unqualify-dialog.js.map +1 -0
  244. package/src/lib/components/leads-bulk-bar.d.ts +58 -0
  245. package/src/lib/components/leads-bulk-bar.js +307 -0
  246. package/src/lib/components/leads-bulk-bar.js.map +1 -0
  247. package/src/lib/components/leads-section.d.ts +23 -0
  248. package/src/lib/components/leads-section.js +664 -0
  249. package/src/lib/components/leads-section.js.map +1 -0
  250. package/src/lib/components/linked-deals-card.d.ts +32 -0
  251. package/src/lib/components/linked-deals-card.js +163 -0
  252. package/src/lib/components/linked-deals-card.js.map +1 -0
  253. package/src/lib/components/log-activity-dialog.d.ts +60 -0
  254. package/src/lib/components/log-activity-dialog.js +368 -0
  255. package/src/lib/components/log-activity-dialog.js.map +1 -0
  256. package/src/lib/components/lost-reason-dialog.d.ts +26 -0
  257. package/src/lib/components/lost-reason-dialog.js +95 -0
  258. package/src/lib/components/lost-reason-dialog.js.map +1 -0
  259. package/src/lib/components/new-contact-drawer.d.ts +78 -0
  260. package/src/lib/components/new-contact-drawer.js +343 -0
  261. package/src/lib/components/new-contact-drawer.js.map +1 -0
  262. package/src/lib/components/org-lead-surfaces-note.d.ts +57 -0
  263. package/src/lib/components/org-lead-surfaces-note.js +172 -0
  264. package/src/lib/components/org-lead-surfaces-note.js.map +1 -0
  265. package/src/lib/components/owner-avatar.d.ts +18 -0
  266. package/src/lib/components/owner-avatar.js +61 -0
  267. package/src/lib/components/owner-avatar.js.map +1 -0
  268. package/src/lib/components/pipeline-stages-dialog.d.ts +43 -0
  269. package/src/lib/components/pipeline-stages-dialog.js +339 -0
  270. package/src/lib/components/pipeline-stages-dialog.js.map +1 -0
  271. package/src/lib/components/pipelines-dialog.d.ts +55 -0
  272. package/src/lib/components/pipelines-dialog.js +517 -0
  273. package/src/lib/components/pipelines-dialog.js.map +1 -0
  274. package/src/lib/components/recent-activity-feed.d.ts +39 -0
  275. package/src/lib/components/recent-activity-feed.js +103 -0
  276. package/src/lib/components/recent-activity-feed.js.map +1 -0
  277. package/src/lib/components/recipes-card.d.ts +39 -0
  278. package/src/lib/components/recipes-card.js +485 -0
  279. package/src/lib/components/recipes-card.js.map +1 -0
  280. package/src/lib/components/record-activity-card.d.ts +26 -0
  281. package/src/lib/components/record-activity-card.js +121 -0
  282. package/src/lib/components/record-activity-card.js.map +1 -0
  283. package/src/lib/components/record-files-card.d.ts +67 -0
  284. package/src/lib/components/record-files-card.js +290 -0
  285. package/src/lib/components/record-files-card.js.map +1 -0
  286. package/src/lib/components/record-tasks-card.d.ts +32 -0
  287. package/src/lib/components/record-tasks-card.js +306 -0
  288. package/src/lib/components/record-tasks-card.js.map +1 -0
  289. package/src/lib/components/reports/activity-card.d.ts +57 -0
  290. package/src/lib/components/reports/activity-card.js +281 -0
  291. package/src/lib/components/reports/activity-card.js.map +1 -0
  292. package/src/lib/components/reports/closed-deals-card.d.ts +20 -0
  293. package/src/lib/components/reports/closed-deals-card.js +194 -0
  294. package/src/lib/components/reports/closed-deals-card.js.map +1 -0
  295. package/src/lib/components/reports/contacts-mix-card.d.ts +27 -0
  296. package/src/lib/components/reports/contacts-mix-card.js +161 -0
  297. package/src/lib/components/reports/contacts-mix-card.js.map +1 -0
  298. package/src/lib/components/reports/contacts-trend-card.d.ts +31 -0
  299. package/src/lib/components/reports/contacts-trend-card.js +144 -0
  300. package/src/lib/components/reports/contacts-trend-card.js.map +1 -0
  301. package/src/lib/components/reports/forecast-card.d.ts +22 -0
  302. package/src/lib/components/reports/forecast-card.js +251 -0
  303. package/src/lib/components/reports/forecast-card.js.map +1 -0
  304. package/src/lib/components/reports/lead-counts.d.ts +32 -0
  305. package/src/lib/components/reports/lead-counts.js +44 -0
  306. package/src/lib/components/reports/lead-counts.js.map +1 -0
  307. package/src/lib/components/reports/lead-funnel-card.d.ts +38 -0
  308. package/src/lib/components/reports/lead-funnel-card.js +375 -0
  309. package/src/lib/components/reports/lead-funnel-card.js.map +1 -0
  310. package/src/lib/components/reports/pipeline-card.d.ts +19 -0
  311. package/src/lib/components/reports/pipeline-card.js +338 -0
  312. package/src/lib/components/reports/pipeline-card.js.map +1 -0
  313. package/src/lib/components/reports/report-bar-chart.d.ts +39 -0
  314. package/src/lib/components/reports/report-bar-chart.js +133 -0
  315. package/src/lib/components/reports/report-bar-chart.js.map +1 -0
  316. package/src/lib/components/reports/report-breakdown.d.ts +32 -0
  317. package/src/lib/components/reports/report-breakdown.js +105 -0
  318. package/src/lib/components/reports/report-breakdown.js.map +1 -0
  319. package/src/lib/components/reports/report-export.d.ts +37 -0
  320. package/src/lib/components/reports/report-export.js +66 -0
  321. package/src/lib/components/reports/report-export.js.map +1 -0
  322. package/src/lib/components/reports/report-format.d.ts +36 -0
  323. package/src/lib/components/reports/report-format.js +43 -0
  324. package/src/lib/components/reports/report-format.js.map +1 -0
  325. package/src/lib/components/reports/report-scope.d.ts +81 -0
  326. package/src/lib/components/reports/report-scope.js +58 -0
  327. package/src/lib/components/reports/report-scope.js.map +1 -0
  328. package/src/lib/components/reports/report-stat-tile.d.ts +47 -0
  329. package/src/lib/components/reports/report-stat-tile.js +96 -0
  330. package/src/lib/components/reports/report-stat-tile.js.map +1 -0
  331. package/src/lib/components/reports/source-conversion-card.d.ts +28 -0
  332. package/src/lib/components/reports/source-conversion-card.js +205 -0
  333. package/src/lib/components/reports/source-conversion-card.js.map +1 -0
  334. package/src/lib/components/reports/tasks-card.d.ts +26 -0
  335. package/src/lib/components/reports/tasks-card.js +279 -0
  336. package/src/lib/components/reports/tasks-card.js.map +1 -0
  337. package/src/lib/components/reports/use-aggregate-read.d.ts +99 -0
  338. package/src/lib/components/reports/use-aggregate-read.js +195 -0
  339. package/src/lib/components/reports/use-aggregate-read.js.map +1 -0
  340. package/src/lib/components/reports/won-lost-by-owner-card.d.ts +30 -0
  341. package/src/lib/components/reports/won-lost-by-owner-card.js +168 -0
  342. package/src/lib/components/reports/won-lost-by-owner-card.js.map +1 -0
  343. package/src/lib/components/reports-section.d.ts +42 -0
  344. package/src/lib/components/reports-section.js +308 -0
  345. package/src/lib/components/reports-section.js.map +1 -0
  346. package/src/lib/components/sending-addresses-card.d.ts +49 -0
  347. package/src/lib/components/sending-addresses-card.js +262 -0
  348. package/src/lib/components/sending-addresses-card.js.map +1 -0
  349. package/src/lib/components/settings-section.d.ts +151 -0
  350. package/src/lib/components/settings-section.js +783 -0
  351. package/src/lib/components/settings-section.js.map +1 -0
  352. package/src/lib/components/task-cells.d.ts +51 -0
  353. package/src/lib/components/task-cells.js +139 -0
  354. package/src/lib/components/task-cells.js.map +1 -0
  355. package/src/lib/components/task-edit-drawer.d.ts +53 -0
  356. package/src/lib/components/task-edit-drawer.js +483 -0
  357. package/src/lib/components/task-edit-drawer.js.map +1 -0
  358. package/src/lib/components/task-import-drawer.d.ts +24 -0
  359. package/src/lib/components/task-import-drawer.js +82 -0
  360. package/src/lib/components/task-import-drawer.js.map +1 -0
  361. package/src/lib/components/task-snooze-menu.d.ts +65 -0
  362. package/src/lib/components/task-snooze-menu.js +207 -0
  363. package/src/lib/components/task-snooze-menu.js.map +1 -0
  364. package/src/lib/components/tasks-bulk-bar.d.ts +25 -0
  365. package/src/lib/components/tasks-bulk-bar.js +348 -0
  366. package/src/lib/components/tasks-bulk-bar.js.map +1 -0
  367. package/src/lib/components/tasks-calendar.d.ts +38 -0
  368. package/src/lib/components/tasks-calendar.js +228 -0
  369. package/src/lib/components/tasks-calendar.js.map +1 -0
  370. package/src/lib/components/tasks-section.d.ts +27 -0
  371. package/src/lib/components/tasks-section.js +579 -0
  372. package/src/lib/components/tasks-section.js.map +1 -0
  373. package/src/lib/components/use-contact-campaign-emails.d.ts +32 -0
  374. package/src/lib/components/use-contact-campaign-emails.js +83 -0
  375. package/src/lib/components/use-contact-campaign-emails.js.map +1 -0
  376. package/src/lib/components/use-crm-api.d.ts +44 -0
  377. package/src/lib/components/use-crm-api.js +84 -0
  378. package/src/lib/components/use-crm-api.js.map +1 -0
  379. package/src/lib/components/use-crm-inbound-address.d.ts +60 -0
  380. package/src/lib/components/use-crm-inbound-address.js +124 -0
  381. package/src/lib/components/use-crm-inbound-address.js.map +1 -0
  382. package/src/lib/components/use-emails-hub-path.d.ts +24 -0
  383. package/src/lib/components/use-emails-hub-path.js +59 -0
  384. package/src/lib/components/use-emails-hub-path.js.map +1 -0
  385. package/src/lib/components/use-member-email-aliases.d.ts +54 -0
  386. package/src/lib/components/use-member-email-aliases.js +186 -0
  387. package/src/lib/components/use-member-email-aliases.js.map +1 -0
  388. package/src/lib/components/use-org-members.d.ts +40 -0
  389. package/src/lib/components/use-org-members.js +100 -0
  390. package/src/lib/components/use-org-members.js.map +1 -0
  391. package/src/lib/constants/api-routes.d.ts +109 -0
  392. package/src/lib/constants/api-routes.js +74 -0
  393. package/src/lib/constants/api-routes.js.map +1 -0
  394. package/src/lib/constants/bundle-common.d.ts +14 -0
  395. package/src/lib/constants/bundle-common.js +14 -0
  396. package/src/lib/constants/bundle-common.js.map +1 -0
  397. package/src/lib/constants/company-filters.d.ts +18 -0
  398. package/src/lib/constants/company-filters.js +51 -0
  399. package/src/lib/constants/company-filters.js.map +1 -0
  400. package/src/lib/constants/contact-filters.d.ts +38 -0
  401. package/src/lib/constants/contact-filters.js +294 -0
  402. package/src/lib/constants/contact-filters.js.map +1 -0
  403. package/src/lib/hooks/use-contact-field-definitions.d.ts +48 -0
  404. package/src/lib/hooks/use-contact-field-definitions.js +72 -0
  405. package/src/lib/hooks/use-contact-field-definitions.js.map +1 -0
  406. package/src/lib/hooks/use-contact-update.d.ts +25 -0
  407. package/src/lib/hooks/use-contact-update.js +80 -0
  408. package/src/lib/hooks/use-contact-update.js.map +1 -0
  409. package/src/lib/hooks/use-crm-activity-logger.d.ts +73 -0
  410. package/src/lib/hooks/use-crm-activity-logger.js +101 -0
  411. package/src/lib/hooks/use-crm-activity-logger.js.map +1 -0
  412. package/src/lib/hooks/use-crm-bulk-apply.d.ts +52 -0
  413. package/src/lib/hooks/use-crm-bulk-apply.js +112 -0
  414. package/src/lib/hooks/use-crm-bulk-apply.js.map +1 -0
  415. package/src/lib/hooks/use-crm-default-view.d.ts +24 -0
  416. package/src/lib/hooks/use-crm-default-view.js +64 -0
  417. package/src/lib/hooks/use-crm-default-view.js.map +1 -0
  418. package/src/lib/hooks/use-crm-email-templates.d.ts +59 -0
  419. package/src/lib/hooks/use-crm-email-templates.js +103 -0
  420. package/src/lib/hooks/use-crm-email-templates.js.map +1 -0
  421. package/src/lib/hooks/use-crm-hub-path.d.ts +29 -0
  422. package/src/lib/hooks/use-crm-hub-path.js +41 -0
  423. package/src/lib/hooks/use-crm-hub-path.js.map +1 -0
  424. package/src/lib/hooks/use-crm-org-mount.d.ts +97 -0
  425. package/src/lib/hooks/use-crm-org-mount.js +215 -0
  426. package/src/lib/hooks/use-crm-org-mount.js.map +1 -0
  427. package/src/lib/hooks/use-crm-record-names.d.ts +52 -0
  428. package/src/lib/hooks/use-crm-record-names.js +126 -0
  429. package/src/lib/hooks/use-crm-record-names.js.map +1 -0
  430. package/src/lib/hooks/use-crm-records-quota.d.ts +68 -0
  431. package/src/lib/hooks/use-crm-records-quota.js +118 -0
  432. package/src/lib/hooks/use-crm-records-quota.js.map +1 -0
  433. package/src/lib/hooks/use-crm-saved-view.d.ts +96 -0
  434. package/src/lib/hooks/use-crm-saved-view.js +329 -0
  435. package/src/lib/hooks/use-crm-saved-view.js.map +1 -0
  436. package/src/lib/hooks/use-crm-scope.d.ts +117 -0
  437. package/src/lib/hooks/use-crm-scope.js +147 -0
  438. package/src/lib/hooks/use-crm-scope.js.map +1 -0
  439. package/src/lib/hooks/use-crm-tasks.d.ts +85 -0
  440. package/src/lib/hooks/use-crm-tasks.js +153 -0
  441. package/src/lib/hooks/use-crm-tasks.js.map +1 -0
  442. package/src/lib/hooks/use-crm-view-grid.d.ts +55 -0
  443. package/src/lib/hooks/use-crm-view-grid.js +170 -0
  444. package/src/lib/hooks/use-crm-view-grid.js.map +1 -0
  445. package/src/lib/hooks/use-crm-views.d.ts +42 -0
  446. package/src/lib/hooks/use-crm-views.js +84 -0
  447. package/src/lib/hooks/use-crm-views.js.map +1 -0
  448. package/src/lib/hooks/use-deal-stage-api.d.ts +69 -0
  449. package/src/lib/hooks/use-deal-stage-api.js +78 -0
  450. package/src/lib/hooks/use-deal-stage-api.js.map +1 -0
  451. package/src/lib/hooks/use-deals.d.ts +47 -0
  452. package/src/lib/hooks/use-deals.js +105 -0
  453. package/src/lib/hooks/use-deals.js.map +1 -0
  454. package/src/lib/hooks/use-org-leads.d.ts +53 -0
  455. package/src/lib/hooks/use-org-leads.js +114 -0
  456. package/src/lib/hooks/use-org-leads.js.map +1 -0
  457. package/src/lib/hooks/use-org-member-directory.d.ts +36 -0
  458. package/src/lib/hooks/use-org-member-directory.js +116 -0
  459. package/src/lib/hooks/use-org-member-directory.js.map +1 -0
  460. package/src/lib/hooks/use-org-member-options.d.ts +38 -0
  461. package/src/lib/hooks/use-org-member-options.js +131 -0
  462. package/src/lib/hooks/use-org-member-options.js.map +1 -0
  463. package/src/lib/hooks/use-pipeline.d.ts +71 -0
  464. package/src/lib/hooks/use-pipeline.js +159 -0
  465. package/src/lib/hooks/use-pipeline.js.map +1 -0
  466. package/src/lib/model/companies-bulk-writes.d.ts +40 -0
  467. package/src/lib/model/companies-bulk-writes.js +103 -0
  468. package/src/lib/model/companies-bulk-writes.js.map +1 -0
  469. package/src/lib/model/companies-csv.d.ts +36 -0
  470. package/src/lib/model/companies-csv.js +38 -0
  471. package/src/lib/model/companies-csv.js.map +1 -0
  472. package/src/lib/model/companies.d.ts +99 -0
  473. package/src/lib/model/companies.js +168 -0
  474. package/src/lib/model/companies.js.map +1 -0
  475. package/src/lib/model/company-delete-route.d.ts +43 -0
  476. package/src/lib/model/company-delete-route.js +31 -0
  477. package/src/lib/model/company-delete-route.js.map +1 -0
  478. package/src/lib/model/company-delete.d.ts +42 -0
  479. package/src/lib/model/company-delete.js +52 -0
  480. package/src/lib/model/company-delete.js.map +1 -0
  481. package/src/lib/model/contact-duplicates.d.ts +58 -0
  482. package/src/lib/model/contact-duplicates.js +67 -0
  483. package/src/lib/model/contact-duplicates.js.map +1 -0
  484. package/src/lib/model/contact-record.d.ts +113 -0
  485. package/src/lib/model/contact-record.js +70 -0
  486. package/src/lib/model/contact-record.js.map +1 -0
  487. package/src/lib/model/contact-update.d.ts +93 -0
  488. package/src/lib/model/contact-update.js +50 -0
  489. package/src/lib/model/contact-update.js.map +1 -0
  490. package/src/lib/model/contacts-bulk-writes.d.ts +173 -0
  491. package/src/lib/model/contacts-bulk-writes.js +196 -0
  492. package/src/lib/model/contacts-bulk-writes.js.map +1 -0
  493. package/src/lib/model/contacts-csv.d.ts +54 -0
  494. package/src/lib/model/contacts-csv.js +67 -0
  495. package/src/lib/model/contacts-csv.js.map +1 -0
  496. package/src/lib/model/contacts-list-seed.d.ts +51 -0
  497. package/src/lib/model/contacts-list-seed.js +63 -0
  498. package/src/lib/model/contacts-list-seed.js.map +1 -0
  499. package/src/lib/model/crm-activity-report.d.ts +27 -0
  500. package/src/lib/model/crm-activity-report.js +56 -0
  501. package/src/lib/model/crm-activity-report.js.map +1 -0
  502. package/src/lib/model/crm-api.d.ts +49 -0
  503. package/src/lib/model/crm-api.js +47 -0
  504. package/src/lib/model/crm-api.js.map +1 -0
  505. package/src/lib/model/crm-bulk-writes.d.ts +147 -0
  506. package/src/lib/model/crm-bulk-writes.js +207 -0
  507. package/src/lib/model/crm-bulk-writes.js.map +1 -0
  508. package/src/lib/model/crm-company-import.d.ts +154 -0
  509. package/src/lib/model/crm-company-import.js +331 -0
  510. package/src/lib/model/crm-company-import.js.map +1 -0
  511. package/src/lib/model/crm-custom-draft.d.ts +62 -0
  512. package/src/lib/model/crm-custom-draft.js +67 -0
  513. package/src/lib/model/crm-custom-draft.js.map +1 -0
  514. package/src/lib/model/crm-deal-import.d.ts +112 -0
  515. package/src/lib/model/crm-deal-import.js +263 -0
  516. package/src/lib/model/crm-deal-import.js.map +1 -0
  517. package/src/lib/model/crm-import.d.ts +244 -0
  518. package/src/lib/model/crm-import.js +466 -0
  519. package/src/lib/model/crm-import.js.map +1 -0
  520. package/src/lib/model/crm-lead-import.d.ts +105 -0
  521. package/src/lib/model/crm-lead-import.js +255 -0
  522. package/src/lib/model/crm-lead-import.js.map +1 -0
  523. package/src/lib/model/crm-record-routes.d.ts +21 -0
  524. package/src/lib/model/crm-record-routes.js +70 -0
  525. package/src/lib/model/crm-record-routes.js.map +1 -0
  526. package/src/lib/model/crm-routes.d.ts +101 -0
  527. package/src/lib/model/crm-routes.js +92 -0
  528. package/src/lib/model/crm-routes.js.map +1 -0
  529. package/src/lib/model/crm-task-import.d.ts +94 -0
  530. package/src/lib/model/crm-task-import.js +275 -0
  531. package/src/lib/model/crm-task-import.js.map +1 -0
  532. package/src/lib/model/crm-view-param.d.ts +43 -0
  533. package/src/lib/model/crm-view-param.js +49 -0
  534. package/src/lib/model/crm-view-param.js.map +1 -0
  535. package/src/lib/model/deal-board-model.d.ts +241 -0
  536. package/src/lib/model/deal-board-model.js +439 -0
  537. package/src/lib/model/deal-board-model.js.map +1 -0
  538. package/src/lib/model/deal-form-model.d.ts +114 -0
  539. package/src/lib/model/deal-form-model.js +218 -0
  540. package/src/lib/model/deal-form-model.js.map +1 -0
  541. package/src/lib/model/deals-csv.d.ts +32 -0
  542. package/src/lib/model/deals-csv.js +37 -0
  543. package/src/lib/model/deals-csv.js.map +1 -0
  544. package/src/lib/model/import-column-shapes.d.ts +36 -0
  545. package/src/lib/model/import-column-shapes.js +76 -0
  546. package/src/lib/model/import-column-shapes.js.map +1 -0
  547. package/src/lib/model/lead-company-suggestion.d.ts +61 -0
  548. package/src/lib/model/lead-company-suggestion.js +65 -0
  549. package/src/lib/model/lead-company-suggestion.js.map +1 -0
  550. package/src/lib/model/lead-filters.d.ts +29 -0
  551. package/src/lib/model/lead-filters.js +39 -0
  552. package/src/lib/model/lead-filters.js.map +1 -0
  553. package/src/lib/model/lead-surfaces.d.ts +58 -0
  554. package/src/lib/model/lead-surfaces.js +67 -0
  555. package/src/lib/model/lead-surfaces.js.map +1 -0
  556. package/src/lib/model/leads-csv.d.ts +40 -0
  557. package/src/lib/model/leads-csv.js +40 -0
  558. package/src/lib/model/leads-csv.js.map +1 -0
  559. package/src/lib/model/next-activity-api.d.ts +31 -0
  560. package/src/lib/model/next-activity-api.js +57 -0
  561. package/src/lib/model/next-activity-api.js.map +1 -0
  562. package/src/lib/model/next-activity.d.ts +64 -0
  563. package/src/lib/model/next-activity.js +47 -0
  564. package/src/lib/model/next-activity.js.map +1 -0
  565. package/src/lib/model/person-key-web.d.ts +43 -0
  566. package/src/lib/model/person-key-web.js +52 -0
  567. package/src/lib/model/person-key-web.js.map +1 -0
  568. package/src/lib/model/record-facts.d.ts +282 -0
  569. package/src/lib/model/record-facts.js +434 -0
  570. package/src/lib/model/record-facts.js.map +1 -0
  571. package/src/lib/model/task-api.d.ts +28 -0
  572. package/src/lib/model/task-api.js +57 -0
  573. package/src/lib/model/task-api.js.map +1 -0
  574. package/src/lib/model/task-calendar.d.ts +108 -0
  575. package/src/lib/model/task-calendar.js +139 -0
  576. package/src/lib/model/task-calendar.js.map +1 -0
  577. package/src/lib/model/task-routes.d.ts +177 -0
  578. package/src/lib/model/task-routes.js +197 -0
  579. package/src/lib/model/task-routes.js.map +1 -0
  580. package/src/lib/model/task-scope.d.ts +45 -0
  581. package/src/lib/model/task-scope.js +51 -0
  582. package/src/lib/model/task-scope.js.map +1 -0
  583. package/src/lib/model/task-views.d.ts +149 -0
  584. package/src/lib/model/task-views.js +286 -0
  585. package/src/lib/model/task-views.js.map +1 -0
  586. package/src/lib/model/tasks-csv.d.ts +28 -0
  587. package/src/lib/model/tasks-csv.js +28 -0
  588. package/src/lib/model/tasks-csv.js.map +1 -0
  589. package/src/lib/plugin.d.ts +32 -0
  590. package/src/lib/plugin.js +208 -0
  591. package/src/lib/plugin.js.map +1 -0
  592. package/src/lib/server/companies-import.d.ts +57 -0
  593. package/src/lib/server/companies-import.js +242 -0
  594. package/src/lib/server/companies-import.js.map +1 -0
  595. package/src/lib/server/company-delete.d.ts +59 -0
  596. package/src/lib/server/company-delete.js +146 -0
  597. package/src/lib/server/company-delete.js.map +1 -0
  598. package/src/lib/server/contact-email-history.d.ts +82 -0
  599. package/src/lib/server/contact-email-history.js +264 -0
  600. package/src/lib/server/contact-email-history.js.map +1 -0
  601. package/src/lib/server/contact-profile.d.ts +41 -0
  602. package/src/lib/server/contact-profile.js +45 -0
  603. package/src/lib/server/contact-profile.js.map +1 -0
  604. package/src/lib/server/contact-update.d.ts +92 -0
  605. package/src/lib/server/contact-update.js +512 -0
  606. package/src/lib/server/contact-update.js.map +1 -0
  607. package/src/lib/server/contacts-import.d.ts +73 -0
  608. package/src/lib/server/contacts-import.js +263 -0
  609. package/src/lib/server/contacts-import.js.map +1 -0
  610. package/src/lib/server/contacts-merge.d.ts +86 -0
  611. package/src/lib/server/contacts-merge.js +206 -0
  612. package/src/lib/server/contacts-merge.js.map +1 -0
  613. package/src/lib/server/deals-import.d.ts +76 -0
  614. package/src/lib/server/deals-import.js +246 -0
  615. package/src/lib/server/deals-import.js.map +1 -0
  616. package/src/lib/server/email-send.d.ts +119 -0
  617. package/src/lib/server/email-send.js +667 -0
  618. package/src/lib/server/email-send.js.map +1 -0
  619. package/src/lib/server/email-template-duplicate.d.ts +19 -0
  620. package/src/lib/server/email-template-duplicate.js +206 -0
  621. package/src/lib/server/email-template-duplicate.js.map +1 -0
  622. package/src/lib/server/erase-person.d.ts +108 -0
  623. package/src/lib/server/erase-person.js +309 -0
  624. package/src/lib/server/erase-person.js.map +1 -0
  625. package/src/lib/server/import-context.d.ts +85 -0
  626. package/src/lib/server/import-context.js +181 -0
  627. package/src/lib/server/import-context.js.map +1 -0
  628. package/src/lib/server/inbound-address.d.ts +61 -0
  629. package/src/lib/server/inbound-address.js +188 -0
  630. package/src/lib/server/inbound-address.js.map +1 -0
  631. package/src/lib/server/lead-convert.d.ts +78 -0
  632. package/src/lib/server/lead-convert.js +250 -0
  633. package/src/lib/server/lead-convert.js.map +1 -0
  634. package/src/lib/server/leads-import.d.ts +84 -0
  635. package/src/lib/server/leads-import.js +261 -0
  636. package/src/lib/server/leads-import.js.map +1 -0
  637. package/src/lib/server/next-activity-routes.d.ts +33 -0
  638. package/src/lib/server/next-activity-routes.js +110 -0
  639. package/src/lib/server/next-activity-routes.js.map +1 -0
  640. package/src/lib/server/org-activity.d.ts +61 -0
  641. package/src/lib/server/org-activity.js +120 -0
  642. package/src/lib/server/org-activity.js.map +1 -0
  643. package/src/lib/server/org-caller.d.ts +110 -0
  644. package/src/lib/server/org-caller.js +154 -0
  645. package/src/lib/server/org-caller.js.map +1 -0
  646. package/src/lib/server/recipe-routes.d.ts +75 -0
  647. package/src/lib/server/recipe-routes.js +442 -0
  648. package/src/lib/server/recipe-routes.js.map +1 -0
  649. package/src/lib/server/record-facts.d.ts +65 -0
  650. package/src/lib/server/record-facts.js +337 -0
  651. package/src/lib/server/record-facts.js.map +1 -0
  652. package/src/lib/server/record-timeline.d.ts +51 -0
  653. package/src/lib/server/record-timeline.js +215 -0
  654. package/src/lib/server/record-timeline.js.map +1 -0
  655. package/src/lib/server/suite-gate.d.ts +42 -0
  656. package/src/lib/server/suite-gate.js +87 -0
  657. package/src/lib/server/suite-gate.js.map +1 -0
  658. package/src/lib/server/task-routes.d.ts +132 -0
  659. package/src/lib/server/task-routes.js +699 -0
  660. package/src/lib/server/task-routes.js.map +1 -0
  661. package/src/lib/server/tasks-import.d.ts +54 -0
  662. package/src/lib/server/tasks-import.js +157 -0
  663. package/src/lib/server/tasks-import.js.map +1 -0
  664. package/src/lib/server-deal-stage.d.ts +88 -0
  665. package/src/lib/server-deal-stage.js +316 -0
  666. package/src/lib/server-deal-stage.js.map +1 -0
  667. package/src/lib/server.d.ts +149 -0
  668. package/src/lib/server.js +615 -0
  669. package/src/lib/server.js.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/crm/src/lib/components/use-emails-hub-path.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport { buildRoute, Route } from '@aglyn/aglyn'\nimport { useParams } from 'next/navigation'\nimport { useCrmOrgMount } from '../hooks/use-crm-org-mount'\n\n/**\n * The Emails hub of the site this page is on — `/{org}/hosts/{site}/emails`\n * — or `null` when the page is not under a site.\n *\n * The sibling-hub pattern the Emails console uses to reach Marketing, in the\n * other direction: a CRM record page links a campaign entry to the email's\n * own report, which lives on the Emails surface, and the shell's `basePath`\n * names only this surface. Read off the URL rather than derived from\n * `basePath`, because the `[host]` segment is the site's subdomain and\n * nothing a CRM component holds says what that is.\n *\n * ⚠️ Under a site, THIS SITE's hub only. A record page under one site cannot\n * address a sibling site's Emails console without that site's subdomain,\n * which a contact document does not carry.\n *\n * At the ORGANIZATION level (AGL-2634) the URL names no site, and the mount\n * holds the org's site list instead: handed a `hostId`, this answers that\n * site's hub — `${hostsPath}/${subdomain}/emails` — or `null` for a site\n * whose subdomain the list could not answer, which is named and not linked.\n * Handed none, `null`: an org-level page has no hub of its own to fall\n * back to.\n */\nexport function useEmailsHubPath(hostId?: string | null): string | null {\n const params = useParams<{ orgSlug: string; host: string }>()\n const mount = useCrmOrgMount()\n const orgSlug = params?.orgSlug\n const host = params?.host\n if (orgSlug && host) {\n return buildRoute(Route.HOST_PLUGIN, { orgSlug, host, pluginSlug: 'emails' })\n }\n if (!mount || !hostId) return null\n const subdomain = mount.siteSubdomain(hostId)\n return subdomain ? `${mount.hostsPath}/${encodeURIComponent(subdomain)}/emails` : null\n}\n\nexport default useEmailsHubPath\n"],"names":["buildRoute","Route","useParams","useCrmOrgMount","useEmailsHubPath","hostId","params","mount","orgSlug","host","HOST_PLUGIN","pluginSlug","subdomain","siteSubdomain","hostsPath","encodeURIComponent"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;AAEA,SAASA,UAAU,EAAEC,KAAK,QAAQ,eAAc;AAChD,SAASC,SAAS,QAAQ,kBAAiB;AAC3C,SAASC,cAAc,QAAQ,gCAA4B;AAE3D;;;;;;;;;;;;;;;;;;;;;CAqBC,GACD,OAAO,SAASC,iBAAiBC,MAAsB;IACrD,MAAMC,SAASJ;IACf,MAAMK,QAAQJ;IACd,MAAMK,UAAUF,0BAAAA,OAAQE,OAAO;IAC/B,MAAMC,OAAOH,0BAAAA,OAAQG,IAAI;IACzB,IAAID,WAAWC,MAAM;QACnB,OAAOT,WAAWC,MAAMS,WAAW,EAAE;YAAEF;YAASC;YAAME,YAAY;QAAS;IAC7E;IACA,IAAI,CAACJ,SAAS,CAACF,QAAQ,OAAO;IAC9B,MAAMO,YAAYL,MAAMM,aAAa,CAACR;IACtC,OAAOO,YAAY,GAAGL,MAAMO,SAAS,CAAC,CAAC,EAAEC,mBAAmBH,WAAW,OAAO,CAAC,GAAG;AACpF;AAEA,eAAeR,iBAAgB"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { type MemberEmailAliasRow } from '@aglyn/aglyn/app-utils/member-email-aliases';
18
+ /** What one change answered: done, with what the route said, or refused and why. */
19
+ export type MemberEmailAliasChange = {
20
+ ok: true;
21
+ payload: Record<string, any>;
22
+ } | {
23
+ ok: false;
24
+ error: string;
25
+ };
26
+ export interface MemberEmailAliases {
27
+ status: 'idle' | 'loading' | 'ready' | 'error';
28
+ aliases: MemberEmailAliasRow[];
29
+ /** The address the member signs in with, which already counts as theirs. */
30
+ signInEmail: string | null;
31
+ error: string | null;
32
+ /** True while a change is in flight. */
33
+ busy: boolean;
34
+ add: (address: string) => Promise<MemberEmailAliasChange>;
35
+ resend: (address: string) => Promise<MemberEmailAliasChange>;
36
+ remove: (address: string) => Promise<MemberEmailAliasChange>;
37
+ /** Confirms the address a link was sent for; the token names the workspace. */
38
+ confirm: (token: string) => Promise<MemberEmailAliasChange>;
39
+ }
40
+ /**
41
+ * The signed-in member's own addresses in one workspace (AGL-2975), from
42
+ * the core route every surface shares. A list the member keeps for
43
+ * themselves, so it is read through the route rather than a listener: the
44
+ * rules close the collection to every client.
45
+ *
46
+ * Every change re-reads the list, so a row's state is always the stored
47
+ * one — an add that could not send its email still shows the address,
48
+ * waiting, with a way to send again. The page the member is on rides along
49
+ * as the path the confirmation link should land on.
50
+ */
51
+ export declare function useMemberEmailAliases(orgId: string | null, options: {
52
+ enabled: boolean;
53
+ }): MemberEmailAliases;
54
+ export default useMemberEmailAliases;
@@ -0,0 +1,186 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ 'use client';
17
+ import { _ as _extends } from "@swc/helpers/_/_extends";
18
+ import { MEMBER_EMAIL_ALIASES_ROUTE } from "@aglyn/aglyn/app-utils/member-email-aliases";
19
+ import { authorizedFetch } from "@aglyn/shared-util-http/authorized-token";
20
+ import { useUser } from "@aglyn/tenant-feature-instance";
21
+ import { useCallback, useEffect, useRef, useState } from "react";
22
+ const LOAD_FAILED = 'Your addresses could not be loaded.';
23
+ const CHANGE_FAILED = 'That change could not be made.';
24
+ /**
25
+ * The signed-in member's own addresses in one workspace (AGL-2975), from
26
+ * the core route every surface shares. A list the member keeps for
27
+ * themselves, so it is read through the route rather than a listener: the
28
+ * rules close the collection to every client.
29
+ *
30
+ * Every change re-reads the list, so a row's state is always the stored
31
+ * one — an add that could not send its email still shows the address,
32
+ * waiting, with a way to send again. The page the member is on rides along
33
+ * as the path the confirmation link should land on.
34
+ */ export function useMemberEmailAliases(orgId, options) {
35
+ const { enabled } = options;
36
+ const { data: user } = useUser();
37
+ const userRef = useRef(user);
38
+ userRef.current = user;
39
+ const [state, setState] = useState({
40
+ status: 'idle',
41
+ aliases: [],
42
+ signInEmail: null,
43
+ error: null
44
+ });
45
+ const [busy, setBusy] = useState(false);
46
+ const request = useCallback(async (method, body)=>{
47
+ const url = method === 'GET' ? `${MEMBER_EMAIL_ALIASES_ROUTE}?orgId=${encodeURIComponent(orgId != null ? orgId : '')}` : MEMBER_EMAIL_ALIASES_ROUTE;
48
+ const response = await authorizedFetch(userRef.current, url, _extends({
49
+ method
50
+ }, body ? {
51
+ headers: {
52
+ 'Content-Type': 'application/json'
53
+ },
54
+ body: JSON.stringify(body)
55
+ } : {}));
56
+ const payload = await response.json().catch(()=>({}));
57
+ return {
58
+ response,
59
+ payload
60
+ };
61
+ }, [
62
+ orgId
63
+ ]);
64
+ const load = useCallback(async ()=>{
65
+ if (!orgId) return;
66
+ try {
67
+ const { response, payload } = await request('GET');
68
+ if (!response.ok) {
69
+ setState((prior)=>{
70
+ var _payload_error;
71
+ return _extends({}, prior, {
72
+ status: 'error',
73
+ error: String((_payload_error = payload['error']) != null ? _payload_error : LOAD_FAILED)
74
+ });
75
+ });
76
+ return;
77
+ }
78
+ setState({
79
+ status: 'ready',
80
+ aliases: Array.isArray(payload['aliases']) ? payload['aliases'] : [],
81
+ signInEmail: typeof payload['signInEmail'] === 'string' ? payload['signInEmail'] : null,
82
+ error: null
83
+ });
84
+ } catch (cause) {
85
+ console.error(cause);
86
+ setState((prior)=>_extends({}, prior, {
87
+ status: 'error',
88
+ error: LOAD_FAILED
89
+ }));
90
+ }
91
+ }, [
92
+ orgId,
93
+ request
94
+ ]);
95
+ useEffect(()=>{
96
+ if (!enabled || !orgId) return;
97
+ setState((prior)=>_extends({}, prior, {
98
+ status: prior.status === 'ready' ? 'ready' : 'loading'
99
+ }));
100
+ void load();
101
+ }, [
102
+ enabled,
103
+ orgId,
104
+ load
105
+ ]);
106
+ const change = useCallback(async (method, body)=>{
107
+ setBusy(true);
108
+ try {
109
+ const { response, payload } = await request(method, body);
110
+ // A refused change and an accepted one both move the stored list —
111
+ // an add whose email could not leave is still on it.
112
+ await load();
113
+ if (!response.ok && payload['ok'] !== true) {
114
+ var _payload_error;
115
+ return {
116
+ ok: false,
117
+ error: String((_payload_error = payload['error']) != null ? _payload_error : CHANGE_FAILED)
118
+ };
119
+ }
120
+ if (payload['sent'] === false) {
121
+ var _payload_error1;
122
+ return {
123
+ ok: false,
124
+ error: String((_payload_error1 = payload['error']) != null ? _payload_error1 : CHANGE_FAILED)
125
+ };
126
+ }
127
+ return {
128
+ ok: true,
129
+ payload
130
+ };
131
+ } catch (cause) {
132
+ console.error(cause);
133
+ return {
134
+ ok: false,
135
+ error: CHANGE_FAILED
136
+ };
137
+ } finally{
138
+ setBusy(false);
139
+ }
140
+ }, [
141
+ request,
142
+ load
143
+ ]);
144
+ const returnPath = ()=>typeof window === 'undefined' ? '/' : window.location.pathname;
145
+ const add = useCallback((address)=>change('POST', {
146
+ orgId,
147
+ action: 'add',
148
+ address,
149
+ returnPath: returnPath()
150
+ }), [
151
+ change,
152
+ orgId
153
+ ]);
154
+ const resend = useCallback((address)=>change('POST', {
155
+ orgId,
156
+ action: 'resend',
157
+ address,
158
+ returnPath: returnPath()
159
+ }), [
160
+ change,
161
+ orgId
162
+ ]);
163
+ const remove = useCallback((address)=>change('DELETE', {
164
+ orgId,
165
+ address
166
+ }), [
167
+ change,
168
+ orgId
169
+ ]);
170
+ const confirm = useCallback((token)=>change('POST', {
171
+ action: 'confirm',
172
+ token
173
+ }), [
174
+ change
175
+ ]);
176
+ return _extends({}, state, {
177
+ busy,
178
+ add,
179
+ resend,
180
+ remove,
181
+ confirm
182
+ });
183
+ }
184
+ export default useMemberEmailAliases;
185
+
186
+ //# sourceMappingURL=use-member-email-aliases.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/crm/src/lib/components/use-member-email-aliases.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n'use client'\n\nimport {\n MEMBER_EMAIL_ALIASES_ROUTE,\n type MemberEmailAliasRow,\n} from '@aglyn/aglyn/app-utils/member-email-aliases'\nimport {\n authorizedFetch,\n type TokenSource,\n} from '@aglyn/shared-util-http/authorized-token'\nimport { useUser } from '@aglyn/tenant-feature-instance'\nimport { useCallback, useEffect, useRef, useState } from 'react'\n\n/** What one change answered: done, with what the route said, or refused and why. */\nexport type MemberEmailAliasChange =\n | { ok: true; payload: Record<string, any> }\n | { ok: false; error: string }\n\nexport interface MemberEmailAliases {\n status: 'idle' | 'loading' | 'ready' | 'error'\n aliases: MemberEmailAliasRow[]\n /** The address the member signs in with, which already counts as theirs. */\n signInEmail: string | null\n error: string | null\n /** True while a change is in flight. */\n busy: boolean\n add: (address: string) => Promise<MemberEmailAliasChange>\n resend: (address: string) => Promise<MemberEmailAliasChange>\n remove: (address: string) => Promise<MemberEmailAliasChange>\n /** Confirms the address a link was sent for; the token names the workspace. */\n confirm: (token: string) => Promise<MemberEmailAliasChange>\n}\n\nconst LOAD_FAILED = 'Your addresses could not be loaded.'\nconst CHANGE_FAILED = 'That change could not be made.'\n\n/**\n * The signed-in member's own addresses in one workspace (AGL-2975), from\n * the core route every surface shares. A list the member keeps for\n * themselves, so it is read through the route rather than a listener: the\n * rules close the collection to every client.\n *\n * Every change re-reads the list, so a row's state is always the stored\n * one — an add that could not send its email still shows the address,\n * waiting, with a way to send again. The page the member is on rides along\n * as the path the confirmation link should land on.\n */\nexport function useMemberEmailAliases(\n orgId: string | null,\n options: { enabled: boolean },\n): MemberEmailAliases {\n const { enabled } = options\n const { data: user } = useUser()\n const userRef = useRef(user)\n userRef.current = user\n const [state, setState] = useState<\n Pick<MemberEmailAliases, 'status' | 'aliases' | 'signInEmail' | 'error'>\n >({ status: 'idle', aliases: [], signInEmail: null, error: null })\n const [busy, setBusy] = useState(false)\n\n const request = useCallback(\n async (method: 'GET' | 'POST' | 'DELETE', body?: Record<string, unknown>) => {\n const url =\n method === 'GET'\n ? `${MEMBER_EMAIL_ALIASES_ROUTE}?orgId=${encodeURIComponent(orgId ?? '')}`\n : MEMBER_EMAIL_ALIASES_ROUTE\n const response = await authorizedFetch(\n userRef.current as TokenSource | null | undefined,\n url,\n {\n method,\n ...(body\n ? { headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body) }\n : {}),\n },\n )\n const payload = (await response.json().catch(() => ({}))) as Record<string, any>\n return { response, payload }\n },\n [orgId],\n )\n\n const load = useCallback(async () => {\n if (!orgId) return\n try {\n const { response, payload } = await request('GET')\n if (!response.ok) {\n setState((prior) => ({ ...prior, status: 'error', error: String(payload['error'] ?? LOAD_FAILED) }))\n return\n }\n setState({\n status: 'ready',\n aliases: Array.isArray(payload['aliases']) ? (payload['aliases'] as MemberEmailAliasRow[]) : [],\n signInEmail: typeof payload['signInEmail'] === 'string' ? payload['signInEmail'] : null,\n error: null,\n })\n } catch (cause) {\n console.error(cause)\n setState((prior) => ({ ...prior, status: 'error', error: LOAD_FAILED }))\n }\n }, [orgId, request])\n\n useEffect(() => {\n if (!enabled || !orgId) return\n setState((prior) => ({ ...prior, status: prior.status === 'ready' ? 'ready' : 'loading' }))\n void load()\n }, [enabled, orgId, load])\n\n const change = useCallback(\n async (\n method: 'POST' | 'DELETE',\n body: Record<string, unknown>,\n ): Promise<MemberEmailAliasChange> => {\n setBusy(true)\n try {\n const { response, payload } = await request(method, body)\n // A refused change and an accepted one both move the stored list —\n // an add whose email could not leave is still on it.\n await load()\n if (!response.ok && payload['ok'] !== true) {\n return { ok: false, error: String(payload['error'] ?? CHANGE_FAILED) }\n }\n if (payload['sent'] === false) {\n return { ok: false, error: String(payload['error'] ?? CHANGE_FAILED) }\n }\n return { ok: true, payload }\n } catch (cause) {\n console.error(cause)\n return { ok: false, error: CHANGE_FAILED }\n } finally {\n setBusy(false)\n }\n },\n [request, load],\n )\n\n const returnPath = () => (typeof window === 'undefined' ? '/' : window.location.pathname)\n\n const add = useCallback(\n (address: string) => change('POST', { orgId, action: 'add', address, returnPath: returnPath() }),\n [change, orgId],\n )\n const resend = useCallback(\n (address: string) => change('POST', { orgId, action: 'resend', address, returnPath: returnPath() }),\n [change, orgId],\n )\n const remove = useCallback(\n (address: string) => change('DELETE', { orgId, address }),\n [change, orgId],\n )\n const confirm = useCallback(\n (token: string) => change('POST', { action: 'confirm', token }),\n [change],\n )\n\n return { ...state, busy, add, resend, remove, confirm }\n}\n\nexport default useMemberEmailAliases\n"],"names":["MEMBER_EMAIL_ALIASES_ROUTE","authorizedFetch","useUser","useCallback","useEffect","useRef","useState","LOAD_FAILED","CHANGE_FAILED","useMemberEmailAliases","orgId","options","enabled","data","user","userRef","current","state","setState","status","aliases","signInEmail","error","busy","setBusy","request","method","body","url","encodeURIComponent","response","headers","JSON","stringify","payload","json","catch","load","ok","prior","String","Array","isArray","cause","console","change","returnPath","window","location","pathname","add","address","action","resend","remove","confirm","token"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;AAEA,SACEA,0BAA0B,QAErB,8CAA6C;AACpD,SACEC,eAAe,QAEV,2CAA0C;AACjD,SAASC,OAAO,QAAQ,iCAAgC;AACxD,SAASC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAO;AAsBhE,MAAMC,cAAc;AACpB,MAAMC,gBAAgB;AAEtB;;;;;;;;;;CAUC,GACD,OAAO,SAASC,sBACdC,KAAoB,EACpBC,OAA6B;IAE7B,MAAM,EAAEC,OAAO,EAAE,GAAGD;IACpB,MAAM,EAAEE,MAAMC,IAAI,EAAE,GAAGZ;IACvB,MAAMa,UAAUV,OAAOS;IACvBC,QAAQC,OAAO,GAAGF;IAClB,MAAM,CAACG,OAAOC,SAAS,GAAGZ,SAExB;QAAEa,QAAQ;QAAQC,SAAS,EAAE;QAAEC,aAAa;QAAMC,OAAO;IAAK;IAChE,MAAM,CAACC,MAAMC,QAAQ,GAAGlB,SAAS;IAEjC,MAAMmB,UAAUtB,YACd,OAAOuB,QAAmCC;QACxC,MAAMC,MACJF,WAAW,QACP,GAAG1B,2BAA2B,OAAO,EAAE6B,mBAAmBnB,gBAAAA,QAAS,KAAK,GACxEV;QACN,MAAM8B,WAAW,MAAM7B,gBACrBc,QAAQC,OAAO,EACfY,KACA;YACEF;WACIC,OACA;YAAEI,SAAS;gBAAE,gBAAgB;YAAmB;YAAGJ,MAAMK,KAAKC,SAAS,CAACN;QAAM,IAC9E,CAAC;QAGT,MAAMO,UAAW,MAAMJ,SAASK,IAAI,GAAGC,KAAK,CAAC,IAAO,CAAA,CAAC,CAAA;QACrD,OAAO;YAAEN;YAAUI;QAAQ;IAC7B,GACA;QAACxB;KAAM;IAGT,MAAM2B,OAAOlC,YAAY;QACvB,IAAI,CAACO,OAAO;QACZ,IAAI;YACF,MAAM,EAAEoB,QAAQ,EAAEI,OAAO,EAAE,GAAG,MAAMT,QAAQ;YAC5C,IAAI,CAACK,SAASQ,EAAE,EAAE;gBAChBpB,SAAS,CAACqB;wBAAsDL;2BAA3C,aAAKK;wBAAOpB,QAAQ;wBAASG,OAAOkB,QAAON,iBAAAA,OAAO,CAAC,QAAQ,YAAhBA,iBAAoB3B;;;gBACpF;YACF;YACAW,SAAS;gBACPC,QAAQ;gBACRC,SAASqB,MAAMC,OAAO,CAACR,OAAO,CAAC,UAAU,IAAKA,OAAO,CAAC,UAAU,GAA6B,EAAE;gBAC/Fb,aAAa,OAAOa,OAAO,CAAC,cAAc,KAAK,WAAWA,OAAO,CAAC,cAAc,GAAG;gBACnFZ,OAAO;YACT;QACF,EAAE,OAAOqB,OAAO;YACdC,QAAQtB,KAAK,CAACqB;YACdzB,SAAS,CAACqB,QAAW,aAAKA;oBAAOpB,QAAQ;oBAASG,OAAOf;;QAC3D;IACF,GAAG;QAACG;QAAOe;KAAQ;IAEnBrB,UAAU;QACR,IAAI,CAACQ,WAAW,CAACF,OAAO;QACxBQ,SAAS,CAACqB,QAAW,aAAKA;gBAAOpB,QAAQoB,MAAMpB,MAAM,KAAK,UAAU,UAAU;;QAC9E,KAAKkB;IACP,GAAG;QAACzB;QAASF;QAAO2B;KAAK;IAEzB,MAAMQ,SAAS1C,YACb,OACEuB,QACAC;QAEAH,QAAQ;QACR,IAAI;YACF,MAAM,EAAEM,QAAQ,EAAEI,OAAO,EAAE,GAAG,MAAMT,QAAQC,QAAQC;YACpD,mEAAmE;YACnE,qDAAqD;YACrD,MAAMU;YACN,IAAI,CAACP,SAASQ,EAAE,IAAIJ,OAAO,CAAC,KAAK,KAAK,MAAM;oBACRA;gBAAlC,OAAO;oBAAEI,IAAI;oBAAOhB,OAAOkB,QAAON,iBAAAA,OAAO,CAAC,QAAQ,YAAhBA,iBAAoB1B;gBAAe;YACvE;YACA,IAAI0B,OAAO,CAAC,OAAO,KAAK,OAAO;oBACKA;gBAAlC,OAAO;oBAAEI,IAAI;oBAAOhB,OAAOkB,QAAON,kBAAAA,OAAO,CAAC,QAAQ,YAAhBA,kBAAoB1B;gBAAe;YACvE;YACA,OAAO;gBAAE8B,IAAI;gBAAMJ;YAAQ;QAC7B,EAAE,OAAOS,OAAO;YACdC,QAAQtB,KAAK,CAACqB;YACd,OAAO;gBAAEL,IAAI;gBAAOhB,OAAOd;YAAc;QAC3C,SAAU;YACRgB,QAAQ;QACV;IACF,GACA;QAACC;QAASY;KAAK;IAGjB,MAAMS,aAAa,IAAO,OAAOC,WAAW,cAAc,MAAMA,OAAOC,QAAQ,CAACC,QAAQ;IAExF,MAAMC,MAAM/C,YACV,CAACgD,UAAoBN,OAAO,QAAQ;YAAEnC;YAAO0C,QAAQ;YAAOD;YAASL,YAAYA;QAAa,IAC9F;QAACD;QAAQnC;KAAM;IAEjB,MAAM2C,SAASlD,YACb,CAACgD,UAAoBN,OAAO,QAAQ;YAAEnC;YAAO0C,QAAQ;YAAUD;YAASL,YAAYA;QAAa,IACjG;QAACD;QAAQnC;KAAM;IAEjB,MAAM4C,SAASnD,YACb,CAACgD,UAAoBN,OAAO,UAAU;YAAEnC;YAAOyC;QAAQ,IACvD;QAACN;QAAQnC;KAAM;IAEjB,MAAM6C,UAAUpD,YACd,CAACqD,QAAkBX,OAAO,QAAQ;YAAEO,QAAQ;YAAWI;QAAM,IAC7D;QAACX;KAAO;IAGV,OAAO,aAAK5B;QAAOM;QAAM2B;QAAKG;QAAQC;QAAQC;;AAChD;AAEA,eAAe9C,sBAAqB"}
@@ -0,0 +1,40 @@
1
+ import { type CrmMemberOption } from '@aglyn/aglyn';
2
+ /** One team member, as an owner picker lists them. */
3
+ export type OrgMemberOption = CrmMemberOption;
4
+ export interface OrgMembers {
5
+ /** Every member of the workspace, by name. */
6
+ options: OrgMemberOption[];
7
+ /** The roster has answered — an empty list is then a real answer. */
8
+ ready: boolean;
9
+ /**
10
+ * The name to show for a stored reference — a uid, or an address the
11
+ * roster has — or the reference itself when the roster does not know it.
12
+ */
13
+ memberName: (ref: string) => string;
14
+ /**
15
+ * The member's ADDRESS for a stored reference — what a CSV export writes
16
+ * in the owner column, because the import resolves an owner by email —
17
+ * falling back to the name and then to the reference itself.
18
+ */
19
+ memberEmail: (ref: string) => string;
20
+ }
21
+ /**
22
+ * THE WORKSPACE'S ROSTER, for picking and naming a contact's owner
23
+ * (AGL-2596).
24
+ *
25
+ * Read through `/api/orgs/members`, not from Firestore: the roster is
26
+ * evaluated against the QUERY by the rules, and a scoped member's read of
27
+ * `orgs/{orgId}/members` is refused for exactly the shape the owner picker
28
+ * needs — every row. The route re-derives membership with the Admin SDK and
29
+ * answers any member of the org, which is who may see who else is on the
30
+ * team.
31
+ *
32
+ * Read only when ASKED — `enabled` — and once per workspace for the life of
33
+ * the mount. The list of contacts does not need the roster until a row
34
+ * carries an owner or the create drawer opens, and a request per mount of a
35
+ * page that may never show a name is a read paid for nothing.
36
+ */
37
+ export declare function useOrgMembers(orgId: string | null | undefined, options?: {
38
+ enabled?: boolean;
39
+ }): OrgMembers;
40
+ export default useOrgMembers;
@@ -0,0 +1,100 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ 'use client';
17
+ import { authorizedFetch } from "@aglyn/shared-util-http/authorized-token";
18
+ import { crmMemberOption, findOrgMember } from "@aglyn/aglyn";
19
+ import { useUser } from "@aglyn/tenant-feature-instance";
20
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
21
+ /**
22
+ * THE WORKSPACE'S ROSTER, for picking and naming a contact's owner
23
+ * (AGL-2596).
24
+ *
25
+ * Read through `/api/orgs/members`, not from Firestore: the roster is
26
+ * evaluated against the QUERY by the rules, and a scoped member's read of
27
+ * `orgs/{orgId}/members` is refused for exactly the shape the owner picker
28
+ * needs — every row. The route re-derives membership with the Admin SDK and
29
+ * answers any member of the org, which is who may see who else is on the
30
+ * team.
31
+ *
32
+ * Read only when ASKED — `enabled` — and once per workspace for the life of
33
+ * the mount. The list of contacts does not need the roster until a row
34
+ * carries an owner or the create drawer opens, and a request per mount of a
35
+ * page that may never show a name is a read paid for nothing.
36
+ */ export function useOrgMembers(orgId, options = {}) {
37
+ var _options_enabled, _ref;
38
+ const enabled = (_options_enabled = options.enabled) != null ? _options_enabled : false;
39
+ const { data: user } = useUser();
40
+ const userRef = useRef(user);
41
+ userRef.current = user;
42
+ const [loaded, setLoaded] = useState(null);
43
+ const loadedOrgId = (_ref = loaded == null ? void 0 : loaded.orgId) != null ? _ref : null;
44
+ useEffect(()=>{
45
+ if (!enabled || !orgId || loadedOrgId === orgId) return undefined;
46
+ let active = true;
47
+ void authorizedFetch(userRef.current, `/api/orgs/members?orgId=${encodeURIComponent(orgId)}`).then(async (response)=>response.ok ? await response.json() : {}).then((json)=>{
48
+ if (!active) return;
49
+ const members = Array.isArray(json == null ? void 0 : json.members) ? json.members : [];
50
+ setLoaded({
51
+ orgId,
52
+ options: members.map((member)=>crmMemberOption(member != null ? member : {})).filter((option)=>option !== null).sort((a, b)=>a.label.localeCompare(b.label))
53
+ });
54
+ }).catch(()=>{
55
+ // An unanswered roster is an EMPTY picker, not a broken page: the
56
+ // owner column falls back to the uid, and the picker says it has
57
+ // nobody to offer.
58
+ if (active) setLoaded({
59
+ orgId,
60
+ options: []
61
+ });
62
+ });
63
+ return ()=>{
64
+ active = false;
65
+ };
66
+ }, [
67
+ enabled,
68
+ orgId,
69
+ loadedOrgId
70
+ ]);
71
+ const current = loaded && loaded.orgId === orgId ? loaded : null;
72
+ const roster = useMemo(()=>{
73
+ var _ref;
74
+ return (_ref = current == null ? void 0 : current.options) != null ? _ref : [];
75
+ }, [
76
+ current
77
+ ]);
78
+ const memberName = useCallback((ref)=>{
79
+ var _ref;
80
+ var _findOrgMember;
81
+ return (_ref = (_findOrgMember = findOrgMember(roster, ref)) == null ? void 0 : _findOrgMember.label) != null ? _ref : ref;
82
+ }, [
83
+ roster
84
+ ]);
85
+ const memberEmail = useCallback((ref)=>{
86
+ const member = findOrgMember(roster, ref);
87
+ return (member == null ? void 0 : member.email) || (member == null ? void 0 : member.label) || ref;
88
+ }, [
89
+ roster
90
+ ]);
91
+ return {
92
+ options: roster,
93
+ ready: current !== null,
94
+ memberName,
95
+ memberEmail
96
+ };
97
+ }
98
+ export default useOrgMembers;
99
+
100
+ //# sourceMappingURL=use-org-members.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/crm/src/lib/components/use-org-members.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport {\n authorizedFetch,\n type TokenSource,\n} from '@aglyn/shared-util-http/authorized-token'\nimport { type CrmMemberOption, crmMemberOption, findOrgMember } from '@aglyn/aglyn'\nimport { useUser } from '@aglyn/tenant-feature-instance'\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react'\n\n/** One team member, as an owner picker lists them. */\nexport type OrgMemberOption = CrmMemberOption\n\nexport interface OrgMembers {\n /** Every member of the workspace, by name. */\n options: OrgMemberOption[]\n /** The roster has answered — an empty list is then a real answer. */\n ready: boolean\n /**\n * The name to show for a stored reference — a uid, or an address the\n * roster has — or the reference itself when the roster does not know it.\n */\n memberName: (ref: string) => string\n /**\n * The member's ADDRESS for a stored reference — what a CSV export writes\n * in the owner column, because the import resolves an owner by email —\n * falling back to the name and then to the reference itself.\n */\n memberEmail: (ref: string) => string\n}\n\n/**\n * THE WORKSPACE'S ROSTER, for picking and naming a contact's owner\n * (AGL-2596).\n *\n * Read through `/api/orgs/members`, not from Firestore: the roster is\n * evaluated against the QUERY by the rules, and a scoped member's read of\n * `orgs/{orgId}/members` is refused for exactly the shape the owner picker\n * needs — every row. The route re-derives membership with the Admin SDK and\n * answers any member of the org, which is who may see who else is on the\n * team.\n *\n * Read only when ASKED — `enabled` — and once per workspace for the life of\n * the mount. The list of contacts does not need the roster until a row\n * carries an owner or the create drawer opens, and a request per mount of a\n * page that may never show a name is a read paid for nothing.\n */\nexport function useOrgMembers(\n orgId: string | null | undefined,\n options: { enabled?: boolean } = {},\n): OrgMembers {\n const enabled = options.enabled ?? false\n const { data: user } = useUser()\n const userRef = useRef(user)\n userRef.current = user\n const [loaded, setLoaded] = useState<{\n orgId: string\n options: OrgMemberOption[]\n } | null>(null)\n const loadedOrgId = loaded?.orgId ?? null\n\n useEffect(() => {\n if (!enabled || !orgId || loadedOrgId === orgId) return undefined\n let active = true\n void authorizedFetch(\n userRef.current as TokenSource | null | undefined,\n `/api/orgs/members?orgId=${encodeURIComponent(orgId)}`,\n )\n .then(async (response) =>\n response.ok ? ((await response.json()) as { members?: unknown[] }) : {},\n )\n .then((json) => {\n if (!active) return\n const members = Array.isArray(json?.members) ? json.members : []\n setLoaded({\n orgId,\n options: members\n .map((member) => crmMemberOption((member ?? {}) as Record<string, unknown>))\n .filter((option): option is OrgMemberOption => option !== null)\n .sort((a, b) => a.label.localeCompare(b.label)),\n })\n })\n .catch(() => {\n // An unanswered roster is an EMPTY picker, not a broken page: the\n // owner column falls back to the uid, and the picker says it has\n // nobody to offer.\n if (active) setLoaded({ orgId, options: [] })\n })\n return () => {\n active = false\n }\n }, [enabled, orgId, loadedOrgId])\n\n const current = loaded && loaded.orgId === orgId ? loaded : null\n const roster = useMemo(() => current?.options ?? [], [current])\n const memberName = useCallback(\n (ref: string) => findOrgMember(roster, ref)?.label ?? ref,\n [roster],\n )\n const memberEmail = useCallback(\n (ref: string) => {\n const member = findOrgMember(roster, ref)\n return member?.email || member?.label || ref\n },\n [roster],\n )\n return {\n options: roster,\n ready: current !== null,\n memberName,\n memberEmail,\n }\n}\n\nexport default useOrgMembers\n"],"names":["authorizedFetch","crmMemberOption","findOrgMember","useUser","useCallback","useEffect","useMemo","useRef","useState","useOrgMembers","orgId","options","enabled","data","user","userRef","current","loaded","setLoaded","loadedOrgId","undefined","active","encodeURIComponent","then","response","ok","json","members","Array","isArray","map","member","filter","option","sort","a","b","label","localeCompare","catch","roster","memberName","ref","memberEmail","email","ready"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;AAEA,SACEA,eAAe,QAEV,2CAA0C;AACjD,SAA+BC,eAAe,EAAEC,aAAa,QAAQ,eAAc;AACnF,SAASC,OAAO,QAAQ,iCAAgC;AACxD,SAASC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAO;AAuBzE;;;;;;;;;;;;;;;CAeC,GACD,OAAO,SAASC,cACdC,KAAgC,EAChCC,UAAiC,CAAC,CAAC;QAEnBA;IAAhB,MAAMC,WAAUD,mBAAAA,QAAQC,OAAO,YAAfD,mBAAmB;IACnC,MAAM,EAAEE,MAAMC,IAAI,EAAE,GAAGX;IACvB,MAAMY,UAAUR,OAAOO;IACvBC,QAAQC,OAAO,GAAGF;IAClB,MAAM,CAACG,QAAQC,UAAU,GAAGV,SAGlB;IACV,MAAMW,sBAAcF,0BAAAA,OAAQP,KAAK,mBAAI;IAErCL,UAAU;QACR,IAAI,CAACO,WAAW,CAACF,SAASS,gBAAgBT,OAAO,OAAOU;QACxD,IAAIC,SAAS;QACb,KAAKrB,gBACHe,QAAQC,OAAO,EACf,CAAC,wBAAwB,EAAEM,mBAAmBZ,QAAQ,EAErDa,IAAI,CAAC,OAAOC,WACXA,SAASC,EAAE,GAAK,MAAMD,SAASE,IAAI,KAAkC,CAAC,GAEvEH,IAAI,CAAC,CAACG;YACL,IAAI,CAACL,QAAQ;YACb,MAAMM,UAAUC,MAAMC,OAAO,CAACH,wBAAAA,KAAMC,OAAO,IAAID,KAAKC,OAAO,GAAG,EAAE;YAChET,UAAU;gBACRR;gBACAC,SAASgB,QACNG,GAAG,CAAC,CAACC,SAAW9B,gBAAiB8B,iBAAAA,SAAU,CAAC,IAC5CC,MAAM,CAAC,CAACC,SAAsCA,WAAW,MACzDC,IAAI,CAAC,CAACC,GAAGC,IAAMD,EAAEE,KAAK,CAACC,aAAa,CAACF,EAAEC,KAAK;YACjD;QACF,GACCE,KAAK,CAAC;YACL,kEAAkE;YAClE,iEAAiE;YACjE,mBAAmB;YACnB,IAAIlB,QAAQH,UAAU;gBAAER;gBAAOC,SAAS,EAAE;YAAC;QAC7C;QACF,OAAO;YACLU,SAAS;QACX;IACF,GAAG;QAACT;QAASF;QAAOS;KAAY;IAEhC,MAAMH,UAAUC,UAAUA,OAAOP,KAAK,KAAKA,QAAQO,SAAS;IAC5D,MAAMuB,SAASlC,QAAQ;;uBAAMU,2BAAAA,QAASL,OAAO,mBAAI,EAAE;OAAE;QAACK;KAAQ;IAC9D,MAAMyB,aAAarC,YACjB,CAACsC;;YAAgBxC;wBAAAA,iBAAAA,cAAcsC,QAAQE,yBAAtBxC,eAA4BmC,KAAK,mBAAIK;OACtD;QAACF;KAAO;IAEV,MAAMG,cAAcvC,YAClB,CAACsC;QACC,MAAMX,SAAS7B,cAAcsC,QAAQE;QACrC,OAAOX,CAAAA,0BAAAA,OAAQa,KAAK,MAAIb,0BAAAA,OAAQM,KAAK,KAAIK;IAC3C,GACA;QAACF;KAAO;IAEV,OAAO;QACL7B,SAAS6B;QACTK,OAAO7B,YAAY;QACnByB;QACAE;IACF;AACF;AAEA,eAAelC,cAAa"}
@@ -0,0 +1,109 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import type { CrmActionRecipeId } from '@aglyn/aglyn';
18
+ /**
19
+ * The CRM plugin's console API routes, as the dispatcher keys them.
20
+ *
21
+ * One file both halves import, because the server registers the path and
22
+ * the client fetches it, and a route spelled twice is a route that 404s
23
+ * the day one spelling changes. Client-safe: constants only.
24
+ */
25
+ export declare const CRM_API_ROUTES: {
26
+ readonly ping: "crm/ping";
27
+ /**
28
+ * `POST` — moves one contact to a lifecycle stage, or clears it; see
29
+ * `server.ts`.
30
+ */
31
+ readonly contactStage: "crm/contact-stage";
32
+ /**
33
+ * `POST` — one holder's profile fields on one or more contacts (AGL-2804):
34
+ * every facet write the console makes; see `server/contact-update.ts`.
35
+ */
36
+ readonly contactUpdate: "crm/contact-update";
37
+ /**
38
+ * `POST` — unlinks the contacts that name a company, then deletes it
39
+ * (AGL-2804); see `server/company-delete.ts`.
40
+ */
41
+ readonly companyDelete: "crm/company-delete";
42
+ /** `POST` — one email to one person from a record; see `server/email-send.ts`. */
43
+ readonly emailSend: "crm/email-send";
44
+ /**
45
+ * `POST` — one line in the ORGANIZATION's activity feed for an act the
46
+ * org-level hub performed client-direct (AGL-2634); see
47
+ * `server/org-activity.ts`.
48
+ */
49
+ readonly orgActivity: "crm/org-activity";
50
+ /**
51
+ * `POST` — installs one recipe's action on one site (AGL-2639): the
52
+ * server builds it, stamps it and writes it into the site's actions;
53
+ * see `server/recipe-routes.ts`.
54
+ */
55
+ readonly recipeInstall: "crm/recipe-install";
56
+ /**
57
+ * `POST` — which recipes each of the organization's sites carries
58
+ * (AGL-2639), read off the stamps; see `server/recipe-routes.ts`.
59
+ */
60
+ readonly recipeStatus: "crm/recipe-status";
61
+ /**
62
+ * `POST` — the workspace's email capture address (AGL-2657), minted on
63
+ * the first ask and replaced with `rotate: true`; see
64
+ * `server/inbound-address.ts`.
65
+ */
66
+ readonly inboundAddress: "crm/inbound-address";
67
+ };
68
+ /**
69
+ * One site's answer to `crm/recipe-status` (AGL-2639).
70
+ *
71
+ * `installed` names the recipes a live action on the site is stamped with.
72
+ * `unstamped` counts the live actions that carry NO stamp — every action
73
+ * saved before the stamp existed — and a site with any is one the reader
74
+ * cannot call free of a recipe: the card names it as "may already have
75
+ * it" rather than offering the install as if to a blank site.
76
+ */
77
+ export interface CrmRecipeSiteStatus {
78
+ hostId: string;
79
+ installed: CrmActionRecipeId[];
80
+ unstamped: number;
81
+ }
82
+ /** The body `crm/recipe-install` reads, beside the route scope. */
83
+ export interface CrmRecipeInstallRequest {
84
+ hostId: string;
85
+ orgId?: string;
86
+ recipeId: CrmActionRecipeId;
87
+ /** The site's form a recipe that `needs: 'form'` is keyed on. */
88
+ formId?: string;
89
+ }
90
+ /** What a successful `crm/recipe-install` answers with. */
91
+ export interface CrmRecipeInstallResult {
92
+ ok: true;
93
+ actionId: string;
94
+ /** The installed action's name, as the site's Actions list will show it. */
95
+ name: string;
96
+ recipeId: CrmActionRecipeId;
97
+ }
98
+ /**
99
+ * What an organization-level activity line may point at: the CRM's record
100
+ * kinds, and nothing the org feed holds for its own reasons (a member, a
101
+ * subscription). The route refuses any other type, so a bulk bar cannot
102
+ * write a line the feed's presenter would render as a workspace event.
103
+ */
104
+ export declare const CRM_ORG_ACTIVITY_KINDS: readonly ["contact", "company", "deal", "lead", "task"];
105
+ export type CrmOrgActivityKind = (typeof CRM_ORG_ACTIVITY_KINDS)[number];
106
+ /** The most an activity line may say — a sentence, not a report. */
107
+ export declare const CRM_ORG_ACTIVITY_ACTION_MAX = 160;
108
+ /** The browser-side URL for a route key. */
109
+ export declare function crmApiUrl(route: keyof typeof CRM_API_ROUTES): string;
@@ -0,0 +1,74 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ /**
17
+ * The CRM plugin's console API routes, as the dispatcher keys them.
18
+ *
19
+ * One file both halves import, because the server registers the path and
20
+ * the client fetches it, and a route spelled twice is a route that 404s
21
+ * the day one spelling changes. Client-safe: constants only.
22
+ */ export const CRM_API_ROUTES = {
23
+ ping: 'crm/ping',
24
+ /**
25
+ * `POST` — moves one contact to a lifecycle stage, or clears it; see
26
+ * `server.ts`.
27
+ */ contactStage: 'crm/contact-stage',
28
+ /**
29
+ * `POST` — one holder's profile fields on one or more contacts (AGL-2804):
30
+ * every facet write the console makes; see `server/contact-update.ts`.
31
+ */ contactUpdate: 'crm/contact-update',
32
+ /**
33
+ * `POST` — unlinks the contacts that name a company, then deletes it
34
+ * (AGL-2804); see `server/company-delete.ts`.
35
+ */ companyDelete: 'crm/company-delete',
36
+ /** `POST` — one email to one person from a record; see `server/email-send.ts`. */ emailSend: 'crm/email-send',
37
+ /**
38
+ * `POST` — one line in the ORGANIZATION's activity feed for an act the
39
+ * org-level hub performed client-direct (AGL-2634); see
40
+ * `server/org-activity.ts`.
41
+ */ orgActivity: 'crm/org-activity',
42
+ /**
43
+ * `POST` — installs one recipe's action on one site (AGL-2639): the
44
+ * server builds it, stamps it and writes it into the site's actions;
45
+ * see `server/recipe-routes.ts`.
46
+ */ recipeInstall: 'crm/recipe-install',
47
+ /**
48
+ * `POST` — which recipes each of the organization's sites carries
49
+ * (AGL-2639), read off the stamps; see `server/recipe-routes.ts`.
50
+ */ recipeStatus: 'crm/recipe-status',
51
+ /**
52
+ * `POST` — the workspace's email capture address (AGL-2657), minted on
53
+ * the first ask and replaced with `rotate: true`; see
54
+ * `server/inbound-address.ts`.
55
+ */ inboundAddress: 'crm/inbound-address'
56
+ };
57
+ /**
58
+ * What an organization-level activity line may point at: the CRM's record
59
+ * kinds, and nothing the org feed holds for its own reasons (a member, a
60
+ * subscription). The route refuses any other type, so a bulk bar cannot
61
+ * write a line the feed's presenter would render as a workspace event.
62
+ */ export const CRM_ORG_ACTIVITY_KINDS = [
63
+ 'contact',
64
+ 'company',
65
+ 'deal',
66
+ 'lead',
67
+ 'task'
68
+ ];
69
+ /** The most an activity line may say — a sentence, not a report. */ export const CRM_ORG_ACTIVITY_ACTION_MAX = 160;
70
+ /** The browser-side URL for a route key. */ export function crmApiUrl(route) {
71
+ return `/api/${CRM_API_ROUTES[route]}`;
72
+ }
73
+
74
+ //# sourceMappingURL=api-routes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/crm/src/lib/constants/api-routes.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { CrmActionRecipeId } from '@aglyn/aglyn'\n\n/**\n * The CRM plugin's console API routes, as the dispatcher keys them.\n *\n * One file both halves import, because the server registers the path and\n * the client fetches it, and a route spelled twice is a route that 404s\n * the day one spelling changes. Client-safe: constants only.\n */\nexport const CRM_API_ROUTES = {\n ping: 'crm/ping',\n /**\n * `POST` — moves one contact to a lifecycle stage, or clears it; see\n * `server.ts`.\n */\n contactStage: 'crm/contact-stage',\n /**\n * `POST` — one holder's profile fields on one or more contacts (AGL-2804):\n * every facet write the console makes; see `server/contact-update.ts`.\n */\n contactUpdate: 'crm/contact-update',\n /**\n * `POST` — unlinks the contacts that name a company, then deletes it\n * (AGL-2804); see `server/company-delete.ts`.\n */\n companyDelete: 'crm/company-delete',\n /** `POST` — one email to one person from a record; see `server/email-send.ts`. */\n emailSend: 'crm/email-send',\n /**\n * `POST` — one line in the ORGANIZATION's activity feed for an act the\n * org-level hub performed client-direct (AGL-2634); see\n * `server/org-activity.ts`.\n */\n orgActivity: 'crm/org-activity',\n /**\n * `POST` — installs one recipe's action on one site (AGL-2639): the\n * server builds it, stamps it and writes it into the site's actions;\n * see `server/recipe-routes.ts`.\n */\n recipeInstall: 'crm/recipe-install',\n /**\n * `POST` — which recipes each of the organization's sites carries\n * (AGL-2639), read off the stamps; see `server/recipe-routes.ts`.\n */\n recipeStatus: 'crm/recipe-status',\n /**\n * `POST` — the workspace's email capture address (AGL-2657), minted on\n * the first ask and replaced with `rotate: true`; see\n * `server/inbound-address.ts`.\n */\n inboundAddress: 'crm/inbound-address',\n} as const\n\n/**\n * One site's answer to `crm/recipe-status` (AGL-2639).\n *\n * `installed` names the recipes a live action on the site is stamped with.\n * `unstamped` counts the live actions that carry NO stamp — every action\n * saved before the stamp existed — and a site with any is one the reader\n * cannot call free of a recipe: the card names it as \"may already have\n * it\" rather than offering the install as if to a blank site.\n */\nexport interface CrmRecipeSiteStatus {\n hostId: string\n installed: CrmActionRecipeId[]\n unstamped: number\n}\n\n/** The body `crm/recipe-install` reads, beside the route scope. */\nexport interface CrmRecipeInstallRequest {\n hostId: string\n orgId?: string\n recipeId: CrmActionRecipeId\n /** The site's form a recipe that `needs: 'form'` is keyed on. */\n formId?: string\n}\n\n/** What a successful `crm/recipe-install` answers with. */\nexport interface CrmRecipeInstallResult {\n ok: true\n actionId: string\n /** The installed action's name, as the site's Actions list will show it. */\n name: string\n recipeId: CrmActionRecipeId\n}\n\n/**\n * What an organization-level activity line may point at: the CRM's record\n * kinds, and nothing the org feed holds for its own reasons (a member, a\n * subscription). The route refuses any other type, so a bulk bar cannot\n * write a line the feed's presenter would render as a workspace event.\n */\nexport const CRM_ORG_ACTIVITY_KINDS = [\n 'contact',\n 'company',\n 'deal',\n 'lead',\n 'task',\n] as const\n\nexport type CrmOrgActivityKind = (typeof CRM_ORG_ACTIVITY_KINDS)[number]\n\n/** The most an activity line may say — a sentence, not a report. */\nexport const CRM_ORG_ACTIVITY_ACTION_MAX = 160\n\n/** The browser-side URL for a route key. */\nexport function crmApiUrl(route: keyof typeof CRM_API_ROUTES): string {\n return `/api/${CRM_API_ROUTES[route]}`\n}\n"],"names":["CRM_API_ROUTES","ping","contactStage","contactUpdate","companyDelete","emailSend","orgActivity","recipeInstall","recipeStatus","inboundAddress","CRM_ORG_ACTIVITY_KINDS","CRM_ORG_ACTIVITY_ACTION_MAX","crmApiUrl","route"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAID;;;;;;CAMC,GACD,OAAO,MAAMA,iBAAiB;IAC5BC,MAAM;IACN;;;GAGC,GACDC,cAAc;IACd;;;GAGC,GACDC,eAAe;IACf;;;GAGC,GACDC,eAAe;IACf,gFAAgF,GAChFC,WAAW;IACX;;;;GAIC,GACDC,aAAa;IACb;;;;GAIC,GACDC,eAAe;IACf;;;GAGC,GACDC,cAAc;IACd;;;;GAIC,GACDC,gBAAgB;AAClB,EAAU;AAmCV;;;;;CAKC,GACD,OAAO,MAAMC,yBAAyB;IACpC;IACA;IACA;IACA;IACA;CACD,CAAS;AAIV,kEAAkE,GAClE,OAAO,MAAMC,8BAA8B,IAAG;AAE9C,0CAA0C,GAC1C,OAAO,SAASC,UAAUC,KAAkC;IAC1D,OAAO,CAAC,KAAK,EAAEb,cAAc,CAACa,MAAM,EAAE;AACxC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ */
8
+ /**
9
+ * The persisted plugin id (AGL-2595). It was `contacts` while the surface was
10
+ * one list; the stored lists were rewritten and the plugin manager's alias for
11
+ * the old value was retired once that backfill reported nothing left
12
+ * (AGL-2614), so `contacts` now reads as an unknown id like any other.
13
+ */
14
+ export declare const BUNDLE_ID = "crm";