@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,55 @@
|
|
|
1
|
+
import type { Hono } from 'hono';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { CredentialDependencies } from '../auth/credentials.ts';
|
|
4
|
+
import type { AddListMemberInput, CreateListInput, ListMemberView, ListMembershipView, ListView, ListsService, UpdateListInput } from './service.ts';
|
|
5
|
+
/**
|
|
6
|
+
* Wire shapes for `/v1/lists`.
|
|
7
|
+
*
|
|
8
|
+
* `target_type` is required on create and absent from update: a list's type is
|
|
9
|
+
* fixed for its lifetime. Bodies are strict, so a caller sending `target_type`
|
|
10
|
+
* on PATCH hears about it as a 422 rather than silently ignored.
|
|
11
|
+
*/
|
|
12
|
+
export declare const createBody: z.ZodObject<{
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
target_type: z.ZodEnum<{
|
|
15
|
+
candidate: "candidate";
|
|
16
|
+
company: "company";
|
|
17
|
+
deal: "deal";
|
|
18
|
+
enquiry: "enquiry";
|
|
19
|
+
opportunity: "opportunity";
|
|
20
|
+
partnership: "partnership";
|
|
21
|
+
person: "person";
|
|
22
|
+
raise: "raise";
|
|
23
|
+
}>;
|
|
24
|
+
description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
consent_purpose_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
}, z.core.$strict>;
|
|
27
|
+
export declare const updateBody: z.ZodObject<{
|
|
28
|
+
name: z.ZodOptional<z.ZodString>;
|
|
29
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
30
|
+
consent_purpose_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
export declare const addMemberBody: z.ZodObject<{
|
|
33
|
+
target_type: z.ZodEnum<{
|
|
34
|
+
candidate: "candidate";
|
|
35
|
+
company: "company";
|
|
36
|
+
deal: "deal";
|
|
37
|
+
enquiry: "enquiry";
|
|
38
|
+
opportunity: "opportunity";
|
|
39
|
+
partnership: "partnership";
|
|
40
|
+
person: "person";
|
|
41
|
+
raise: "raise";
|
|
42
|
+
}>;
|
|
43
|
+
target_id: z.ZodString;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
export interface ListsRoutesDependencies extends CredentialDependencies {
|
|
46
|
+
readonly service: ListsService;
|
|
47
|
+
}
|
|
48
|
+
export declare function toCreateInput(body: z.infer<typeof createBody>): CreateListInput;
|
|
49
|
+
export declare function toUpdateInput(body: z.infer<typeof updateBody>): UpdateListInput;
|
|
50
|
+
export declare function toAddMemberInput(body: z.infer<typeof addMemberBody>): AddListMemberInput;
|
|
51
|
+
export declare function listResponse(list: ListView): Record<string, unknown>;
|
|
52
|
+
export declare function listMembershipResponse(membership: ListMembershipView): Record<string, unknown>;
|
|
53
|
+
export declare function listMemberResponse(member: ListMemberView): Record<string, unknown>;
|
|
54
|
+
export declare function mountListsRoutes(router: Hono, dependencies: ListsRoutesDependencies): void;
|
|
55
|
+
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/modules/lists/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,MAAM,CAAA;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAIpE,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,YAAY,EACZ,eAAe,EAChB,MAAM,cAAc,CAAA;AAErB;;;;;;GAMG;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;kBAKrB,CAAA;AAEF,eAAO,MAAM,UAAU;;;;kBAMX,CAAA;AAEZ,eAAO,MAAM,aAAa;;;;;;;;;;;;kBAGxB,CAAA;AAEF,MAAM,WAAW,uBAAwB,SAAQ,sBAAsB;IACrE,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAA;CAC/B;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,GAAG,eAAe,CAO/E;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,GAAG,eAAe,CAQ/E;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,GAAG,kBAAkB,CAKxF;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAYpE;AAED,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,kBAAkB,GAC7B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAUzB;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASlF;AA4CD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,uBAAuB,GAAG,IAAI,CA8F1F"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AppError } from '../../lib/errors.js';
|
|
3
|
+
import { pageBody, readJsonBody, readListParameters } from '../../lib/http.js';
|
|
4
|
+
import { resolveActorFrom } from '../auth/credentials.js';
|
|
5
|
+
import { isRecordTargetType } from '../recordTargets.js';
|
|
6
|
+
import { RECORD_TARGET_TYPES } from './schema.js';
|
|
7
|
+
/**
|
|
8
|
+
* Wire shapes for `/v1/lists`.
|
|
9
|
+
*
|
|
10
|
+
* `target_type` is required on create and absent from update: a list's type is
|
|
11
|
+
* fixed for its lifetime. Bodies are strict, so a caller sending `target_type`
|
|
12
|
+
* on PATCH hears about it as a 422 rather than silently ignored.
|
|
13
|
+
*/
|
|
14
|
+
export const createBody = z.strictObject({
|
|
15
|
+
name: z.string().min(1),
|
|
16
|
+
target_type: z.enum(RECORD_TARGET_TYPES),
|
|
17
|
+
description: z.string().nullable().default(null),
|
|
18
|
+
consent_purpose_id: z.string().min(1).nullable().default(null),
|
|
19
|
+
});
|
|
20
|
+
export const updateBody = z
|
|
21
|
+
.strictObject({
|
|
22
|
+
name: z.string().min(1),
|
|
23
|
+
description: z.string().nullable(),
|
|
24
|
+
consent_purpose_id: z.string().min(1).nullable(),
|
|
25
|
+
})
|
|
26
|
+
.partial();
|
|
27
|
+
export const addMemberBody = z.strictObject({
|
|
28
|
+
target_type: z.enum(RECORD_TARGET_TYPES),
|
|
29
|
+
target_id: z.string().min(1),
|
|
30
|
+
});
|
|
31
|
+
export function toCreateInput(body) {
|
|
32
|
+
return {
|
|
33
|
+
name: body.name,
|
|
34
|
+
targetType: body.target_type,
|
|
35
|
+
description: body.description,
|
|
36
|
+
consentPurposeId: body.consent_purpose_id,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export function toUpdateInput(body) {
|
|
40
|
+
return {
|
|
41
|
+
...(body.name === undefined ? {} : { name: body.name }),
|
|
42
|
+
...(body.description === undefined ? {} : { description: body.description }),
|
|
43
|
+
...(body.consent_purpose_id === undefined
|
|
44
|
+
? {}
|
|
45
|
+
: { consentPurposeId: body.consent_purpose_id }),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export function toAddMemberInput(body) {
|
|
49
|
+
return {
|
|
50
|
+
targetType: body.target_type,
|
|
51
|
+
targetId: body.target_id,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export function listResponse(list) {
|
|
55
|
+
return {
|
|
56
|
+
id: list.id,
|
|
57
|
+
name: list.name,
|
|
58
|
+
description: list.description,
|
|
59
|
+
target_type: list.targetType,
|
|
60
|
+
member_count: list.memberCount,
|
|
61
|
+
consent_purpose_id: list.consentPurposeId,
|
|
62
|
+
consent_purpose_slug: list.consentPurposeSlug,
|
|
63
|
+
created_at: list.createdAt.toISOString(),
|
|
64
|
+
updated_at: list.updatedAt.toISOString(),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export function listMembershipResponse(membership) {
|
|
68
|
+
return {
|
|
69
|
+
id: membership.id,
|
|
70
|
+
list_id: membership.listId,
|
|
71
|
+
list_name: membership.listName,
|
|
72
|
+
list_target_type: membership.listTargetType,
|
|
73
|
+
target_type: membership.targetType,
|
|
74
|
+
target_id: membership.targetId,
|
|
75
|
+
added_at: membership.addedAt.toISOString(),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export function listMemberResponse(member) {
|
|
79
|
+
return {
|
|
80
|
+
id: member.id,
|
|
81
|
+
list_id: member.listId,
|
|
82
|
+
target_type: member.targetType,
|
|
83
|
+
target_id: member.targetId,
|
|
84
|
+
target_name: member.targetName,
|
|
85
|
+
added_at: member.addedAt.toISOString(),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function readTargetTypeFilter(context) {
|
|
89
|
+
const raw = context.req.query('target_type');
|
|
90
|
+
if (raw === undefined) {
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
if (!isRecordTargetType(raw)) {
|
|
94
|
+
throw AppError.validationFailed('That is not a record type a list holds', [
|
|
95
|
+
{ field: 'target_type', message: `Unknown target type "${raw}"` },
|
|
96
|
+
]);
|
|
97
|
+
}
|
|
98
|
+
return raw;
|
|
99
|
+
}
|
|
100
|
+
function readMembershipTarget(context) {
|
|
101
|
+
const rawType = context.req.query('target_type');
|
|
102
|
+
const targetId = context.req.query('target_id');
|
|
103
|
+
if (rawType === undefined || targetId === undefined || targetId.length === 0) {
|
|
104
|
+
throw AppError.validationFailed('A memberships list always names the record it is for', [
|
|
105
|
+
{ field: 'target_type', message: 'Required' },
|
|
106
|
+
{ field: 'target_id', message: 'Required' },
|
|
107
|
+
]);
|
|
108
|
+
}
|
|
109
|
+
if (!isRecordTargetType(rawType)) {
|
|
110
|
+
throw AppError.validationFailed('That is not a record type a list holds', [
|
|
111
|
+
{ field: 'target_type', message: `Unknown target type "${rawType}"` },
|
|
112
|
+
]);
|
|
113
|
+
}
|
|
114
|
+
return { targetType: rawType, targetId };
|
|
115
|
+
}
|
|
116
|
+
export function mountListsRoutes(router, dependencies) {
|
|
117
|
+
const requireActor = (context) => resolveActorFrom(dependencies, context);
|
|
118
|
+
router.get('/list-memberships', async (context) => {
|
|
119
|
+
const { targetType, targetId } = readMembershipTarget(context);
|
|
120
|
+
const memberships = await dependencies.service.membershipsFor(await requireActor(context), targetType, targetId);
|
|
121
|
+
// Not paged. A record has a small number of memberships in practice; the
|
|
122
|
+
// `next_cursor: null` is here so the standard list envelope reader accepts
|
|
123
|
+
// this response without a special case.
|
|
124
|
+
return context.json({
|
|
125
|
+
data: memberships.map(listMembershipResponse),
|
|
126
|
+
next_cursor: null,
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
router.get('/lists', async (context) => {
|
|
130
|
+
const page = await dependencies.service.list(await requireActor(context), {
|
|
131
|
+
term: context.req.query('q'),
|
|
132
|
+
targetType: readTargetTypeFilter(context),
|
|
133
|
+
}, readListParameters(context));
|
|
134
|
+
return context.json(pageBody(page, listResponse));
|
|
135
|
+
});
|
|
136
|
+
router.post('/lists', async (context) => {
|
|
137
|
+
const body = await readJsonBody(context, createBody);
|
|
138
|
+
const list = await dependencies.service.create(await requireActor(context), toCreateInput(body));
|
|
139
|
+
return context.json(listResponse(list), 201);
|
|
140
|
+
});
|
|
141
|
+
router.get('/lists/:id', async (context) => {
|
|
142
|
+
const list = await dependencies.service.get(await requireActor(context), context.req.param('id'));
|
|
143
|
+
return context.json(listResponse(list));
|
|
144
|
+
});
|
|
145
|
+
router.patch('/lists/:id', async (context) => {
|
|
146
|
+
const body = await readJsonBody(context, updateBody);
|
|
147
|
+
const list = await dependencies.service.update(await requireActor(context), context.req.param('id'), toUpdateInput(body));
|
|
148
|
+
return context.json(listResponse(list));
|
|
149
|
+
});
|
|
150
|
+
router.delete('/lists/:id', async (context) => {
|
|
151
|
+
await dependencies.service.remove(await requireActor(context), context.req.param('id'));
|
|
152
|
+
return context.body(null, 204);
|
|
153
|
+
});
|
|
154
|
+
router.get('/lists/:id/members', async (context) => {
|
|
155
|
+
const page = await dependencies.service.listMembers(await requireActor(context), { listId: context.req.param('id') }, readListParameters(context));
|
|
156
|
+
return context.json(pageBody(page, listMemberResponse));
|
|
157
|
+
});
|
|
158
|
+
router.post('/lists/:id/members', async (context) => {
|
|
159
|
+
const body = await readJsonBody(context, addMemberBody);
|
|
160
|
+
const member = await dependencies.service.addMember(await requireActor(context), context.req.param('id'), toAddMemberInput(body));
|
|
161
|
+
return context.json(listMemberResponse(member), 201);
|
|
162
|
+
});
|
|
163
|
+
router.delete('/lists/:id/members/:memberId', async (context) => {
|
|
164
|
+
await dependencies.service.removeMember(await requireActor(context), context.req.param('id'), context.req.param('memberId'));
|
|
165
|
+
return context.body(null, 204);
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../src/modules/lists/routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAWjD;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,YAAY,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC;IACxC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAChD,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CAC/D,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC;KACxB,YAAY,CAAC;IACZ,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,WAAW,EAAE,CAAC,CAAC,MAAM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 +1,281 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The target types come from `@kelpie/schemas`, so this check constraint, the
|
|
3
|
+
* route's Zod enum, and the browser's decoder are one list rather than three
|
|
4
|
+
* copies. Re-exported because `routes.ts` reads them from here, and the tables
|
|
5
|
+
* they constrain are the reason they matter.
|
|
6
|
+
*/
|
|
7
|
+
export { RECORD_TARGET_TYPES } from '@kelpie/schemas';
|
|
8
|
+
export type { RecordTargetType } from '@kelpie/schemas';
|
|
9
|
+
/**
|
|
10
|
+
* A named collection of records of one type.
|
|
11
|
+
*
|
|
12
|
+
* The `target_type` is chosen at creation and never changes. A `list_members`
|
|
13
|
+
* row's `(list_id, target_type)` foreign-keys back into the composite unique on
|
|
14
|
+
* this table, so adding a person to a company list is refused by the database
|
|
15
|
+
* rather than trusted to the service.
|
|
16
|
+
*
|
|
17
|
+
* `(workspace_id, name)` is unique so the sidebar never shows two lists with the
|
|
18
|
+
* same label. Renaming to an in-use name returns 409.
|
|
19
|
+
*/
|
|
20
|
+
export declare const lists: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
21
|
+
name: "lists";
|
|
22
|
+
schema: undefined;
|
|
23
|
+
columns: {
|
|
24
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
25
|
+
name: "id";
|
|
26
|
+
tableName: "lists";
|
|
27
|
+
dataType: "string";
|
|
28
|
+
columnType: "PgText";
|
|
29
|
+
data: string;
|
|
30
|
+
driverParam: string;
|
|
31
|
+
notNull: true;
|
|
32
|
+
hasDefault: false;
|
|
33
|
+
isPrimaryKey: true;
|
|
34
|
+
isAutoincrement: false;
|
|
35
|
+
hasRuntimeDefault: false;
|
|
36
|
+
enumValues: [string, ...string[]];
|
|
37
|
+
baseColumn: never;
|
|
38
|
+
identity: undefined;
|
|
39
|
+
generated: undefined;
|
|
40
|
+
}, {}, {}>;
|
|
41
|
+
workspaceId: import("drizzle-orm/pg-core").PgColumn<{
|
|
42
|
+
name: "workspace_id";
|
|
43
|
+
tableName: "lists";
|
|
44
|
+
dataType: "string";
|
|
45
|
+
columnType: "PgText";
|
|
46
|
+
data: string;
|
|
47
|
+
driverParam: string;
|
|
48
|
+
notNull: true;
|
|
49
|
+
hasDefault: false;
|
|
50
|
+
isPrimaryKey: false;
|
|
51
|
+
isAutoincrement: false;
|
|
52
|
+
hasRuntimeDefault: false;
|
|
53
|
+
enumValues: [string, ...string[]];
|
|
54
|
+
baseColumn: never;
|
|
55
|
+
identity: undefined;
|
|
56
|
+
generated: undefined;
|
|
57
|
+
}, {}, {}>;
|
|
58
|
+
name: import("drizzle-orm/pg-core").PgColumn<{
|
|
59
|
+
name: "name";
|
|
60
|
+
tableName: "lists";
|
|
61
|
+
dataType: "string";
|
|
62
|
+
columnType: "PgText";
|
|
63
|
+
data: string;
|
|
64
|
+
driverParam: string;
|
|
65
|
+
notNull: true;
|
|
66
|
+
hasDefault: false;
|
|
67
|
+
isPrimaryKey: false;
|
|
68
|
+
isAutoincrement: false;
|
|
69
|
+
hasRuntimeDefault: false;
|
|
70
|
+
enumValues: [string, ...string[]];
|
|
71
|
+
baseColumn: never;
|
|
72
|
+
identity: undefined;
|
|
73
|
+
generated: undefined;
|
|
74
|
+
}, {}, {}>;
|
|
75
|
+
description: import("drizzle-orm/pg-core").PgColumn<{
|
|
76
|
+
name: "description";
|
|
77
|
+
tableName: "lists";
|
|
78
|
+
dataType: "string";
|
|
79
|
+
columnType: "PgText";
|
|
80
|
+
data: string;
|
|
81
|
+
driverParam: string;
|
|
82
|
+
notNull: false;
|
|
83
|
+
hasDefault: false;
|
|
84
|
+
isPrimaryKey: false;
|
|
85
|
+
isAutoincrement: false;
|
|
86
|
+
hasRuntimeDefault: false;
|
|
87
|
+
enumValues: [string, ...string[]];
|
|
88
|
+
baseColumn: never;
|
|
89
|
+
identity: undefined;
|
|
90
|
+
generated: undefined;
|
|
91
|
+
}, {}, {}>;
|
|
92
|
+
targetType: import("drizzle-orm/pg-core").PgColumn<{
|
|
93
|
+
name: "target_type";
|
|
94
|
+
tableName: "lists";
|
|
95
|
+
dataType: "string";
|
|
96
|
+
columnType: "PgText";
|
|
97
|
+
data: string;
|
|
98
|
+
driverParam: string;
|
|
99
|
+
notNull: true;
|
|
100
|
+
hasDefault: false;
|
|
101
|
+
isPrimaryKey: false;
|
|
102
|
+
isAutoincrement: false;
|
|
103
|
+
hasRuntimeDefault: false;
|
|
104
|
+
enumValues: [string, ...string[]];
|
|
105
|
+
baseColumn: never;
|
|
106
|
+
identity: undefined;
|
|
107
|
+
generated: undefined;
|
|
108
|
+
}, {}, {}>;
|
|
109
|
+
consentPurposeId: import("drizzle-orm/pg-core").PgColumn<{
|
|
110
|
+
name: "consent_purpose_id";
|
|
111
|
+
tableName: "lists";
|
|
112
|
+
dataType: "string";
|
|
113
|
+
columnType: "PgText";
|
|
114
|
+
data: string;
|
|
115
|
+
driverParam: string;
|
|
116
|
+
notNull: false;
|
|
117
|
+
hasDefault: false;
|
|
118
|
+
isPrimaryKey: false;
|
|
119
|
+
isAutoincrement: false;
|
|
120
|
+
hasRuntimeDefault: false;
|
|
121
|
+
enumValues: [string, ...string[]];
|
|
122
|
+
baseColumn: never;
|
|
123
|
+
identity: undefined;
|
|
124
|
+
generated: undefined;
|
|
125
|
+
}, {}, {}>;
|
|
126
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
127
|
+
name: "created_at";
|
|
128
|
+
tableName: "lists";
|
|
129
|
+
dataType: "date";
|
|
130
|
+
columnType: "PgTimestamp";
|
|
131
|
+
data: Date;
|
|
132
|
+
driverParam: string;
|
|
133
|
+
notNull: true;
|
|
134
|
+
hasDefault: true;
|
|
135
|
+
isPrimaryKey: false;
|
|
136
|
+
isAutoincrement: false;
|
|
137
|
+
hasRuntimeDefault: false;
|
|
138
|
+
enumValues: undefined;
|
|
139
|
+
baseColumn: never;
|
|
140
|
+
identity: undefined;
|
|
141
|
+
generated: undefined;
|
|
142
|
+
}, {}, {}>;
|
|
143
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
144
|
+
name: "updated_at";
|
|
145
|
+
tableName: "lists";
|
|
146
|
+
dataType: "date";
|
|
147
|
+
columnType: "PgTimestamp";
|
|
148
|
+
data: Date;
|
|
149
|
+
driverParam: string;
|
|
150
|
+
notNull: true;
|
|
151
|
+
hasDefault: true;
|
|
152
|
+
isPrimaryKey: false;
|
|
153
|
+
isAutoincrement: false;
|
|
154
|
+
hasRuntimeDefault: false;
|
|
155
|
+
enumValues: undefined;
|
|
156
|
+
baseColumn: never;
|
|
157
|
+
identity: undefined;
|
|
158
|
+
generated: undefined;
|
|
159
|
+
}, {}, {}>;
|
|
160
|
+
};
|
|
161
|
+
dialect: 'pg';
|
|
162
|
+
}>;
|
|
163
|
+
/**
|
|
164
|
+
* A record's membership in a list.
|
|
165
|
+
*
|
|
166
|
+
* `(list_id, target_type)` foreign-keys back to the list's own unique key, so
|
|
167
|
+
* the member's type must equal its parent list's. The target itself is
|
|
168
|
+
* polymorphic and carries no foreign key of its own; the owning service checks
|
|
169
|
+
* existence with `missingTargets` and removes the row when the target goes
|
|
170
|
+
* (`attachedRecords.ts`).
|
|
171
|
+
*/
|
|
172
|
+
export declare const listMembers: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
173
|
+
name: "list_members";
|
|
174
|
+
schema: undefined;
|
|
175
|
+
columns: {
|
|
176
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
177
|
+
name: "id";
|
|
178
|
+
tableName: "list_members";
|
|
179
|
+
dataType: "string";
|
|
180
|
+
columnType: "PgText";
|
|
181
|
+
data: string;
|
|
182
|
+
driverParam: string;
|
|
183
|
+
notNull: true;
|
|
184
|
+
hasDefault: false;
|
|
185
|
+
isPrimaryKey: true;
|
|
186
|
+
isAutoincrement: false;
|
|
187
|
+
hasRuntimeDefault: false;
|
|
188
|
+
enumValues: [string, ...string[]];
|
|
189
|
+
baseColumn: never;
|
|
190
|
+
identity: undefined;
|
|
191
|
+
generated: undefined;
|
|
192
|
+
}, {}, {}>;
|
|
193
|
+
workspaceId: import("drizzle-orm/pg-core").PgColumn<{
|
|
194
|
+
name: "workspace_id";
|
|
195
|
+
tableName: "list_members";
|
|
196
|
+
dataType: "string";
|
|
197
|
+
columnType: "PgText";
|
|
198
|
+
data: string;
|
|
199
|
+
driverParam: string;
|
|
200
|
+
notNull: true;
|
|
201
|
+
hasDefault: false;
|
|
202
|
+
isPrimaryKey: false;
|
|
203
|
+
isAutoincrement: false;
|
|
204
|
+
hasRuntimeDefault: false;
|
|
205
|
+
enumValues: [string, ...string[]];
|
|
206
|
+
baseColumn: never;
|
|
207
|
+
identity: undefined;
|
|
208
|
+
generated: undefined;
|
|
209
|
+
}, {}, {}>;
|
|
210
|
+
listId: import("drizzle-orm/pg-core").PgColumn<{
|
|
211
|
+
name: "list_id";
|
|
212
|
+
tableName: "list_members";
|
|
213
|
+
dataType: "string";
|
|
214
|
+
columnType: "PgText";
|
|
215
|
+
data: string;
|
|
216
|
+
driverParam: string;
|
|
217
|
+
notNull: true;
|
|
218
|
+
hasDefault: false;
|
|
219
|
+
isPrimaryKey: false;
|
|
220
|
+
isAutoincrement: false;
|
|
221
|
+
hasRuntimeDefault: false;
|
|
222
|
+
enumValues: [string, ...string[]];
|
|
223
|
+
baseColumn: never;
|
|
224
|
+
identity: undefined;
|
|
225
|
+
generated: undefined;
|
|
226
|
+
}, {}, {}>;
|
|
227
|
+
targetType: import("drizzle-orm/pg-core").PgColumn<{
|
|
228
|
+
name: "target_type";
|
|
229
|
+
tableName: "list_members";
|
|
230
|
+
dataType: "string";
|
|
231
|
+
columnType: "PgText";
|
|
232
|
+
data: string;
|
|
233
|
+
driverParam: string;
|
|
234
|
+
notNull: true;
|
|
235
|
+
hasDefault: false;
|
|
236
|
+
isPrimaryKey: false;
|
|
237
|
+
isAutoincrement: false;
|
|
238
|
+
hasRuntimeDefault: false;
|
|
239
|
+
enumValues: [string, ...string[]];
|
|
240
|
+
baseColumn: never;
|
|
241
|
+
identity: undefined;
|
|
242
|
+
generated: undefined;
|
|
243
|
+
}, {}, {}>;
|
|
244
|
+
targetId: import("drizzle-orm/pg-core").PgColumn<{
|
|
245
|
+
name: "target_id";
|
|
246
|
+
tableName: "list_members";
|
|
247
|
+
dataType: "string";
|
|
248
|
+
columnType: "PgText";
|
|
249
|
+
data: string;
|
|
250
|
+
driverParam: string;
|
|
251
|
+
notNull: true;
|
|
252
|
+
hasDefault: false;
|
|
253
|
+
isPrimaryKey: false;
|
|
254
|
+
isAutoincrement: false;
|
|
255
|
+
hasRuntimeDefault: false;
|
|
256
|
+
enumValues: [string, ...string[]];
|
|
257
|
+
baseColumn: never;
|
|
258
|
+
identity: undefined;
|
|
259
|
+
generated: undefined;
|
|
260
|
+
}, {}, {}>;
|
|
261
|
+
addedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
262
|
+
name: "added_at";
|
|
263
|
+
tableName: "list_members";
|
|
264
|
+
dataType: "date";
|
|
265
|
+
columnType: "PgTimestamp";
|
|
266
|
+
data: Date;
|
|
267
|
+
driverParam: string;
|
|
268
|
+
notNull: true;
|
|
269
|
+
hasDefault: true;
|
|
270
|
+
isPrimaryKey: false;
|
|
271
|
+
isAutoincrement: false;
|
|
272
|
+
hasRuntimeDefault: false;
|
|
273
|
+
enumValues: undefined;
|
|
274
|
+
baseColumn: never;
|
|
275
|
+
identity: undefined;
|
|
276
|
+
generated: undefined;
|
|
277
|
+
}, {}, {}>;
|
|
278
|
+
};
|
|
279
|
+
dialect: 'pg';
|
|
280
|
+
}>;
|
|
281
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/modules/lists/schema.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAEvD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BjB,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BvB,CAAA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { RECORD_TARGET_TYPES } from '@kelpie/schemas';
|
|
2
|
+
import { foreignKey, index, pgTable, text, timestamp, unique } from 'drizzle-orm/pg-core';
|
|
3
|
+
import { checkOneOf, createdAt, primaryId, updatedAt } from '../../lib/columns.js';
|
|
4
|
+
import { consentPurposes } from '../consent-purposes/schema.js';
|
|
5
|
+
import { workspaces } from '../workspace/schema.js';
|
|
6
|
+
/**
|
|
7
|
+
* The target types come from `@kelpie/schemas`, so this check constraint, the
|
|
8
|
+
* route's Zod enum, and the browser's decoder are one list rather than three
|
|
9
|
+
* copies. Re-exported because `routes.ts` reads them from here, and the tables
|
|
10
|
+
* they constrain are the reason they matter.
|
|
11
|
+
*/
|
|
12
|
+
export { RECORD_TARGET_TYPES } from '@kelpie/schemas';
|
|
13
|
+
/**
|
|
14
|
+
* A named collection of records of one type.
|
|
15
|
+
*
|
|
16
|
+
* The `target_type` is chosen at creation and never changes. A `list_members`
|
|
17
|
+
* row's `(list_id, target_type)` foreign-keys back into the composite unique on
|
|
18
|
+
* this table, so adding a person to a company list is refused by the database
|
|
19
|
+
* rather than trusted to the service.
|
|
20
|
+
*
|
|
21
|
+
* `(workspace_id, name)` is unique so the sidebar never shows two lists with the
|
|
22
|
+
* same label. Renaming to an in-use name returns 409.
|
|
23
|
+
*/
|
|
24
|
+
export const lists = pgTable('lists', {
|
|
25
|
+
id: primaryId(),
|
|
26
|
+
workspaceId: text('workspace_id')
|
|
27
|
+
.notNull()
|
|
28
|
+
.references(() => workspaces.id, { onDelete: 'cascade' }),
|
|
29
|
+
name: text('name').notNull(),
|
|
30
|
+
description: text('description'),
|
|
31
|
+
targetType: text('target_type').notNull(),
|
|
32
|
+
/**
|
|
33
|
+
* The consent purpose captured when a form submit adds a person to this
|
|
34
|
+
* list. Person lists only — the service refuses a non-null value on any
|
|
35
|
+
* other target type. `restrict` on delete so a purpose in use is not
|
|
36
|
+
* silently unset behind the list's back.
|
|
37
|
+
*/
|
|
38
|
+
consentPurposeId: text('consent_purpose_id').references(() => consentPurposes.id, {
|
|
39
|
+
onDelete: 'restrict',
|
|
40
|
+
}),
|
|
41
|
+
createdAt: createdAt(),
|
|
42
|
+
updatedAt: updatedAt(),
|
|
43
|
+
}, (table) => [
|
|
44
|
+
index('lists_workspace_idx').on(table.workspaceId),
|
|
45
|
+
unique('lists_workspace_name_key').on(table.workspaceId, table.name),
|
|
46
|
+
// The referent of the composite FK from `list_members`. Postgres requires a
|
|
47
|
+
// unique key over the referenced columns; this exists solely to satisfy it.
|
|
48
|
+
unique('lists_id_target_type_key').on(table.id, table.targetType),
|
|
49
|
+
checkOneOf('lists_target_type_check', table.targetType, RECORD_TARGET_TYPES),
|
|
50
|
+
]);
|
|
51
|
+
/**
|
|
52
|
+
* A record's membership in a list.
|
|
53
|
+
*
|
|
54
|
+
* `(list_id, target_type)` foreign-keys back to the list's own unique key, so
|
|
55
|
+
* the member's type must equal its parent list's. The target itself is
|
|
56
|
+
* polymorphic and carries no foreign key of its own; the owning service checks
|
|
57
|
+
* existence with `missingTargets` and removes the row when the target goes
|
|
58
|
+
* (`attachedRecords.ts`).
|
|
59
|
+
*/
|
|
60
|
+
export const listMembers = pgTable('list_members', {
|
|
61
|
+
id: primaryId(),
|
|
62
|
+
workspaceId: text('workspace_id')
|
|
63
|
+
.notNull()
|
|
64
|
+
.references(() => workspaces.id, { onDelete: 'cascade' }),
|
|
65
|
+
listId: text('list_id').notNull(),
|
|
66
|
+
targetType: text('target_type').notNull(),
|
|
67
|
+
targetId: text('target_id').notNull(),
|
|
68
|
+
// A membership is not edited, only added or removed, so no `updated_at`.
|
|
69
|
+
addedAt: timestamp('added_at', { withTimezone: true, mode: 'date' })
|
|
70
|
+
.notNull()
|
|
71
|
+
.defaultNow(),
|
|
72
|
+
}, (table) => [
|
|
73
|
+
index('list_members_list_idx').on(table.workspaceId, table.listId),
|
|
74
|
+
index('list_members_target_idx').on(table.workspaceId, table.targetType, table.targetId),
|
|
75
|
+
unique('list_members_list_target_key').on(table.listId, table.targetId),
|
|
76
|
+
foreignKey({
|
|
77
|
+
name: 'list_members_list_target_type_fk',
|
|
78
|
+
columns: [table.listId, table.targetType],
|
|
79
|
+
foreignColumns: [lists.id, lists.targetType],
|
|
80
|
+
}).onDelete('cascade'),
|
|
81
|
+
checkOneOf('list_members_target_type_check', table.targetType, RECORD_TARGET_TYPES),
|
|
82
|
+
]);
|
|
83
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/modules/lists/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAEzF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD;;;;;GAKG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAGrD;;;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