@aglyn/plugins-crm 1.0.0-beta.220 → 1.0.0-beta.222

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 (514) hide show
  1. package/README.md +2 -1
  2. package/package.json +13 -13
  3. package/src/lib/components/activity-list.js +12 -5
  4. package/src/lib/components/activity-list.js.map +1 -1
  5. package/src/lib/components/companies-bulk-bar.d.ts +1 -4
  6. package/src/lib/components/companies-bulk-bar.js +7 -20
  7. package/src/lib/components/companies-bulk-bar.js.map +1 -1
  8. package/src/lib/components/companies-section.d.ts +3 -3
  9. package/src/lib/components/companies-section.js +149 -46
  10. package/src/lib/components/companies-section.js.map +1 -1
  11. package/src/lib/components/company-edit-drawer.js +281 -20
  12. package/src/lib/components/company-edit-drawer.js.map +1 -1
  13. package/src/lib/components/company-properties-card.js +99 -8
  14. package/src/lib/components/company-properties-card.js.map +1 -1
  15. package/src/lib/components/contact-detail-page.js +3 -1
  16. package/src/lib/components/contact-detail-page.js.map +1 -1
  17. package/src/lib/components/contact-merge-dialog.js +33 -10
  18. package/src/lib/components/contact-merge-dialog.js.map +1 -1
  19. package/src/lib/components/contact-properties-card.d.ts +0 -69
  20. package/src/lib/components/contact-properties-card.js +350 -60
  21. package/src/lib/components/contact-properties-card.js.map +1 -1
  22. package/src/lib/components/contact-reports-to-field.d.ts +46 -0
  23. package/src/lib/components/contact-reports-to-field.js +67 -0
  24. package/src/lib/components/contact-reports-to-field.js.map +1 -0
  25. package/src/lib/components/contacts-bulk-bar.d.ts +1 -8
  26. package/src/lib/components/contacts-bulk-bar.js +7 -19
  27. package/src/lib/components/contacts-bulk-bar.js.map +1 -1
  28. package/src/lib/components/contacts-section.js +46 -33
  29. package/src/lib/components/contacts-section.js.map +1 -1
  30. package/src/lib/components/crm-call-actions.d.ts +10 -0
  31. package/src/lib/components/crm-call-actions.js +26 -9
  32. package/src/lib/components/crm-call-actions.js.map +1 -1
  33. package/src/lib/components/crm-record-picker.d.ts +15 -0
  34. package/src/lib/components/crm-record-picker.js +16 -10
  35. package/src/lib/components/crm-record-picker.js.map +1 -1
  36. package/src/lib/components/crm-transfer-buttons.d.ts +54 -0
  37. package/src/lib/components/crm-transfer-buttons.js +167 -0
  38. package/src/lib/components/crm-transfer-buttons.js.map +1 -0
  39. package/src/lib/components/deal-contact-roles-card.d.ts +46 -0
  40. package/src/lib/components/deal-contact-roles-card.js +368 -0
  41. package/src/lib/components/deal-contact-roles-card.js.map +1 -0
  42. package/src/lib/components/deal-detail-page.d.ts +3 -2
  43. package/src/lib/components/deal-detail-page.js +25 -6
  44. package/src/lib/components/deal-detail-page.js.map +1 -1
  45. package/src/lib/components/deal-edit-drawer.d.ts +10 -0
  46. package/src/lib/components/deal-edit-drawer.js +219 -10
  47. package/src/lib/components/deal-edit-drawer.js.map +1 -1
  48. package/src/lib/components/deal-properties-card.d.ts +7 -0
  49. package/src/lib/components/deal-properties-card.js +34 -3
  50. package/src/lib/components/deal-properties-card.js.map +1 -1
  51. package/src/lib/components/deal-stage-card.d.ts +4 -0
  52. package/src/lib/components/deal-stage-card.js +10 -2
  53. package/src/lib/components/deal-stage-card.js.map +1 -1
  54. package/src/lib/components/deals-bulk-bar.d.ts +0 -3
  55. package/src/lib/components/deals-bulk-bar.js +7 -20
  56. package/src/lib/components/deals-bulk-bar.js.map +1 -1
  57. package/src/lib/components/deals-section.d.ts +3 -3
  58. package/src/lib/components/deals-section.js +123 -63
  59. package/src/lib/components/deals-section.js.map +1 -1
  60. package/src/lib/components/fields-section.js +31 -17
  61. package/src/lib/components/fields-section.js.map +1 -1
  62. package/src/lib/components/lead-convert-dialog.d.ts +4 -0
  63. package/src/lib/components/lead-convert-dialog.js +23 -1
  64. package/src/lib/components/lead-convert-dialog.js.map +1 -1
  65. package/src/lib/components/lead-detail-page.js +8 -2
  66. package/src/lib/components/lead-detail-page.js.map +1 -1
  67. package/src/lib/components/lead-profile-fields.d.ts +71 -0
  68. package/src/lib/components/lead-profile-fields.js +386 -0
  69. package/src/lib/components/lead-profile-fields.js.map +1 -0
  70. package/src/lib/components/lead-properties-card.d.ts +2 -1
  71. package/src/lib/components/lead-properties-card.js +85 -176
  72. package/src/lib/components/lead-properties-card.js.map +1 -1
  73. package/src/lib/components/lead-source-select.d.ts +4 -23
  74. package/src/lib/components/lead-source-select.js +9 -73
  75. package/src/lib/components/lead-source-select.js.map +1 -1
  76. package/src/lib/components/lead-status-chip.d.ts +9 -3
  77. package/src/lib/components/lead-status-chip.js +8 -4
  78. package/src/lib/components/lead-status-chip.js.map +1 -1
  79. package/src/lib/components/lead-status-options.d.ts +20 -0
  80. package/src/lib/components/lead-status-options.js +51 -0
  81. package/src/lib/components/lead-status-options.js.map +1 -0
  82. package/src/lib/components/lead-unqualify-dialog.d.ts +5 -0
  83. package/src/lib/components/lead-unqualify-dialog.js +50 -18
  84. package/src/lib/components/lead-unqualify-dialog.js.map +1 -1
  85. package/src/lib/components/leads-bulk-bar.d.ts +0 -3
  86. package/src/lib/components/leads-bulk-bar.js +29 -29
  87. package/src/lib/components/leads-bulk-bar.js.map +1 -1
  88. package/src/lib/components/leads-section.js +120 -68
  89. package/src/lib/components/leads-section.js.map +1 -1
  90. package/src/lib/components/linked-deals-card.d.ts +4 -0
  91. package/src/lib/components/linked-deals-card.js +47 -3
  92. package/src/lib/components/linked-deals-card.js.map +1 -1
  93. package/src/lib/components/log-activity-dialog.js +43 -3
  94. package/src/lib/components/log-activity-dialog.js.map +1 -1
  95. package/src/lib/components/new-contact-drawer.d.ts +8 -0
  96. package/src/lib/components/new-contact-drawer.js +108 -6
  97. package/src/lib/components/new-contact-drawer.js.map +1 -1
  98. package/src/lib/components/new-lead-drawer.d.ts +9 -2
  99. package/src/lib/components/new-lead-drawer.js +88 -121
  100. package/src/lib/components/new-lead-drawer.js.map +1 -1
  101. package/src/lib/components/picklist-select.d.ts +36 -0
  102. package/src/lib/components/picklist-select.js +114 -0
  103. package/src/lib/components/picklist-select.js.map +1 -0
  104. package/src/lib/components/picklist-values-card.d.ts +34 -0
  105. package/src/lib/components/{lead-source-values-card.js → picklist-values-card.js} +241 -58
  106. package/src/lib/components/picklist-values-card.js.map +1 -0
  107. package/src/lib/components/pipeline-stages-dialog.d.ts +7 -0
  108. package/src/lib/components/pipeline-stages-dialog.js +26 -4
  109. package/src/lib/components/pipeline-stages-dialog.js.map +1 -1
  110. package/src/lib/components/pipelines-dialog.js +15 -6
  111. package/src/lib/components/pipelines-dialog.js.map +1 -1
  112. package/src/lib/components/recent-activity-feed.js +20 -5
  113. package/src/lib/components/recent-activity-feed.js.map +1 -1
  114. package/src/lib/components/recipes-card.js +4 -2
  115. package/src/lib/components/recipes-card.js.map +1 -1
  116. package/src/lib/components/record-tasks-card.js +15 -8
  117. package/src/lib/components/record-tasks-card.js.map +1 -1
  118. package/src/lib/components/reports/forecast-card.d.ts +6 -0
  119. package/src/lib/components/reports/forecast-card.js +101 -3
  120. package/src/lib/components/reports/forecast-card.js.map +1 -1
  121. package/src/lib/components/reports/lead-funnel-card.d.ts +12 -0
  122. package/src/lib/components/reports/lead-funnel-card.js +9 -5
  123. package/src/lib/components/reports/lead-funnel-card.js.map +1 -1
  124. package/src/lib/components/reports/lead-source-card.d.ts +23 -0
  125. package/src/lib/components/reports/lead-source-card.js +318 -0
  126. package/src/lib/components/reports/lead-source-card.js.map +1 -0
  127. package/src/lib/components/reports/report-export.js +1 -1
  128. package/src/lib/components/reports/report-export.js.map +1 -1
  129. package/src/lib/components/reports-section.js +8 -0
  130. package/src/lib/components/reports-section.js.map +1 -1
  131. package/src/lib/components/sharing-rule-drawer.d.ts +5 -0
  132. package/src/lib/components/sharing-rule-drawer.js +108 -19
  133. package/src/lib/components/sharing-rule-drawer.js.map +1 -1
  134. package/src/lib/components/sharing-rules-card.js +11 -3
  135. package/src/lib/components/sharing-rules-card.js.map +1 -1
  136. package/src/lib/components/task-cells.d.ts +9 -1
  137. package/src/lib/components/task-cells.js +9 -4
  138. package/src/lib/components/task-cells.js.map +1 -1
  139. package/src/lib/components/task-edit-drawer.js +111 -43
  140. package/src/lib/components/task-edit-drawer.js.map +1 -1
  141. package/src/lib/components/tasks-bulk-bar.d.ts +0 -3
  142. package/src/lib/components/tasks-bulk-bar.js +7 -20
  143. package/src/lib/components/tasks-bulk-bar.js.map +1 -1
  144. package/src/lib/components/tasks-calendar.d.ts +3 -0
  145. package/src/lib/components/tasks-calendar.js +8 -1
  146. package/src/lib/components/tasks-calendar.js.map +1 -1
  147. package/src/lib/components/tasks-section.d.ts +3 -3
  148. package/src/lib/components/tasks-section.js +58 -43
  149. package/src/lib/components/tasks-section.js.map +1 -1
  150. package/src/lib/constants/api-routes.d.ts +2 -9
  151. package/src/lib/constants/api-routes.js +1 -7
  152. package/src/lib/constants/api-routes.js.map +1 -1
  153. package/src/lib/constants/bundle-common.d.ts +6 -0
  154. package/src/lib/constants/bundle-common.js +11 -0
  155. package/src/lib/constants/bundle-common.js.map +1 -1
  156. package/src/lib/constants/company-filters.d.ts +14 -0
  157. package/src/lib/constants/company-filters.js +51 -1
  158. package/src/lib/constants/company-filters.js.map +1 -1
  159. package/src/lib/constants/contact-filters.d.ts +2 -0
  160. package/src/lib/constants/contact-filters.js +18 -1
  161. package/src/lib/constants/contact-filters.js.map +1 -1
  162. package/src/lib/constants/deal-filters.d.ts +22 -1
  163. package/src/lib/constants/deal-filters.js +67 -4
  164. package/src/lib/constants/deal-filters.js.map +1 -1
  165. package/src/lib/declarations.console-server.d.ts +3 -0
  166. package/src/lib/declarations.console-server.js +35 -0
  167. package/src/lib/declarations.console-server.js.map +1 -1
  168. package/src/lib/declarations.d.ts +26 -0
  169. package/src/lib/declarations.js +35 -0
  170. package/src/lib/declarations.js.map +1 -0
  171. package/src/lib/declarations.server.d.ts +11 -0
  172. package/src/lib/declarations.server.js +92 -1
  173. package/src/lib/declarations.server.js.map +1 -1
  174. package/src/lib/hooks/use-company-picklists.d.ts +15 -0
  175. package/src/lib/hooks/use-company-picklists.js +55 -0
  176. package/src/lib/hooks/use-company-picklists.js.map +1 -0
  177. package/src/lib/hooks/use-crm-picklist.d.ts +25 -0
  178. package/src/lib/hooks/use-crm-picklist.js +53 -0
  179. package/src/lib/hooks/use-crm-picklist.js.map +1 -0
  180. package/src/lib/hooks/use-crm-record-names.d.ts +16 -0
  181. package/src/lib/hooks/use-crm-record-names.js +45 -19
  182. package/src/lib/hooks/use-crm-record-names.js.map +1 -1
  183. package/src/lib/hooks/use-crm-task-picklists.d.ts +11 -0
  184. package/src/lib/hooks/use-crm-task-picklists.js +45 -0
  185. package/src/lib/hooks/use-crm-task-picklists.js.map +1 -0
  186. package/src/lib/hooks/use-deals.d.ts +14 -0
  187. package/src/lib/hooks/use-deals.js +29 -0
  188. package/src/lib/hooks/use-deals.js.map +1 -1
  189. package/src/lib/hooks/use-lead-picklists.d.ts +14 -0
  190. package/src/lib/hooks/use-lead-picklists.js +46 -0
  191. package/src/lib/hooks/use-lead-picklists.js.map +1 -0
  192. package/src/lib/hooks/use-lead-source-picklist.d.ts +5 -19
  193. package/src/lib/hooks/use-lead-source-picklist.js +12 -22
  194. package/src/lib/hooks/use-lead-source-picklist.js.map +1 -1
  195. package/src/lib/hooks/use-lead-status-picklist.d.ts +9 -0
  196. package/src/lib/hooks/use-lead-status-picklist.js +40 -0
  197. package/src/lib/hooks/use-lead-status-picklist.js.map +1 -0
  198. package/src/lib/model/companies.d.ts +32 -3
  199. package/src/lib/model/companies.js +133 -16
  200. package/src/lib/model/companies.js.map +1 -1
  201. package/src/lib/model/contact-merge.d.ts +27 -3
  202. package/src/lib/model/contact-merge.js +81 -7
  203. package/src/lib/model/contact-merge.js.map +1 -1
  204. package/src/lib/model/contact-record.d.ts +17 -0
  205. package/src/lib/model/contact-record.js +15 -1
  206. package/src/lib/model/contact-record.js.map +1 -1
  207. package/src/lib/model/contact-update.d.ts +31 -2
  208. package/src/lib/model/contact-update.js +14 -0
  209. package/src/lib/model/contact-update.js.map +1 -1
  210. package/src/lib/model/crm-list-query.d.ts +5 -0
  211. package/src/lib/model/crm-list-query.js +8 -0
  212. package/src/lib/model/crm-list-query.js.map +1 -1
  213. package/src/lib/model/crm-recipes.d.ts +40 -0
  214. package/src/lib/model/crm-recipes.js +244 -0
  215. package/src/lib/model/crm-recipes.js.map +1 -0
  216. package/src/lib/model/crm-record-counts.d.ts +36 -0
  217. package/src/lib/model/crm-record-counts.js +54 -0
  218. package/src/lib/model/crm-record-counts.js.map +1 -0
  219. package/src/lib/model/crm-record-lists.d.ts +23 -0
  220. package/src/lib/model/crm-record-lists.js +161 -0
  221. package/src/lib/model/crm-record-lists.js.map +1 -0
  222. package/src/lib/model/crm-reports.d.ts +73 -3
  223. package/src/lib/model/crm-reports.js +120 -1
  224. package/src/lib/model/crm-reports.js.map +1 -1
  225. package/src/lib/model/crm-sharing.d.ts +21 -3
  226. package/src/lib/model/crm-sharing.js +27 -6
  227. package/src/lib/model/crm-sharing.js.map +1 -1
  228. package/src/lib/model/deal-board-model.d.ts +8 -2
  229. package/src/lib/model/deal-board-model.js +15 -2
  230. package/src/lib/model/deal-board-model.js.map +1 -1
  231. package/src/lib/model/deal-contact-roles.d.ts +45 -0
  232. package/src/lib/model/deal-contact-roles.js +73 -0
  233. package/src/lib/model/deal-contact-roles.js.map +1 -0
  234. package/src/lib/model/deal-form-model.d.ts +56 -0
  235. package/src/lib/model/deal-form-model.js +79 -7
  236. package/src/lib/model/deal-form-model.js.map +1 -1
  237. package/src/lib/model/download-text-file.d.ts +23 -0
  238. package/src/lib/model/download-text-file.js +34 -0
  239. package/src/lib/model/download-text-file.js.map +1 -0
  240. package/src/lib/model/lead-filters.d.ts +36 -2
  241. package/src/lib/model/lead-filters.js +123 -2
  242. package/src/lib/model/lead-filters.js.map +1 -1
  243. package/src/lib/model/lead-source-direction.d.ts +38 -0
  244. package/src/lib/model/lead-source-direction.js +52 -0
  245. package/src/lib/model/lead-source-direction.js.map +1 -0
  246. package/src/lib/model/picklist-values.d.ts +119 -0
  247. package/src/lib/model/picklist-values.js +256 -0
  248. package/src/lib/model/picklist-values.js.map +1 -0
  249. package/src/lib/model/record-facts-disclosed.d.ts +81 -0
  250. package/src/lib/model/record-facts-disclosed.js +281 -0
  251. package/src/lib/model/record-facts-disclosed.js.map +1 -0
  252. package/src/lib/model/record-facts.d.ts +215 -34
  253. package/src/lib/model/record-facts.js +307 -128
  254. package/src/lib/model/record-facts.js.map +1 -1
  255. package/src/lib/model/task-picklists.d.ts +52 -0
  256. package/src/lib/model/task-picklists.js +83 -0
  257. package/src/lib/model/task-picklists.js.map +1 -0
  258. package/src/lib/model/task-routes.d.ts +13 -0
  259. package/src/lib/model/task-routes.js +23 -4
  260. package/src/lib/model/task-routes.js.map +1 -1
  261. package/src/lib/plan-entitlements.js +6 -4
  262. package/src/lib/plan-entitlements.js.map +1 -1
  263. package/src/lib/plugin.js +17 -0
  264. package/src/lib/plugin.js.map +1 -1
  265. package/src/lib/server/api-v1/contacts.js +220 -14
  266. package/src/lib/server/api-v1/contacts.js.map +1 -1
  267. package/src/lib/server/api-v1/crm-activities.js +14 -1
  268. package/src/lib/server/api-v1/crm-activities.js.map +1 -1
  269. package/src/lib/server/api-v1/crm-companies.js +123 -14
  270. package/src/lib/server/api-v1/crm-companies.js.map +1 -1
  271. package/src/lib/server/api-v1/crm-deals.js +291 -26
  272. package/src/lib/server/api-v1/crm-deals.js.map +1 -1
  273. package/src/lib/server/api-v1/crm-leads.js +144 -38
  274. package/src/lib/server/api-v1/crm-leads.js.map +1 -1
  275. package/src/lib/server/api-v1/crm-pipelines.d.ts +6 -0
  276. package/src/lib/server/api-v1/crm-pipelines.js +8 -2
  277. package/src/lib/server/api-v1/crm-pipelines.js.map +1 -1
  278. package/src/lib/server/api-v1/crm-tasks.js +75 -33
  279. package/src/lib/server/api-v1/crm-tasks.js.map +1 -1
  280. package/src/lib/server/api-v1/openapi.d.ts +0 -11
  281. package/src/lib/server/api-v1/openapi.js +171 -16
  282. package/src/lib/server/api-v1/openapi.js.map +1 -1
  283. package/src/lib/server/assign-contact-owner.d.ts +162 -0
  284. package/src/lib/server/assign-contact-owner.js +340 -0
  285. package/src/lib/server/assign-contact-owner.js.map +1 -0
  286. package/src/lib/server/associate-company-by-domain.d.ts +70 -0
  287. package/src/lib/server/associate-company-by-domain.js +153 -0
  288. package/src/lib/server/associate-company-by-domain.js.map +1 -0
  289. package/src/lib/server/automation-steps.d.ts +139 -0
  290. package/src/lib/server/automation-steps.js +472 -0
  291. package/src/lib/server/automation-steps.js.map +1 -0
  292. package/src/lib/server/capture-contact.js +69 -22
  293. package/src/lib/server/capture-contact.js.map +1 -1
  294. package/src/lib/server/capture-host-contact.d.ts +104 -0
  295. package/src/lib/server/capture-host-contact.js +151 -0
  296. package/src/lib/server/capture-host-contact.js.map +1 -0
  297. package/src/lib/server/company-children.d.ts +25 -0
  298. package/src/lib/server/company-children.js +42 -0
  299. package/src/lib/server/company-children.js.map +1 -0
  300. package/src/lib/server/company-delete.d.ts +18 -0
  301. package/src/lib/server/company-delete.js +44 -21
  302. package/src/lib/server/company-delete.js.map +1 -1
  303. package/src/lib/server/contact-email-history.js +21 -19
  304. package/src/lib/server/contact-email-history.js.map +1 -1
  305. package/src/lib/server/contact-remove.js +27 -2
  306. package/src/lib/server/contact-remove.js.map +1 -1
  307. package/src/lib/server/contact-reports-to.d.ts +61 -0
  308. package/src/lib/server/contact-reports-to.js +114 -0
  309. package/src/lib/server/contact-reports-to.js.map +1 -0
  310. package/src/lib/server/contact-update.d.ts +42 -1
  311. package/src/lib/server/contact-update.js +204 -23
  312. package/src/lib/server/contact-update.js.map +1 -1
  313. package/src/lib/server/convert-host-lead.d.ts +46 -1
  314. package/src/lib/server/convert-host-lead.js +173 -15
  315. package/src/lib/server/convert-host-lead.js.map +1 -1
  316. package/src/lib/server/convert-open-lead.js +12 -5
  317. package/src/lib/server/convert-open-lead.js.map +1 -1
  318. package/src/lib/server/crm-record-indexes.d.ts +45 -0
  319. package/src/lib/server/crm-record-indexes.js +78 -0
  320. package/src/lib/server/crm-record-indexes.js.map +1 -0
  321. package/src/lib/server/crm-sharing.d.ts +9 -1
  322. package/src/lib/server/crm-sharing.js +23 -3
  323. package/src/lib/server/crm-sharing.js.map +1 -1
  324. package/src/lib/server/deal-contact-roles.d.ts +27 -0
  325. package/src/lib/server/deal-contact-roles.js +89 -0
  326. package/src/lib/server/deal-contact-roles.js.map +1 -0
  327. package/src/lib/server/lead-convert.d.ts +5 -0
  328. package/src/lib/server/lead-convert.js +19 -3
  329. package/src/lib/server/lead-convert.js.map +1 -1
  330. package/src/lib/server/lead-create.d.ts +17 -2
  331. package/src/lib/server/lead-create.js +46 -14
  332. package/src/lib/server/lead-create.js.map +1 -1
  333. package/src/lib/server/lead-nurturing.d.ts +6 -0
  334. package/src/lib/server/lead-nurturing.js +57 -20
  335. package/src/lib/server/lead-nurturing.js.map +1 -1
  336. package/src/lib/server/lead-picklists.d.ts +35 -0
  337. package/src/lib/server/lead-picklists.js +52 -0
  338. package/src/lib/server/lead-picklists.js.map +1 -0
  339. package/src/lib/server/lead-source-picklist.d.ts +1 -13
  340. package/src/lib/server/lead-source-picklist.js +6 -33
  341. package/src/lib/server/lead-source-picklist.js.map +1 -1
  342. package/src/lib/server/merge-contacts.js +22 -4
  343. package/src/lib/server/merge-contacts.js.map +1 -1
  344. package/src/lib/server/person-eraser.d.ts +53 -0
  345. package/src/lib/server/person-eraser.js +149 -0
  346. package/src/lib/server/person-eraser.js.map +1 -0
  347. package/src/lib/server/person-records.d.ts +69 -0
  348. package/src/lib/server/person-records.js +317 -0
  349. package/src/lib/server/person-records.js.map +1 -0
  350. package/src/lib/server/person-refund.d.ts +97 -0
  351. package/src/lib/server/person-refund.js +221 -0
  352. package/src/lib/server/person-refund.js.map +1 -0
  353. package/src/lib/server/picklist-values.d.ts +21 -0
  354. package/src/lib/server/picklist-values.js +308 -0
  355. package/src/lib/server/picklist-values.js.map +1 -0
  356. package/src/lib/server/read-picklist.d.ts +44 -0
  357. package/src/lib/server/read-picklist.js +65 -0
  358. package/src/lib/server/read-picklist.js.map +1 -0
  359. package/src/lib/server/recipe-routes.js +15 -7
  360. package/src/lib/server/recipe-routes.js.map +1 -1
  361. package/src/lib/server/record-email-state.js +7 -1
  362. package/src/lib/server/record-email-state.js.map +1 -1
  363. package/src/lib/server/record-facts.d.ts +3 -0
  364. package/src/lib/server/record-facts.js +233 -31
  365. package/src/lib/server/record-facts.js.map +1 -1
  366. package/src/lib/server/record-origin.d.ts +27 -0
  367. package/src/lib/server/record-origin.js +104 -0
  368. package/src/lib/server/record-origin.js.map +1 -0
  369. package/src/lib/server/record-timeline.js +15 -2
  370. package/src/lib/server/record-timeline.js.map +1 -1
  371. package/src/lib/server/suite-gate.js +4 -3
  372. package/src/lib/server/suite-gate.js.map +1 -1
  373. package/src/lib/server/task-routes.js +30 -16
  374. package/src/lib/server/task-routes.js.map +1 -1
  375. package/src/lib/server-deal-stage.d.ts +5 -1
  376. package/src/lib/server-deal-stage.js +10 -5
  377. package/src/lib/server-deal-stage.js.map +1 -1
  378. package/src/lib/server.d.ts +8 -3
  379. package/src/lib/server.js +47 -43
  380. package/src/lib/server.js.map +1 -1
  381. package/src/lib/testing/memory-firestore.d.ts +55 -0
  382. package/src/lib/testing/memory-firestore.js +335 -0
  383. package/src/lib/testing/memory-firestore.js.map +1 -0
  384. package/src/lib/testing/stand-in-email-send-index.d.ts +25 -0
  385. package/src/lib/testing/stand-in-email-send-index.js +49 -0
  386. package/src/lib/testing/stand-in-email-send-index.js.map +1 -0
  387. package/src/lib/transfer/activities.d.ts +30 -0
  388. package/src/lib/transfer/activities.js +132 -0
  389. package/src/lib/transfer/activities.js.map +1 -0
  390. package/src/lib/transfer/aliases.d.ts +22 -0
  391. package/src/lib/transfer/aliases.js +1342 -0
  392. package/src/lib/transfer/aliases.js.map +1 -0
  393. package/src/lib/transfer/common.d.ts +222 -0
  394. package/src/lib/transfer/common.js +832 -0
  395. package/src/lib/transfer/common.js.map +1 -0
  396. package/src/lib/transfer/companies.d.ts +43 -0
  397. package/src/lib/transfer/companies.js +549 -0
  398. package/src/lib/transfer/companies.js.map +1 -0
  399. package/src/lib/transfer/contacts.d.ts +31 -0
  400. package/src/lib/transfer/contacts.js +727 -0
  401. package/src/lib/transfer/contacts.js.map +1 -0
  402. package/src/lib/transfer/deals.d.ts +66 -0
  403. package/src/lib/transfer/deals.js +698 -0
  404. package/src/lib/transfer/deals.js.map +1 -0
  405. package/src/lib/transfer/email-templates-package.d.ts +40 -0
  406. package/src/lib/transfer/email-templates-package.js +76 -0
  407. package/src/lib/transfer/email-templates-package.js.map +1 -0
  408. package/src/lib/transfer/email-templates-package.server.d.ts +32 -0
  409. package/src/lib/transfer/email-templates-package.server.js +176 -0
  410. package/src/lib/transfer/email-templates-package.server.js.map +1 -0
  411. package/src/lib/transfer/fields.d.ts +102 -0
  412. package/src/lib/transfer/fields.js +1755 -0
  413. package/src/lib/transfer/fields.js.map +1 -0
  414. package/src/lib/transfer/leads.d.ts +30 -0
  415. package/src/lib/transfer/leads.js +582 -0
  416. package/src/lib/transfer/leads.js.map +1 -0
  417. package/src/lib/transfer/pipelines.d.ts +21 -0
  418. package/src/lib/transfer/pipelines.js +172 -0
  419. package/src/lib/transfer/pipelines.js.map +1 -0
  420. package/src/lib/transfer/register.d.ts +47 -0
  421. package/src/lib/transfer/register.js +277 -0
  422. package/src/lib/transfer/register.js.map +1 -0
  423. package/src/lib/transfer/tasks.d.ts +30 -0
  424. package/src/lib/transfer/tasks.js +418 -0
  425. package/src/lib/transfer/tasks.js.map +1 -0
  426. package/src/lib/transfer/ui.d.ts +20 -0
  427. package/src/lib/transfer/ui.js +42 -0
  428. package/src/lib/transfer/ui.js.map +1 -0
  429. package/src/lib/components/company-import-drawer.d.ts +0 -42
  430. package/src/lib/components/company-import-drawer.js +0 -99
  431. package/src/lib/components/company-import-drawer.js.map +0 -1
  432. package/src/lib/components/contact-import-drawer.d.ts +0 -46
  433. package/src/lib/components/contact-import-drawer.js +0 -149
  434. package/src/lib/components/contact-import-drawer.js.map +0 -1
  435. package/src/lib/components/crm-export-all-button.d.ts +0 -39
  436. package/src/lib/components/crm-export-all-button.js +0 -98
  437. package/src/lib/components/crm-export-all-button.js.map +0 -1
  438. package/src/lib/components/csv-import-drawer.d.ts +0 -139
  439. package/src/lib/components/csv-import-drawer.js +0 -757
  440. package/src/lib/components/csv-import-drawer.js.map +0 -1
  441. package/src/lib/components/deal-import-drawer.d.ts +0 -24
  442. package/src/lib/components/deal-import-drawer.js +0 -83
  443. package/src/lib/components/deal-import-drawer.js.map +0 -1
  444. package/src/lib/components/lead-import-drawer.d.ts +0 -27
  445. package/src/lib/components/lead-import-drawer.js +0 -118
  446. package/src/lib/components/lead-import-drawer.js.map +0 -1
  447. package/src/lib/components/lead-source-values-card.d.ts +0 -27
  448. package/src/lib/components/lead-source-values-card.js.map +0 -1
  449. package/src/lib/components/task-import-drawer.d.ts +0 -24
  450. package/src/lib/components/task-import-drawer.js +0 -82
  451. package/src/lib/components/task-import-drawer.js.map +0 -1
  452. package/src/lib/model/companies-csv.d.ts +0 -36
  453. package/src/lib/model/companies-csv.js +0 -38
  454. package/src/lib/model/companies-csv.js.map +0 -1
  455. package/src/lib/model/contacts-csv.d.ts +0 -54
  456. package/src/lib/model/contacts-csv.js +0 -67
  457. package/src/lib/model/contacts-csv.js.map +0 -1
  458. package/src/lib/model/crm-company-import.d.ts +0 -154
  459. package/src/lib/model/crm-company-import.js +0 -331
  460. package/src/lib/model/crm-company-import.js.map +0 -1
  461. package/src/lib/model/crm-csv.d.ts +0 -239
  462. package/src/lib/model/crm-csv.js +0 -467
  463. package/src/lib/model/crm-csv.js.map +0 -1
  464. package/src/lib/model/crm-deal-import.d.ts +0 -112
  465. package/src/lib/model/crm-deal-import.js +0 -263
  466. package/src/lib/model/crm-deal-import.js.map +0 -1
  467. package/src/lib/model/crm-import.d.ts +0 -250
  468. package/src/lib/model/crm-import.js +0 -467
  469. package/src/lib/model/crm-import.js.map +0 -1
  470. package/src/lib/model/crm-lead-import.d.ts +0 -138
  471. package/src/lib/model/crm-lead-import.js +0 -446
  472. package/src/lib/model/crm-lead-import.js.map +0 -1
  473. package/src/lib/model/crm-task-import.d.ts +0 -94
  474. package/src/lib/model/crm-task-import.js +0 -275
  475. package/src/lib/model/crm-task-import.js.map +0 -1
  476. package/src/lib/model/deals-csv.d.ts +0 -32
  477. package/src/lib/model/deals-csv.js +0 -36
  478. package/src/lib/model/deals-csv.js.map +0 -1
  479. package/src/lib/model/import-column-shapes.d.ts +0 -36
  480. package/src/lib/model/import-column-shapes.js +0 -76
  481. package/src/lib/model/import-column-shapes.js.map +0 -1
  482. package/src/lib/model/lead-source-values.d.ts +0 -82
  483. package/src/lib/model/lead-source-values.js +0 -149
  484. package/src/lib/model/lead-source-values.js.map +0 -1
  485. package/src/lib/model/leads-csv.d.ts +0 -40
  486. package/src/lib/model/leads-csv.js +0 -40
  487. package/src/lib/model/leads-csv.js.map +0 -1
  488. package/src/lib/model/tasks-csv.d.ts +0 -28
  489. package/src/lib/model/tasks-csv.js +0 -28
  490. package/src/lib/model/tasks-csv.js.map +0 -1
  491. package/src/lib/server/companies-import.d.ts +0 -57
  492. package/src/lib/server/companies-import.js +0 -242
  493. package/src/lib/server/companies-import.js.map +0 -1
  494. package/src/lib/server/contacts-import.d.ts +0 -109
  495. package/src/lib/server/contacts-import.js +0 -393
  496. package/src/lib/server/contacts-import.js.map +0 -1
  497. package/src/lib/server/deals-import.d.ts +0 -76
  498. package/src/lib/server/deals-import.js +0 -248
  499. package/src/lib/server/deals-import.js.map +0 -1
  500. package/src/lib/server/export-route.d.ts +0 -60
  501. package/src/lib/server/export-route.js +0 -447
  502. package/src/lib/server/export-route.js.map +0 -1
  503. package/src/lib/server/import-context.d.ts +0 -87
  504. package/src/lib/server/import-context.js +0 -182
  505. package/src/lib/server/import-context.js.map +0 -1
  506. package/src/lib/server/lead-source-values.d.ts +0 -50
  507. package/src/lib/server/lead-source-values.js +0 -191
  508. package/src/lib/server/lead-source-values.js.map +0 -1
  509. package/src/lib/server/leads-import.d.ts +0 -84
  510. package/src/lib/server/leads-import.js +0 -367
  511. package/src/lib/server/leads-import.js.map +0 -1
  512. package/src/lib/server/tasks-import.d.ts +0 -54
  513. package/src/lib/server/tasks-import.js +0 -160
  514. package/src/lib/server/tasks-import.js.map +0 -1
