@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,39 @@
|
|
|
1
|
+
import type { Database } from '../../lib/database.ts';
|
|
2
|
+
import type { IdFactory } from '../../lib/ids.ts';
|
|
3
|
+
import type { TransactionScope } from '../../runtime/transaction.ts';
|
|
4
|
+
import type { Actor } from '../auth/actor.ts';
|
|
5
|
+
/**
|
|
6
|
+
* Installs the sample workspace, in one transaction.
|
|
7
|
+
*
|
|
8
|
+
* The whole seed is one write. A failure part-way through rolls the whole
|
|
9
|
+
* thing back, so a workspace never ends up with half of it.
|
|
10
|
+
*
|
|
11
|
+
* Idempotent by refusal: a workspace that already holds any companies or
|
|
12
|
+
* people gets a 409. Installing twice would double the fixture, which is not
|
|
13
|
+
* what an "install once" button says.
|
|
14
|
+
*/
|
|
15
|
+
export interface SampleDataDependencies {
|
|
16
|
+
readonly db: Database;
|
|
17
|
+
readonly transaction: TransactionScope;
|
|
18
|
+
readonly createId: IdFactory;
|
|
19
|
+
readonly now: () => Date;
|
|
20
|
+
}
|
|
21
|
+
export interface SampleDataCounts {
|
|
22
|
+
readonly companies: number;
|
|
23
|
+
readonly people: number;
|
|
24
|
+
readonly positions: number;
|
|
25
|
+
readonly deals: number;
|
|
26
|
+
readonly planItems: number;
|
|
27
|
+
readonly notes: number;
|
|
28
|
+
readonly opportunities: number;
|
|
29
|
+
readonly raises: number;
|
|
30
|
+
readonly partnerships: number;
|
|
31
|
+
readonly enquiries: number;
|
|
32
|
+
readonly roles: number;
|
|
33
|
+
readonly candidates: number;
|
|
34
|
+
}
|
|
35
|
+
export interface SampleDataService {
|
|
36
|
+
install(actor: Actor, workspaceId: string): Promise<SampleDataCounts>;
|
|
37
|
+
}
|
|
38
|
+
export declare function createSampleDataService(dependencies: SampleDataDependencies): SampleDataService;
|
|
39
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/modules/sample-data/service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAErD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAmB7C;;;;;;;;;GASG;AAEH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAA;IACrB,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAA;IACtC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,IAAI,CAAA;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;CACtE;AAED,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,sBAAsB,GAAG,iBAAiB,CAqiB/F"}
|
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
import { and, count, eq, inArray } from 'drizzle-orm';
|
|
2
|
+
import { toEventActor } from '../../lib/actor.js';
|
|
3
|
+
import { AppError } from '../../lib/errors.js';
|
|
4
|
+
import { requireWorkspaceId } from '../auth/actor.js';
|
|
5
|
+
import * as authRepository from '../auth/repository.js';
|
|
6
|
+
import { companies } from '../companies/schema.js';
|
|
7
|
+
import { deals } from '../deals/schema.js';
|
|
8
|
+
import { candidates, roles } from '../hiring/schema.js';
|
|
9
|
+
import { notes } from '../notes/schema.js';
|
|
10
|
+
import { enquiries } from '../enquiries/schema.js';
|
|
11
|
+
import { opportunities } from '../opportunities/schema.js';
|
|
12
|
+
import { partnerships } from '../partnerships/schema.js';
|
|
13
|
+
import { people, personLinks } from '../people/schema.js';
|
|
14
|
+
import { pipelineStages } from '../pipelines/schema.js';
|
|
15
|
+
import { planItems } from '../plans/schema.js';
|
|
16
|
+
import { positions } from '../positions/schema.js';
|
|
17
|
+
import { raises } from '../raises/schema.js';
|
|
18
|
+
import { parseMemberRole, roleAllows } from '../workspace/roles.js';
|
|
19
|
+
import { SAMPLE_DATA_FIXTURE } from './fixture.js';
|
|
20
|
+
export function createSampleDataService(dependencies) {
|
|
21
|
+
async function requireAdmin(actor, workspaceId) {
|
|
22
|
+
if (actor.workspaceId !== workspaceId) {
|
|
23
|
+
throw AppError.notFound('Workspace not found');
|
|
24
|
+
}
|
|
25
|
+
if (actor.kind === 'api_key' && actor.userId === null) {
|
|
26
|
+
if (!roleAllows(actor.role, 'admin')) {
|
|
27
|
+
throw new AppError('forbidden', 'This action needs the admin role');
|
|
28
|
+
}
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const userId = actor.userId;
|
|
32
|
+
if (userId === null) {
|
|
33
|
+
throw AppError.notFound('Workspace not found');
|
|
34
|
+
}
|
|
35
|
+
const membership = await authRepository.findMembership(dependencies.db, workspaceId, userId);
|
|
36
|
+
if (membership === undefined) {
|
|
37
|
+
throw AppError.notFound('Workspace not found');
|
|
38
|
+
}
|
|
39
|
+
const role = parseMemberRole(membership.role);
|
|
40
|
+
if (role === undefined) {
|
|
41
|
+
throw new Error(`workspace_members.role holds "${membership.role}", which its check forbids`);
|
|
42
|
+
}
|
|
43
|
+
if (!roleAllows(role, 'admin')) {
|
|
44
|
+
throw new AppError('forbidden', 'This action needs the admin role');
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
async install(actor, workspaceId) {
|
|
49
|
+
// The path parameter must match the actor's workspace, and it must be an
|
|
50
|
+
// admin. `requireWorkspaceId` is what CRM endpoints call to reject an
|
|
51
|
+
// actor with no workspace at all.
|
|
52
|
+
requireWorkspaceId(actor);
|
|
53
|
+
await requireAdmin(actor, workspaceId);
|
|
54
|
+
const fixture = SAMPLE_DATA_FIXTURE;
|
|
55
|
+
return dependencies.transaction(async ({ tx }) => {
|
|
56
|
+
const [companiesTally] = await tx
|
|
57
|
+
.select({ value: count() })
|
|
58
|
+
.from(companies)
|
|
59
|
+
.where(eq(companies.workspaceId, workspaceId));
|
|
60
|
+
const [peopleTally] = await tx
|
|
61
|
+
.select({ value: count() })
|
|
62
|
+
.from(people)
|
|
63
|
+
.where(eq(people.workspaceId, workspaceId));
|
|
64
|
+
const alreadyHasData = (companiesTally?.value ?? 0) > 0 || (peopleTally?.value ?? 0) > 0;
|
|
65
|
+
if (alreadyHasData) {
|
|
66
|
+
throw AppError.conflict('This workspace already has CRM data');
|
|
67
|
+
}
|
|
68
|
+
// Every stage this workspace carries, grouped by kind so a deal, an
|
|
69
|
+
// opportunity, a raise and a partnership all resolve their fixture
|
|
70
|
+
// stage slugs against the same read.
|
|
71
|
+
const allStages = await tx
|
|
72
|
+
.select({
|
|
73
|
+
id: pipelineStages.id,
|
|
74
|
+
slug: pipelineStages.slug,
|
|
75
|
+
kind: pipelineStages.kind,
|
|
76
|
+
})
|
|
77
|
+
.from(pipelineStages)
|
|
78
|
+
.where(and(eq(pipelineStages.workspaceId, workspaceId), inArray(pipelineStages.kind, [
|
|
79
|
+
'deal',
|
|
80
|
+
'opportunity',
|
|
81
|
+
'raise',
|
|
82
|
+
'partnership',
|
|
83
|
+
'enquiry',
|
|
84
|
+
])));
|
|
85
|
+
const stageIdByKindAndSlug = new Map();
|
|
86
|
+
for (const row of allStages) {
|
|
87
|
+
stageIdByKindAndSlug.set(stageLookupKey(row.kind, row.slug), row.id);
|
|
88
|
+
}
|
|
89
|
+
const now = dependencies.now();
|
|
90
|
+
const companyIds = new Map();
|
|
91
|
+
const personIds = new Map();
|
|
92
|
+
const dealIds = new Map();
|
|
93
|
+
const opportunityIds = new Map();
|
|
94
|
+
const raiseIds = new Map();
|
|
95
|
+
const partnershipIds = new Map();
|
|
96
|
+
const enquiryIds = new Map();
|
|
97
|
+
const roleIds = new Map();
|
|
98
|
+
const candidateIds = new Map();
|
|
99
|
+
for (const record of fixture.companies) {
|
|
100
|
+
const id = dependencies.createId('company');
|
|
101
|
+
companyIds.set(record.key, id);
|
|
102
|
+
await tx.insert(companies).values({
|
|
103
|
+
id,
|
|
104
|
+
workspaceId,
|
|
105
|
+
name: record.name,
|
|
106
|
+
domain: record.domain,
|
|
107
|
+
industry: record.industry,
|
|
108
|
+
description: record.description,
|
|
109
|
+
stage: record.stage,
|
|
110
|
+
sizeBand: record.sizeBand,
|
|
111
|
+
hq: record.hq,
|
|
112
|
+
website: record.website,
|
|
113
|
+
accountType: record.accountType,
|
|
114
|
+
icpFit: record.icpFit,
|
|
115
|
+
techStack: [...record.techStack],
|
|
116
|
+
summary: record.summary,
|
|
117
|
+
tags: [...record.tags],
|
|
118
|
+
createdAt: now,
|
|
119
|
+
updatedAt: now,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
for (const record of fixture.people) {
|
|
123
|
+
const id = dependencies.createId('person');
|
|
124
|
+
personIds.set(record.key, id);
|
|
125
|
+
await tx.insert(people).values({
|
|
126
|
+
id,
|
|
127
|
+
workspaceId,
|
|
128
|
+
name: record.name,
|
|
129
|
+
firstName: record.firstName,
|
|
130
|
+
lastName: record.lastName,
|
|
131
|
+
email: record.email,
|
|
132
|
+
location: record.location,
|
|
133
|
+
preferredChannel: record.preferredChannel,
|
|
134
|
+
influence: record.influence,
|
|
135
|
+
relationship: record.relationship,
|
|
136
|
+
summary: record.summary,
|
|
137
|
+
tags: [...record.tags],
|
|
138
|
+
createdAt: now,
|
|
139
|
+
updatedAt: now,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
for (const record of fixture.positions) {
|
|
143
|
+
const personId = personIds.get(record.personKey);
|
|
144
|
+
const companyId = companyIds.get(record.companyKey);
|
|
145
|
+
if (personId === undefined || companyId === undefined) {
|
|
146
|
+
throw new Error(`Sample position links unknown keys: person=${record.personKey}, company=${record.companyKey}`);
|
|
147
|
+
}
|
|
148
|
+
await tx.insert(positions).values({
|
|
149
|
+
id: dependencies.createId('position'),
|
|
150
|
+
workspaceId,
|
|
151
|
+
personId,
|
|
152
|
+
companyId,
|
|
153
|
+
title: record.title,
|
|
154
|
+
createdAt: now,
|
|
155
|
+
updatedAt: now,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
for (const record of fixture.deals) {
|
|
159
|
+
const stageId = stageIdByKindAndSlug.get(stageLookupKey('deal', record.stageSlug));
|
|
160
|
+
const companyId = companyIds.get(record.companyKey);
|
|
161
|
+
if (stageId === undefined) {
|
|
162
|
+
throw new Error(`Sample deal "${record.name}" names stage "${record.stageSlug}", which this workspace's deal pipeline does not carry`);
|
|
163
|
+
}
|
|
164
|
+
if (companyId === undefined) {
|
|
165
|
+
throw new Error(`Sample deal "${record.name}" names unknown company "${record.companyKey}"`);
|
|
166
|
+
}
|
|
167
|
+
const id = dependencies.createId('deal');
|
|
168
|
+
dealIds.set(record.key, id);
|
|
169
|
+
await tx.insert(deals).values({
|
|
170
|
+
id,
|
|
171
|
+
workspaceId,
|
|
172
|
+
name: record.name,
|
|
173
|
+
companyId,
|
|
174
|
+
stageId,
|
|
175
|
+
valueCents: record.valueCents,
|
|
176
|
+
currency: record.currency,
|
|
177
|
+
expectedClose: record.expectedClose,
|
|
178
|
+
competitors: [],
|
|
179
|
+
risks: record.risks,
|
|
180
|
+
whyWin: record.whyWin,
|
|
181
|
+
summary: record.summary,
|
|
182
|
+
tags: [...record.tags],
|
|
183
|
+
createdAt: now,
|
|
184
|
+
updatedAt: now,
|
|
185
|
+
});
|
|
186
|
+
for (const personKey of record.peopleKeys) {
|
|
187
|
+
const personId = personIds.get(personKey);
|
|
188
|
+
if (personId === undefined) {
|
|
189
|
+
throw new Error(`Sample deal "${record.name}" names unknown person "${personKey}"`);
|
|
190
|
+
}
|
|
191
|
+
await tx.insert(personLinks).values({
|
|
192
|
+
id: dependencies.createId('personLink'),
|
|
193
|
+
workspaceId,
|
|
194
|
+
personId,
|
|
195
|
+
targetType: 'deal',
|
|
196
|
+
targetId: id,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
for (const record of fixture.opportunities) {
|
|
201
|
+
const stageId = stageIdByKindAndSlug.get(stageLookupKey('opportunity', record.stageSlug));
|
|
202
|
+
if (stageId === undefined) {
|
|
203
|
+
throw new Error(`Sample opportunity "${record.name}" names stage "${record.stageSlug}", which this workspace's opportunity pipeline does not carry`);
|
|
204
|
+
}
|
|
205
|
+
const companyId = record.companyKey === null ? null : (companyIds.get(record.companyKey) ?? undefined);
|
|
206
|
+
if (companyId === undefined) {
|
|
207
|
+
throw new Error(`Sample opportunity "${record.name}" names unknown company "${String(record.companyKey)}"`);
|
|
208
|
+
}
|
|
209
|
+
const id = dependencies.createId('opportunity');
|
|
210
|
+
opportunityIds.set(record.key, id);
|
|
211
|
+
await tx.insert(opportunities).values({
|
|
212
|
+
id,
|
|
213
|
+
workspaceId,
|
|
214
|
+
name: record.name,
|
|
215
|
+
kind: record.kind,
|
|
216
|
+
stageId,
|
|
217
|
+
companyId,
|
|
218
|
+
expectedClose: record.expectedClose,
|
|
219
|
+
summary: record.summary,
|
|
220
|
+
tags: [...record.tags],
|
|
221
|
+
createdAt: now,
|
|
222
|
+
updatedAt: now,
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
for (const record of fixture.raises) {
|
|
226
|
+
const stageId = stageIdByKindAndSlug.get(stageLookupKey('raise', record.stageSlug));
|
|
227
|
+
const companyId = companyIds.get(record.companyKey);
|
|
228
|
+
if (stageId === undefined) {
|
|
229
|
+
throw new Error(`Sample raise "${record.name}" names stage "${record.stageSlug}", which this workspace's raise pipeline does not carry`);
|
|
230
|
+
}
|
|
231
|
+
if (companyId === undefined) {
|
|
232
|
+
throw new Error(`Sample raise "${record.name}" names unknown company "${record.companyKey}"`);
|
|
233
|
+
}
|
|
234
|
+
const id = dependencies.createId('raise');
|
|
235
|
+
raiseIds.set(record.key, id);
|
|
236
|
+
await tx.insert(raises).values({
|
|
237
|
+
id,
|
|
238
|
+
workspaceId,
|
|
239
|
+
name: record.name,
|
|
240
|
+
companyId,
|
|
241
|
+
stageId,
|
|
242
|
+
checkSizeCents: record.checkSizeCents,
|
|
243
|
+
currency: record.currency,
|
|
244
|
+
thesisFit: record.thesisFit,
|
|
245
|
+
expectedClose: record.expectedClose,
|
|
246
|
+
summary: record.summary,
|
|
247
|
+
tags: [...record.tags],
|
|
248
|
+
createdAt: now,
|
|
249
|
+
updatedAt: now,
|
|
250
|
+
});
|
|
251
|
+
for (const personKey of record.peopleKeys) {
|
|
252
|
+
const personId = personIds.get(personKey);
|
|
253
|
+
if (personId === undefined) {
|
|
254
|
+
throw new Error(`Sample raise "${record.name}" names unknown person "${personKey}"`);
|
|
255
|
+
}
|
|
256
|
+
await tx.insert(personLinks).values({
|
|
257
|
+
id: dependencies.createId('personLink'),
|
|
258
|
+
workspaceId,
|
|
259
|
+
personId,
|
|
260
|
+
targetType: 'raise',
|
|
261
|
+
targetId: id,
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
for (const record of fixture.partnerships) {
|
|
266
|
+
const stageId = stageIdByKindAndSlug.get(stageLookupKey('partnership', record.stageSlug));
|
|
267
|
+
const companyId = companyIds.get(record.companyKey);
|
|
268
|
+
if (stageId === undefined) {
|
|
269
|
+
throw new Error(`Sample partnership "${record.name}" names stage "${record.stageSlug}", which this workspace's partnership pipeline does not carry`);
|
|
270
|
+
}
|
|
271
|
+
if (companyId === undefined) {
|
|
272
|
+
throw new Error(`Sample partnership "${record.name}" names unknown company "${record.companyKey}"`);
|
|
273
|
+
}
|
|
274
|
+
const id = dependencies.createId('partnership');
|
|
275
|
+
partnershipIds.set(record.key, id);
|
|
276
|
+
await tx.insert(partnerships).values({
|
|
277
|
+
id,
|
|
278
|
+
workspaceId,
|
|
279
|
+
name: record.name,
|
|
280
|
+
companyId,
|
|
281
|
+
stageId,
|
|
282
|
+
kind: record.kind,
|
|
283
|
+
nextTouchpoint: record.nextTouchpoint,
|
|
284
|
+
goals: record.goals,
|
|
285
|
+
successLooksLike: record.successLooksLike,
|
|
286
|
+
summary: record.summary,
|
|
287
|
+
tags: [...record.tags],
|
|
288
|
+
createdAt: now,
|
|
289
|
+
updatedAt: now,
|
|
290
|
+
});
|
|
291
|
+
for (const personKey of record.peopleKeys) {
|
|
292
|
+
const personId = personIds.get(personKey);
|
|
293
|
+
if (personId === undefined) {
|
|
294
|
+
throw new Error(`Sample partnership "${record.name}" names unknown person "${personKey}"`);
|
|
295
|
+
}
|
|
296
|
+
await tx.insert(personLinks).values({
|
|
297
|
+
id: dependencies.createId('personLink'),
|
|
298
|
+
workspaceId,
|
|
299
|
+
personId,
|
|
300
|
+
targetType: 'partnership',
|
|
301
|
+
targetId: id,
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
for (const record of fixture.enquiries) {
|
|
306
|
+
const stageId = stageIdByKindAndSlug.get(stageLookupKey('enquiry', record.stageSlug));
|
|
307
|
+
if (stageId === undefined) {
|
|
308
|
+
throw new Error(`Sample enquiry "${record.name}" names stage "${record.stageSlug}", which this workspace's enquiry pipeline does not carry`);
|
|
309
|
+
}
|
|
310
|
+
const companyId = record.companyKey === null ? null : (companyIds.get(record.companyKey) ?? undefined);
|
|
311
|
+
if (companyId === undefined) {
|
|
312
|
+
throw new Error(`Sample enquiry "${record.name}" names unknown company "${String(record.companyKey)}"`);
|
|
313
|
+
}
|
|
314
|
+
const id = dependencies.createId('enquiry');
|
|
315
|
+
enquiryIds.set(record.key, id);
|
|
316
|
+
await tx.insert(enquiries).values({
|
|
317
|
+
id,
|
|
318
|
+
workspaceId,
|
|
319
|
+
name: record.name,
|
|
320
|
+
source: record.source,
|
|
321
|
+
stageId,
|
|
322
|
+
companyId,
|
|
323
|
+
summary: record.summary,
|
|
324
|
+
tags: [...record.tags],
|
|
325
|
+
createdAt: now,
|
|
326
|
+
updatedAt: now,
|
|
327
|
+
});
|
|
328
|
+
for (const personKey of record.peopleKeys) {
|
|
329
|
+
const personId = personIds.get(personKey);
|
|
330
|
+
if (personId === undefined) {
|
|
331
|
+
throw new Error(`Sample enquiry "${record.name}" names unknown person "${personKey}"`);
|
|
332
|
+
}
|
|
333
|
+
await tx.insert(personLinks).values({
|
|
334
|
+
id: dependencies.createId('personLink'),
|
|
335
|
+
workspaceId,
|
|
336
|
+
personId,
|
|
337
|
+
targetType: 'enquiry',
|
|
338
|
+
targetId: id,
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
for (const record of fixture.roles) {
|
|
343
|
+
const id = dependencies.createId('role');
|
|
344
|
+
roleIds.set(record.key, id);
|
|
345
|
+
await tx.insert(roles).values({
|
|
346
|
+
id,
|
|
347
|
+
workspaceId,
|
|
348
|
+
title: record.title,
|
|
349
|
+
status: record.status,
|
|
350
|
+
createdAt: now,
|
|
351
|
+
updatedAt: now,
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
for (const record of fixture.candidates) {
|
|
355
|
+
const roleId = roleIds.get(record.roleKey);
|
|
356
|
+
const personId = personIds.get(record.personKey);
|
|
357
|
+
const referrerPersonId = record.referrerPersonKey === null
|
|
358
|
+
? null
|
|
359
|
+
: (personIds.get(record.referrerPersonKey) ?? undefined);
|
|
360
|
+
if (roleId === undefined) {
|
|
361
|
+
throw new Error(`Sample candidate "${record.key}" names unknown role "${record.roleKey}"`);
|
|
362
|
+
}
|
|
363
|
+
if (personId === undefined) {
|
|
364
|
+
throw new Error(`Sample candidate "${record.key}" names unknown person "${record.personKey}"`);
|
|
365
|
+
}
|
|
366
|
+
if (referrerPersonId === undefined) {
|
|
367
|
+
throw new Error(`Sample candidate "${record.key}" names unknown referrer "${String(record.referrerPersonKey)}"`);
|
|
368
|
+
}
|
|
369
|
+
const id = dependencies.createId('candidate');
|
|
370
|
+
candidateIds.set(record.key, id);
|
|
371
|
+
await tx.insert(candidates).values({
|
|
372
|
+
id,
|
|
373
|
+
workspaceId,
|
|
374
|
+
roleId,
|
|
375
|
+
personId,
|
|
376
|
+
status: record.status,
|
|
377
|
+
// The interview_stage column carries a value only while the
|
|
378
|
+
// candidate is in process. Every other status clears it, which
|
|
379
|
+
// the service does the same way `hiring` does for a PATCH.
|
|
380
|
+
interviewStage: record.status === 'in_process' ? record.interviewStage : null,
|
|
381
|
+
referrerPersonId,
|
|
382
|
+
createdAt: now,
|
|
383
|
+
updatedAt: now,
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
for (const record of fixture.plans) {
|
|
387
|
+
const dealId = dealIds.get(record.targetDealKey);
|
|
388
|
+
if (dealId === undefined) {
|
|
389
|
+
throw new Error(`Sample plan item "${record.title}" names unknown deal "${record.targetDealKey}"`);
|
|
390
|
+
}
|
|
391
|
+
await tx.insert(planItems).values({
|
|
392
|
+
id: dependencies.createId('planItem'),
|
|
393
|
+
workspaceId,
|
|
394
|
+
targetType: record.targetType,
|
|
395
|
+
targetId: dealId,
|
|
396
|
+
date: record.date,
|
|
397
|
+
title: record.title,
|
|
398
|
+
status: record.status,
|
|
399
|
+
createdAt: now,
|
|
400
|
+
updatedAt: now,
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
for (const record of fixture.notes) {
|
|
404
|
+
const targetId = resolveNoteTargetId(record.targetType, record.targetKey, {
|
|
405
|
+
companyIds,
|
|
406
|
+
personIds,
|
|
407
|
+
dealIds,
|
|
408
|
+
opportunityIds,
|
|
409
|
+
raiseIds,
|
|
410
|
+
partnershipIds,
|
|
411
|
+
enquiryIds,
|
|
412
|
+
candidateIds,
|
|
413
|
+
});
|
|
414
|
+
if (targetId === undefined) {
|
|
415
|
+
throw new Error(`Sample note names unknown ${record.targetType} "${record.targetKey}"`);
|
|
416
|
+
}
|
|
417
|
+
await tx.insert(notes).values({
|
|
418
|
+
id: dependencies.createId('note'),
|
|
419
|
+
workspaceId,
|
|
420
|
+
targetType: record.targetType,
|
|
421
|
+
targetId,
|
|
422
|
+
body: record.body,
|
|
423
|
+
pinned: record.pinned,
|
|
424
|
+
createdAt: now,
|
|
425
|
+
updatedAt: now,
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
return countsFor(fixture);
|
|
429
|
+
}, { workspaceId, actor: toEventActor(actor) });
|
|
430
|
+
},
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
function resolveNoteTargetId(targetType, targetKey, maps) {
|
|
434
|
+
switch (targetType) {
|
|
435
|
+
case 'company':
|
|
436
|
+
return maps.companyIds.get(targetKey);
|
|
437
|
+
case 'person':
|
|
438
|
+
return maps.personIds.get(targetKey);
|
|
439
|
+
case 'deal':
|
|
440
|
+
return maps.dealIds.get(targetKey);
|
|
441
|
+
case 'opportunity':
|
|
442
|
+
return maps.opportunityIds.get(targetKey);
|
|
443
|
+
case 'raise':
|
|
444
|
+
return maps.raiseIds.get(targetKey);
|
|
445
|
+
case 'partnership':
|
|
446
|
+
return maps.partnershipIds.get(targetKey);
|
|
447
|
+
case 'enquiry':
|
|
448
|
+
return maps.enquiryIds.get(targetKey);
|
|
449
|
+
case 'candidate':
|
|
450
|
+
return maps.candidateIds.get(targetKey);
|
|
451
|
+
default:
|
|
452
|
+
// A new RECORD_TARGET_TYPES value in the fixture requires a case here;
|
|
453
|
+
// falling through silently would drop a note on the floor.
|
|
454
|
+
return undefined;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* The lookup key `stageIdByKindAndSlug` uses. A slug is only unique per kind
|
|
459
|
+
* (`won` is a stage in both `deal` and `opportunity`), so the map is keyed by
|
|
460
|
+
* both fields joined.
|
|
461
|
+
*/
|
|
462
|
+
function stageLookupKey(kind, slug) {
|
|
463
|
+
return `${kind}::${slug}`;
|
|
464
|
+
}
|
|
465
|
+
function countsFor(fixture) {
|
|
466
|
+
return {
|
|
467
|
+
companies: fixture.companies.length,
|
|
468
|
+
people: fixture.people.length,
|
|
469
|
+
positions: fixture.positions.length,
|
|
470
|
+
deals: fixture.deals.length,
|
|
471
|
+
planItems: fixture.plans.length,
|
|
472
|
+
notes: fixture.notes.length,
|
|
473
|
+
opportunities: fixture.opportunities.length,
|
|
474
|
+
raises: fixture.raises.length,
|
|
475
|
+
partnerships: fixture.partnerships.length,
|
|
476
|
+
enquiries: fixture.enquiries.length,
|
|
477
|
+
roles: fixture.roles.length,
|
|
478
|
+
candidates: fixture.candidates.length,
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/modules/sample-data/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAI9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AACvD,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,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,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
+
import { z } from 'zod';
|
|
2
|
+
import { requireWorkspaceId } from '../auth/actor.js';
|
|
3
|
+
import { sampleDataResponse } from './routes.js';
|
|
4
|
+
/**
|
|
5
|
+
* `sample_data_install`: the MCP mirror of `POST /v1/workspaces/:id/sample-data`.
|
|
6
|
+
*
|
|
7
|
+
* Same admin check, same conflict on a workspace that already has data. The
|
|
8
|
+
* tool takes no arguments: it installs into the actor's own workspace.
|
|
9
|
+
*/
|
|
10
|
+
const installArgs = z.strictObject({});
|
|
11
|
+
export function registerSampleDataTools(mcp, service) {
|
|
12
|
+
mcp.tool({
|
|
13
|
+
name: 'sample_data_install',
|
|
14
|
+
description: 'Populate this workspace with a small sample of companies, people, positions, deals, plans and notes. Refuses if the workspace already has data.',
|
|
15
|
+
inputSchema: installArgs,
|
|
16
|
+
async invoke(_args, actor) {
|
|
17
|
+
const counts = await service.install(actor, requireWorkspaceId(actor));
|
|
18
|
+
return sampleDataResponse(counts);
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../src/modules/sample-data/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAGhD;;;;;GAKG;AAEH,MAAM,WAAW,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;AAEtC,MAAM,UAAU,uBAAuB,CACrC,GAAoB,EACpB,OAA0B;IAE1B,GAAG,CAAC,IAAI,CAAC;QACP,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EACT,iJAAiJ;QACnJ,WAAW,EAAE,WAAW;QACxB,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK;YACvB,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAA;YAEtE,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAA;QACnC,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { KelpieModule } from '../../runtime/module.ts';
|
|
2
2
|
/**
|
|
3
|
-
* One box across
|
|
3
|
+
* One box across ten collections.
|
|
4
4
|
*
|
|
5
5
|
* It contributes no tables and calls no `context.schema`. The `search_vector`
|
|
6
6
|
* column each searchable table carries belongs to that table's own module, which
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/search/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAK3D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,IAAI,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/search/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAK3D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,IAAI,YAAY,CAgCjD"}
|
|
@@ -2,7 +2,7 @@ import { mountSearchRoutes } from './routes.js';
|
|
|
2
2
|
import { createSearchService } from './service.js';
|
|
3
3
|
import { registerSearchTools } from './tools.js';
|
|
4
4
|
/**
|
|
5
|
-
* One box across
|
|
5
|
+
* One box across ten collections.
|
|
6
6
|
*
|
|
7
7
|
* It contributes no tables and calls no `context.schema`. The `search_vector`
|
|
8
8
|
* column each searchable table carries belongs to that table's own module, which
|
|
@@ -28,6 +28,7 @@ export function createSearchModule() {
|
|
|
28
28
|
'positions',
|
|
29
29
|
'companies',
|
|
30
30
|
'deals',
|
|
31
|
+
'enquiries',
|
|
31
32
|
'opportunities',
|
|
32
33
|
'partnerships',
|
|
33
34
|
'raises',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/search/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAEhD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO;QACL,EAAE,EAAE,QAAQ;QACZ,QAAQ,EAAE;YACR,WAAW;YACX,QAAQ;YACR,WAAW;YACX,WAAW;YACX,OAAO;YACP,eAAe;YACf,cAAc;YACd,QAAQ;YACR,QAAQ;YACR,OAAO;YACP,WAAW;YACX,UAAU;SACX;QACD,UAAU,EAAE,IAAI;QAEhB,QAAQ,CAAC,OAAO;YACd,MAAM,OAAO,GAAG,mBAAmB,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAA;YAEvD,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE;gBACxB,iBAAiB,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,CAAA;YAC1E,CAAC,CAAC,CAAA;YAEF,mBAAmB,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;YAEzC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;QAC1B,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/search/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAEhD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO;QACL,EAAE,EAAE,QAAQ;QACZ,QAAQ,EAAE;YACR,WAAW;YACX,QAAQ;YACR,WAAW;YACX,WAAW;YACX,OAAO;YACP,WAAW;YACX,eAAe;YACf,cAAc;YACd,QAAQ;YACR,QAAQ;YACR,OAAO;YACP,WAAW;YACX,UAAU;SACX;QACD,UAAU,EAAE,IAAI;QAEhB,QAAQ,CAAC,OAAO;YACd,MAAM,OAAO,GAAG,mBAAmB,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAA;YAEvD,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE;gBACxB,iBAAiB,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,CAAA;YAC1E,CAAC,CAAC,CAAA;YAEF,mBAAmB,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;YAEzC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;QAC1B,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -36,6 +36,7 @@ export declare function searchHandbookPages(db: Queryable, workspaceId: string,
|
|
|
36
36
|
export declare function searchPeople(db: Queryable, workspaceId: string, query: SQL, limit: number): Promise<CollectionHits>;
|
|
37
37
|
export declare function searchRoles(db: Queryable, workspaceId: string, query: SQL, limit: number): Promise<CollectionHits>;
|
|
38
38
|
export declare function searchCompanies(db: Queryable, workspaceId: string, query: SQL, limit: number): Promise<CollectionHits>;
|
|
39
|
+
export declare function searchEnquiries(db: Queryable, workspaceId: string, query: SQL, limit: number): Promise<CollectionHits>;
|
|
39
40
|
export declare function searchDeals(db: Queryable, workspaceId: string, query: SQL, limit: number): Promise<CollectionHits>;
|
|
40
41
|
export declare function searchOpportunities(db: Queryable, workspaceId: string, query: SQL, limit: number): Promise<CollectionHits>;
|
|
41
42
|
export declare function searchRaises(db: Queryable, workspaceId: string, query: SQL, limit: number): Promise<CollectionHits>;
|