@kelpie/server 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/consumerEmailDomains.d.ts +2 -0
- package/dist/lib/consumerEmailDomains.d.ts.map +1 -0
- package/dist/lib/consumerEmailDomains.js +62 -0
- package/dist/lib/consumerEmailDomains.js.map +1 -0
- package/dist/lib/email.d.ts +7 -0
- package/dist/lib/email.d.ts.map +1 -1
- package/dist/lib/email.js.map +1 -1
- package/dist/lib/emailContent.d.ts +33 -0
- package/dist/lib/emailContent.d.ts.map +1 -0
- package/dist/lib/emailContent.js +54 -0
- package/dist/lib/emailContent.js.map +1 -0
- package/dist/lib/emailDomainAutoLink.d.ts +27 -0
- package/dist/lib/emailDomainAutoLink.d.ts.map +1 -0
- package/dist/lib/emailDomainAutoLink.js +119 -0
- package/dist/lib/emailDomainAutoLink.js.map +1 -0
- package/dist/lib/ids.d.ts +13 -0
- package/dist/lib/ids.d.ts.map +1 -1
- package/dist/lib/ids.js +13 -0
- package/dist/lib/ids.js.map +1 -1
- package/dist/modules/activities/repository.d.ts.map +1 -1
- package/dist/modules/activities/repository.js +19 -20
- package/dist/modules/activities/repository.js.map +1 -1
- package/dist/modules/activities/wording.d.ts +12 -0
- package/dist/modules/activities/wording.d.ts.map +1 -1
- package/dist/modules/activities/wording.js +16 -0
- package/dist/modules/activities/wording.js.map +1 -1
- package/dist/modules/agent-tasks/catalog.d.ts.map +1 -1
- package/dist/modules/agent-tasks/catalog.js +62 -0
- package/dist/modules/agent-tasks/catalog.js.map +1 -1
- package/dist/modules/agent-tasks/resolve.d.ts.map +1 -1
- package/dist/modules/agent-tasks/resolve.js +42 -9
- package/dist/modules/agent-tasks/resolve.js.map +1 -1
- package/dist/modules/agent-tasks/routes.d.ts +2 -0
- package/dist/modules/agent-tasks/routes.d.ts.map +1 -1
- package/dist/modules/attachedRecords.d.ts +6 -1
- package/dist/modules/attachedRecords.d.ts.map +1 -1
- package/dist/modules/attachedRecords.js +18 -2
- package/dist/modules/attachedRecords.js.map +1 -1
- package/dist/modules/auth/preferences.d.ts +11 -1
- package/dist/modules/auth/preferences.d.ts.map +1 -1
- package/dist/modules/auth/preferences.js +11 -0
- package/dist/modules/auth/preferences.js.map +1 -1
- package/dist/modules/auth/routes.d.ts.map +1 -1
- package/dist/modules/auth/routes.js +18 -0
- package/dist/modules/auth/routes.js.map +1 -1
- package/dist/modules/auth/schema.d.ts +20 -0
- package/dist/modules/auth/schema.d.ts.map +1 -1
- package/dist/modules/auth/schema.js +11 -1
- package/dist/modules/auth/schema.js.map +1 -1
- package/dist/modules/auth/service.d.ts.map +1 -1
- package/dist/modules/auth/service.js +27 -3
- package/dist/modules/auth/service.js.map +1 -1
- package/dist/modules/companies/index.d.ts.map +1 -1
- package/dist/modules/companies/index.js +3 -1
- package/dist/modules/companies/index.js.map +1 -1
- package/dist/modules/companies/repository.d.ts +2 -0
- package/dist/modules/companies/repository.d.ts.map +1 -1
- package/dist/modules/companies/repository.js +1 -0
- package/dist/modules/companies/repository.js.map +1 -1
- package/dist/modules/companies/routes.d.ts +16 -0
- package/dist/modules/companies/routes.d.ts.map +1 -1
- package/dist/modules/companies/routes.js +18 -0
- package/dist/modules/companies/routes.js.map +1 -1
- package/dist/modules/companies/schema.d.ts +37 -0
- package/dist/modules/companies/schema.d.ts.map +1 -1
- package/dist/modules/companies/schema.js +10 -1
- package/dist/modules/companies/schema.js.map +1 -1
- package/dist/modules/companies/service.d.ts +6 -0
- package/dist/modules/companies/service.d.ts.map +1 -1
- package/dist/modules/companies/service.js +45 -11
- package/dist/modules/companies/service.js.map +1 -1
- package/dist/modules/consent-purposes/capabilities.d.ts +7 -0
- package/dist/modules/consent-purposes/capabilities.d.ts.map +1 -0
- package/dist/modules/consent-purposes/capabilities.js +10 -0
- package/dist/modules/consent-purposes/capabilities.js.map +1 -0
- package/dist/modules/consent-purposes/events.d.ts +38 -0
- package/dist/modules/consent-purposes/events.d.ts.map +1 -0
- package/dist/modules/consent-purposes/events.js +17 -0
- package/dist/modules/consent-purposes/events.js.map +1 -0
- package/dist/modules/consent-purposes/index.d.ts +13 -0
- package/dist/modules/consent-purposes/index.d.ts.map +1 -0
- package/dist/modules/consent-purposes/index.js +41 -0
- package/dist/modules/consent-purposes/index.js.map +1 -0
- package/dist/modules/consent-purposes/repository.d.ts +21 -0
- package/dist/modules/consent-purposes/repository.d.ts.map +1 -0
- package/dist/modules/consent-purposes/repository.js +98 -0
- package/dist/modules/consent-purposes/repository.js.map +1 -0
- package/dist/modules/consent-purposes/routes.d.ts +39 -0
- package/dist/modules/consent-purposes/routes.d.ts.map +1 -0
- package/dist/modules/consent-purposes/routes.js +79 -0
- package/dist/modules/consent-purposes/routes.js.map +1 -0
- package/dist/modules/consent-purposes/schema.d.ts +175 -0
- package/dist/modules/consent-purposes/schema.d.ts.map +1 -0
- package/dist/modules/consent-purposes/schema.js +35 -0
- package/dist/modules/consent-purposes/schema.js.map +1 -0
- package/dist/modules/consent-purposes/service.d.ts +50 -0
- package/dist/modules/consent-purposes/service.d.ts.map +1 -0
- package/dist/modules/consent-purposes/service.js +263 -0
- package/dist/modules/consent-purposes/service.js.map +1 -0
- package/dist/modules/consent-purposes/starters.d.ts +17 -0
- package/dist/modules/consent-purposes/starters.d.ts.map +1 -0
- package/dist/modules/consent-purposes/starters.js +15 -0
- package/dist/modules/consent-purposes/starters.js.map +1 -0
- package/dist/modules/consent-purposes/tools.d.ts +4 -0
- package/dist/modules/consent-purposes/tools.d.ts.map +1 -0
- package/dist/modules/consent-purposes/tools.js +29 -0
- package/dist/modules/consent-purposes/tools.js.map +1 -0
- package/dist/modules/core.d.ts.map +1 -1
- package/dist/modules/core.js +21 -0
- package/dist/modules/core.js.map +1 -1
- package/dist/modules/custom-fields/capabilities.d.ts +12 -0
- package/dist/modules/custom-fields/capabilities.d.ts.map +1 -0
- package/dist/modules/custom-fields/capabilities.js +15 -0
- package/dist/modules/custom-fields/capabilities.js.map +1 -0
- package/dist/modules/custom-fields/events.d.ts +49 -0
- package/dist/modules/custom-fields/events.d.ts.map +1 -0
- package/dist/modules/custom-fields/events.js +25 -0
- package/dist/modules/custom-fields/events.js.map +1 -0
- package/dist/modules/custom-fields/index.d.ts +19 -0
- package/dist/modules/custom-fields/index.d.ts.map +1 -0
- package/dist/modules/custom-fields/index.js +46 -0
- package/dist/modules/custom-fields/index.js.map +1 -0
- package/dist/modules/custom-fields/repository.d.ts +37 -0
- package/dist/modules/custom-fields/repository.d.ts.map +1 -0
- package/dist/modules/custom-fields/repository.js +144 -0
- package/dist/modules/custom-fields/repository.js.map +1 -0
- package/dist/modules/custom-fields/routes.d.ts +44 -0
- package/dist/modules/custom-fields/routes.d.ts.map +1 -0
- package/dist/modules/custom-fields/routes.js +103 -0
- package/dist/modules/custom-fields/routes.js.map +1 -0
- package/dist/modules/custom-fields/schema.d.ts +215 -0
- package/dist/modules/custom-fields/schema.d.ts.map +1 -0
- package/dist/modules/custom-fields/schema.js +43 -0
- package/dist/modules/custom-fields/schema.js.map +1 -0
- package/dist/modules/custom-fields/service.d.ts +57 -0
- package/dist/modules/custom-fields/service.d.ts.map +1 -0
- package/dist/modules/custom-fields/service.js +273 -0
- package/dist/modules/custom-fields/service.js.map +1 -0
- package/dist/modules/custom-fields/tools.d.ts +4 -0
- package/dist/modules/custom-fields/tools.d.ts.map +1 -0
- package/dist/modules/custom-fields/tools.js +38 -0
- package/dist/modules/custom-fields/tools.js.map +1 -0
- package/dist/modules/custom-fields/values.d.ts +49 -0
- package/dist/modules/custom-fields/values.d.ts.map +1 -0
- package/dist/modules/custom-fields/values.js +249 -0
- package/dist/modules/custom-fields/values.js.map +1 -0
- package/dist/modules/custom-fields/wire.d.ts +12 -0
- package/dist/modules/custom-fields/wire.d.ts.map +1 -0
- package/dist/modules/custom-fields/wire.js +30 -0
- package/dist/modules/custom-fields/wire.js.map +1 -0
- package/dist/modules/dashboard/repository.d.ts.map +1 -1
- package/dist/modules/dashboard/repository.js +4 -3
- package/dist/modules/dashboard/repository.js.map +1 -1
- package/dist/modules/deals/index.d.ts +2 -1
- package/dist/modules/deals/index.d.ts.map +1 -1
- package/dist/modules/deals/index.js +5 -2
- package/dist/modules/deals/index.js.map +1 -1
- package/dist/modules/deals/repository.d.ts +0 -16
- package/dist/modules/deals/repository.d.ts.map +1 -1
- package/dist/modules/deals/repository.js +6 -76
- package/dist/modules/deals/repository.js.map +1 -1
- package/dist/modules/deals/routes.d.ts +14 -0
- package/dist/modules/deals/routes.d.ts.map +1 -1
- package/dist/modules/deals/routes.js +7 -0
- package/dist/modules/deals/routes.js.map +1 -1
- package/dist/modules/deals/schema.d.ts +20 -42
- package/dist/modules/deals/schema.d.ts.map +1 -1
- package/dist/modules/deals/schema.js +6 -11
- package/dist/modules/deals/schema.js.map +1 -1
- package/dist/modules/deals/service.d.ts +13 -2
- package/dist/modules/deals/service.d.ts.map +1 -1
- package/dist/modules/deals/service.js +43 -20
- package/dist/modules/deals/service.js.map +1 -1
- package/dist/modules/decisions/repository.d.ts.map +1 -1
- package/dist/modules/decisions/repository.js +2 -0
- package/dist/modules/decisions/repository.js.map +1 -1
- package/dist/modules/decisions/routes.d.ts +1 -0
- package/dist/modules/decisions/routes.d.ts.map +1 -1
- package/dist/modules/email-domain-linker/index.d.ts +12 -0
- package/dist/modules/email-domain-linker/index.d.ts.map +1 -0
- package/dist/modules/email-domain-linker/index.js +34 -0
- package/dist/modules/email-domain-linker/index.js.map +1 -0
- package/dist/modules/email-domain-linker/routes.d.ts +14 -0
- package/dist/modules/email-domain-linker/routes.d.ts.map +1 -0
- package/dist/modules/email-domain-linker/routes.js +15 -0
- package/dist/modules/email-domain-linker/routes.js.map +1 -0
- package/dist/modules/email-domain-linker/service.d.ts +37 -0
- package/dist/modules/email-domain-linker/service.d.ts.map +1 -0
- package/dist/modules/email-domain-linker/service.js +63 -0
- package/dist/modules/email-domain-linker/service.js.map +1 -0
- package/dist/modules/enquiries/events.d.ts +44 -0
- package/dist/modules/enquiries/events.d.ts.map +1 -0
- package/dist/modules/enquiries/events.js +19 -0
- package/dist/modules/enquiries/events.js.map +1 -0
- package/dist/modules/enquiries/index.d.ts +13 -0
- package/dist/modules/enquiries/index.d.ts.map +1 -0
- package/dist/modules/enquiries/index.js +44 -0
- package/dist/modules/enquiries/index.js.map +1 -0
- package/dist/modules/enquiries/repository.d.ts +30 -0
- package/dist/modules/enquiries/repository.d.ts.map +1 -0
- package/dist/modules/enquiries/repository.js +94 -0
- package/dist/modules/enquiries/repository.js.map +1 -0
- package/dist/modules/enquiries/routes.d.ts +52 -0
- package/dist/modules/enquiries/routes.d.ts.map +1 -0
- package/dist/modules/enquiries/routes.js +127 -0
- package/dist/modules/enquiries/routes.js.map +1 -0
- package/dist/modules/enquiries/schema.d.ts +290 -0
- package/dist/modules/enquiries/schema.d.ts.map +1 -0
- package/dist/modules/enquiries/schema.js +52 -0
- package/dist/modules/enquiries/schema.js.map +1 -0
- package/dist/modules/enquiries/service.d.ts +85 -0
- package/dist/modules/enquiries/service.d.ts.map +1 -0
- package/dist/modules/enquiries/service.js +370 -0
- package/dist/modules/enquiries/service.js.map +1 -0
- package/dist/modules/enquiries/tools.d.ts +4 -0
- package/dist/modules/enquiries/tools.d.ts.map +1 -0
- package/dist/modules/enquiries/tools.js +50 -0
- package/dist/modules/enquiries/tools.js.map +1 -0
- package/dist/modules/eventCatalogs.d.ts +4 -0
- package/dist/modules/eventCatalogs.d.ts.map +1 -1
- package/dist/modules/eventCatalogs.js +4 -0
- package/dist/modules/eventCatalogs.js.map +1 -1
- package/dist/modules/forms/embed.d.ts +20 -6
- package/dist/modules/forms/embed.d.ts.map +1 -1
- package/dist/modules/forms/embed.js +359 -43
- package/dist/modules/forms/embed.js.map +1 -1
- package/dist/modules/forms/events.d.ts +20 -7
- package/dist/modules/forms/events.d.ts.map +1 -1
- package/dist/modules/forms/events.js +20 -2
- package/dist/modules/forms/events.js.map +1 -1
- package/dist/modules/forms/fields.d.ts +14 -1
- package/dist/modules/forms/fields.d.ts.map +1 -1
- package/dist/modules/forms/fields.js +87 -3
- package/dist/modules/forms/fields.js.map +1 -1
- package/dist/modules/forms/index.d.ts.map +1 -1
- package/dist/modules/forms/index.js +12 -1
- package/dist/modules/forms/index.js.map +1 -1
- package/dist/modules/forms/mapping.d.ts +62 -5
- package/dist/modules/forms/mapping.d.ts.map +1 -1
- package/dist/modules/forms/mapping.js +139 -5
- package/dist/modules/forms/mapping.js.map +1 -1
- package/dist/modules/forms/publicRoutes.d.ts.map +1 -1
- package/dist/modules/forms/publicRoutes.js +29 -1
- package/dist/modules/forms/publicRoutes.js.map +1 -1
- package/dist/modules/forms/repository.d.ts +31 -0
- package/dist/modules/forms/repository.d.ts.map +1 -1
- package/dist/modules/forms/repository.js +90 -1
- package/dist/modules/forms/repository.js.map +1 -1
- package/dist/modules/forms/routes.d.ts +83 -1
- package/dist/modules/forms/routes.d.ts.map +1 -1
- package/dist/modules/forms/routes.js +185 -2
- package/dist/modules/forms/routes.js.map +1 -1
- package/dist/modules/forms/schema.d.ts +672 -1
- package/dist/modules/forms/schema.d.ts.map +1 -1
- package/dist/modules/forms/schema.js +146 -3
- package/dist/modules/forms/schema.js.map +1 -1
- package/dist/modules/forms/service.d.ts +54 -1
- package/dist/modules/forms/service.d.ts.map +1 -1
- package/dist/modules/forms/service.js +338 -28
- package/dist/modules/forms/service.js.map +1 -1
- package/dist/modules/forms/submission.d.ts +15 -0
- package/dist/modules/forms/submission.d.ts.map +1 -1
- package/dist/modules/forms/submission.js +418 -40
- package/dist/modules/forms/submission.js.map +1 -1
- package/dist/modules/import-export/drafts.d.ts +10 -0
- package/dist/modules/import-export/drafts.d.ts.map +1 -1
- package/dist/modules/import-export/drafts.js +16 -2
- package/dist/modules/import-export/drafts.js.map +1 -1
- package/dist/modules/import-export/exportRows.d.ts +7 -4
- package/dist/modules/import-export/exportRows.d.ts.map +1 -1
- package/dist/modules/import-export/exportRows.js +20 -5
- package/dist/modules/import-export/exportRows.js.map +1 -1
- package/dist/modules/import-export/plan.d.ts +12 -1
- package/dist/modules/import-export/plan.d.ts.map +1 -1
- package/dist/modules/import-export/plan.js +29 -2
- package/dist/modules/import-export/plan.js.map +1 -1
- package/dist/modules/import-export/presets.d.ts.map +1 -1
- package/dist/modules/import-export/presets.js +10 -0
- package/dist/modules/import-export/presets.js.map +1 -1
- package/dist/modules/import-export/repository.d.ts +11 -1
- package/dist/modules/import-export/repository.d.ts.map +1 -1
- package/dist/modules/import-export/repository.js +42 -9
- package/dist/modules/import-export/repository.js.map +1 -1
- package/dist/modules/import-export/routes.d.ts.map +1 -1
- package/dist/modules/import-export/routes.js +4 -0
- package/dist/modules/import-export/routes.js.map +1 -1
- package/dist/modules/import-export/schema.d.ts +17 -0
- package/dist/modules/import-export/schema.d.ts.map +1 -1
- package/dist/modules/import-export/schema.js +11 -0
- package/dist/modules/import-export/schema.js.map +1 -1
- package/dist/modules/import-export/service.d.ts +6 -0
- package/dist/modules/import-export/service.d.ts.map +1 -1
- package/dist/modules/import-export/service.js +14 -2
- package/dist/modules/import-export/service.js.map +1 -1
- package/dist/modules/import-export/streams.d.ts.map +1 -1
- package/dist/modules/import-export/streams.js +3 -3
- package/dist/modules/import-export/streams.js.map +1 -1
- package/dist/modules/import-export/tools.d.ts.map +1 -1
- package/dist/modules/import-export/tools.js +8 -0
- package/dist/modules/import-export/tools.js.map +1 -1
- package/dist/modules/import-export/validation.d.ts.map +1 -1
- package/dist/modules/import-export/validation.js +22 -1
- package/dist/modules/import-export/validation.js.map +1 -1
- package/dist/modules/import-export/writes.d.ts.map +1 -1
- package/dist/modules/import-export/writes.js +37 -4
- package/dist/modules/import-export/writes.js.map +1 -1
- package/dist/modules/lists/events.d.ts +42 -0
- package/dist/modules/lists/events.d.ts.map +1 -0
- package/dist/modules/lists/events.js +16 -0
- package/dist/modules/lists/events.js.map +1 -0
- package/dist/modules/lists/index.d.ts +10 -0
- package/dist/modules/lists/index.d.ts.map +1 -0
- package/dist/modules/lists/index.js +35 -0
- package/dist/modules/lists/index.js.map +1 -0
- package/dist/modules/lists/repository.d.ts +80 -0
- package/dist/modules/lists/repository.d.ts.map +1 -0
- package/dist/modules/lists/repository.js +178 -0
- package/dist/modules/lists/repository.js.map +1 -0
- package/dist/modules/lists/routes.d.ts +55 -0
- package/dist/modules/lists/routes.d.ts.map +1 -0
- package/dist/modules/lists/routes.js +168 -0
- package/dist/modules/lists/routes.js.map +1 -0
- package/dist/modules/lists/schema.d.ts +281 -0
- package/dist/modules/lists/schema.d.ts.map +1 -0
- package/dist/modules/lists/schema.js +83 -0
- package/dist/modules/lists/schema.js.map +1 -0
- package/dist/modules/lists/service.d.ts +82 -0
- package/dist/modules/lists/service.d.ts.map +1 -0
- package/dist/modules/lists/service.js +262 -0
- package/dist/modules/lists/service.js.map +1 -0
- package/dist/modules/lists/tools.d.ts +4 -0
- package/dist/modules/lists/tools.d.ts.map +1 -0
- package/dist/modules/lists/tools.js +86 -0
- package/dist/modules/lists/tools.js.map +1 -0
- package/dist/modules/mcp/index.d.ts.map +1 -1
- package/dist/modules/mcp/index.js +5 -0
- package/dist/modules/mcp/index.js.map +1 -1
- package/dist/modules/notes/routes.d.ts +1 -0
- package/dist/modules/notes/routes.d.ts.map +1 -1
- package/dist/modules/opportunities/index.d.ts.map +1 -1
- package/dist/modules/opportunities/index.js +3 -1
- package/dist/modules/opportunities/index.js.map +1 -1
- package/dist/modules/opportunities/repository.d.ts +2 -0
- package/dist/modules/opportunities/repository.d.ts.map +1 -1
- package/dist/modules/opportunities/repository.js +4 -0
- package/dist/modules/opportunities/repository.js.map +1 -1
- package/dist/modules/opportunities/routes.d.ts +16 -0
- package/dist/modules/opportunities/routes.d.ts.map +1 -1
- package/dist/modules/opportunities/routes.js +13 -0
- package/dist/modules/opportunities/routes.js.map +1 -1
- package/dist/modules/opportunities/schema.d.ts +20 -0
- package/dist/modules/opportunities/schema.d.ts.map +1 -1
- package/dist/modules/opportunities/schema.js +6 -1
- package/dist/modules/opportunities/schema.js.map +1 -1
- package/dist/modules/opportunities/service.d.ts +20 -3
- package/dist/modules/opportunities/service.d.ts.map +1 -1
- package/dist/modules/opportunities/service.js +99 -18
- package/dist/modules/opportunities/service.js.map +1 -1
- package/dist/modules/opportunities/tools.d.ts.map +1 -1
- package/dist/modules/opportunities/tools.js +2 -0
- package/dist/modules/opportunities/tools.js.map +1 -1
- package/dist/modules/partnerships/index.d.ts.map +1 -1
- package/dist/modules/partnerships/index.js +3 -1
- package/dist/modules/partnerships/index.js.map +1 -1
- package/dist/modules/partnerships/repository.d.ts +0 -17
- package/dist/modules/partnerships/repository.d.ts.map +1 -1
- package/dist/modules/partnerships/repository.js +6 -82
- package/dist/modules/partnerships/repository.js.map +1 -1
- package/dist/modules/partnerships/routes.d.ts +14 -0
- package/dist/modules/partnerships/routes.d.ts.map +1 -1
- package/dist/modules/partnerships/routes.js +7 -0
- package/dist/modules/partnerships/routes.js.map +1 -1
- package/dist/modules/partnerships/schema.d.ts +20 -41
- package/dist/modules/partnerships/schema.d.ts.map +1 -1
- package/dist/modules/partnerships/schema.js +6 -10
- package/dist/modules/partnerships/schema.js.map +1 -1
- package/dist/modules/partnerships/service.d.ts +11 -1
- package/dist/modules/partnerships/service.d.ts.map +1 -1
- package/dist/modules/partnerships/service.js +43 -20
- package/dist/modules/partnerships/service.js.map +1 -1
- package/dist/modules/people/consentHydration.d.ts +26 -0
- package/dist/modules/people/consentHydration.d.ts.map +1 -0
- package/dist/modules/people/consentHydration.js +100 -0
- package/dist/modules/people/consentHydration.js.map +1 -0
- package/dist/modules/people/index.d.ts.map +1 -1
- package/dist/modules/people/index.js +3 -1
- package/dist/modules/people/index.js.map +1 -1
- package/dist/modules/people/personConsentWrites.d.ts +40 -0
- package/dist/modules/people/personConsentWrites.d.ts.map +1 -0
- package/dist/modules/people/personConsentWrites.js +98 -0
- package/dist/modules/people/personConsentWrites.js.map +1 -0
- package/dist/modules/people/repository.d.ts +11 -0
- package/dist/modules/people/repository.d.ts.map +1 -1
- package/dist/modules/people/repository.js +21 -1
- package/dist/modules/people/repository.js.map +1 -1
- package/dist/modules/people/routes.d.ts +57 -4
- package/dist/modules/people/routes.d.ts.map +1 -1
- package/dist/modules/people/routes.js +104 -5
- package/dist/modules/people/routes.js.map +1 -1
- package/dist/modules/people/schema.d.ts +366 -1
- package/dist/modules/people/schema.d.ts.map +1 -1
- package/dist/modules/people/schema.js +92 -2
- package/dist/modules/people/schema.js.map +1 -1
- package/dist/modules/people/service.d.ts +30 -1
- package/dist/modules/people/service.d.ts.map +1 -1
- package/dist/modules/people/service.js +131 -36
- package/dist/modules/people/service.js.map +1 -1
- package/dist/modules/people/tools.d.ts.map +1 -1
- package/dist/modules/people/tools.js +4 -1
- package/dist/modules/people/tools.js.map +1 -1
- package/dist/modules/personLinks.d.ts +79 -0
- package/dist/modules/personLinks.d.ts.map +1 -0
- package/dist/modules/personLinks.js +155 -0
- package/dist/modules/personLinks.js.map +1 -0
- package/dist/modules/pipelines/routes.d.ts +1 -0
- package/dist/modules/pipelines/routes.d.ts.map +1 -1
- package/dist/modules/plans/routes.d.ts +1 -0
- package/dist/modules/plans/routes.d.ts.map +1 -1
- package/dist/modules/positions/routes.d.ts.map +1 -1
- package/dist/modules/positions/routes.js +4 -2
- package/dist/modules/positions/routes.js.map +1 -1
- package/dist/modules/raises/index.d.ts.map +1 -1
- package/dist/modules/raises/index.js +3 -1
- package/dist/modules/raises/index.js.map +1 -1
- package/dist/modules/raises/repository.d.ts +0 -17
- package/dist/modules/raises/repository.d.ts.map +1 -1
- package/dist/modules/raises/repository.js +6 -77
- package/dist/modules/raises/repository.js.map +1 -1
- package/dist/modules/raises/routes.d.ts +14 -0
- package/dist/modules/raises/routes.d.ts.map +1 -1
- package/dist/modules/raises/routes.js +7 -0
- package/dist/modules/raises/routes.js.map +1 -1
- package/dist/modules/raises/schema.d.ts +20 -41
- package/dist/modules/raises/schema.d.ts.map +1 -1
- package/dist/modules/raises/schema.js +6 -10
- package/dist/modules/raises/schema.js.map +1 -1
- package/dist/modules/raises/service.d.ts +11 -1
- package/dist/modules/raises/service.d.ts.map +1 -1
- package/dist/modules/raises/service.js +41 -18
- package/dist/modules/raises/service.js.map +1 -1
- package/dist/modules/recordTargets.d.ts.map +1 -1
- package/dist/modules/recordTargets.js +2 -0
- package/dist/modules/recordTargets.js.map +1 -1
- package/dist/modules/references.d.ts +10 -0
- package/dist/modules/references.d.ts.map +1 -1
- package/dist/modules/references.js +27 -4
- package/dist/modules/references.js.map +1 -1
- package/dist/modules/sample-data/fixture.d.ts +160 -0
- package/dist/modules/sample-data/fixture.d.ts.map +1 -0
- package/dist/modules/sample-data/fixture.js +501 -0
- package/dist/modules/sample-data/fixture.js.map +1 -0
- package/dist/modules/sample-data/index.d.ts +11 -0
- package/dist/modules/sample-data/index.d.ts.map +1 -0
- package/dist/modules/sample-data/index.js +44 -0
- package/dist/modules/sample-data/index.js.map +1 -0
- package/dist/modules/sample-data/routes.d.ts +15 -0
- package/dist/modules/sample-data/routes.d.ts.map +1 -0
- package/dist/modules/sample-data/routes.js +25 -0
- package/dist/modules/sample-data/routes.js.map +1 -0
- package/dist/modules/sample-data/service.d.ts +39 -0
- package/dist/modules/sample-data/service.d.ts.map +1 -0
- package/dist/modules/sample-data/service.js +481 -0
- package/dist/modules/sample-data/service.js.map +1 -0
- package/dist/modules/sample-data/tools.d.ts +4 -0
- package/dist/modules/sample-data/tools.d.ts.map +1 -0
- package/dist/modules/sample-data/tools.js +22 -0
- package/dist/modules/sample-data/tools.js.map +1 -0
- package/dist/modules/search/index.d.ts +1 -1
- package/dist/modules/search/index.d.ts.map +1 -1
- package/dist/modules/search/index.js +2 -1
- package/dist/modules/search/index.js.map +1 -1
- package/dist/modules/search/repository.d.ts +1 -0
- package/dist/modules/search/repository.d.ts.map +1 -1
- package/dist/modules/search/repository.js +23 -0
- package/dist/modules/search/repository.js.map +1 -1
- package/dist/modules/search/service.d.ts +3 -3
- package/dist/modules/search/service.d.ts.map +1 -1
- package/dist/modules/search/service.js +5 -4
- package/dist/modules/search/service.js.map +1 -1
- package/dist/modules/smtp-email/index.d.ts +1 -0
- package/dist/modules/smtp-email/index.d.ts.map +1 -1
- package/dist/modules/smtp-email/index.js +1 -0
- package/dist/modules/smtp-email/index.js.map +1 -1
- package/dist/modules/stagedRecords.d.ts +3 -3
- package/dist/modules/stagedRecords.d.ts.map +1 -1
- package/dist/modules/stagedRecords.js +9 -0
- package/dist/modules/stagedRecords.js.map +1 -1
- package/dist/modules/webhooks/payloads.d.ts.map +1 -1
- package/dist/modules/webhooks/payloads.js +15 -2
- package/dist/modules/webhooks/payloads.js.map +1 -1
- package/dist/modules/workspace/repository.d.ts +2 -0
- package/dist/modules/workspace/repository.d.ts.map +1 -1
- package/dist/modules/workspace/repository.js +7 -0
- package/dist/modules/workspace/repository.js.map +1 -1
- package/dist/modules/workspace/service.d.ts.map +1 -1
- package/dist/modules/workspace/service.js +20 -1
- package/dist/modules/workspace/service.js.map +1 -1
- package/dist/modules/workspace/starters.d.ts.map +1 -1
- package/dist/modules/workspace/starters.js +5 -0
- package/dist/modules/workspace/starters.js.map +1 -1
- package/dist/runtime/events.d.ts +1 -1
- package/dist/runtime/events.d.ts.map +1 -1
- package/dist/runtime/events.js +1 -0
- package/dist/runtime/events.js.map +1 -1
- package/dist/schema/index.d.ts +4 -0
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +4 -0
- package/dist/schema/index.js.map +1 -1
- package/dist/testing/database.d.ts +5 -1
- package/dist/testing/database.d.ts.map +1 -1
- package/dist/testing/database.js +81 -10
- package/dist/testing/database.js.map +1 -1
- package/migrations/0021_certain_maggott.sql +30 -0
- package/migrations/0022_stormy_manta.sql +1 -0
- package/migrations/0023_funny_maddog.sql +1 -0
- package/migrations/0024_third_king_cobra.sql +46 -0
- package/migrations/0025_worthless_chimera.sql +3 -0
- package/migrations/0026_late_aqueduct.sql +46 -0
- package/migrations/0027_brainy_silver_sable.sql +3 -0
- package/migrations/0028_freezing_scrambler.sql +19 -0
- package/migrations/0029_custom_fields.sql +26 -0
- package/migrations/0030_enquiries.sql +79 -0
- package/migrations/0031_consent.sql +45 -0
- package/migrations/0032_form_field_statement.sql +1 -0
- package/migrations/0033_form_field_consent_purpose_ids.sql +5 -0
- package/migrations/0034_drop_form_field_consent_purpose_id.sql +1 -0
- package/migrations/0035_form_field_consent_purpose_labels.sql +1 -0
- package/migrations/0036_form_field_notice_type.sql +2 -0
- package/migrations/meta/0021_snapshot.json +5389 -0
- package/migrations/meta/0022_snapshot.json +5396 -0
- package/migrations/meta/0023_snapshot.json +5403 -0
- package/migrations/meta/0024_snapshot.json +5516 -0
- package/migrations/meta/0025_snapshot.json +5336 -0
- package/migrations/meta/0026_snapshot.json +5710 -0
- package/migrations/meta/0027_snapshot.json +5716 -0
- package/migrations/meta/0028_snapshot.json +5740 -0
- package/migrations/meta/0029_snapshot.json +5935 -0
- package/migrations/meta/0030_snapshot.json +6245 -0
- package/migrations/meta/0031_snapshot.json +6572 -0
- package/migrations/meta/0032_snapshot.json +6578 -0
- package/migrations/meta/0033_snapshot.json +6572 -0
- package/migrations/meta/0034_snapshot.json +6566 -0
- package/migrations/meta/0035_snapshot.json +6573 -0
- package/migrations/meta/0036_snapshot.json +6573 -0
- package/migrations/meta/_journal.json +112 -0
- package/package.json +3 -2
- package/src/lib/consumerEmailDomains.ts +62 -0
- package/src/lib/email.ts +7 -0
- package/src/lib/emailContent.ts +91 -0
- package/src/lib/emailDomainAutoLink.ts +165 -0
- package/src/lib/ids.ts +13 -0
- package/src/modules/activities/repository.ts +22 -23
- package/src/modules/activities/wording.ts +18 -0
- package/src/modules/agent-tasks/catalog.ts +63 -0
- package/src/modules/agent-tasks/resolve.ts +64 -24
- package/src/modules/attachedRecords.ts +37 -3
- package/src/modules/auth/preferences.ts +13 -1
- package/src/modules/auth/routes.ts +22 -0
- package/src/modules/auth/schema.ts +12 -2
- package/src/modules/auth/service.ts +37 -3
- package/src/modules/companies/index.ts +3 -1
- package/src/modules/companies/repository.ts +3 -0
- package/src/modules/companies/routes.ts +20 -0
- package/src/modules/companies/schema.ts +11 -1
- package/src/modules/companies/service.ts +72 -12
- package/src/modules/consent-purposes/capabilities.ts +12 -0
- package/src/modules/consent-purposes/events.ts +38 -0
- package/src/modules/consent-purposes/index.ts +48 -0
- package/src/modules/consent-purposes/repository.ts +163 -0
- package/src/modules/consent-purposes/routes.ts +122 -0
- package/src/modules/consent-purposes/schema.ts +46 -0
- package/src/modules/consent-purposes/service.ts +423 -0
- package/src/modules/consent-purposes/starters.ts +32 -0
- package/src/modules/consent-purposes/tools.ts +44 -0
- package/src/modules/core.ts +21 -0
- package/src/modules/custom-fields/capabilities.ts +17 -0
- package/src/modules/custom-fields/events.ts +51 -0
- package/src/modules/custom-fields/index.ts +61 -0
- package/src/modules/custom-fields/repository.ts +225 -0
- package/src/modules/custom-fields/routes.ts +155 -0
- package/src/modules/custom-fields/schema.ts +61 -0
- package/src/modules/custom-fields/service.ts +439 -0
- package/src/modules/custom-fields/tools.ts +53 -0
- package/src/modules/custom-fields/values.ts +352 -0
- package/src/modules/custom-fields/wire.ts +32 -0
- package/src/modules/dashboard/repository.ts +4 -3
- package/src/modules/deals/index.ts +5 -2
- package/src/modules/deals/repository.ts +6 -106
- package/src/modules/deals/routes.ts +7 -0
- package/src/modules/deals/schema.ts +7 -15
- package/src/modules/deals/service.ts +92 -23
- package/src/modules/decisions/repository.ts +2 -0
- package/src/modules/email-domain-linker/index.ts +40 -0
- package/src/modules/email-domain-linker/routes.ts +40 -0
- package/src/modules/email-domain-linker/service.ts +122 -0
- package/src/modules/enquiries/events.ts +45 -0
- package/src/modules/enquiries/index.ts +50 -0
- package/src/modules/enquiries/repository.ts +164 -0
- package/src/modules/enquiries/routes.ts +172 -0
- package/src/modules/enquiries/schema.ts +59 -0
- package/src/modules/enquiries/service.ts +644 -0
- package/src/modules/enquiries/tools.ts +66 -0
- package/src/modules/eventCatalogs.ts +4 -0
- package/src/modules/forms/embed.ts +391 -44
- package/src/modules/forms/events.ts +30 -2
- package/src/modules/forms/fields.ts +102 -2
- package/src/modules/forms/index.ts +12 -1
- package/src/modules/forms/mapping.ts +183 -6
- package/src/modules/forms/publicRoutes.ts +43 -1
- package/src/modules/forms/repository.ts +162 -1
- package/src/modules/forms/routes.ts +212 -2
- package/src/modules/forms/schema.ts +166 -4
- package/src/modules/forms/service.ts +565 -41
- package/src/modules/forms/submission.ts +718 -44
- package/src/modules/import-export/drafts.ts +20 -1
- package/src/modules/import-export/exportRows.ts +21 -5
- package/src/modules/import-export/plan.ts +47 -2
- package/src/modules/import-export/presets.ts +10 -0
- package/src/modules/import-export/repository.ts +73 -8
- package/src/modules/import-export/routes.ts +4 -0
- package/src/modules/import-export/schema.ts +11 -0
- package/src/modules/import-export/service.ts +28 -2
- package/src/modules/import-export/streams.ts +3 -1
- package/src/modules/import-export/tools.ts +10 -0
- package/src/modules/import-export/validation.ts +28 -0
- package/src/modules/import-export/writes.ts +70 -5
- package/src/modules/lists/events.ts +41 -0
- package/src/modules/lists/index.ts +41 -0
- package/src/modules/lists/repository.ts +343 -0
- package/src/modules/lists/routes.ts +255 -0
- package/src/modules/lists/schema.ts +95 -0
- package/src/modules/lists/service.ts +505 -0
- package/src/modules/lists/tools.ts +128 -0
- package/src/modules/mcp/index.ts +5 -0
- package/src/modules/opportunities/index.ts +3 -1
- package/src/modules/opportunities/repository.ts +11 -0
- package/src/modules/opportunities/routes.ts +13 -0
- package/src/modules/opportunities/schema.ts +7 -1
- package/src/modules/opportunities/service.ts +188 -22
- package/src/modules/opportunities/tools.ts +2 -0
- package/src/modules/partnerships/index.ts +3 -1
- package/src/modules/partnerships/repository.ts +6 -117
- package/src/modules/partnerships/routes.ts +7 -0
- package/src/modules/partnerships/schema.ts +7 -14
- package/src/modules/partnerships/service.ts +93 -22
- package/src/modules/people/consentHydration.ts +167 -0
- package/src/modules/people/index.ts +3 -1
- package/src/modules/people/personConsentWrites.ts +177 -0
- package/src/modules/people/repository.ts +31 -0
- package/src/modules/people/routes.ts +127 -18
- package/src/modules/people/schema.ts +109 -3
- package/src/modules/people/service.ts +205 -39
- package/src/modules/people/tools.ts +5 -1
- package/src/modules/personLinks.ts +278 -0
- package/src/modules/positions/routes.ts +4 -2
- package/src/modules/raises/index.ts +3 -1
- package/src/modules/raises/repository.ts +6 -107
- package/src/modules/raises/routes.ts +7 -0
- package/src/modules/raises/schema.ts +7 -14
- package/src/modules/raises/service.ts +91 -20
- package/src/modules/recordTargets.ts +2 -0
- package/src/modules/references.ts +43 -4
- package/src/modules/sample-data/fixture.ts +690 -0
- package/src/modules/sample-data/index.ts +51 -0
- package/src/modules/sample-data/routes.ts +50 -0
- package/src/modules/sample-data/service.ts +679 -0
- package/src/modules/sample-data/tools.ts +32 -0
- package/src/modules/search/index.ts +2 -1
- package/src/modules/search/repository.ts +33 -1
- package/src/modules/search/service.ts +7 -5
- package/src/modules/smtp-email/index.ts +8 -1
- package/src/modules/stagedRecords.ts +18 -3
- package/src/modules/webhooks/payloads.ts +20 -2
- package/src/modules/workspace/repository.ts +12 -0
- package/src/modules/workspace/service.ts +27 -1
- package/src/modules/workspace/starters.ts +5 -0
- package/src/runtime/events.ts +1 -0
- package/src/schema/index.ts +4 -0
- package/src/testing/database.ts +97 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumerEmailDomains.d.ts","sourceRoot":"","sources":["../../src/lib/consumerEmailDomains.ts"],"names":[],"mappings":"AA2DA,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE7D"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consumer email hosts, checked case-insensitively.
|
|
3
|
+
*
|
|
4
|
+
* The email-domain listener refuses to auto-link a Person to a Company on any
|
|
5
|
+
* domain in this list. A consumer address belongs to no one company, and a
|
|
6
|
+
* Company row entered by mistake against, say, `gmail.com` would otherwise
|
|
7
|
+
* auto-attach every consumer address after.
|
|
8
|
+
*
|
|
9
|
+
* A starter list of the common providers. Add locale variants and less common
|
|
10
|
+
* hosts as the need arrives.
|
|
11
|
+
*/
|
|
12
|
+
const CONSUMER_EMAIL_DOMAINS = new Set([
|
|
13
|
+
'gmail.com',
|
|
14
|
+
'googlemail.com',
|
|
15
|
+
'yahoo.com',
|
|
16
|
+
'yahoo.co.uk',
|
|
17
|
+
'yahoo.co.jp',
|
|
18
|
+
'yahoo.fr',
|
|
19
|
+
'yahoo.de',
|
|
20
|
+
'yahoo.ca',
|
|
21
|
+
'yahoo.com.au',
|
|
22
|
+
'ymail.com',
|
|
23
|
+
'rocketmail.com',
|
|
24
|
+
'hotmail.com',
|
|
25
|
+
'hotmail.co.uk',
|
|
26
|
+
'hotmail.fr',
|
|
27
|
+
'hotmail.de',
|
|
28
|
+
'hotmail.it',
|
|
29
|
+
'hotmail.es',
|
|
30
|
+
'outlook.com',
|
|
31
|
+
'outlook.co.uk',
|
|
32
|
+
'live.com',
|
|
33
|
+
'live.co.uk',
|
|
34
|
+
'msn.com',
|
|
35
|
+
'aol.com',
|
|
36
|
+
'aim.com',
|
|
37
|
+
'icloud.com',
|
|
38
|
+
'me.com',
|
|
39
|
+
'mac.com',
|
|
40
|
+
'protonmail.com',
|
|
41
|
+
'proton.me',
|
|
42
|
+
'pm.me',
|
|
43
|
+
'gmx.com',
|
|
44
|
+
'gmx.net',
|
|
45
|
+
'gmx.de',
|
|
46
|
+
'mail.com',
|
|
47
|
+
'fastmail.com',
|
|
48
|
+
'fastmail.fm',
|
|
49
|
+
'zoho.com',
|
|
50
|
+
'yandex.com',
|
|
51
|
+
'yandex.ru',
|
|
52
|
+
'tutanota.com',
|
|
53
|
+
'tuta.io',
|
|
54
|
+
'qq.com',
|
|
55
|
+
'163.com',
|
|
56
|
+
'126.com',
|
|
57
|
+
'naver.com',
|
|
58
|
+
]);
|
|
59
|
+
export function isConsumerEmailDomain(domain) {
|
|
60
|
+
return CONSUMER_EMAIL_DOMAINS.has(domain.trim().toLowerCase());
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=consumerEmailDomains.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consumerEmailDomains.js","sourceRoot":"","sources":["../../src/lib/consumerEmailDomains.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,sBAAsB,GAAwB,IAAI,GAAG,CAAC;IAC1D,WAAW;IACX,gBAAgB;IAChB,WAAW;IACX,aAAa;IACb,aAAa;IACb,UAAU;IACV,UAAU;IACV,UAAU;IACV,cAAc;IACd,WAAW;IACX,gBAAgB;IAChB,aAAa;IACb,eAAe;IACf,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,aAAa;IACb,eAAe;IACf,UAAU;IACV,YAAY;IACZ,SAAS;IACT,SAAS;IACT,SAAS;IACT,YAAY;IACZ,QAAQ;IACR,SAAS;IACT,gBAAgB;IAChB,WAAW;IACX,OAAO;IACP,SAAS;IACT,SAAS;IACT,QAAQ;IACR,UAAU;IACV,cAAc;IACd,aAAa;IACb,UAAU;IACV,YAAY;IACZ,WAAW;IACX,cAAc;IACd,SAAS;IACT,QAAQ;IACR,SAAS;IACT,SAAS;IACT,WAAW;CACZ,CAAC,CAAA;AAEF,MAAM,UAAU,qBAAqB,CAAC,MAAc;IAClD,OAAO,sBAAsB,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;AAChE,CAAC"}
|
package/dist/lib/email.d.ts
CHANGED
|
@@ -18,7 +18,14 @@ import type { Logger } from './logger.ts';
|
|
|
18
18
|
export interface EmailMessage {
|
|
19
19
|
readonly to: string;
|
|
20
20
|
readonly subject: string;
|
|
21
|
+
/** The plaintext part. Always present: text-only clients and logs read it. */
|
|
21
22
|
readonly body: string;
|
|
23
|
+
/**
|
|
24
|
+
* The HTML alternative, rendered by `lib/emailContent.ts`. Optional so
|
|
25
|
+
* provider modules written against the older port keep compiling and a
|
|
26
|
+
* plain-text message stays expressible.
|
|
27
|
+
*/
|
|
28
|
+
readonly html?: string;
|
|
22
29
|
}
|
|
23
30
|
export interface EmailSender {
|
|
24
31
|
send(message: EmailMessage): Promise<void>;
|
package/dist/lib/email.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/lib/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/lib/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC3C;AAED,eAAO,MAAM,iBAAiB;;;iBAS5B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAa9E"}
|
package/dist/lib/email.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.js","sourceRoot":"","sources":["../../src/lib/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"email.js","sourceRoot":"","sources":["../../src/lib/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAqCvB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC;;;;;OAKG;IACH,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC9B,CAAC,CAAA;AAIF;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAc,EAAE,IAAY;IAC/D,OAAO;QACL,IAAI,CAAC,OAAO;YACV,MAAM,CAAC,IAAI,CAAC,+CAA+C,EAAE;gBAC3D,IAAI;gBACJ,EAAE,EAAE,OAAO,CAAC,EAAE;gBACd,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,IAAI,EAAE,OAAO,CAAC,IAAI;aACnB,CAAC,CAAA;YAEF,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;QAC1B,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renders transactional mail bodies: a plaintext part and an HTML part from
|
|
3
|
+
* one description of the message.
|
|
4
|
+
*
|
|
5
|
+
* Email clients need table-based, inline-styled HTML; mailgen owns that
|
|
6
|
+
* problem so Kelpie does not. The plaintext part is built here by hand rather
|
|
7
|
+
* than by mailgen's plaintext generator, because that generator pads lines
|
|
8
|
+
* with trailing whitespace and the plaintext body is the part tests and
|
|
9
|
+
* text-only clients read token links out of. The wording of the two parts
|
|
10
|
+
* comes from the same fields, so they cannot drift.
|
|
11
|
+
*/
|
|
12
|
+
/** A link the message asks the reader to follow, rendered as a button in HTML. */
|
|
13
|
+
export interface EmailAction {
|
|
14
|
+
readonly instructions: string;
|
|
15
|
+
readonly buttonText: string;
|
|
16
|
+
readonly link: string;
|
|
17
|
+
}
|
|
18
|
+
export interface EmailContent {
|
|
19
|
+
readonly intro?: string;
|
|
20
|
+
readonly action?: EmailAction;
|
|
21
|
+
readonly outro?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface RenderedEmail {
|
|
24
|
+
readonly text: string;
|
|
25
|
+
readonly html: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Renders one transactional message. `appBaseUrl` becomes the link on the
|
|
29
|
+
* product name in the header and footer, so every part of the mail points at
|
|
30
|
+
* the deployment that sent it.
|
|
31
|
+
*/
|
|
32
|
+
export declare function renderEmail(content: EmailContent, appBaseUrl: string): RenderedEmail;
|
|
33
|
+
//# sourceMappingURL=emailContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emailContent.d.ts","sourceRoot":"","sources":["../../src/lib/emailContent.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,kFAAkF;AAClF,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AASD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,GAAG,aAAa,CA8CpF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import Mailgen from 'mailgen';
|
|
2
|
+
/**
|
|
3
|
+
* Fixed so rendering is deterministic. Mailgen's default footer stamps the
|
|
4
|
+
* current year, which the sender has no claim to: the workspace, not Kelpie,
|
|
5
|
+
* owns the relationship with the recipient.
|
|
6
|
+
*/
|
|
7
|
+
const FOOTER_LINE = 'Sent by Kelpie.';
|
|
8
|
+
/**
|
|
9
|
+
* Renders one transactional message. `appBaseUrl` becomes the link on the
|
|
10
|
+
* product name in the header and footer, so every part of the mail points at
|
|
11
|
+
* the deployment that sent it.
|
|
12
|
+
*/
|
|
13
|
+
export function renderEmail(content, appBaseUrl) {
|
|
14
|
+
const generator = new Mailgen({
|
|
15
|
+
theme: 'default',
|
|
16
|
+
product: {
|
|
17
|
+
name: 'Kelpie',
|
|
18
|
+
link: appBaseUrl,
|
|
19
|
+
copyright: FOOTER_LINE,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
const html = generator.generate({
|
|
23
|
+
body: {
|
|
24
|
+
greeting: false,
|
|
25
|
+
signature: false,
|
|
26
|
+
...(content.intro === undefined ? {} : { intro: content.intro }),
|
|
27
|
+
...(content.action === undefined
|
|
28
|
+
? {}
|
|
29
|
+
: {
|
|
30
|
+
action: {
|
|
31
|
+
instructions: content.action.instructions,
|
|
32
|
+
button: {
|
|
33
|
+
text: content.action.buttonText,
|
|
34
|
+
link: content.action.link,
|
|
35
|
+
fallback: true,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
}),
|
|
39
|
+
...(content.outro === undefined ? {} : { outro: content.outro }),
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
const paragraphs = [];
|
|
43
|
+
if (content.intro !== undefined) {
|
|
44
|
+
paragraphs.push(content.intro);
|
|
45
|
+
}
|
|
46
|
+
if (content.action !== undefined) {
|
|
47
|
+
paragraphs.push(`${content.action.instructions}\n\n${content.action.link}`);
|
|
48
|
+
}
|
|
49
|
+
if (content.outro !== undefined) {
|
|
50
|
+
paragraphs.push(content.outro);
|
|
51
|
+
}
|
|
52
|
+
return { text: paragraphs.join('\n\n'), html };
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=emailContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emailContent.js","sourceRoot":"","sources":["../../src/lib/emailContent.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAgC7B;;;;GAIG;AACH,MAAM,WAAW,GAAG,iBAAiB,CAAA;AAErC;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,OAAqB,EAAE,UAAkB;IACnE,MAAM,SAAS,GAAG,IAAI,OAAO,CAAC;QAC5B,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE,WAAW;SACvB;KACF,CAAC,CAAA;IAEF,MAAM,IAAI,GAAW,SAAS,CAAC,QAAQ,CAAC;QACtC,IAAI,EAAE;YACJ,QAAQ,EAAE,KAAK;YACf,SAAS,EAAE,KAAK;YAChB,GAAG,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;YAChE,GAAG,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS;gBAC9B,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC;oBACE,MAAM,EAAE;wBACN,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY;wBACzC,MAAM,EAAE;4BACN,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU;4BAC/B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI;4BACzB,QAAQ,EAAE,IAAI;yBACf;qBACF;iBACF,CAAC;YACN,GAAG,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;SACjE;KACF,CAAC,CAAA;IAEF,MAAM,UAAU,GAAa,EAAE,CAAA;IAE/B,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QAChC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAChC,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QACjC,UAAU,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;IAC7E,CAAC;IAED,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QAChC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAChC,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAA;AAChD,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IdFactory } from './ids.ts';
|
|
2
|
+
import type { BufferedEvents, Transaction } from '../runtime/transaction.ts';
|
|
3
|
+
import type { ActivityRecorder } from '../modules/activities/recorder.ts';
|
|
4
|
+
import type { CompanyRecord } from '../modules/companies/repository.ts';
|
|
5
|
+
import type { PersonRecord } from '../modules/people/repository.ts';
|
|
6
|
+
import '../modules/positions/events.ts';
|
|
7
|
+
export interface AutoLinkDependencies {
|
|
8
|
+
readonly createId: IdFactory;
|
|
9
|
+
readonly now: () => Date;
|
|
10
|
+
readonly recordActivity: ActivityRecorder;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Considers `person` for a matching Company in `workspaceId` and inserts a
|
|
14
|
+
* titleless Position if none links them yet.
|
|
15
|
+
*
|
|
16
|
+
* @returns The new Position's id, or `undefined` if nothing was written.
|
|
17
|
+
*/
|
|
18
|
+
export declare function autoLinkPersonByEmailDomain(tx: Transaction, events: BufferedEvents, workspaceId: string, person: PersonRecord, dependencies: AutoLinkDependencies): Promise<string | undefined>;
|
|
19
|
+
/**
|
|
20
|
+
* Sweeps every Person in `workspaceId` whose email domain matches `company`'s
|
|
21
|
+
* domain and stubs a Position where none exists yet. Called when a Company is
|
|
22
|
+
* created or its domain is set.
|
|
23
|
+
*
|
|
24
|
+
* @returns The ids of every Position this call inserted.
|
|
25
|
+
*/
|
|
26
|
+
export declare function autoLinkCompanyByDomain(tx: Transaction, events: BufferedEvents, workspaceId: string, company: CompanyRecord, dependencies: AutoLinkDependencies): Promise<readonly string[]>;
|
|
27
|
+
//# sourceMappingURL=emailDomainAutoLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emailDomainAutoLink.d.ts","sourceRoot":"","sources":["../../src/lib/emailDomainAutoLink.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAe,MAAM,mCAAmC,CAAA;AAGtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAEvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,gCAAgC,CAAA;AAwBvC,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,IAAI,CAAA;IACxB,QAAQ,CAAC,cAAc,EAAE,gBAAgB,CAAA;CAC1C;AAED;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,EAAE,EAAE,WAAW,EACf,MAAM,EAAE,cAAc,EACtB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,oBAAoB,GACjC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA0B7B;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAC3C,EAAE,EAAE,WAAW,EACf,MAAM,EAAE,cAAc,EACtB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,aAAa,EACtB,YAAY,EAAE,oBAAoB,GACjC,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAyB5B"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { UNIQUE_VIOLATION, postgresErrorCode } from './database.js';
|
|
2
|
+
import { isConsumerEmailDomain } from './consumerEmailDomains.js';
|
|
3
|
+
import { describeLink } from '../modules/activities/wording.js';
|
|
4
|
+
import * as companyRepository from '../modules/companies/repository.js';
|
|
5
|
+
import * as peopleRepository from '../modules/people/repository.js';
|
|
6
|
+
import '../modules/positions/events.js';
|
|
7
|
+
import * as positionRepository from '../modules/positions/repository.js';
|
|
8
|
+
/**
|
|
9
|
+
* Auto-link a Person to a workspace Company whose domain matches the person's
|
|
10
|
+
* email. Runs inside the caller's transaction, so the new Position is present
|
|
11
|
+
* in the response the API returns for the same request.
|
|
12
|
+
*
|
|
13
|
+
* Skips: no email, consumer email host (`isConsumerEmailDomain`), no Company
|
|
14
|
+
* on that domain in the workspace, or a Position already linking the two. A
|
|
15
|
+
* unique-key race with a concurrent linker is absorbed.
|
|
16
|
+
*
|
|
17
|
+
* The created Position carries an empty title. `positions.title` is `NOT NULL`,
|
|
18
|
+
* and empty reads honestly as "the domain matched; no title yet".
|
|
19
|
+
*
|
|
20
|
+
* Split from the people service so the layering (people below positions) is
|
|
21
|
+
* carried by imports only: this helper depends on both repositories, and the
|
|
22
|
+
* people service depends on this helper. The `positions` module still owns the
|
|
23
|
+
* event catalogue for the emitted event.
|
|
24
|
+
*/
|
|
25
|
+
/** What the timeline calls this side effect. */
|
|
26
|
+
const LINKER_ACTOR = { kind: 'system', label: 'Email domain match' };
|
|
27
|
+
/**
|
|
28
|
+
* Considers `person` for a matching Company in `workspaceId` and inserts a
|
|
29
|
+
* titleless Position if none links them yet.
|
|
30
|
+
*
|
|
31
|
+
* @returns The new Position's id, or `undefined` if nothing was written.
|
|
32
|
+
*/
|
|
33
|
+
export async function autoLinkPersonByEmailDomain(tx, events, workspaceId, person, dependencies) {
|
|
34
|
+
if (person.email === null) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
const at = person.email.indexOf('@');
|
|
38
|
+
if (at < 0) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
const domain = person.email.slice(at + 1);
|
|
42
|
+
if (domain.length === 0 || isConsumerEmailDomain(domain)) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
const company = await companyRepository.findCompanyByDomain(tx, workspaceId, domain);
|
|
46
|
+
if (company === undefined) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
const held = await positionRepository.listPositionsAt(tx, workspaceId, person.id, company.id);
|
|
50
|
+
if (held.length > 0) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
return insertStubPosition(tx, events, workspaceId, person, company, dependencies);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Sweeps every Person in `workspaceId` whose email domain matches `company`'s
|
|
57
|
+
* domain and stubs a Position where none exists yet. Called when a Company is
|
|
58
|
+
* created or its domain is set.
|
|
59
|
+
*
|
|
60
|
+
* @returns The ids of every Position this call inserted.
|
|
61
|
+
*/
|
|
62
|
+
export async function autoLinkCompanyByDomain(tx, events, workspaceId, company, dependencies) {
|
|
63
|
+
if (company.domain === null || company.domain.length === 0) {
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
if (isConsumerEmailDomain(company.domain)) {
|
|
67
|
+
return [];
|
|
68
|
+
}
|
|
69
|
+
const matches = await peopleRepository.findPeopleByEmailDomain(tx, workspaceId, company.domain);
|
|
70
|
+
const created = [];
|
|
71
|
+
for (const person of matches) {
|
|
72
|
+
const held = await positionRepository.listPositionsAt(tx, workspaceId, person.id, company.id);
|
|
73
|
+
if (held.length > 0) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
const id = await insertStubPosition(tx, events, workspaceId, person, company, dependencies);
|
|
77
|
+
if (id !== undefined) {
|
|
78
|
+
created.push(id);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return created;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The write half. Wraps the unique-constraint race the two entry points share:
|
|
85
|
+
* a concurrent linker that beat us to `(personId, companyId, '')` is treated
|
|
86
|
+
* as success (the link is there, either way).
|
|
87
|
+
*/
|
|
88
|
+
async function insertStubPosition(tx, events, workspaceId, person, company, dependencies) {
|
|
89
|
+
try {
|
|
90
|
+
const created = await positionRepository.insertPosition(tx, {
|
|
91
|
+
id: dependencies.createId('position'),
|
|
92
|
+
workspaceId,
|
|
93
|
+
personId: person.id,
|
|
94
|
+
companyId: company.id,
|
|
95
|
+
title: '',
|
|
96
|
+
});
|
|
97
|
+
await dependencies.recordActivity(tx, workspaceId, LINKER_ACTOR, {
|
|
98
|
+
targetType: 'person',
|
|
99
|
+
targetId: person.id,
|
|
100
|
+
kind: 'linked',
|
|
101
|
+
...describeLink('company', company.name),
|
|
102
|
+
});
|
|
103
|
+
await dependencies.recordActivity(tx, workspaceId, LINKER_ACTOR, {
|
|
104
|
+
targetType: 'company',
|
|
105
|
+
targetId: company.id,
|
|
106
|
+
kind: 'linked',
|
|
107
|
+
...describeLink('person', person.name),
|
|
108
|
+
});
|
|
109
|
+
events.emit('positions.position.created', { type: 'position', id: created.id }, {});
|
|
110
|
+
return created.id;
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
if (postgresErrorCode(error) === UNIQUE_VIOLATION) {
|
|
114
|
+
return undefined;
|
|
115
|
+
}
|
|
116
|
+
throw error;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=emailDomainAutoLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emailDomainAutoLink.js","sourceRoot":"","sources":["../../src/lib/emailDomainAutoLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAC/D,OAAO,KAAK,iBAAiB,MAAM,oCAAoC,CAAA;AAEvE,OAAO,KAAK,gBAAgB,MAAM,iCAAiC,CAAA;AAEnE,OAAO,gCAAgC,CAAA;AACvC,OAAO,KAAK,kBAAkB,MAAM,oCAAoC,CAAA;AAExE;;;;;;;;;;;;;;;;GAgBG;AAEH,gDAAgD;AAChD,MAAM,YAAY,GAAgB,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAA;AAQjF;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,EAAe,EACf,MAAsB,EACtB,WAAmB,EACnB,MAAoB,EACpB,YAAkC;IAElC,IAAI,MAAM,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;QAC1B,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IACpC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QACX,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,C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B,QAAQ,EAAE,OAAO,CAAC,EAAE;YACpB,IAAI,EAAE,QAAQ;YACd,GAAG,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;SACvC,CAAC,CAAA;QAEF,MAAM,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;QAEnF,OAAO,OAAO,CAAC,EAAE,CAAA;IACnB,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,IAAI,iBAAiB,CAAC,KAAK,CAAC,KAAK,gBAAgB,EAAE,CAAC;YAClD,OAAO,SAAS,CAAA;QAClB,CAAC;QACD,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC"}
|
package/dist/lib/ids.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare const idPrefixes: {
|
|
|
17
17
|
readonly position: 'pos';
|
|
18
18
|
readonly pipelineStage: 'stage';
|
|
19
19
|
readonly deal: 'deal';
|
|
20
|
+
readonly enquiry: 'enq';
|
|
20
21
|
readonly opportunity: 'opp';
|
|
21
22
|
readonly partnership: 'prt';
|
|
22
23
|
readonly raise: 'rse';
|
|
@@ -26,7 +27,19 @@ export declare const idPrefixes: {
|
|
|
26
27
|
readonly decision: 'dec';
|
|
27
28
|
readonly note: 'note';
|
|
28
29
|
readonly activity: 'act';
|
|
30
|
+
readonly list: 'list';
|
|
31
|
+
readonly listMember: 'lmem';
|
|
32
|
+
/**
|
|
33
|
+
* Never returns over the wire either: `person_links` has no routes of its
|
|
34
|
+
* own — the link surfaces as a `person_ids` array on each pipeline record —
|
|
35
|
+
* so the prefix is not in `api.md`'s public prefix table, matching `idem`
|
|
36
|
+
* and `rl`. It still comes from this factory rather than a bare ULID call,
|
|
37
|
+
* so every id in the database is generated the same, injectable way.
|
|
38
|
+
*/
|
|
39
|
+
readonly personLink: 'plink';
|
|
29
40
|
readonly handbookPage: 'hb';
|
|
41
|
+
readonly customFieldDefinition: 'fld';
|
|
42
|
+
readonly consentPurpose: 'cnp';
|
|
30
43
|
readonly form: 'form';
|
|
31
44
|
readonly formField: 'ff';
|
|
32
45
|
readonly formSubmission: 'sub';
|
package/dist/lib/ids.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../src/lib/ids.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,UAAU;aACrB,SAAS,EAAE,IAAI;aACf,IAAI,EAAE,KAAK;aACX,OAAO,EAAE,KAAK;aACd,kBAAkB,EAAE,KAAK;IACzB,wFAAwF;aACxF,sBAAsB,EAAE,KAAK;aAC7B,UAAU,EAAE,KAAK;aACjB,MAAM,EAAE,KAAK;aACb,MAAM,EAAE,KAAK;aACb,MAAM,EAAE,KAAK;aACb,OAAO,EAAE,KAAK;aACd,QAAQ,EAAE,KAAK;aACf,aAAa,EAAE,OAAO;aACtB,IAAI,EAAE,MAAM;aACZ,WAAW,EAAE,KAAK;aAClB,WAAW,EAAE,KAAK;aAClB,KAAK,EAAE,KAAK;aACZ,IAAI,EAAE,MAAM;aACZ,SAAS,EAAE,MAAM;aACjB,QAAQ,EAAE,MAAM;aAChB,QAAQ,EAAE,KAAK;aACf,IAAI,EAAE,MAAM;aACZ,QAAQ,EAAE,KAAK;aACf,YAAY,EAAE,IAAI;aAClB,IAAI,EAAE,MAAM;aACZ,SAAS,EAAE,IAAI;aACf,cAAc,EAAE,KAAK;aACrB,OAAO,EAAE,IAAI;IACb,8EAA8E;aAC9E,eAAe,EAAE,KAAK;aACtB,iBAAiB,EAAE,IAAI;aACvB,QAAQ,EAAE,KAAK;aACf,SAAS,EAAE,KAAK;IAChB,6FAA6F;aAC7F,aAAa,EAAE,MAAM;IACrB;;;;;OAKG;aACH,cAAc,EAAE,MAAM;IACtB;;;OAGG;aACH,eAAe,EAAE,IAAI;IACrB;;;;OAIG;aACH,KAAK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,EAAE,IAAI;aACvB,QAAQ,EAAE,KAAK;aACf,SAAS,EAAE,KAAK;IAChB,6FAA6F;aAC7F,aAAa,EAAE,MAAM;IACrB;;;;;OAKG;aACH,cAAc,EAAE,MAAM;IACtB;;;OAGG;aACH,eAAe,EAAE,IAAI;IACrB;;;;OAIG;aACH,KAAK,EAAE,IAAI;CACH,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,UAAU,CAAA;AAEhD,MAAM,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,UAAU,KAAK,MAAM,CAAA;AAEpD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,YAAY,GAAE,MAAM,MAAa,GAAG,SAAS,CAE5E"}
|
package/dist/lib/ids.js
CHANGED
|
@@ -18,6 +18,7 @@ export const idPrefixes = {
|
|
|
18
18
|
position: 'pos',
|
|
19
19
|
pipelineStage: 'stage',
|
|
20
20
|
deal: 'deal',
|
|
21
|
+
enquiry: 'enq',
|
|
21
22
|
opportunity: 'opp',
|
|
22
23
|
partnership: 'prt',
|
|
23
24
|
raise: 'rse',
|
|
@@ -27,7 +28,19 @@ export const idPrefixes = {
|
|
|
27
28
|
decision: 'dec',
|
|
28
29
|
note: 'note',
|
|
29
30
|
activity: 'act',
|
|
31
|
+
list: 'list',
|
|
32
|
+
listMember: 'lmem',
|
|
33
|
+
/**
|
|
34
|
+
* Never returns over the wire either: `person_links` has no routes of its
|
|
35
|
+
* own — the link surfaces as a `person_ids` array on each pipeline record —
|
|
36
|
+
* so the prefix is not in `api.md`'s public prefix table, matching `idem`
|
|
37
|
+
* and `rl`. It still comes from this factory rather than a bare ULID call,
|
|
38
|
+
* so every id in the database is generated the same, injectable way.
|
|
39
|
+
*/
|
|
40
|
+
personLink: 'plink',
|
|
30
41
|
handbookPage: 'hb',
|
|
42
|
+
customFieldDefinition: 'fld',
|
|
43
|
+
consentPurpose: 'cnp',
|
|
31
44
|
form: 'form',
|
|
32
45
|
formField: 'ff',
|
|
33
46
|
formSubmission: 'sub',
|
package/dist/lib/ids.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../../src/lib/ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,KAAK;IACX,OAAO,EAAE,KAAK;IACd,kBAAkB,EAAE,KAAK;IACzB,wFAAwF;IACxF,sBAAsB,EAAE,KAAK;IAC7B,UAAU,EAAE,KAAK;IACjB,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,KAAK;IACf,aAAa,EAAE,OAAO;IACtB,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,KAAK;IAClB,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,KAAK;IACf,YAAY,EAAE,IAAI;IAClB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,IAAI;IACf,cAAc,EAAE,KAAK;IACrB,OAAO,EAAE,IAAI;IACb,8EAA8E;IAC9E,eAAe,EAAE,KAAK;IACtB,iBAAiB,EAAE,IAAI;IACvB,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,KAAK;IAChB,6FAA6F;IAC7F,aAAa,EAAE,MAAM;IACrB;;;;;OAKG;IACH,cAAc,EAAE,MAAM;IACtB;;;OAGG;IACH,eAAe,EAAE,IAAI;IACrB;;;;OAIG;IACH,KAAK,EAAE,IAAI;CACH,CAAA;AAMV;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,YAAY,GAAiB,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,KAAK;IAChB,6FAA6F;IAC7F,aAAa,EAAE,MAAM;IACrB;;;;;OAKG;IACH,cAAc,EAAE,MAAM;IACtB;;;OAGG;IACH,eAAe,EAAE,IAAI;IACrB;;;;OAIG;IACH,KAAK,EAAE,IAAI;CACH,CAAA;AAMV;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,YAAY,GAAiB,IAAI;IAC/D,OAAO,CAAC,IAAgB,EAAU,EAAE,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,YAAY,EAAE,EAAE,CAAA;AAC9E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../src/modules/activities/repository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../src/modules/activities/repository.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAM7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,MAAM,MAAM,cAAc,GAAG,OAAO,UAAU,CAAC,YAAY,CAAA;AAE3D,wGAAwG;AACxG,MAAM,MAAM,eAAe,GAAG,OAAO,UAAU,CAAC,YAAY,CAAA;AAE5D;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,cAAc,CAEzD,CAAA;AAED,eAAO,MAAM,qBAAqB,gBAAgB,CAAA;AAElD,iEAAiE;AACjE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAA;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B;AAED,wBAAsB,cAAc,CAClC,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,cAAc,CAAC,CAQzB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,mBAAmB,CACvC,EAAE,EAAE,SAAS,EACb,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,gBAAgB,EAC5B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,cAAc,EAAE,CAAC,CA6C3B;AA2BD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,EAAE,EAAE,SAAS,EACb,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,MAAM,EAAE,UAAU,CAAC,cAAc,CAAC,GACjC,OAAO,CAAC,cAAc,EAAE,CAAC,CAa3B;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,EAAE,EAAE,SAAS,EACb,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,CAajB"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { and, eq, inArray, or, sql } from 'drizzle-orm';
|
|
2
2
|
import { keysetCondition, orderByWindow, timestampSort } from '../../lib/pagination.js';
|
|
3
|
-
import {
|
|
3
|
+
import { deals } from '../deals/schema.js';
|
|
4
|
+
import { enquiries } from '../enquiries/schema.js';
|
|
4
5
|
import { opportunities } from '../opportunities/schema.js';
|
|
5
|
-
import {
|
|
6
|
+
import { partnerships } from '../partnerships/schema.js';
|
|
7
|
+
import * as personLinks from '../personLinks.js';
|
|
6
8
|
import { activities } from './schema.js';
|
|
7
9
|
/**
|
|
8
10
|
* Only `created_at`. An activity carries no other non-nullable value worth
|
|
@@ -36,7 +38,7 @@ export async function insertActivity(db, values) {
|
|
|
36
38
|
*/
|
|
37
39
|
export async function listRolledUpTargets(db, workspaceId, targetType, targetId) {
|
|
38
40
|
if (targetType === 'company') {
|
|
39
|
-
const [dealRows, opportunityRows, partnershipRows] = await Promise.all([
|
|
41
|
+
const [dealRows, opportunityRows, partnershipRows, enquiryRows] = await Promise.all([
|
|
40
42
|
db
|
|
41
43
|
.select({ id: deals.id })
|
|
42
44
|
.from(deals)
|
|
@@ -49,31 +51,28 @@ export async function listRolledUpTargets(db, workspaceId, targetType, targetId)
|
|
|
49
51
|
.select({ id: partnerships.id })
|
|
50
52
|
.from(partnerships)
|
|
51
53
|
.where(and(eq(partnerships.workspaceId, workspaceId), eq(partnerships.companyId, targetId))),
|
|
54
|
+
db
|
|
55
|
+
.select({ id: enquiries.id })
|
|
56
|
+
.from(enquiries)
|
|
57
|
+
.where(and(eq(enquiries.workspaceId, workspaceId), eq(enquiries.companyId, targetId))),
|
|
52
58
|
]);
|
|
53
59
|
return [
|
|
54
60
|
...dealRows.map((row) => ({ targetType: 'deal', targetId: row.id })),
|
|
55
61
|
...opportunityRows.map((row) => ({ targetType: 'opportunity', targetId: row.id })),
|
|
56
62
|
...partnershipRows.map((row) => ({ targetType: 'partnership', targetId: row.id })),
|
|
63
|
+
...enquiryRows.map((row) => ({ targetType: 'enquiry', targetId: row.id })),
|
|
57
64
|
];
|
|
58
65
|
}
|
|
59
66
|
if (targetType === 'person') {
|
|
60
|
-
//
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
.from(partnerships)
|
|
70
|
-
.innerJoin(partnershipPeople, eq(partnershipPeople.partnershipId, partnerships.id))
|
|
71
|
-
.where(and(eq(partnerships.workspaceId, workspaceId), eq(partnershipPeople.personId, targetId))),
|
|
72
|
-
]);
|
|
73
|
-
return [
|
|
74
|
-
...dealRows.map((row) => ({ targetType: 'deal', targetId: row.id })),
|
|
75
|
-
...partnershipRows.map((row) => ({ targetType: 'partnership', targetId: row.id })),
|
|
76
|
-
];
|
|
67
|
+
// person_links carries all four pipeline kinds in one table, so a person's
|
|
68
|
+
// roll-up is one read regardless of how many pipelines they touch. The
|
|
69
|
+
// shared helper's `PipelineKind` narrows to the check-constraint set, which
|
|
70
|
+
// is exactly what an ActivityTarget expects to receive.
|
|
71
|
+
const links = await personLinks.listTargetsOfPerson(db, workspaceId, targetId);
|
|
72
|
+
return links.map((link) => ({
|
|
73
|
+
targetType: link.targetType,
|
|
74
|
+
targetId: link.targetId,
|
|
75
|
+
}));
|
|
77
76
|
}
|
|
78
77
|
return [];
|
|
79
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.js","sourceRoot":"","sources":["../../../src/modules/activities/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"repository.js","sourceRoot":"","sources":["../../../src/modules/activities/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAKvD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAGvF,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAOxC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAmC;IAC5D,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC;CAClF,CAAA;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAA;AA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WAAW,EAAE,WAAW,CAAC,EACvC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAC7D,eAAe,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC,CACvC,CACF;SACA,OAAO,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;SAChD,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;AAC7B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,EAAa,EACb,WAAmB,EACnB,UAAkB,EAClB,QAAgB;IAEhB,MAAM,OAAO,GAAG,MAAM,EAAE;SACrB,MAAM,CAAC,UAAU,CAAC;SAClB,KAAK,CACJ,GAAG,CACD,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,WAAW,CAAC,EACvC,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,EACrC,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAClC,CACF;SACA,SAAS,CAAC,EAAE,EAAE,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC,CAAA;IAEnC,OAAO,OAAO,CAAC,MAAM,CAAA;AACvB,CAAC"}
|
|
@@ -68,6 +68,18 @@ export declare function describeLink(relatedLabel: string, relatedName: string):
|
|
|
68
68
|
export declare function describeUnlink(relatedLabel: string, relatedName: string): ActivityWording;
|
|
69
69
|
/** `moved to Proposal`, with where it came from beneath. */
|
|
70
70
|
export declare function describeStageChange(fromStage: string, toStage: string): ActivityWording;
|
|
71
|
+
/**
|
|
72
|
+
* `converted to Deal`, with the deal's name beneath it. Files on the enquiry;
|
|
73
|
+
* the deal's own timeline gets `created Deal from Enquiry` via
|
|
74
|
+
* `describeCreationFrom`.
|
|
75
|
+
*/
|
|
76
|
+
export declare function describeConversion(objectLabel: string, name: string): ActivityWording;
|
|
77
|
+
/**
|
|
78
|
+
* `created Deal from Enquiry`, with the source record's name beneath it. Mirror
|
|
79
|
+
* of `describeCreationVia` but the source is another CRM record rather than a
|
|
80
|
+
* form or import file.
|
|
81
|
+
*/
|
|
82
|
+
export declare function describeCreationFrom(objectLabel: string, sourceLabel: string, sourceName: string): ActivityWording;
|
|
71
83
|
/**
|
|
72
84
|
* `added a note`, with the opening of the note beneath it.
|
|
73
85
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wording.d.ts","sourceRoot":"","sources":["../../../src/modules/activities/wording.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,sDAAsD;AACtD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B;AAED,2FAA2F;AAC3F,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;AAkC1D,2CAA2C;AAC3C,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,eAAe,CAErE;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,eAAe,CAEhG;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,eAAe,CAE5F;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,eAAe,CAE1F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAA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E,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,eAAe,CAE1F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACzC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACvC,eAAe,CAiBjB;AAED,+DAA+D;AAC/D,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,eAAe,CAEvF;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,eAAe,CAEzF;AAED,4DAA4D;AAC5D,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,eAAe,CAEvF;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,eAAe,CAErF;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,eAAe,CAElH;AAKD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAQ1D"}
|
|
@@ -115,6 +115,22 @@ export function describeUnlink(relatedLabel, relatedName) {
|
|
|
115
115
|
export function describeStageChange(fromStage, toStage) {
|
|
116
116
|
return { action: `moved to ${toStage}`, detail: `${fromStage} → ${toStage}` };
|
|
117
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* `converted to Deal`, with the deal's name beneath it. Files on the enquiry;
|
|
120
|
+
* the deal's own timeline gets `created Deal from Enquiry` via
|
|
121
|
+
* `describeCreationFrom`.
|
|
122
|
+
*/
|
|
123
|
+
export function describeConversion(objectLabel, name) {
|
|
124
|
+
return { action: `converted to ${objectLabel}`, detail: name };
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* `created Deal from Enquiry`, with the source record's name beneath it. Mirror
|
|
128
|
+
* of `describeCreationVia` but the source is another CRM record rather than a
|
|
129
|
+
* form or import file.
|
|
130
|
+
*/
|
|
131
|
+
export function describeCreationFrom(objectLabel, sourceLabel, sourceName) {
|
|
132
|
+
return { action: `created ${objectLabel} from ${sourceLabel}`, detail: sourceName };
|
|
133
|
+
}
|
|
118
134
|
/** How much of a note's body the timeline repeats before trailing off. */
|
|
119
135
|
const NOTE_EXCERPT_LENGTH = 120;
|
|
120
136
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wording.js","sourceRoot":"","sources":["../../../src/modules/activities/wording.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAWH;;;;;;;GAOG;AACH,SAAS,SAAS,CAAC,KAAc;IAC/B,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,OAAO,MAAM,CAAA;IACf,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA;IAC5C,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;QAC5D,OAAO,MAAM,CAAC,KAAK,CAAC,CAAA;IACtB,CAAC;IAED,IAAI,KAAK,YAAY,IAAI,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC,WAAW,EAAE,CAAA;IAC5B,CAAC;IAED,OAAO,SAAS,CAAA;AAClB,CAAC;AAED,SAAS,QAAQ,CAAC,MAAmB,EAAE,KAAa;IAClD,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,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AAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAA;AAClF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/modules/agent-tasks/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAE/E;;;;;;;;GAQG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,2dAMmB,CAAA;AAUnD,eAAO,MAAM,sBAAsB,EAAE,SAAS,mBAAmB,
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/modules/agent-tasks/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAE/E;;;;;;;;GAQG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,2dAMmB,CAAA;AAUnD,eAAO,MAAM,sBAAsB,EAAE,SAAS,mBAAmB,EAiuBhE,CAAA;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAEpE;AAED,wBAAgB,QAAQ,CAAC,UAAU,EAAE,mBAAmB,GAAG,SAAS,mBAAmB,EAAE,CAExF"}
|