@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.
- package/LICENSE +201 -0
- package/README.md +7 -0
- package/package.json +57 -0
- package/src/index.d.ts +21 -0
- package/src/index.js +29 -0
- package/src/index.js.map +1 -0
- package/src/lib/components/activity-list.d.ts +98 -0
- package/src/lib/components/activity-list.js +321 -0
- package/src/lib/components/activity-list.js.map +1 -0
- package/src/lib/components/activity-queries.d.ts +117 -0
- package/src/lib/components/activity-queries.js +198 -0
- package/src/lib/components/activity-queries.js.map +1 -0
- package/src/lib/components/add-to-list-button.d.ts +25 -0
- package/src/lib/components/add-to-list-button.js +64 -0
- package/src/lib/components/add-to-list-button.js.map +1 -0
- package/src/lib/components/add-to-list-dialog.d.ts +24 -0
- package/src/lib/components/add-to-list-dialog.js +327 -0
- package/src/lib/components/add-to-list-dialog.js.map +1 -0
- package/src/lib/components/assignment-rule-drawer.d.ts +43 -0
- package/src/lib/components/assignment-rule-drawer.js +293 -0
- package/src/lib/components/assignment-rule-drawer.js.map +1 -0
- package/src/lib/components/companies-bulk-bar.d.ts +29 -0
- package/src/lib/components/companies-bulk-bar.js +274 -0
- package/src/lib/components/companies-bulk-bar.js.map +1 -0
- package/src/lib/components/companies-section.d.ts +54 -0
- package/src/lib/components/companies-section.js +522 -0
- package/src/lib/components/companies-section.js.map +1 -0
- package/src/lib/components/company-contacts-card.d.ts +49 -0
- package/src/lib/components/company-contacts-card.js +435 -0
- package/src/lib/components/company-contacts-card.js.map +1 -0
- package/src/lib/components/company-deals-card.d.ts +20 -0
- package/src/lib/components/company-deals-card.js +38 -0
- package/src/lib/components/company-deals-card.js.map +1 -0
- package/src/lib/components/company-detail-page.d.ts +20 -0
- package/src/lib/components/company-detail-page.js +165 -0
- package/src/lib/components/company-detail-page.js.map +1 -0
- package/src/lib/components/company-edit-drawer.d.ts +65 -0
- package/src/lib/components/company-edit-drawer.js +433 -0
- package/src/lib/components/company-edit-drawer.js.map +1 -0
- package/src/lib/components/company-import-drawer.d.ts +42 -0
- package/src/lib/components/company-import-drawer.js +99 -0
- package/src/lib/components/company-import-drawer.js.map +1 -0
- package/src/lib/components/company-picker.d.ts +127 -0
- package/src/lib/components/company-picker.js +323 -0
- package/src/lib/components/company-picker.js.map +1 -0
- package/src/lib/components/company-properties-card.d.ts +47 -0
- package/src/lib/components/company-properties-card.js +289 -0
- package/src/lib/components/company-properties-card.js.map +1 -0
- package/src/lib/components/contact-address-fields.d.ts +29 -0
- package/src/lib/components/contact-address-fields.js +149 -0
- package/src/lib/components/contact-address-fields.js.map +1 -0
- package/src/lib/components/contact-associations-card.d.ts +72 -0
- package/src/lib/components/contact-associations-card.js +296 -0
- package/src/lib/components/contact-associations-card.js.map +1 -0
- package/src/lib/components/contact-custom-columns.d.ts +38 -0
- package/src/lib/components/contact-custom-columns.js +102 -0
- package/src/lib/components/contact-custom-columns.js.map +1 -0
- package/src/lib/components/contact-custom-fields-card.d.ts +39 -0
- package/src/lib/components/contact-custom-fields-card.js +204 -0
- package/src/lib/components/contact-custom-fields-card.js.map +1 -0
- package/src/lib/components/contact-deals-card.d.ts +20 -0
- package/src/lib/components/contact-deals-card.js +38 -0
- package/src/lib/components/contact-deals-card.js.map +1 -0
- package/src/lib/components/contact-detail-page.d.ts +46 -0
- package/src/lib/components/contact-detail-page.js +535 -0
- package/src/lib/components/contact-detail-page.js.map +1 -0
- package/src/lib/components/contact-duplicates-card.d.ts +42 -0
- package/src/lib/components/contact-duplicates-card.js +167 -0
- package/src/lib/components/contact-duplicates-card.js.map +1 -0
- package/src/lib/components/contact-field-drawer.d.ts +64 -0
- package/src/lib/components/contact-field-drawer.js +251 -0
- package/src/lib/components/contact-field-drawer.js.map +1 -0
- package/src/lib/components/contact-import-drawer.d.ts +46 -0
- package/src/lib/components/contact-import-drawer.js +149 -0
- package/src/lib/components/contact-import-drawer.js.map +1 -0
- package/src/lib/components/contact-known-by-card.d.ts +39 -0
- package/src/lib/components/contact-known-by-card.js +142 -0
- package/src/lib/components/contact-known-by-card.js.map +1 -0
- package/src/lib/components/contact-list-columns.d.ts +53 -0
- package/src/lib/components/contact-list-columns.js +288 -0
- package/src/lib/components/contact-list-columns.js.map +1 -0
- package/src/lib/components/contact-merge-dialog.d.ts +79 -0
- package/src/lib/components/contact-merge-dialog.js +405 -0
- package/src/lib/components/contact-merge-dialog.js.map +1 -0
- package/src/lib/components/contact-properties-card.d.ts +89 -0
- package/src/lib/components/contact-properties-card.js +492 -0
- package/src/lib/components/contact-properties-card.js.map +1 -0
- package/src/lib/components/contact-timeline-card.d.ts +68 -0
- package/src/lib/components/contact-timeline-card.js +435 -0
- package/src/lib/components/contact-timeline-card.js.map +1 -0
- package/src/lib/components/contacts-bulk-bar.d.ts +91 -0
- package/src/lib/components/contacts-bulk-bar.js +493 -0
- package/src/lib/components/contacts-bulk-bar.js.map +1 -0
- package/src/lib/components/contacts-section.d.ts +26 -0
- package/src/lib/components/contacts-section.js +1025 -0
- package/src/lib/components/contacts-section.js.map +1 -0
- package/src/lib/components/copy-capture-address-button.d.ts +33 -0
- package/src/lib/components/copy-capture-address-button.js +60 -0
- package/src/lib/components/copy-capture-address-button.js.map +1 -0
- package/src/lib/components/crm-attribution-zone.d.ts +38 -0
- package/src/lib/components/crm-attribution-zone.js +36 -0
- package/src/lib/components/crm-attribution-zone.js.map +1 -0
- package/src/lib/components/crm-booking-zone.d.ts +61 -0
- package/src/lib/components/crm-booking-zone.js +50 -0
- package/src/lib/components/crm-booking-zone.js.map +1 -0
- package/src/lib/components/crm-bulk-bar-frame.d.ts +47 -0
- package/src/lib/components/crm-bulk-bar-frame.js +137 -0
- package/src/lib/components/crm-bulk-bar-frame.js.map +1 -0
- package/src/lib/components/crm-call-actions.d.ts +65 -0
- package/src/lib/components/crm-call-actions.js +110 -0
- package/src/lib/components/crm-call-actions.js.map +1 -0
- package/src/lib/components/crm-column-menu.d.ts +21 -0
- package/src/lib/components/crm-column-menu.js +103 -0
- package/src/lib/components/crm-column-menu.js.map +1 -0
- package/src/lib/components/crm-console-page.d.ts +19 -0
- package/src/lib/components/crm-console-page.js +151 -0
- package/src/lib/components/crm-console-page.js.map +1 -0
- package/src/lib/components/crm-console-sections.d.ts +52 -0
- package/src/lib/components/crm-console-sections.js +83 -0
- package/src/lib/components/crm-console-sections.js.map +1 -0
- package/src/lib/components/crm-custom-field-control.d.ts +26 -0
- package/src/lib/components/crm-custom-field-control.js +131 -0
- package/src/lib/components/crm-custom-field-control.js.map +1 -0
- package/src/lib/components/crm-email-template-tools.d.ts +69 -0
- package/src/lib/components/crm-email-template-tools.js +240 -0
- package/src/lib/components/crm-email-template-tools.js.map +1 -0
- package/src/lib/components/crm-export-all-button.d.ts +39 -0
- package/src/lib/components/crm-export-all-button.js +98 -0
- package/src/lib/components/crm-export-all-button.js.map +1 -0
- package/src/lib/components/crm-filter-bar.d.ts +53 -0
- package/src/lib/components/crm-filter-bar.js +294 -0
- package/src/lib/components/crm-filter-bar.js.map +1 -0
- package/src/lib/components/crm-glance-card.d.ts +54 -0
- package/src/lib/components/crm-glance-card.js +219 -0
- package/src/lib/components/crm-glance-card.js.map +1 -0
- package/src/lib/components/crm-next-activity-column.d.ts +35 -0
- package/src/lib/components/crm-next-activity-column.js +100 -0
- package/src/lib/components/crm-next-activity-column.js.map +1 -0
- package/src/lib/components/crm-record-header.d.ts +97 -0
- package/src/lib/components/crm-record-header.js +160 -0
- package/src/lib/components/crm-record-header.js.map +1 -0
- package/src/lib/components/crm-record-insights-zone.d.ts +50 -0
- package/src/lib/components/crm-record-insights-zone.js +169 -0
- package/src/lib/components/crm-record-insights-zone.js.map +1 -0
- package/src/lib/components/crm-record-picker.d.ts +42 -0
- package/src/lib/components/crm-record-picker.js +104 -0
- package/src/lib/components/crm-record-picker.js.map +1 -0
- package/src/lib/components/crm-send-email-button.d.ts +39 -0
- package/src/lib/components/crm-send-email-button.js +81 -0
- package/src/lib/components/crm-send-email-button.js.map +1 -0
- package/src/lib/components/crm-send-email-dialog.d.ts +61 -0
- package/src/lib/components/crm-send-email-dialog.js +851 -0
- package/src/lib/components/crm-send-email-dialog.js.map +1 -0
- package/src/lib/components/crm-site-picker.d.ts +61 -0
- package/src/lib/components/crm-site-picker.js +99 -0
- package/src/lib/components/crm-site-picker.js.map +1 -0
- package/src/lib/components/crm-suite-lock.d.ts +29 -0
- package/src/lib/components/crm-suite-lock.js +114 -0
- package/src/lib/components/crm-suite-lock.js.map +1 -0
- package/src/lib/components/crm-tasks-due-card.d.ts +42 -0
- package/src/lib/components/crm-tasks-due-card.js +225 -0
- package/src/lib/components/crm-tasks-due-card.js.map +1 -0
- package/src/lib/components/crm-views-control.d.ts +65 -0
- package/src/lib/components/crm-views-control.js +518 -0
- package/src/lib/components/crm-views-control.js.map +1 -0
- package/src/lib/components/csv-import-drawer.d.ts +132 -0
- package/src/lib/components/csv-import-drawer.js +746 -0
- package/src/lib/components/csv-import-drawer.js.map +1 -0
- package/src/lib/components/deal-board.d.ts +70 -0
- package/src/lib/components/deal-board.js +478 -0
- package/src/lib/components/deal-board.js.map +1 -0
- package/src/lib/components/deal-detail-page.d.ts +18 -0
- package/src/lib/components/deal-detail-page.js +323 -0
- package/src/lib/components/deal-detail-page.js.map +1 -0
- package/src/lib/components/deal-edit-drawer.d.ts +59 -0
- package/src/lib/components/deal-edit-drawer.js +640 -0
- package/src/lib/components/deal-edit-drawer.js.map +1 -0
- package/src/lib/components/deal-import-drawer.d.ts +24 -0
- package/src/lib/components/deal-import-drawer.js +83 -0
- package/src/lib/components/deal-import-drawer.js.map +1 -0
- package/src/lib/components/deal-products-card.d.ts +48 -0
- package/src/lib/components/deal-products-card.js +614 -0
- package/src/lib/components/deal-products-card.js.map +1 -0
- package/src/lib/components/deal-properties-card.d.ts +29 -0
- package/src/lib/components/deal-properties-card.js +144 -0
- package/src/lib/components/deal-properties-card.js.map +1 -0
- package/src/lib/components/deal-stage-card.d.ts +24 -0
- package/src/lib/components/deal-stage-card.js +199 -0
- package/src/lib/components/deal-stage-card.js.map +1 -0
- package/src/lib/components/deals-bulk-bar.d.ts +31 -0
- package/src/lib/components/deals-bulk-bar.js +340 -0
- package/src/lib/components/deals-bulk-bar.js.map +1 -0
- package/src/lib/components/deals-section.d.ts +49 -0
- package/src/lib/components/deals-section.js +767 -0
- package/src/lib/components/deals-section.js.map +1 -0
- package/src/lib/components/email-capture-card.d.ts +42 -0
- package/src/lib/components/email-capture-card.js +134 -0
- package/src/lib/components/email-capture-card.js.map +1 -0
- package/src/lib/components/email-template-drawer.d.ts +33 -0
- package/src/lib/components/email-template-drawer.js +209 -0
- package/src/lib/components/email-template-drawer.js.map +1 -0
- package/src/lib/components/email-templates-card.d.ts +33 -0
- package/src/lib/components/email-templates-card.js +370 -0
- package/src/lib/components/email-templates-card.js.map +1 -0
- package/src/lib/components/erase-person-action.d.ts +92 -0
- package/src/lib/components/erase-person-action.js +261 -0
- package/src/lib/components/erase-person-action.js.map +1 -0
- package/src/lib/components/fields-section.d.ts +37 -0
- package/src/lib/components/fields-section.js +641 -0
- package/src/lib/components/fields-section.js.map +1 -0
- package/src/lib/components/form-contact-fields-card.d.ts +46 -0
- package/src/lib/components/form-contact-fields-card.js +253 -0
- package/src/lib/components/form-contact-fields-card.js.map +1 -0
- package/src/lib/components/insert-link-at-caret.d.ts +28 -0
- package/src/lib/components/insert-link-at-caret.js +37 -0
- package/src/lib/components/insert-link-at-caret.js.map +1 -0
- package/src/lib/components/lead-convert-dialog.d.ts +32 -0
- package/src/lib/components/lead-convert-dialog.js +493 -0
- package/src/lib/components/lead-convert-dialog.js.map +1 -0
- package/src/lib/components/lead-detail-page.d.ts +16 -0
- package/src/lib/components/lead-detail-page.js +163 -0
- package/src/lib/components/lead-detail-page.js.map +1 -0
- package/src/lib/components/lead-history-card.d.ts +32 -0
- package/src/lib/components/lead-history-card.js +165 -0
- package/src/lib/components/lead-history-card.js.map +1 -0
- package/src/lib/components/lead-import-drawer.d.ts +24 -0
- package/src/lib/components/lead-import-drawer.js +95 -0
- package/src/lib/components/lead-import-drawer.js.map +1 -0
- package/src/lib/components/lead-owner-select.d.ts +35 -0
- package/src/lib/components/lead-owner-select.js +91 -0
- package/src/lib/components/lead-owner-select.js.map +1 -0
- package/src/lib/components/lead-properties-card.d.ts +61 -0
- package/src/lib/components/lead-properties-card.js +395 -0
- package/src/lib/components/lead-properties-card.js.map +1 -0
- package/src/lib/components/lead-status-chip.d.ts +12 -0
- package/src/lib/components/lead-status-chip.js +43 -0
- package/src/lib/components/lead-status-chip.js.map +1 -0
- package/src/lib/components/lead-surfaces-note.d.ts +126 -0
- package/src/lib/components/lead-surfaces-note.js +262 -0
- package/src/lib/components/lead-surfaces-note.js.map +1 -0
- package/src/lib/components/lead-unqualify-dialog.d.ts +24 -0
- package/src/lib/components/lead-unqualify-dialog.js +125 -0
- package/src/lib/components/lead-unqualify-dialog.js.map +1 -0
- package/src/lib/components/leads-bulk-bar.d.ts +58 -0
- package/src/lib/components/leads-bulk-bar.js +307 -0
- package/src/lib/components/leads-bulk-bar.js.map +1 -0
- package/src/lib/components/leads-section.d.ts +23 -0
- package/src/lib/components/leads-section.js +664 -0
- package/src/lib/components/leads-section.js.map +1 -0
- package/src/lib/components/linked-deals-card.d.ts +32 -0
- package/src/lib/components/linked-deals-card.js +163 -0
- package/src/lib/components/linked-deals-card.js.map +1 -0
- package/src/lib/components/log-activity-dialog.d.ts +60 -0
- package/src/lib/components/log-activity-dialog.js +368 -0
- package/src/lib/components/log-activity-dialog.js.map +1 -0
- package/src/lib/components/lost-reason-dialog.d.ts +26 -0
- package/src/lib/components/lost-reason-dialog.js +95 -0
- package/src/lib/components/lost-reason-dialog.js.map +1 -0
- package/src/lib/components/new-contact-drawer.d.ts +78 -0
- package/src/lib/components/new-contact-drawer.js +343 -0
- package/src/lib/components/new-contact-drawer.js.map +1 -0
- package/src/lib/components/org-lead-surfaces-note.d.ts +57 -0
- package/src/lib/components/org-lead-surfaces-note.js +172 -0
- package/src/lib/components/org-lead-surfaces-note.js.map +1 -0
- package/src/lib/components/owner-avatar.d.ts +18 -0
- package/src/lib/components/owner-avatar.js +61 -0
- package/src/lib/components/owner-avatar.js.map +1 -0
- package/src/lib/components/pipeline-stages-dialog.d.ts +43 -0
- package/src/lib/components/pipeline-stages-dialog.js +339 -0
- package/src/lib/components/pipeline-stages-dialog.js.map +1 -0
- package/src/lib/components/pipelines-dialog.d.ts +55 -0
- package/src/lib/components/pipelines-dialog.js +517 -0
- package/src/lib/components/pipelines-dialog.js.map +1 -0
- package/src/lib/components/recent-activity-feed.d.ts +39 -0
- package/src/lib/components/recent-activity-feed.js +103 -0
- package/src/lib/components/recent-activity-feed.js.map +1 -0
- package/src/lib/components/recipes-card.d.ts +39 -0
- package/src/lib/components/recipes-card.js +485 -0
- package/src/lib/components/recipes-card.js.map +1 -0
- package/src/lib/components/record-activity-card.d.ts +26 -0
- package/src/lib/components/record-activity-card.js +121 -0
- package/src/lib/components/record-activity-card.js.map +1 -0
- package/src/lib/components/record-files-card.d.ts +67 -0
- package/src/lib/components/record-files-card.js +290 -0
- package/src/lib/components/record-files-card.js.map +1 -0
- package/src/lib/components/record-tasks-card.d.ts +32 -0
- package/src/lib/components/record-tasks-card.js +306 -0
- package/src/lib/components/record-tasks-card.js.map +1 -0
- package/src/lib/components/reports/activity-card.d.ts +57 -0
- package/src/lib/components/reports/activity-card.js +281 -0
- package/src/lib/components/reports/activity-card.js.map +1 -0
- package/src/lib/components/reports/closed-deals-card.d.ts +20 -0
- package/src/lib/components/reports/closed-deals-card.js +194 -0
- package/src/lib/components/reports/closed-deals-card.js.map +1 -0
- package/src/lib/components/reports/contacts-mix-card.d.ts +27 -0
- package/src/lib/components/reports/contacts-mix-card.js +161 -0
- package/src/lib/components/reports/contacts-mix-card.js.map +1 -0
- package/src/lib/components/reports/contacts-trend-card.d.ts +31 -0
- package/src/lib/components/reports/contacts-trend-card.js +144 -0
- package/src/lib/components/reports/contacts-trend-card.js.map +1 -0
- package/src/lib/components/reports/forecast-card.d.ts +22 -0
- package/src/lib/components/reports/forecast-card.js +251 -0
- package/src/lib/components/reports/forecast-card.js.map +1 -0
- package/src/lib/components/reports/lead-counts.d.ts +32 -0
- package/src/lib/components/reports/lead-counts.js +44 -0
- package/src/lib/components/reports/lead-counts.js.map +1 -0
- package/src/lib/components/reports/lead-funnel-card.d.ts +38 -0
- package/src/lib/components/reports/lead-funnel-card.js +375 -0
- package/src/lib/components/reports/lead-funnel-card.js.map +1 -0
- package/src/lib/components/reports/pipeline-card.d.ts +19 -0
- package/src/lib/components/reports/pipeline-card.js +338 -0
- package/src/lib/components/reports/pipeline-card.js.map +1 -0
- package/src/lib/components/reports/report-bar-chart.d.ts +39 -0
- package/src/lib/components/reports/report-bar-chart.js +133 -0
- package/src/lib/components/reports/report-bar-chart.js.map +1 -0
- package/src/lib/components/reports/report-breakdown.d.ts +32 -0
- package/src/lib/components/reports/report-breakdown.js +105 -0
- package/src/lib/components/reports/report-breakdown.js.map +1 -0
- package/src/lib/components/reports/report-export.d.ts +37 -0
- package/src/lib/components/reports/report-export.js +66 -0
- package/src/lib/components/reports/report-export.js.map +1 -0
- package/src/lib/components/reports/report-format.d.ts +36 -0
- package/src/lib/components/reports/report-format.js +43 -0
- package/src/lib/components/reports/report-format.js.map +1 -0
- package/src/lib/components/reports/report-scope.d.ts +81 -0
- package/src/lib/components/reports/report-scope.js +58 -0
- package/src/lib/components/reports/report-scope.js.map +1 -0
- package/src/lib/components/reports/report-stat-tile.d.ts +47 -0
- package/src/lib/components/reports/report-stat-tile.js +96 -0
- package/src/lib/components/reports/report-stat-tile.js.map +1 -0
- package/src/lib/components/reports/source-conversion-card.d.ts +28 -0
- package/src/lib/components/reports/source-conversion-card.js +205 -0
- package/src/lib/components/reports/source-conversion-card.js.map +1 -0
- package/src/lib/components/reports/tasks-card.d.ts +26 -0
- package/src/lib/components/reports/tasks-card.js +279 -0
- package/src/lib/components/reports/tasks-card.js.map +1 -0
- package/src/lib/components/reports/use-aggregate-read.d.ts +99 -0
- package/src/lib/components/reports/use-aggregate-read.js +195 -0
- package/src/lib/components/reports/use-aggregate-read.js.map +1 -0
- package/src/lib/components/reports/won-lost-by-owner-card.d.ts +30 -0
- package/src/lib/components/reports/won-lost-by-owner-card.js +168 -0
- package/src/lib/components/reports/won-lost-by-owner-card.js.map +1 -0
- package/src/lib/components/reports-section.d.ts +42 -0
- package/src/lib/components/reports-section.js +308 -0
- package/src/lib/components/reports-section.js.map +1 -0
- package/src/lib/components/sending-addresses-card.d.ts +49 -0
- package/src/lib/components/sending-addresses-card.js +262 -0
- package/src/lib/components/sending-addresses-card.js.map +1 -0
- package/src/lib/components/settings-section.d.ts +151 -0
- package/src/lib/components/settings-section.js +783 -0
- package/src/lib/components/settings-section.js.map +1 -0
- package/src/lib/components/task-cells.d.ts +51 -0
- package/src/lib/components/task-cells.js +139 -0
- package/src/lib/components/task-cells.js.map +1 -0
- package/src/lib/components/task-edit-drawer.d.ts +53 -0
- package/src/lib/components/task-edit-drawer.js +483 -0
- package/src/lib/components/task-edit-drawer.js.map +1 -0
- package/src/lib/components/task-import-drawer.d.ts +24 -0
- package/src/lib/components/task-import-drawer.js +82 -0
- package/src/lib/components/task-import-drawer.js.map +1 -0
- package/src/lib/components/task-snooze-menu.d.ts +65 -0
- package/src/lib/components/task-snooze-menu.js +207 -0
- package/src/lib/components/task-snooze-menu.js.map +1 -0
- package/src/lib/components/tasks-bulk-bar.d.ts +25 -0
- package/src/lib/components/tasks-bulk-bar.js +348 -0
- package/src/lib/components/tasks-bulk-bar.js.map +1 -0
- package/src/lib/components/tasks-calendar.d.ts +38 -0
- package/src/lib/components/tasks-calendar.js +228 -0
- package/src/lib/components/tasks-calendar.js.map +1 -0
- package/src/lib/components/tasks-section.d.ts +27 -0
- package/src/lib/components/tasks-section.js +579 -0
- package/src/lib/components/tasks-section.js.map +1 -0
- package/src/lib/components/use-contact-campaign-emails.d.ts +32 -0
- package/src/lib/components/use-contact-campaign-emails.js +83 -0
- package/src/lib/components/use-contact-campaign-emails.js.map +1 -0
- package/src/lib/components/use-crm-api.d.ts +44 -0
- package/src/lib/components/use-crm-api.js +84 -0
- package/src/lib/components/use-crm-api.js.map +1 -0
- package/src/lib/components/use-crm-inbound-address.d.ts +60 -0
- package/src/lib/components/use-crm-inbound-address.js +124 -0
- package/src/lib/components/use-crm-inbound-address.js.map +1 -0
- package/src/lib/components/use-emails-hub-path.d.ts +24 -0
- package/src/lib/components/use-emails-hub-path.js +59 -0
- package/src/lib/components/use-emails-hub-path.js.map +1 -0
- package/src/lib/components/use-member-email-aliases.d.ts +54 -0
- package/src/lib/components/use-member-email-aliases.js +186 -0
- package/src/lib/components/use-member-email-aliases.js.map +1 -0
- package/src/lib/components/use-org-members.d.ts +40 -0
- package/src/lib/components/use-org-members.js +100 -0
- package/src/lib/components/use-org-members.js.map +1 -0
- package/src/lib/constants/api-routes.d.ts +109 -0
- package/src/lib/constants/api-routes.js +74 -0
- package/src/lib/constants/api-routes.js.map +1 -0
- package/src/lib/constants/bundle-common.d.ts +14 -0
- package/src/lib/constants/bundle-common.js +14 -0
- package/src/lib/constants/bundle-common.js.map +1 -0
- package/src/lib/constants/company-filters.d.ts +18 -0
- package/src/lib/constants/company-filters.js +51 -0
- package/src/lib/constants/company-filters.js.map +1 -0
- package/src/lib/constants/contact-filters.d.ts +38 -0
- package/src/lib/constants/contact-filters.js +294 -0
- package/src/lib/constants/contact-filters.js.map +1 -0
- package/src/lib/hooks/use-contact-field-definitions.d.ts +48 -0
- package/src/lib/hooks/use-contact-field-definitions.js +72 -0
- package/src/lib/hooks/use-contact-field-definitions.js.map +1 -0
- package/src/lib/hooks/use-contact-update.d.ts +25 -0
- package/src/lib/hooks/use-contact-update.js +80 -0
- package/src/lib/hooks/use-contact-update.js.map +1 -0
- package/src/lib/hooks/use-crm-activity-logger.d.ts +73 -0
- package/src/lib/hooks/use-crm-activity-logger.js +101 -0
- package/src/lib/hooks/use-crm-activity-logger.js.map +1 -0
- package/src/lib/hooks/use-crm-bulk-apply.d.ts +52 -0
- package/src/lib/hooks/use-crm-bulk-apply.js +112 -0
- package/src/lib/hooks/use-crm-bulk-apply.js.map +1 -0
- package/src/lib/hooks/use-crm-default-view.d.ts +24 -0
- package/src/lib/hooks/use-crm-default-view.js +64 -0
- package/src/lib/hooks/use-crm-default-view.js.map +1 -0
- package/src/lib/hooks/use-crm-email-templates.d.ts +59 -0
- package/src/lib/hooks/use-crm-email-templates.js +103 -0
- package/src/lib/hooks/use-crm-email-templates.js.map +1 -0
- package/src/lib/hooks/use-crm-hub-path.d.ts +29 -0
- package/src/lib/hooks/use-crm-hub-path.js +41 -0
- package/src/lib/hooks/use-crm-hub-path.js.map +1 -0
- package/src/lib/hooks/use-crm-org-mount.d.ts +97 -0
- package/src/lib/hooks/use-crm-org-mount.js +215 -0
- package/src/lib/hooks/use-crm-org-mount.js.map +1 -0
- package/src/lib/hooks/use-crm-record-names.d.ts +52 -0
- package/src/lib/hooks/use-crm-record-names.js +126 -0
- package/src/lib/hooks/use-crm-record-names.js.map +1 -0
- package/src/lib/hooks/use-crm-records-quota.d.ts +68 -0
- package/src/lib/hooks/use-crm-records-quota.js +118 -0
- package/src/lib/hooks/use-crm-records-quota.js.map +1 -0
- package/src/lib/hooks/use-crm-saved-view.d.ts +96 -0
- package/src/lib/hooks/use-crm-saved-view.js +329 -0
- package/src/lib/hooks/use-crm-saved-view.js.map +1 -0
- package/src/lib/hooks/use-crm-scope.d.ts +117 -0
- package/src/lib/hooks/use-crm-scope.js +147 -0
- package/src/lib/hooks/use-crm-scope.js.map +1 -0
- package/src/lib/hooks/use-crm-tasks.d.ts +85 -0
- package/src/lib/hooks/use-crm-tasks.js +153 -0
- package/src/lib/hooks/use-crm-tasks.js.map +1 -0
- package/src/lib/hooks/use-crm-view-grid.d.ts +55 -0
- package/src/lib/hooks/use-crm-view-grid.js +170 -0
- package/src/lib/hooks/use-crm-view-grid.js.map +1 -0
- package/src/lib/hooks/use-crm-views.d.ts +42 -0
- package/src/lib/hooks/use-crm-views.js +84 -0
- package/src/lib/hooks/use-crm-views.js.map +1 -0
- package/src/lib/hooks/use-deal-stage-api.d.ts +69 -0
- package/src/lib/hooks/use-deal-stage-api.js +78 -0
- package/src/lib/hooks/use-deal-stage-api.js.map +1 -0
- package/src/lib/hooks/use-deals.d.ts +47 -0
- package/src/lib/hooks/use-deals.js +105 -0
- package/src/lib/hooks/use-deals.js.map +1 -0
- package/src/lib/hooks/use-org-leads.d.ts +53 -0
- package/src/lib/hooks/use-org-leads.js +114 -0
- package/src/lib/hooks/use-org-leads.js.map +1 -0
- package/src/lib/hooks/use-org-member-directory.d.ts +36 -0
- package/src/lib/hooks/use-org-member-directory.js +116 -0
- package/src/lib/hooks/use-org-member-directory.js.map +1 -0
- package/src/lib/hooks/use-org-member-options.d.ts +38 -0
- package/src/lib/hooks/use-org-member-options.js +131 -0
- package/src/lib/hooks/use-org-member-options.js.map +1 -0
- package/src/lib/hooks/use-pipeline.d.ts +71 -0
- package/src/lib/hooks/use-pipeline.js +159 -0
- package/src/lib/hooks/use-pipeline.js.map +1 -0
- package/src/lib/model/companies-bulk-writes.d.ts +40 -0
- package/src/lib/model/companies-bulk-writes.js +103 -0
- package/src/lib/model/companies-bulk-writes.js.map +1 -0
- package/src/lib/model/companies-csv.d.ts +36 -0
- package/src/lib/model/companies-csv.js +38 -0
- package/src/lib/model/companies-csv.js.map +1 -0
- package/src/lib/model/companies.d.ts +99 -0
- package/src/lib/model/companies.js +168 -0
- package/src/lib/model/companies.js.map +1 -0
- package/src/lib/model/company-delete-route.d.ts +43 -0
- package/src/lib/model/company-delete-route.js +31 -0
- package/src/lib/model/company-delete-route.js.map +1 -0
- package/src/lib/model/company-delete.d.ts +42 -0
- package/src/lib/model/company-delete.js +52 -0
- package/src/lib/model/company-delete.js.map +1 -0
- package/src/lib/model/contact-duplicates.d.ts +58 -0
- package/src/lib/model/contact-duplicates.js +67 -0
- package/src/lib/model/contact-duplicates.js.map +1 -0
- package/src/lib/model/contact-record.d.ts +113 -0
- package/src/lib/model/contact-record.js +70 -0
- package/src/lib/model/contact-record.js.map +1 -0
- package/src/lib/model/contact-update.d.ts +93 -0
- package/src/lib/model/contact-update.js +50 -0
- package/src/lib/model/contact-update.js.map +1 -0
- package/src/lib/model/contacts-bulk-writes.d.ts +173 -0
- package/src/lib/model/contacts-bulk-writes.js +196 -0
- package/src/lib/model/contacts-bulk-writes.js.map +1 -0
- package/src/lib/model/contacts-csv.d.ts +54 -0
- package/src/lib/model/contacts-csv.js +67 -0
- package/src/lib/model/contacts-csv.js.map +1 -0
- package/src/lib/model/contacts-list-seed.d.ts +51 -0
- package/src/lib/model/contacts-list-seed.js +63 -0
- package/src/lib/model/contacts-list-seed.js.map +1 -0
- package/src/lib/model/crm-activity-report.d.ts +27 -0
- package/src/lib/model/crm-activity-report.js +56 -0
- package/src/lib/model/crm-activity-report.js.map +1 -0
- package/src/lib/model/crm-api.d.ts +49 -0
- package/src/lib/model/crm-api.js +47 -0
- package/src/lib/model/crm-api.js.map +1 -0
- package/src/lib/model/crm-bulk-writes.d.ts +147 -0
- package/src/lib/model/crm-bulk-writes.js +207 -0
- package/src/lib/model/crm-bulk-writes.js.map +1 -0
- package/src/lib/model/crm-company-import.d.ts +154 -0
- package/src/lib/model/crm-company-import.js +331 -0
- package/src/lib/model/crm-company-import.js.map +1 -0
- package/src/lib/model/crm-custom-draft.d.ts +62 -0
- package/src/lib/model/crm-custom-draft.js +67 -0
- package/src/lib/model/crm-custom-draft.js.map +1 -0
- package/src/lib/model/crm-deal-import.d.ts +112 -0
- package/src/lib/model/crm-deal-import.js +263 -0
- package/src/lib/model/crm-deal-import.js.map +1 -0
- package/src/lib/model/crm-import.d.ts +244 -0
- package/src/lib/model/crm-import.js +466 -0
- package/src/lib/model/crm-import.js.map +1 -0
- package/src/lib/model/crm-lead-import.d.ts +105 -0
- package/src/lib/model/crm-lead-import.js +255 -0
- package/src/lib/model/crm-lead-import.js.map +1 -0
- package/src/lib/model/crm-record-routes.d.ts +21 -0
- package/src/lib/model/crm-record-routes.js +70 -0
- package/src/lib/model/crm-record-routes.js.map +1 -0
- package/src/lib/model/crm-routes.d.ts +101 -0
- package/src/lib/model/crm-routes.js +92 -0
- package/src/lib/model/crm-routes.js.map +1 -0
- package/src/lib/model/crm-task-import.d.ts +94 -0
- package/src/lib/model/crm-task-import.js +275 -0
- package/src/lib/model/crm-task-import.js.map +1 -0
- package/src/lib/model/crm-view-param.d.ts +43 -0
- package/src/lib/model/crm-view-param.js +49 -0
- package/src/lib/model/crm-view-param.js.map +1 -0
- package/src/lib/model/deal-board-model.d.ts +241 -0
- package/src/lib/model/deal-board-model.js +439 -0
- package/src/lib/model/deal-board-model.js.map +1 -0
- package/src/lib/model/deal-form-model.d.ts +114 -0
- package/src/lib/model/deal-form-model.js +218 -0
- package/src/lib/model/deal-form-model.js.map +1 -0
- package/src/lib/model/deals-csv.d.ts +32 -0
- package/src/lib/model/deals-csv.js +37 -0
- package/src/lib/model/deals-csv.js.map +1 -0
- package/src/lib/model/import-column-shapes.d.ts +36 -0
- package/src/lib/model/import-column-shapes.js +76 -0
- package/src/lib/model/import-column-shapes.js.map +1 -0
- package/src/lib/model/lead-company-suggestion.d.ts +61 -0
- package/src/lib/model/lead-company-suggestion.js +65 -0
- package/src/lib/model/lead-company-suggestion.js.map +1 -0
- package/src/lib/model/lead-filters.d.ts +29 -0
- package/src/lib/model/lead-filters.js +39 -0
- package/src/lib/model/lead-filters.js.map +1 -0
- package/src/lib/model/lead-surfaces.d.ts +58 -0
- package/src/lib/model/lead-surfaces.js +67 -0
- package/src/lib/model/lead-surfaces.js.map +1 -0
- package/src/lib/model/leads-csv.d.ts +40 -0
- package/src/lib/model/leads-csv.js +40 -0
- package/src/lib/model/leads-csv.js.map +1 -0
- package/src/lib/model/next-activity-api.d.ts +31 -0
- package/src/lib/model/next-activity-api.js +57 -0
- package/src/lib/model/next-activity-api.js.map +1 -0
- package/src/lib/model/next-activity.d.ts +64 -0
- package/src/lib/model/next-activity.js +47 -0
- package/src/lib/model/next-activity.js.map +1 -0
- package/src/lib/model/person-key-web.d.ts +43 -0
- package/src/lib/model/person-key-web.js +52 -0
- package/src/lib/model/person-key-web.js.map +1 -0
- package/src/lib/model/record-facts.d.ts +282 -0
- package/src/lib/model/record-facts.js +434 -0
- package/src/lib/model/record-facts.js.map +1 -0
- package/src/lib/model/task-api.d.ts +28 -0
- package/src/lib/model/task-api.js +57 -0
- package/src/lib/model/task-api.js.map +1 -0
- package/src/lib/model/task-calendar.d.ts +108 -0
- package/src/lib/model/task-calendar.js +139 -0
- package/src/lib/model/task-calendar.js.map +1 -0
- package/src/lib/model/task-routes.d.ts +177 -0
- package/src/lib/model/task-routes.js +197 -0
- package/src/lib/model/task-routes.js.map +1 -0
- package/src/lib/model/task-scope.d.ts +45 -0
- package/src/lib/model/task-scope.js +51 -0
- package/src/lib/model/task-scope.js.map +1 -0
- package/src/lib/model/task-views.d.ts +149 -0
- package/src/lib/model/task-views.js +286 -0
- package/src/lib/model/task-views.js.map +1 -0
- package/src/lib/model/tasks-csv.d.ts +28 -0
- package/src/lib/model/tasks-csv.js +28 -0
- package/src/lib/model/tasks-csv.js.map +1 -0
- package/src/lib/plugin.d.ts +32 -0
- package/src/lib/plugin.js +208 -0
- package/src/lib/plugin.js.map +1 -0
- package/src/lib/server/companies-import.d.ts +57 -0
- package/src/lib/server/companies-import.js +242 -0
- package/src/lib/server/companies-import.js.map +1 -0
- package/src/lib/server/company-delete.d.ts +59 -0
- package/src/lib/server/company-delete.js +146 -0
- package/src/lib/server/company-delete.js.map +1 -0
- package/src/lib/server/contact-email-history.d.ts +82 -0
- package/src/lib/server/contact-email-history.js +264 -0
- package/src/lib/server/contact-email-history.js.map +1 -0
- package/src/lib/server/contact-profile.d.ts +41 -0
- package/src/lib/server/contact-profile.js +45 -0
- package/src/lib/server/contact-profile.js.map +1 -0
- package/src/lib/server/contact-update.d.ts +92 -0
- package/src/lib/server/contact-update.js +512 -0
- package/src/lib/server/contact-update.js.map +1 -0
- package/src/lib/server/contacts-import.d.ts +73 -0
- package/src/lib/server/contacts-import.js +263 -0
- package/src/lib/server/contacts-import.js.map +1 -0
- package/src/lib/server/contacts-merge.d.ts +86 -0
- package/src/lib/server/contacts-merge.js +206 -0
- package/src/lib/server/contacts-merge.js.map +1 -0
- package/src/lib/server/deals-import.d.ts +76 -0
- package/src/lib/server/deals-import.js +246 -0
- package/src/lib/server/deals-import.js.map +1 -0
- package/src/lib/server/email-send.d.ts +119 -0
- package/src/lib/server/email-send.js +667 -0
- package/src/lib/server/email-send.js.map +1 -0
- package/src/lib/server/email-template-duplicate.d.ts +19 -0
- package/src/lib/server/email-template-duplicate.js +206 -0
- package/src/lib/server/email-template-duplicate.js.map +1 -0
- package/src/lib/server/erase-person.d.ts +108 -0
- package/src/lib/server/erase-person.js +309 -0
- package/src/lib/server/erase-person.js.map +1 -0
- package/src/lib/server/import-context.d.ts +85 -0
- package/src/lib/server/import-context.js +181 -0
- package/src/lib/server/import-context.js.map +1 -0
- package/src/lib/server/inbound-address.d.ts +61 -0
- package/src/lib/server/inbound-address.js +188 -0
- package/src/lib/server/inbound-address.js.map +1 -0
- package/src/lib/server/lead-convert.d.ts +78 -0
- package/src/lib/server/lead-convert.js +250 -0
- package/src/lib/server/lead-convert.js.map +1 -0
- package/src/lib/server/leads-import.d.ts +84 -0
- package/src/lib/server/leads-import.js +261 -0
- package/src/lib/server/leads-import.js.map +1 -0
- package/src/lib/server/next-activity-routes.d.ts +33 -0
- package/src/lib/server/next-activity-routes.js +110 -0
- package/src/lib/server/next-activity-routes.js.map +1 -0
- package/src/lib/server/org-activity.d.ts +61 -0
- package/src/lib/server/org-activity.js +120 -0
- package/src/lib/server/org-activity.js.map +1 -0
- package/src/lib/server/org-caller.d.ts +110 -0
- package/src/lib/server/org-caller.js +154 -0
- package/src/lib/server/org-caller.js.map +1 -0
- package/src/lib/server/recipe-routes.d.ts +75 -0
- package/src/lib/server/recipe-routes.js +442 -0
- package/src/lib/server/recipe-routes.js.map +1 -0
- package/src/lib/server/record-facts.d.ts +65 -0
- package/src/lib/server/record-facts.js +337 -0
- package/src/lib/server/record-facts.js.map +1 -0
- package/src/lib/server/record-timeline.d.ts +51 -0
- package/src/lib/server/record-timeline.js +215 -0
- package/src/lib/server/record-timeline.js.map +1 -0
- package/src/lib/server/suite-gate.d.ts +42 -0
- package/src/lib/server/suite-gate.js +87 -0
- package/src/lib/server/suite-gate.js.map +1 -0
- package/src/lib/server/task-routes.d.ts +132 -0
- package/src/lib/server/task-routes.js +699 -0
- package/src/lib/server/task-routes.js.map +1 -0
- package/src/lib/server/tasks-import.d.ts +54 -0
- package/src/lib/server/tasks-import.js +157 -0
- package/src/lib/server/tasks-import.js.map +1 -0
- package/src/lib/server-deal-stage.d.ts +88 -0
- package/src/lib/server-deal-stage.js +316 -0
- package/src/lib/server-deal-stage.js.map +1 -0
- package/src/lib/server.d.ts +149 -0
- package/src/lib/server.js +615 -0
- package/src/lib/server.js.map +1 -0
|
@@ -0,0 +1,64 @@
|
|
|
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 { CrmNextActivityLink } from '@aglyn/aglyn';
|
|
18
|
+
import type { CrmTaskRouteScope } from './task-routes';
|
|
19
|
+
/**
|
|
20
|
+
* The contract between the console and the plugin's next-activity route
|
|
21
|
+
* (AGL-2661), the door a CLIENT-DIRECT task write uses to keep the records'
|
|
22
|
+
* `nextTaskAtMs` honest.
|
|
23
|
+
*
|
|
24
|
+
* The two task routes recompute it themselves. Every other task write —
|
|
25
|
+
* reopening, snoozing, deleting, the bulk bar's reassign — is a Firestore
|
|
26
|
+
* write from the browser, and a browser cannot recompute a denormalized
|
|
27
|
+
* figure it is not allowed to write consistently. So after such a write the
|
|
28
|
+
* surface tells this route which records the task named, and the route
|
|
29
|
+
* reads the tasks back and stores the answer. Best effort by design: the
|
|
30
|
+
* task write already happened, and a figure that did not move is what the
|
|
31
|
+
* Fields section's recompute exists for. The browser's side is
|
|
32
|
+
* `next-activity-api.ts`; this module is the contract both halves import.
|
|
33
|
+
*
|
|
34
|
+
* `all: true` is that recompute — the whole organization, every open task
|
|
35
|
+
* once — and is the Fields section's maintenance action.
|
|
36
|
+
*/
|
|
37
|
+
export declare const CRM_NEXT_ACTIVITY_ROUTE: "crm/next-activity";
|
|
38
|
+
export declare const crmNextActivityRouteUrl: () => string;
|
|
39
|
+
/** The most records one request recomputes — the bulk bar's own window. */
|
|
40
|
+
export declare const CRM_NEXT_ACTIVITY_LINKS_MAX = 200;
|
|
41
|
+
export type CrmNextActivityRequest = CrmTaskRouteScope & ({
|
|
42
|
+
links: CrmNextActivityLink[];
|
|
43
|
+
all?: false;
|
|
44
|
+
} | {
|
|
45
|
+
all: true;
|
|
46
|
+
links?: undefined;
|
|
47
|
+
});
|
|
48
|
+
export interface CrmNextActivityResponse {
|
|
49
|
+
ok: true;
|
|
50
|
+
/** Records written. */
|
|
51
|
+
records: number;
|
|
52
|
+
/** Records a task named that no longer exist. */
|
|
53
|
+
missing: number;
|
|
54
|
+
/** The whole-org form only: how many open tasks it read, and whether it read them all. */
|
|
55
|
+
tasks?: number;
|
|
56
|
+
cleared?: number;
|
|
57
|
+
truncated?: boolean;
|
|
58
|
+
}
|
|
59
|
+
/** The links a task row carries, as the request names them. */
|
|
60
|
+
export declare function nextActivityRequestLinks(tasks: readonly {
|
|
61
|
+
contactId?: string | null;
|
|
62
|
+
companyId?: string | null;
|
|
63
|
+
dealId?: string | null;
|
|
64
|
+
}[]): CrmNextActivityLink[];
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
*/ import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
17
|
+
/**
|
|
18
|
+
* The contract between the console and the plugin's next-activity route
|
|
19
|
+
* (AGL-2661), the door a CLIENT-DIRECT task write uses to keep the records'
|
|
20
|
+
* `nextTaskAtMs` honest.
|
|
21
|
+
*
|
|
22
|
+
* The two task routes recompute it themselves. Every other task write —
|
|
23
|
+
* reopening, snoozing, deleting, the bulk bar's reassign — is a Firestore
|
|
24
|
+
* write from the browser, and a browser cannot recompute a denormalized
|
|
25
|
+
* figure it is not allowed to write consistently. So after such a write the
|
|
26
|
+
* surface tells this route which records the task named, and the route
|
|
27
|
+
* reads the tasks back and stores the answer. Best effort by design: the
|
|
28
|
+
* task write already happened, and a figure that did not move is what the
|
|
29
|
+
* Fields section's recompute exists for. The browser's side is
|
|
30
|
+
* `next-activity-api.ts`; this module is the contract both halves import.
|
|
31
|
+
*
|
|
32
|
+
* `all: true` is that recompute — the whole organization, every open task
|
|
33
|
+
* once — and is the Fields section's maintenance action.
|
|
34
|
+
*/ export const CRM_NEXT_ACTIVITY_ROUTE = 'crm/next-activity';
|
|
35
|
+
export const crmNextActivityRouteUrl = ()=>`/api/${CRM_NEXT_ACTIVITY_ROUTE}`;
|
|
36
|
+
/** The most records one request recomputes — the bulk bar's own window. */ export const CRM_NEXT_ACTIVITY_LINKS_MAX = 200;
|
|
37
|
+
/** The links a task row carries, as the request names them. */ export function nextActivityRequestLinks(tasks) {
|
|
38
|
+
return tasks.map((task)=>_extends({}, task.contactId ? {
|
|
39
|
+
contactId: task.contactId
|
|
40
|
+
} : {}, task.companyId ? {
|
|
41
|
+
companyId: task.companyId
|
|
42
|
+
} : {}, task.dealId ? {
|
|
43
|
+
dealId: task.dealId
|
|
44
|
+
} : {}));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=next-activity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../libs/plugins/crm/src/lib/model/next-activity.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 { CrmNextActivityLink } from '@aglyn/aglyn'\nimport type { CrmTaskRouteScope } from './task-routes'\n\n/**\n * The contract between the console and the plugin's next-activity route\n * (AGL-2661), the door a CLIENT-DIRECT task write uses to keep the records'\n * `nextTaskAtMs` honest.\n *\n * The two task routes recompute it themselves. Every other task write —\n * reopening, snoozing, deleting, the bulk bar's reassign — is a Firestore\n * write from the browser, and a browser cannot recompute a denormalized\n * figure it is not allowed to write consistently. So after such a write the\n * surface tells this route which records the task named, and the route\n * reads the tasks back and stores the answer. Best effort by design: the\n * task write already happened, and a figure that did not move is what the\n * Fields section's recompute exists for. The browser's side is\n * `next-activity-api.ts`; this module is the contract both halves import.\n *\n * `all: true` is that recompute — the whole organization, every open task\n * once — and is the Fields section's maintenance action.\n */\nexport const CRM_NEXT_ACTIVITY_ROUTE = 'crm/next-activity' as const\n\nexport const crmNextActivityRouteUrl = (): string => `/api/${CRM_NEXT_ACTIVITY_ROUTE}`\n\n/** The most records one request recomputes — the bulk bar's own window. */\nexport const CRM_NEXT_ACTIVITY_LINKS_MAX = 200\n\nexport type CrmNextActivityRequest = CrmTaskRouteScope &\n ({ links: CrmNextActivityLink[]; all?: false } | { all: true; links?: undefined })\n\nexport interface CrmNextActivityResponse {\n ok: true\n /** Records written. */\n records: number\n /** Records a task named that no longer exist. */\n missing: number\n /** The whole-org form only: how many open tasks it read, and whether it read them all. */\n tasks?: number\n cleared?: number\n truncated?: boolean\n}\n\n/** The links a task row carries, as the request names them. */\nexport function nextActivityRequestLinks(\n tasks: readonly { contactId?: string | null; companyId?: string | null; dealId?: string | null }[],\n): CrmNextActivityLink[] {\n return tasks.map((task) => ({\n ...(task.contactId ? { contactId: task.contactId } : {}),\n ...(task.companyId ? { companyId: task.companyId } : {}),\n ...(task.dealId ? { dealId: task.dealId } : {}),\n }))\n}\n"],"names":["CRM_NEXT_ACTIVITY_ROUTE","crmNextActivityRouteUrl","CRM_NEXT_ACTIVITY_LINKS_MAX","nextActivityRequestLinks","tasks","map","task","contactId","companyId","dealId"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;AAKD;;;;;;;;;;;;;;;;;CAiBC,GACD,OAAO,MAAMA,0BAA0B,oBAA4B;AAEnE,OAAO,MAAMC,0BAA0B,IAAc,CAAC,KAAK,EAAED,yBAAyB,CAAA;AAEtF,yEAAyE,GACzE,OAAO,MAAME,8BAA8B,IAAG;AAiB9C,6DAA6D,GAC7D,OAAO,SAASC,yBACdC,KAAkG;IAElG,OAAOA,MAAMC,GAAG,CAAC,CAACC,OAAU,aACtBA,KAAKC,SAAS,GAAG;YAAEA,WAAWD,KAAKC,SAAS;QAAC,IAAI,CAAC,GAClDD,KAAKE,SAAS,GAAG;YAAEA,WAAWF,KAAKE,SAAS;QAAC,IAAI,CAAC,GAClDF,KAAKG,MAAM,GAAG;YAAEA,QAAQH,KAAKG,MAAM;QAAC,IAAI,CAAC;AAEjD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
* `personKey`, for a browser (AGL-2612).
|
|
19
|
+
*
|
|
20
|
+
* `person-key.ts` is THE derivation of the one address-keyed document id in
|
|
21
|
+
* this product — `sha256(normalizeContactEmail(email))` as full hex — and it
|
|
22
|
+
* is held out of the client barrel because `node:crypto` cannot ship to a
|
|
23
|
+
* published page. A console surface that wants to look a lead up by the
|
|
24
|
+
* address on a contact has the same derivation to make and no `node:crypto`
|
|
25
|
+
* to make it with, which left it reading the whole leads collection to find
|
|
26
|
+
* one document, or not looking at all.
|
|
27
|
+
*
|
|
28
|
+
* So this is the same derivation, to the byte, on WebCrypto: the same
|
|
29
|
+
* normalizer, the same digest, the same hex. Asynchronous because
|
|
30
|
+
* `crypto.subtle` is, and `null` for exactly the inputs the synchronous twin
|
|
31
|
+
* refuses — never a best-guess key, because a lookup keyed on a guess finds
|
|
32
|
+
* somebody else's record or nobody's and cannot tell which.
|
|
33
|
+
*
|
|
34
|
+
* The digest is spelled here rather than borrowed from the plugin manager's
|
|
35
|
+
* `sha256Hex`: that module imports this layer, and a helper reached back up
|
|
36
|
+
* through it would be a cycle for four lines.
|
|
37
|
+
*
|
|
38
|
+
* And `null`, rather than a throw, where there is no WebCrypto to run it —
|
|
39
|
+
* an insecure origin, a test DOM. A lookup that cannot be keyed is a lookup
|
|
40
|
+
* that finds nothing, which is the same answer the caller gets for an
|
|
41
|
+
* address that is not one, and the one it already handles.
|
|
42
|
+
*/
|
|
43
|
+
export declare function personKeyInBrowser(email: unknown): Promise<string | null>;
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
*/ import { normalizeContactEmail } from "@aglyn/aglyn/app-utils/contacts";
|
|
17
|
+
/**
|
|
18
|
+
* `personKey`, for a browser (AGL-2612).
|
|
19
|
+
*
|
|
20
|
+
* `person-key.ts` is THE derivation of the one address-keyed document id in
|
|
21
|
+
* this product — `sha256(normalizeContactEmail(email))` as full hex — and it
|
|
22
|
+
* is held out of the client barrel because `node:crypto` cannot ship to a
|
|
23
|
+
* published page. A console surface that wants to look a lead up by the
|
|
24
|
+
* address on a contact has the same derivation to make and no `node:crypto`
|
|
25
|
+
* to make it with, which left it reading the whole leads collection to find
|
|
26
|
+
* one document, or not looking at all.
|
|
27
|
+
*
|
|
28
|
+
* So this is the same derivation, to the byte, on WebCrypto: the same
|
|
29
|
+
* normalizer, the same digest, the same hex. Asynchronous because
|
|
30
|
+
* `crypto.subtle` is, and `null` for exactly the inputs the synchronous twin
|
|
31
|
+
* refuses — never a best-guess key, because a lookup keyed on a guess finds
|
|
32
|
+
* somebody else's record or nobody's and cannot tell which.
|
|
33
|
+
*
|
|
34
|
+
* The digest is spelled here rather than borrowed from the plugin manager's
|
|
35
|
+
* `sha256Hex`: that module imports this layer, and a helper reached back up
|
|
36
|
+
* through it would be a cycle for four lines.
|
|
37
|
+
*
|
|
38
|
+
* And `null`, rather than a throw, where there is no WebCrypto to run it —
|
|
39
|
+
* an insecure origin, a test DOM. A lookup that cannot be keyed is a lookup
|
|
40
|
+
* that finds nothing, which is the same answer the caller gets for an
|
|
41
|
+
* address that is not one, and the one it already handles.
|
|
42
|
+
*/ export async function personKeyInBrowser(email) {
|
|
43
|
+
var _globalThis_crypto;
|
|
44
|
+
const normalized = normalizeContactEmail(email);
|
|
45
|
+
if (!normalized) return null;
|
|
46
|
+
const subtle = (_globalThis_crypto = globalThis.crypto) == null ? void 0 : _globalThis_crypto.subtle;
|
|
47
|
+
if (!subtle) return null;
|
|
48
|
+
const digest = await subtle.digest('SHA-256', new TextEncoder().encode(normalized));
|
|
49
|
+
return Array.from(new Uint8Array(digest)).map((byte)=>byte.toString(16).padStart(2, '0')).join('');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=person-key-web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../libs/plugins/crm/src/lib/model/person-key-web.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 { normalizeContactEmail } from '@aglyn/aglyn/app-utils/contacts'\n\n/**\n * `personKey`, for a browser (AGL-2612).\n *\n * `person-key.ts` is THE derivation of the one address-keyed document id in\n * this product — `sha256(normalizeContactEmail(email))` as full hex — and it\n * is held out of the client barrel because `node:crypto` cannot ship to a\n * published page. A console surface that wants to look a lead up by the\n * address on a contact has the same derivation to make and no `node:crypto`\n * to make it with, which left it reading the whole leads collection to find\n * one document, or not looking at all.\n *\n * So this is the same derivation, to the byte, on WebCrypto: the same\n * normalizer, the same digest, the same hex. Asynchronous because\n * `crypto.subtle` is, and `null` for exactly the inputs the synchronous twin\n * refuses — never a best-guess key, because a lookup keyed on a guess finds\n * somebody else's record or nobody's and cannot tell which.\n *\n * The digest is spelled here rather than borrowed from the plugin manager's\n * `sha256Hex`: that module imports this layer, and a helper reached back up\n * through it would be a cycle for four lines.\n *\n * And `null`, rather than a throw, where there is no WebCrypto to run it —\n * an insecure origin, a test DOM. A lookup that cannot be keyed is a lookup\n * that finds nothing, which is the same answer the caller gets for an\n * address that is not one, and the one it already handles.\n */\nexport async function personKeyInBrowser(\n email: unknown,\n): Promise<string | null> {\n const normalized = normalizeContactEmail(email)\n if (!normalized) return null\n const subtle = globalThis.crypto?.subtle\n if (!subtle) return null\n const digest = await subtle.digest(\n 'SHA-256',\n new TextEncoder().encode(normalized),\n )\n return Array.from(new Uint8Array(digest))\n .map((byte) => byte.toString(16).padStart(2, '0'))\n .join('')\n}\n"],"names":["normalizeContactEmail","personKeyInBrowser","email","globalThis","normalized","subtle","crypto","digest","TextEncoder","encode","Array","from","Uint8Array","map","byte","toString","padStart","join"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,qBAAqB,QAAQ,kCAAiC;AAEvE;;;;;;;;;;;;;;;;;;;;;;;;;CAyBC,GACD,OAAO,eAAeC,mBACpBC,KAAc;QAICC;IAFf,MAAMC,aAAaJ,sBAAsBE;IACzC,IAAI,CAACE,YAAY,OAAO;IACxB,MAAMC,UAASF,qBAAAA,WAAWG,MAAM,qBAAjBH,mBAAmBE,MAAM;IACxC,IAAI,CAACA,QAAQ,OAAO;IACpB,MAAME,SAAS,MAAMF,OAAOE,MAAM,CAChC,WACA,IAAIC,cAAcC,MAAM,CAACL;IAE3B,OAAOM,MAAMC,IAAI,CAAC,IAAIC,WAAWL,SAC9BM,GAAG,CAAC,CAACC,OAASA,KAAKC,QAAQ,CAAC,IAAIC,QAAQ,CAAC,GAAG,MAC5CC,IAAI,CAAC;AACV"}
|
|
@@ -0,0 +1,282 @@
|
|
|
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 ConsentGroup, type ContactFieldDefinition, type ContactInteraction, type CrmActivity, type CrmCompany, type CrmDeal, type CrmPipeline, type CrmTask } from '@aglyn/aglyn/server';
|
|
18
|
+
/**
|
|
19
|
+
* WHAT THE CRM TELLS ANOTHER PLUGIN ABOUT ONE OF ITS RECORDS (AGL-2917).
|
|
20
|
+
*
|
|
21
|
+
* The facts a reader on the core's record-facts seam reports: one contact,
|
|
22
|
+
* company, deal or lead as a person on the team sees it, and the fields a
|
|
23
|
+
* spreadsheet import may fill. The server half reads the documents and
|
|
24
|
+
* applies who may see them (`server/record-facts.ts`); this half decides
|
|
25
|
+
* which of their fields leave the CRM at all, so the list below is the whole
|
|
26
|
+
* of what a caller — an assistant summarizing a record, an automation
|
|
27
|
+
* deciding on one — can pass on.
|
|
28
|
+
*
|
|
29
|
+
* ## What never leaves
|
|
30
|
+
*
|
|
31
|
+
* No email address, phone number or postal address of anyone; no marketing
|
|
32
|
+
* consent; no custom field VALUE; no team member's name or id; no document
|
|
33
|
+
* id of any record; no file; no order or payment detail beyond a count. A
|
|
34
|
+
* logged email carries its subject and a cut of its body, never the address
|
|
35
|
+
* it went to or came from. An import catalog carries field keys, labels and
|
|
36
|
+
* types, never a row of the file.
|
|
37
|
+
*
|
|
38
|
+
* Every text a person wrote into a record — a name, a job title, a tag, notes,
|
|
39
|
+
* a logged activity, a capture's summary, a task's or a deal's title, a
|
|
40
|
+
* reason — is reported as written, except that an email address or a phone
|
|
41
|
+
* number inside it is replaced by a placeholder first ({@link crmFactProse}):
|
|
42
|
+
* an import that put an address in the name column leaves no address behind.
|
|
43
|
+
* What the workspace configured — pipeline, stage and field names — and a
|
|
44
|
+
* company's domain are reported as they are. A postal address typed into a
|
|
45
|
+
* note is not recognized and leaves as typed.
|
|
46
|
+
*
|
|
47
|
+
* ## Stable bytes
|
|
48
|
+
*
|
|
49
|
+
* Every builder writes its keys in one order, dates as UTC calendar days and
|
|
50
|
+
* money as a currency code and a fixed-point amount, so the same records read
|
|
51
|
+
* twice report the same facts — a caller may key a cache on them, and one
|
|
52
|
+
* that does sees a change exactly when something it was told has changed.
|
|
53
|
+
*/
|
|
54
|
+
/** The records a reader is registered for, by the seam's resource name. */
|
|
55
|
+
export declare const CRM_RECORD_FACTS_RESOURCES: {
|
|
56
|
+
readonly contact: "crm.contact";
|
|
57
|
+
readonly company: "crm.company";
|
|
58
|
+
readonly deal: "crm.deal";
|
|
59
|
+
readonly lead: "crm.lead";
|
|
60
|
+
};
|
|
61
|
+
export type CrmRecordFactsKind = keyof typeof CRM_RECORD_FACTS_RESOURCES;
|
|
62
|
+
/** The import catalogs, read by collection name as the record id. */
|
|
63
|
+
export declare const CRM_IMPORT_FACTS_RESOURCE = "crm.import";
|
|
64
|
+
export declare const CRM_IMPORT_FACTS_COLLECTIONS: readonly ["contacts", "companies", "deals", "leads"];
|
|
65
|
+
export type CrmImportFactsCollection = (typeof CRM_IMPORT_FACTS_COLLECTIONS)[number];
|
|
66
|
+
export declare function isCrmImportFactsCollection(value: unknown): value is CrmImportFactsCollection;
|
|
67
|
+
/** Newest timeline entries reported for a record. */
|
|
68
|
+
export declare const CRM_FACTS_TIMELINE_MAX = 12;
|
|
69
|
+
/** Open tasks reported for a record. */
|
|
70
|
+
export declare const CRM_FACTS_TASKS_MAX = 8;
|
|
71
|
+
/** Deals reported for a contact or a company. */
|
|
72
|
+
export declare const CRM_FACTS_DEALS_MAX = 5;
|
|
73
|
+
/** Tags reported for a record. */
|
|
74
|
+
export declare const CRM_FACTS_TAGS_MAX = 10;
|
|
75
|
+
/** How much of a logged activity's text, or a platform capture's summary, is reported. */
|
|
76
|
+
export declare const CRM_FACTS_TEXT_MAX = 280;
|
|
77
|
+
/** How much of a record's notes is reported. */
|
|
78
|
+
export declare const CRM_FACTS_NOTES_MAX = 600;
|
|
79
|
+
/** How long a name, a title or a subject may run. */
|
|
80
|
+
export declare const CRM_FACTS_LABEL_MAX = 120;
|
|
81
|
+
/** Custom fields an import catalog reports. */
|
|
82
|
+
export declare const CRM_FACTS_CUSTOM_FIELDS_MAX = 40;
|
|
83
|
+
/** One thing that happened, as a record's timeline reports it. */
|
|
84
|
+
export interface CrmTimelineFact {
|
|
85
|
+
/** The UTC day it happened, `YYYY-MM-DD`. */
|
|
86
|
+
on: string;
|
|
87
|
+
/** What happened: a logged kind (Call, Email) or the capture it came through (Form, Booking). */
|
|
88
|
+
kind: string;
|
|
89
|
+
/** `outbound` or `inbound` for an email; absent otherwise. */
|
|
90
|
+
direction?: string;
|
|
91
|
+
subject?: string;
|
|
92
|
+
text?: string;
|
|
93
|
+
outcome?: string;
|
|
94
|
+
/** How far a sent email got: Sent, Delivered, Opened, Clicked, Bounced, Complained. */
|
|
95
|
+
delivery?: string;
|
|
96
|
+
}
|
|
97
|
+
/** One task still to do. */
|
|
98
|
+
export interface CrmTaskFact {
|
|
99
|
+
title: string;
|
|
100
|
+
kind: string;
|
|
101
|
+
priority: string;
|
|
102
|
+
/** The UTC day it is due, or `null` for a task with no due date. */
|
|
103
|
+
due: string | null;
|
|
104
|
+
overdue: boolean;
|
|
105
|
+
}
|
|
106
|
+
/** One deal, as a contact's or a company's facts report it. */
|
|
107
|
+
export interface CrmDealFact {
|
|
108
|
+
title: string;
|
|
109
|
+
stage: string;
|
|
110
|
+
status: string;
|
|
111
|
+
amount: string | null;
|
|
112
|
+
expectedClose: string | null;
|
|
113
|
+
}
|
|
114
|
+
export interface CrmContactFacts {
|
|
115
|
+
record: 'contact';
|
|
116
|
+
name: string;
|
|
117
|
+
jobTitle: string;
|
|
118
|
+
company: string;
|
|
119
|
+
lifecycleStage: string;
|
|
120
|
+
tags: string[];
|
|
121
|
+
/** The captures that met the person: Form, Booking, Customer. */
|
|
122
|
+
sources: string[];
|
|
123
|
+
orders: number;
|
|
124
|
+
lastPurchase: string | null;
|
|
125
|
+
since: string | null;
|
|
126
|
+
lastEmailEngagement: string | null;
|
|
127
|
+
notes: string;
|
|
128
|
+
timeline: CrmTimelineFact[];
|
|
129
|
+
openTasks: CrmTaskFact[];
|
|
130
|
+
deals: CrmDealFact[];
|
|
131
|
+
}
|
|
132
|
+
export interface CrmCompanyFacts {
|
|
133
|
+
record: 'company';
|
|
134
|
+
name: string;
|
|
135
|
+
domain: string;
|
|
136
|
+
industry: string;
|
|
137
|
+
tags: string[];
|
|
138
|
+
people: number;
|
|
139
|
+
since: string | null;
|
|
140
|
+
notes: string;
|
|
141
|
+
timeline: CrmTimelineFact[];
|
|
142
|
+
openTasks: CrmTaskFact[];
|
|
143
|
+
deals: CrmDealFact[];
|
|
144
|
+
}
|
|
145
|
+
/** One stage of a deal's pipeline, in order. */
|
|
146
|
+
export interface CrmStageFact {
|
|
147
|
+
id: string;
|
|
148
|
+
name: string;
|
|
149
|
+
kind: 'open' | 'won' | 'lost';
|
|
150
|
+
}
|
|
151
|
+
export interface CrmDealFacts {
|
|
152
|
+
record: 'deal';
|
|
153
|
+
title: string;
|
|
154
|
+
pipeline: string;
|
|
155
|
+
stages: CrmStageFact[];
|
|
156
|
+
stageId: string;
|
|
157
|
+
stage: string;
|
|
158
|
+
status: string;
|
|
159
|
+
amount: string | null;
|
|
160
|
+
expectedClose: string | null;
|
|
161
|
+
inStageSince: string | null;
|
|
162
|
+
lostReason: string;
|
|
163
|
+
/** The name of the person the deal is with, as the deal copied it. */
|
|
164
|
+
contact: string;
|
|
165
|
+
company: string;
|
|
166
|
+
products: number;
|
|
167
|
+
since: string | null;
|
|
168
|
+
notes: string;
|
|
169
|
+
timeline: CrmTimelineFact[];
|
|
170
|
+
openTasks: CrmTaskFact[];
|
|
171
|
+
}
|
|
172
|
+
export interface CrmLeadFacts {
|
|
173
|
+
record: 'lead';
|
|
174
|
+
name: string;
|
|
175
|
+
status: string;
|
|
176
|
+
/** Where the lead was captured: Form, Booking, Sign-up, Import. */
|
|
177
|
+
sources: string[];
|
|
178
|
+
captures: number;
|
|
179
|
+
firstSeen: string | null;
|
|
180
|
+
lastSeen: string | null;
|
|
181
|
+
assigned: boolean;
|
|
182
|
+
converted: boolean;
|
|
183
|
+
unqualifiedReason: string;
|
|
184
|
+
notes: string;
|
|
185
|
+
timeline: CrmTimelineFact[];
|
|
186
|
+
}
|
|
187
|
+
export type CrmRecordFacts = CrmContactFacts | CrmCompanyFacts | CrmDealFacts | CrmLeadFacts;
|
|
188
|
+
/** What a column of a file may hold, as an import field expects it. */
|
|
189
|
+
export type CrmImportFieldType = 'email' | 'phone' | 'number' | 'date' | 'yes-no' | 'url' | 'text';
|
|
190
|
+
/** One field an import may fill. */
|
|
191
|
+
export interface CrmImportFieldFact {
|
|
192
|
+
/** The mapping target: a standard field's key, or `custom:<key>`. */
|
|
193
|
+
key: string;
|
|
194
|
+
label: string;
|
|
195
|
+
type: CrmImportFieldType;
|
|
196
|
+
required: boolean;
|
|
197
|
+
}
|
|
198
|
+
export interface CrmImportFacts {
|
|
199
|
+
record: 'import';
|
|
200
|
+
collection: CrmImportFactsCollection;
|
|
201
|
+
fields: CrmImportFieldFact[];
|
|
202
|
+
}
|
|
203
|
+
/** A value as trimmed, single-spaced text of at most `max` characters. */
|
|
204
|
+
export declare function crmFactText(value: unknown, max: number): string;
|
|
205
|
+
/** Epoch millis, a `Date` or a stored timestamp, as epoch millis; `null` for anything else. */
|
|
206
|
+
export declare function crmFactMillis(value: unknown): number | null;
|
|
207
|
+
/** A UTC calendar day, `YYYY-MM-DD`, or `null`. */
|
|
208
|
+
export declare function crmFactDay(value: unknown): string | null;
|
|
209
|
+
/** An amount as a currency code and a fixed-point figure: `USD 1250.00`. */
|
|
210
|
+
export declare function crmFactMoney(cents: unknown, currency: unknown): string | null;
|
|
211
|
+
export declare const CRM_FACTS_EMAIL_PLACEHOLDER = "[email address]";
|
|
212
|
+
export declare const CRM_FACTS_PHONE_PLACEHOLDER = "[phone number]";
|
|
213
|
+
/**
|
|
214
|
+
* Free text the team wrote, as {@link crmFactText} reports it, with every
|
|
215
|
+
* email address, and every run of ten digits or more that is not a list of
|
|
216
|
+
* days, replaced by a placeholder. The fields that hold an address or a number
|
|
217
|
+
* are never reported, and this keeps one typed into a note from leaving
|
|
218
|
+
* either. Replaced before the cut, so a cut never halves an address into
|
|
219
|
+
* something unrecognized.
|
|
220
|
+
*/
|
|
221
|
+
export declare function crmFactProse(value: unknown, max: number): string;
|
|
222
|
+
/** A logged activity as a timeline entry. */
|
|
223
|
+
export declare function crmActivityFact(activity: Partial<CrmActivity>): CrmTimelineFact | null;
|
|
224
|
+
/** A capture the platform recorded on a contact, as a timeline entry. */
|
|
225
|
+
export declare function crmInteractionFact(interaction: Partial<ContactInteraction>): CrmTimelineFact | null;
|
|
226
|
+
/**
|
|
227
|
+
* Timeline entries newest first, at most {@link CRM_FACTS_TIMELINE_MAX}. A
|
|
228
|
+
* tie keeps the order the entries arrived in, so the same reads report the
|
|
229
|
+
* same list.
|
|
230
|
+
*/
|
|
231
|
+
export declare function crmTimelineFacts(entries: ReadonlyArray<{
|
|
232
|
+
atMs: unknown;
|
|
233
|
+
fact: CrmTimelineFact | null;
|
|
234
|
+
}>): CrmTimelineFact[];
|
|
235
|
+
/** The open tasks among `tasks`, soonest due first, undated last. */
|
|
236
|
+
export declare function crmOpenTaskFacts(tasks: ReadonlyArray<Partial<CrmTask>>, nowMs: number): CrmTaskFact[];
|
|
237
|
+
/** One deal, with its stage named by the pipeline it is in. */
|
|
238
|
+
export declare function crmDealFact(deal: Partial<CrmDeal>, pipeline: CrmPipeline | null | undefined): CrmDealFact;
|
|
239
|
+
/** Deals, open ones first, then most recently updated. */
|
|
240
|
+
export declare function crmDealFacts(deals: ReadonlyArray<Partial<CrmDeal>>, pipelines: ReadonlyMap<string, CrmPipeline>): CrmDealFact[];
|
|
241
|
+
export interface ContactFactsInput {
|
|
242
|
+
row: Record<string, unknown>;
|
|
243
|
+
/** The holder whose facet the person is read through. */
|
|
244
|
+
group: ConsentGroup;
|
|
245
|
+
activities: ReadonlyArray<Partial<CrmActivity>>;
|
|
246
|
+
tasks: ReadonlyArray<Partial<CrmTask>>;
|
|
247
|
+
deals: ReadonlyArray<Partial<CrmDeal>>;
|
|
248
|
+
pipelines: ReadonlyMap<string, CrmPipeline>;
|
|
249
|
+
nowMs: number;
|
|
250
|
+
}
|
|
251
|
+
export declare function contactFacts(input: ContactFactsInput): CrmContactFacts;
|
|
252
|
+
export interface CompanyFactsInput {
|
|
253
|
+
company: Partial<CrmCompany>;
|
|
254
|
+
activities: ReadonlyArray<Partial<CrmActivity>>;
|
|
255
|
+
tasks: ReadonlyArray<Partial<CrmTask>>;
|
|
256
|
+
deals: ReadonlyArray<Partial<CrmDeal>>;
|
|
257
|
+
pipelines: ReadonlyMap<string, CrmPipeline>;
|
|
258
|
+
nowMs: number;
|
|
259
|
+
}
|
|
260
|
+
export declare function companyFacts(input: CompanyFactsInput): CrmCompanyFacts;
|
|
261
|
+
export interface DealFactsInput {
|
|
262
|
+
deal: Partial<CrmDeal> & {
|
|
263
|
+
contactName?: unknown;
|
|
264
|
+
companyName?: unknown;
|
|
265
|
+
};
|
|
266
|
+
pipeline: CrmPipeline | null;
|
|
267
|
+
activities: ReadonlyArray<Partial<CrmActivity>>;
|
|
268
|
+
tasks: ReadonlyArray<Partial<CrmTask>>;
|
|
269
|
+
nowMs: number;
|
|
270
|
+
}
|
|
271
|
+
export declare function dealFacts(input: DealFactsInput): CrmDealFacts;
|
|
272
|
+
export interface LeadFactsInput {
|
|
273
|
+
lead: Record<string, unknown>;
|
|
274
|
+
activities: ReadonlyArray<Partial<CrmActivity>>;
|
|
275
|
+
}
|
|
276
|
+
export declare function leadFacts(input: LeadFactsInput): CrmLeadFacts;
|
|
277
|
+
/**
|
|
278
|
+
* The fields an import of `collection` may fill: the standard ones in the
|
|
279
|
+
* mapping menu's order, then the org's active custom fields for the record
|
|
280
|
+
* the collection holds, in their own order.
|
|
281
|
+
*/
|
|
282
|
+
export declare function importFacts(collection: CrmImportFactsCollection, customFields: ReadonlyArray<Partial<ContactFieldDefinition>>): CrmImportFacts;
|