@@ -1,82 +0,0 @@
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 { jsx as _jsx } from "react/jsx-runtime";
18
- /**
19
- * IMPORTING A TASKS FILE — the task vocabulary over the shared drawer
20
- * (AGL-2662).
21
- *
22
- * The server half is `server/tasks-import.ts`. What is particular to
23
- * tasks: the title is the one cell every row needs, an assignee address
24
- * that names nobody on the team refuses the ROW rather than filing the
25
- * task unassigned, no notification is sent, and nothing is merged — a
26
- * task has no key, so every row is a new task.
27
- */ import { pluginDocsHelp } from "@aglyn/aglyn";
28
- import { TASK_IMPORT_CHUNK_SIZE, TASK_IMPORT_FIELD_LABELS, TASK_IMPORT_FIELDS, TASK_IMPORT_MAX_ROWS, TASK_IMPORT_PREVIEW_ROWS, TASK_IMPORT_SKIP_LABELS, emptyTaskImportResult, guessTaskImportMapping, mapTaskImportRow, mergeTaskImportResults, taskImportSkippedCsv } from "../model/crm-task-import.js";
29
- import { tasksCsv } from "../model/tasks-csv.js";
30
- import { CsvImportButton, CsvImportDrawer } from "./csv-import-drawer.js";
31
- /** The browser-side address of the route one chunk is posted to. */ export const TASKS_IMPORT_URL = '/api/crm/tasks-import';
32
- /** Built once: nothing in it depends on a render. */ export const TASK_IMPORT_VOCABULARY = {
33
- title: 'Import tasks from CSV',
34
- help: pluginDocsHelp('crmTasks', {
35
- anchor: '#import-from-csv'
36
- }),
37
- sitePickerHelperText: 'The site these tasks are filed from — it decides which of your sites ' + 'may see them.',
38
- intro: 'A CSV with a header row. Match its columns to task fields below, check ' + 'the preview, then import. An assignee is a team member’s email address; ' + 'a row naming somebody who is not on the team is skipped. Nobody is ' + 'notified. Every row becomes a new task — importing a file twice files ' + `it twice. Up to ${TASK_IMPORT_MAX_ROWS.toLocaleString()} rows per file ` + '— split a larger one.',
39
- fields: TASK_IMPORT_FIELDS,
40
- fieldLabels: TASK_IMPORT_FIELD_LABELS,
41
- requiredField: 'title',
42
- requiredWarning: 'Choose which column holds the task title. It is the one field every ' + 'row needs.',
43
- unusableNotice: (count, total)=>`${count.toLocaleString()} of ${total.toLocaleString()} rows have no ` + 'title and will be skipped. You can download them after the import.',
44
- guessMapping: guessTaskImportMapping,
45
- mapRow: (cells, mapping)=>mapTaskImportRow(cells, mapping),
46
- route: TASKS_IMPORT_URL,
47
- maxRows: TASK_IMPORT_MAX_ROWS,
48
- chunkSize: TASK_IMPORT_CHUNK_SIZE,
49
- previewRows: TASK_IMPORT_PREVIEW_ROWS,
50
- emptyResult: emptyTaskImportResult,
51
- mergeResults: mergeTaskImportResults,
52
- skipLabels: TASK_IMPORT_SKIP_LABELS,
53
- skippedCsv: taskImportSkippedCsv,
54
- skippedFileName: 'skipped-tasks.csv',
55
- // The export's own header over no rows, so an export re-imports as is.
56
- templateCsv: ()=>tasksCsv([]),
57
- templateFileName: 'tasks-template.csv'
58
- };
59
- export function TaskImportDrawer(props) {
60
- const { open, onClose, hostId } = props;
61
- return /*#__PURE__*/ _jsx(CsvImportDrawer, {
62
- open: open,
63
- onClose: onClose,
64
- hostId: hostId,
65
- vocabulary: TASK_IMPORT_VOCABULARY
66
- });
67
- }
68
- TaskImportDrawer.displayName = 'TaskImportDrawer';
69
- /** The "Import CSV" action on the tasks list, with the drawer it opens. */ export function TaskImportButton(props) {
70
- const { hostId } = props;
71
- return /*#__PURE__*/ _jsx(CsvImportButton, {
72
- children: (open, onClose)=>/*#__PURE__*/ _jsx(TaskImportDrawer, {
73
- open: open,
74
- onClose: onClose,
75
- hostId: hostId
76
- })
77
- });
78
- }
79
- TaskImportButton.displayName = 'TaskImportButton';
80
- export default TaskImportDrawer;
81
-
82
- //# sourceMappingURL=task-import-drawer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../libs/plugins/crm/src/lib/components/task-import-drawer.tsx"],"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\n/**\n * IMPORTING A TASKS FILE — the task vocabulary over the shared drawer\n * (AGL-2662).\n *\n * The server half is `server/tasks-import.ts`. What is particular to\n * tasks: the title is the one cell every row needs, an assignee address\n * that names nobody on the team refuses the ROW rather than filing the\n * task unassigned, no notification is sent, and nothing is merged — a\n * task has no key, so every row is a new task.\n */\n\nimport { pluginDocsHelp } from '@aglyn/aglyn'\nimport {\n TASK_IMPORT_CHUNK_SIZE,\n TASK_IMPORT_FIELD_LABELS,\n TASK_IMPORT_FIELDS,\n TASK_IMPORT_MAX_ROWS,\n TASK_IMPORT_PREVIEW_ROWS,\n TASK_IMPORT_SKIP_LABELS,\n type TaskImportField,\n type TaskImportRawRow,\n type TaskImportSkippedRow,\n emptyTaskImportResult,\n guessTaskImportMapping,\n mapTaskImportRow,\n mergeTaskImportResults,\n taskImportSkippedCsv,\n} from '../model/crm-task-import'\nimport { tasksCsv } from '../model/tasks-csv'\nimport {\n CsvImportButton,\n CsvImportDrawer,\n type CsvImportVocabulary,\n} from './csv-import-drawer'\n\n/** The browser-side address of the route one chunk is posted to. */\nexport const TASKS_IMPORT_URL = '/api/crm/tasks-import'\n\n/** Built once: nothing in it depends on a render. */\nexport const TASK_IMPORT_VOCABULARY: CsvImportVocabulary<\n TaskImportField,\n TaskImportRawRow & Record<string, unknown>,\n TaskImportSkippedRow\n> = {\n title: 'Import tasks from CSV',\n help: pluginDocsHelp('crmTasks', { anchor: '#import-from-csv' }),\n sitePickerHelperText:\n 'The site these tasks are filed from — it decides which of your sites ' +\n 'may see them.',\n intro:\n 'A CSV with a header row. Match its columns to task fields below, check ' +\n 'the preview, then import. An assignee is a team member’s email address; ' +\n 'a row naming somebody who is not on the team is skipped. Nobody is ' +\n 'notified. Every row becomes a new task — importing a file twice files ' +\n `it twice. Up to ${TASK_IMPORT_MAX_ROWS.toLocaleString()} rows per file ` +\n '— split a larger one.',\n fields: TASK_IMPORT_FIELDS,\n fieldLabels: TASK_IMPORT_FIELD_LABELS,\n requiredField: 'title',\n requiredWarning:\n 'Choose which column holds the task title. It is the one field every ' +\n 'row needs.',\n unusableNotice: (count, total) =>\n `${count.toLocaleString()} of ${total.toLocaleString()} rows have no ` +\n 'title and will be skipped. You can download them after the import.',\n guessMapping: guessTaskImportMapping,\n mapRow: (cells, mapping) =>\n mapTaskImportRow(cells, mapping) as TaskImportRawRow & Record<string, unknown>,\n route: TASKS_IMPORT_URL,\n maxRows: TASK_IMPORT_MAX_ROWS,\n chunkSize: TASK_IMPORT_CHUNK_SIZE,\n previewRows: TASK_IMPORT_PREVIEW_ROWS,\n emptyResult: emptyTaskImportResult,\n mergeResults: mergeTaskImportResults,\n skipLabels: TASK_IMPORT_SKIP_LABELS,\n skippedCsv: taskImportSkippedCsv,\n skippedFileName: 'skipped-tasks.csv',\n // The export's own header over no rows, so an export re-imports as is.\n templateCsv: () => tasksCsv([]),\n templateFileName: 'tasks-template.csv',\n}\n\nexport interface TaskImportDrawerProps {\n open: boolean\n onClose: () => void\n /** The site the file is filed from, or `null` at the organization level. */\n hostId: string | null\n}\n\nexport function TaskImportDrawer(props: TaskImportDrawerProps) {\n const { open, onClose, hostId } = props\n return (\n <CsvImportDrawer\n open={open}\n onClose={onClose}\n hostId={hostId}\n vocabulary={TASK_IMPORT_VOCABULARY}\n />\n )\n}\nTaskImportDrawer.displayName = 'TaskImportDrawer'\n\n/** The \"Import CSV\" action on the tasks list, with the drawer it opens. */\nexport function TaskImportButton(props: { hostId: string | null }) {\n const { hostId } = props\n return (\n <CsvImportButton>\n {(open, onClose) => <TaskImportDrawer open={open} onClose={onClose} hostId={hostId} />}\n </CsvImportButton>\n )\n}\nTaskImportButton.displayName = 'TaskImportButton'\n\nexport default TaskImportDrawer\n"],"names":["pluginDocsHelp","TASK_IMPORT_CHUNK_SIZE","TASK_IMPORT_FIELD_LABELS","TASK_IMPORT_FIELDS","TASK_IMPORT_MAX_ROWS","TASK_IMPORT_PREVIEW_ROWS","TASK_IMPORT_SKIP_LABELS","emptyTaskImportResult","guessTaskImportMapping","mapTaskImportRow","mergeTaskImportResults","taskImportSkippedCsv","tasksCsv","CsvImportButton","CsvImportDrawer","TASKS_IMPORT_URL","TASK_IMPORT_VOCABULARY","title","help","anchor","sitePickerHelperText","intro","toLocaleString","fields","fieldLabels","requiredField","requiredWarning","unusableNotice","count","total","guessMapping","mapRow","cells","mapping","route","maxRows","chunkSize","previewRows","emptyResult","mergeResults","skipLabels","skippedCsv","skippedFileName","templateCsv","templateFileName","TaskImportDrawer","props","open","onClose","hostId","vocabulary","displayName","TaskImportButton"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;AAEA;;;;;;;;;CASC,GAED,SAASA,cAAc,QAAQ,eAAc;AAC7C,SACEC,sBAAsB,EACtBC,wBAAwB,EACxBC,kBAAkB,EAClBC,oBAAoB,EACpBC,wBAAwB,EACxBC,uBAAuB,EAIvBC,qBAAqB,EACrBC,sBAAsB,EACtBC,gBAAgB,EAChBC,sBAAsB,EACtBC,oBAAoB,QACf,8BAA0B;AACjC,SAASC,QAAQ,QAAQ,wBAAoB;AAC7C,SACEC,eAAe,EACfC,eAAe,QAEV,yBAAqB;AAE5B,kEAAkE,GAClE,OAAO,MAAMC,mBAAmB,wBAAuB;AAEvD,mDAAmD,GACnD,OAAO,MAAMC,yBAIT;IACFC,OAAO;IACPC,MAAMlB,eAAe,YAAY;QAAEmB,QAAQ;IAAmB;IAC9DC,sBACE,0EACA;IACFC,OACE,4EACA,6EACA,wEACA,2EACA,CAAC,gBAAgB,EAAEjB,qBAAqBkB,cAAc,GAAG,eAAe,CAAC,GACzE;IACFC,QAAQpB;IACRqB,aAAatB;IACbuB,eAAe;IACfC,iBACE,yEACA;IACFC,gBAAgB,CAACC,OAAOC,QACtB,GAAGD,MAAMN,cAAc,GAAG,IAAI,EAAEO,MAAMP,cAAc,GAAG,cAAc,CAAC,GACtE;IACFQ,cAActB;IACduB,QAAQ,CAACC,OAAOC,UACdxB,iBAAiBuB,OAAOC;IAC1BC,OAAOnB;IACPoB,SAAS/B;IACTgC,WAAWnC;IACXoC,aAAahC;IACbiC,aAAa/B;IACbgC,cAAc7B;IACd8B,YAAYlC;IACZmC,YAAY9B;IACZ+B,iBAAiB;IACjB,uEAAuE;IACvEC,aAAa,IAAM/B,SAAS,EAAE;IAC9BgC,kBAAkB;AACpB,EAAC;AASD,OAAO,SAASC,iBAAiBC,KAA4B;IAC3D,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGH;IAClC,qBACE,KAAChC;QACCiC,MAAMA;QACNC,SAASA;QACTC,QAAQA;QACRC,YAAYlC;;AAGlB;AACA6B,iBAAiBM,WAAW,GAAG;AAE/B,yEAAyE,GACzE,OAAO,SAASC,iBAAiBN,KAAgC;IAC/D,MAAM,EAAEG,MAAM,EAAE,GAAGH;IACnB,qBACE,KAACjC;kBACE,CAACkC,MAAMC,wBAAY,KAACH;gBAAiBE,MAAMA;gBAAMC,SAASA;gBAASC,QAAQA;;;AAGlF;AACAG,iBAAiBD,WAAW,GAAG;AAE/B,eAAeN,iBAAgB"}
@@ -1,36 +0,0 @@
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
- /**
18
- * The companies CSV — one file from the table's Export button and the bulk
19
- * bar's (AGL-2621).
20
- *
21
- * The same rule the contacts file follows: the header is the companies
22
- * IMPORT's own vocabulary — the first alias of every field
23
- * `guessCompanyImportMapping` reads — so an export re-imports without a
24
- * hand mapping, and the template the Import drawer hands out IS this header
25
- * over no rows. The owner is written by ADDRESS, because the import resolves
26
- * an owner by email and a uid is nothing a spreadsheet can read. The one
27
- * column the import has no field for, the contacts count, is written last
28
- * because it is what a merchant reads the file for, and maps to "Do not
29
- * import" on the way back.
30
- */
31
- export { COMPANY_CSV_COLUMNS, companiesCsv, type CompanyCsvOptions, type CompanyCsvRow, } from './crm-csv';
32
- /**
33
- * The file the Import drawer hands out to start from: the export's header
34
- * and nothing under it.
35
- */
36
- export declare function companyImportTemplateCsv(): string;
@@ -1,38 +0,0 @@
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 companies CSV — one file from the table's Export button and the bulk
18
- * bar's (AGL-2621).
19
- *
20
- * The same rule the contacts file follows: the header is the companies
21
- * IMPORT's own vocabulary — the first alias of every field
22
- * `guessCompanyImportMapping` reads — so an export re-imports without a
23
- * hand mapping, and the template the Import drawer hands out IS this header
24
- * over no rows. The owner is written by ADDRESS, because the import resolves
25
- * an owner by email and a uid is nothing a spreadsheet can read. The one
26
- * column the import has no field for, the contacts count, is written last
27
- * because it is what a merchant reads the file for, and maps to "Do not
28
- * import" on the way back.
29
- */ /* The writer is `crm-csv.ts`, shared with the server's export — see `deals-csv.ts`. */ export { COMPANY_CSV_COLUMNS, companiesCsv } from "./crm-csv.js";
30
- import { companiesCsv } from "./crm-csv.js";
31
- /**
32
- * The file the Import drawer hands out to start from: the export's header
33
- * and nothing under it.
34
- */ export function companyImportTemplateCsv() {
35
- return companiesCsv([]);
36
- }
37
-
38
- //# sourceMappingURL=companies-csv.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../libs/plugins/crm/src/lib/model/companies-csv.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/**\n * The companies CSV — one file from the table's Export button and the bulk\n * bar's (AGL-2621).\n *\n * The same rule the contacts file follows: the header is the companies\n * IMPORT's own vocabulary — the first alias of every field\n * `guessCompanyImportMapping` reads — so an export re-imports without a\n * hand mapping, and the template the Import drawer hands out IS this header\n * over no rows. The owner is written by ADDRESS, because the import resolves\n * an owner by email and a uid is nothing a spreadsheet can read. The one\n * column the import has no field for, the contacts count, is written last\n * because it is what a merchant reads the file for, and maps to \"Do not\n * import\" on the way back.\n */\n\n/* The writer is `crm-csv.ts`, shared with the server's export — see `deals-csv.ts`. */\nexport {\n COMPANY_CSV_COLUMNS,\n companiesCsv,\n type CompanyCsvOptions,\n type CompanyCsvRow,\n} from './crm-csv'\n\nimport { companiesCsv } from './crm-csv'\n\n/**\n * The file the Import drawer hands out to start from: the export's header\n * and nothing under it.\n */\nexport function companyImportTemplateCsv(): string {\n return companiesCsv([])\n}\n"],"names":["COMPANY_CSV_COLUMNS","companiesCsv","companyImportTemplateCsv"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;;;;CAaC,GAED,qFAAqF,GACrF,SACEA,mBAAmB,EACnBC,YAAY,QAGP,eAAW;AAElB,SAASA,YAAY,QAAQ,eAAW;AAExC;;;CAGC,GACD,OAAO,SAASC;IACd,OAAOD,aAAa,EAAE;AACxB"}
@@ -1,54 +0,0 @@
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
- /**
18
- * The contacts CSV — every CRM column, the same file from the table's
19
- * Export button and the bulk bar's (AGL-2603, widened by AGL-2621).
20
- *
21
- * The selection's export and the table's export are the same file over a
22
- * different set of rows: the same columns in the same order, the same `|`
23
- * between multi-valued cells, the same quoting. A second column list would
24
- * be a second file format for one feature, and the person opening both in
25
- * a spreadsheet would be the one to find the difference.
26
- *
27
- * ## The header row is the import's own vocabulary
28
- *
29
- * Each column is headed by a name `guessContactImportMapping` recognizes —
30
- * "Job title", "Address line 1", "Lifecycle stage", a custom field's label
31
- * — so an export re-imports without a hand mapping, and the template the
32
- * Import drawer offers IS this header over no rows. The owner column
33
- * carries the member's ADDRESS rather than a uid for the same reason: the
34
- * import resolves an owner by email, and a uid is nothing a spreadsheet
35
- * can read anyway. The three columns the import has no field for — sources,
36
- * the last interaction and the last campaign engagement — are still
37
- * written, because they are what a merchant reads the file for; they map to
38
- * "Do not import" on the way back.
39
- */
40
- export { CONTACT_CSV_COLUMNS, contactCsvHeader, contactsCsv, type ContactCsvOptions, type ContactCsvRow, } from './crm-csv';
41
- import { type ContactCsvOptions } from './crm-csv';
42
- /**
43
- * The file the Import drawer hands out to start from: the export's header
44
- * and nothing under it, so a sheet filled in against it maps itself.
45
- */
46
- export declare function contactImportTemplateCsv(customFields?: ContactCsvOptions['customFields']): string;
47
- /**
48
- * Hand the browser a file to save.
49
- *
50
- * The one writer that stayed: it touches `URL.createObjectURL` and
51
- * `document`, so it belongs to the browser and not to the library a server
52
- * route imports.
53
- */
54
- export declare function downloadTextFile(name: string, mime: string, text: string): void;
@@ -1,67 +0,0 @@
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 contacts CSV — every CRM column, the same file from the table's
18
- * Export button and the bulk bar's (AGL-2603, widened by AGL-2621).
19
- *
20
- * The selection's export and the table's export are the same file over a
21
- * different set of rows: the same columns in the same order, the same `|`
22
- * between multi-valued cells, the same quoting. A second column list would
23
- * be a second file format for one feature, and the person opening both in
24
- * a spreadsheet would be the one to find the difference.
25
- *
26
- * ## The header row is the import's own vocabulary
27
- *
28
- * Each column is headed by a name `guessContactImportMapping` recognizes —
29
- * "Job title", "Address line 1", "Lifecycle stage", a custom field's label
30
- * — so an export re-imports without a hand mapping, and the template the
31
- * Import drawer offers IS this header over no rows. The owner column
32
- * carries the member's ADDRESS rather than a uid for the same reason: the
33
- * import resolves an owner by email, and a uid is nothing a spreadsheet
34
- * can read anyway. The three columns the import has no field for — sources,
35
- * the last interaction and the last campaign engagement — are still
36
- * written, because they are what a merchant reads the file for; they map to
37
- * "Do not import" on the way back.
38
- */ /* The writer is `crm-csv.ts`, shared with the server's export — see `deals-csv.ts`. */ export { CONTACT_CSV_COLUMNS, contactCsvHeader, contactsCsv } from "./crm-csv.js";
39
- import { contactsCsv } from "./crm-csv.js";
40
- /**
41
- * The file the Import drawer hands out to start from: the export's header
42
- * and nothing under it, so a sheet filled in against it maps itself.
43
- */ export function contactImportTemplateCsv(customFields = []) {
44
- return contactsCsv([], {
45
- customFields
46
- });
47
- }
48
- /**
49
- * Hand the browser a file to save.
50
- *
51
- * The one writer that stayed: it touches `URL.createObjectURL` and
52
- * `document`, so it belongs to the browser and not to the library a server
53
- * route imports.
54
- */ export function downloadTextFile(name, mime, text) {
55
- const url = URL.createObjectURL(new Blob([
56
- text
57
- ], {
58
- type: mime
59
- }));
60
- const anchor = document.createElement('a');
61
- anchor.href = url;
62
- anchor.download = name;
63
- anchor.click();
64
- URL.revokeObjectURL(url);
65
- }
66
-
67
- //# sourceMappingURL=contacts-csv.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../../libs/plugins/crm/src/lib/model/contacts-csv.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/**\n * The contacts CSV — every CRM column, the same file from the table's\n * Export button and the bulk bar's (AGL-2603, widened by AGL-2621).\n *\n * The selection's export and the table's export are the same file over a\n * different set of rows: the same columns in the same order, the same `|`\n * between multi-valued cells, the same quoting. A second column list would\n * be a second file format for one feature, and the person opening both in\n * a spreadsheet would be the one to find the difference.\n *\n * ## The header row is the import's own vocabulary\n *\n * Each column is headed by a name `guessContactImportMapping` recognizes —\n * \"Job title\", \"Address line 1\", \"Lifecycle stage\", a custom field's label\n * — so an export re-imports without a hand mapping, and the template the\n * Import drawer offers IS this header over no rows. The owner column\n * carries the member's ADDRESS rather than a uid for the same reason: the\n * import resolves an owner by email, and a uid is nothing a spreadsheet\n * can read anyway. The three columns the import has no field for — sources,\n * the last interaction and the last campaign engagement — are still\n * written, because they are what a merchant reads the file for; they map to\n * \"Do not import\" on the way back.\n */\n\n/* The writer is `crm-csv.ts`, shared with the server's export — see `deals-csv.ts`. */\nexport {\n CONTACT_CSV_COLUMNS,\n contactCsvHeader,\n contactsCsv,\n type ContactCsvOptions,\n type ContactCsvRow,\n} from './crm-csv'\n\nimport { contactsCsv, type ContactCsvOptions } from './crm-csv'\n\n/**\n * The file the Import drawer hands out to start from: the export's header\n * and nothing under it, so a sheet filled in against it maps itself.\n */\nexport function contactImportTemplateCsv(\n customFields: ContactCsvOptions['customFields'] = [],\n): string {\n return contactsCsv([], { customFields })\n}\n\n/**\n * Hand the browser a file to save.\n *\n * The one writer that stayed: it touches `URL.createObjectURL` and\n * `document`, so it belongs to the browser and not to the library a server\n * route imports.\n */\nexport function downloadTextFile(name: string, mime: string, text: string): void {\n const url = URL.createObjectURL(new Blob([text], { type: mime }))\n const anchor = document.createElement('a')\n anchor.href = url\n anchor.download = name\n anchor.click()\n URL.revokeObjectURL(url)\n}\n"],"names":["CONTACT_CSV_COLUMNS","contactCsvHeader","contactsCsv","contactImportTemplateCsv","customFields","downloadTextFile","name","mime","text","url","URL","createObjectURL","Blob","type","anchor","document","createElement","href","download","click","revokeObjectURL"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;;;;;;;;;;;;;CAsBC,GAED,qFAAqF,GACrF,SACEA,mBAAmB,EACnBC,gBAAgB,EAChBC,WAAW,QAGN,eAAW;AAElB,SAASA,WAAW,QAAgC,eAAW;AAE/D;;;CAGC,GACD,OAAO,SAASC,yBACdC,eAAkD,EAAE;IAEpD,OAAOF,YAAY,EAAE,EAAE;QAAEE;IAAa;AACxC;AAEA;;;;;;CAMC,GACD,OAAO,SAASC,iBAAiBC,IAAY,EAAEC,IAAY,EAAEC,IAAY;IACvE,MAAMC,MAAMC,IAAIC,eAAe,CAAC,IAAIC,KAAK;QAACJ;KAAK,EAAE;QAAEK,MAAMN;IAAK;IAC9D,MAAMO,SAASC,SAASC,aAAa,CAAC;IACtCF,OAAOG,IAAI,GAAGR;IACdK,OAAOI,QAAQ,GAAGZ;IAClBQ,OAAOK,KAAK;IACZT,IAAIU,eAAe,CAACX;AACtB"}
@@ -1,154 +0,0 @@
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
- /**
18
- * BRINGING A SPREADSHEET OF COMPANIES INTO THE CRM — the pure half
19
- * (AGL-2621).
20
- *
21
- * The contact import's three stages (`crm-import.ts`) over the company
22
- * vocabulary: a header row is matched to a proposed mapping, one line is
23
- * mapped to a raw row of verbatim strings, and the server normalizes each
24
- * row through the SAME functions the company drawer runs —
25
- * `normalizeCompanyDomain` for the key, `normalizeCompanyWebsite` for the
26
- * link, `normalizePhone` for E.164, `normalizeAddress` for the postal shape
27
- * — so an imported company and a typed one are the same document.
28
- *
29
- * ## The name is the one thing a row must have
30
- *
31
- * A company is matched by its DOMAIN first and its name second, because a
32
- * domain is a key and a name is a spelling: two files calling one business
33
- * "Acme" and "Acme Inc" meet at `acme.com`. But a row with a domain and no
34
- * name would create a record the list cannot caption, so the name is
35
- * required and the domain optional — the opposite of the contact import,
36
- * where the address is both the key and the caption.
37
- *
38
- * ## A bad cell is dropped and named; a bad row is skipped and named
39
- *
40
- * The contact import's rule, unchanged: a domain that is not a hostname, a
41
- * phone that is not a number, a website that is not a URL, a country that
42
- * is not a code — each is left off the record and REPORTED under
43
- * {@link CompanyImportRow.dropped}, never silently discarded.
44
- */
45
- import type { AglynPostalAddress } from '@aglyn/aglyn/foundation/definitions/contact.types';
46
- import { type ContactFieldDefinition, type CrmCustomValue } from '@aglyn/aglyn/app-utils/crm';
47
- import { type ImportChunkResult, type ImportDroppedValue } from '@aglyn/aglyn/app-utils/csv-import';
48
- /** The shared ceilings, under this collection's names. */
49
- export declare const COMPANY_IMPORT_MAX_ROWS = 5000;
50
- export declare const COMPANY_IMPORT_CHUNK_SIZE = 200;
51
- export declare const COMPANY_IMPORT_MAX_BODY_BYTES = 2000000;
52
- export declare const COMPANY_IMPORT_PREVIEW_ROWS = 10;
53
- /** The most tags one company may carry — the same cap a contact has. */
54
- export declare const COMPANY_IMPORT_TAGS_MAX = 20;
55
- /** The fields a column may be mapped to, in the order the mapping menu lists them. */
56
- export declare const COMPANY_IMPORT_FIELDS: readonly ["name", "domain", "website", "phone", "industry", "ownerEmail", "addressLine1", "addressLine2", "addressCity", "addressState", "addressPostalCode", "addressCountry", "tags", "notes"];
57
- export type CompanyImportField = (typeof COMPANY_IMPORT_FIELDS)[number];
58
- /** How each field reads in the mapping menu. Typed so a field cannot ship unlabeled. */
59
- export declare const COMPANY_IMPORT_FIELD_LABELS: Record<CompanyImportField, string>;
60
- /**
61
- * Column index → field, or a company custom field as `custom:<key>` (AGL-2661).
62
- * A column absent from the map is not imported.
63
- */
64
- export type CompanyImportMapping = Record<number, CompanyImportField | `custom:${string}`>;
65
- /**
66
- * A proposed mapping from a file's header row, each field taken at most
67
- * once. `fields` is the org's COMPANY definitions (AGL-2661): a header
68
- * matching one's label or key maps onto it, and wins over a standard
69
- * alias, the contact import's rule.
70
- */
71
- export declare function guessCompanyImportMapping(columns: readonly string[], fields?: readonly Pick<ContactFieldDefinition, 'key' | 'label'>[]): CompanyImportMapping;
72
- /**
73
- * What the browser posts for one line: the cells the mapping selected,
74
- * under the field they were mapped to, verbatim. `unknown` because the
75
- * server reads this off an untrusted body.
76
- */
77
- export type CompanyImportRawRow = Partial<Record<CompanyImportField, unknown>> & {
78
- /** Custom values by definition key, verbatim — judged by `normalizeCompanyImportRow`. */
79
- custom?: unknown;
80
- };
81
- /**
82
- * One parsed line under the mapping. Empty cells are left absent; custom
83
- * values are gathered under `custom` by definition key (AGL-2661).
84
- */
85
- export declare function mapCompanyImportRow(cells: readonly string[], mapping: CompanyImportMapping): CompanyImportRawRow;
86
- /** Why one row was not stored. */
87
- export type CompanyImportSkipReason = 'missing-name' | 'duplicate' | 'records-band' | 'write-failed';
88
- /** How a skip reason reads on screen and in the downloaded file. */
89
- export declare const COMPANY_IMPORT_SKIP_LABELS: Record<CompanyImportSkipReason, string>;
90
- /** One row, ready to be written. */
91
- export interface CompanyImportRow {
92
- name: string;
93
- /** Lowercase hostname — the match key when present. */
94
- domain?: string;
95
- /** An absolute http(s) URL. */
96
- website?: string;
97
- /** E.164. */
98
- phone?: string;
99
- industry?: string;
100
- /** Normalized, for the server to resolve against the org's members. */
101
- ownerEmail?: string;
102
- address?: AglynPostalAddress;
103
- /** Lowercased, deduplicated, capped at {@link COMPANY_IMPORT_TAGS_MAX}. */
104
- tags: string[];
105
- notes?: string;
106
- dropped: ImportDroppedValue[];
107
- /**
108
- * Custom values under the org's COMPANY definitions (AGL-2661), each
109
- * coerced by its type the way a contact's are. Empty when the file
110
- * mapped none, or none survived.
111
- */
112
- custom: Record<string, CrmCustomValue>;
113
- }
114
- export type CompanyImportRowVerdict = {
115
- ok: true;
116
- row: CompanyImportRow;
117
- } | {
118
- ok: false;
119
- reason: 'missing-name';
120
- input: string;
121
- };
122
- /**
123
- * One raw row as the values that will be written, or the reason it cannot
124
- * be. Refused only for a missing name; every other unreadable cell is
125
- * dropped and named.
126
- */
127
- export declare function normalizeCompanyImportRow(raw: CompanyImportRawRow,
128
- /**
129
- * The org's live COMPANY definitions (AGL-2661): a value under a key
130
- * with no definition is dropped and reported, because a value nobody
131
- * defined a field for is a value no surface will ever show.
132
- */
133
- fields?: readonly Pick<ContactFieldDefinition, 'key' | 'type' | 'options'>[]): CompanyImportRowVerdict;
134
- /**
135
- * How two rows are recognized as one company: by domain when the row has
136
- * one, else by the name's search key — the same `nameLower` the companies
137
- * list searches on, so "Acme" and "ACME " are one key.
138
- */
139
- export declare function companyImportMatchKey(row: Pick<CompanyImportRow, 'name' | 'domain'>): string;
140
- /** One row the server did not store, by its index in the request, named by the company. */
141
- export interface CompanyImportSkippedRow {
142
- index: number;
143
- name: string;
144
- reason: CompanyImportSkipReason;
145
- }
146
- /** What one request did. The drawer sums these across a file. */
147
- export type CompanyImportChunkResult = ImportChunkResult<CompanyImportSkippedRow>;
148
- export declare function emptyCompanyImportResult(): CompanyImportChunkResult;
149
- export declare function mergeCompanyImportResults(total: CompanyImportChunkResult, chunk: CompanyImportChunkResult, offset?: number): CompanyImportChunkResult;
150
- /** The skipped rows as a file the operator can fix and re-import. */
151
- export declare function companyImportSkippedCsv(columns: readonly string[], entries: readonly {
152
- cells: readonly string[];
153
- reason: CompanyImportSkipReason;
154
- }[]): string;