@kelpie/server 0.10.0 → 0.11.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/app.d.ts.map +1 -1
- package/dist/app.js +2 -0
- package/dist/app.js.map +1 -1
- package/dist/lib/actor.d.ts +3 -1
- package/dist/lib/actor.d.ts.map +1 -1
- package/dist/lib/actor.js.map +1 -1
- package/dist/lib/apiKeyScopes.d.ts +8 -0
- package/dist/lib/apiKeyScopes.d.ts.map +1 -0
- package/dist/lib/apiKeyScopes.js +166 -0
- package/dist/lib/apiKeyScopes.js.map +1 -0
- package/dist/modules/activities/repository.d.ts +2 -0
- package/dist/modules/activities/repository.d.ts.map +1 -1
- package/dist/modules/activities/repository.js +9 -0
- package/dist/modules/activities/repository.js.map +1 -1
- package/dist/modules/agent-tasks/repository.d.ts +2 -0
- package/dist/modules/agent-tasks/repository.d.ts.map +1 -1
- package/dist/modules/agent-tasks/repository.js +9 -0
- package/dist/modules/agent-tasks/repository.js.map +1 -1
- package/dist/modules/api-keys/routes.d.ts.map +1 -1
- package/dist/modules/api-keys/routes.js +4 -1
- package/dist/modules/api-keys/routes.js.map +1 -1
- package/dist/modules/api-keys/schema.d.ts +43 -0
- package/dist/modules/api-keys/schema.d.ts.map +1 -1
- package/dist/modules/api-keys/schema.js +2 -0
- package/dist/modules/api-keys/schema.js.map +1 -1
- package/dist/modules/api-keys/scopeMiddleware.d.ts +8 -0
- package/dist/modules/api-keys/scopeMiddleware.d.ts.map +1 -0
- package/dist/modules/api-keys/scopeMiddleware.js +21 -0
- package/dist/modules/api-keys/scopeMiddleware.js.map +1 -0
- package/dist/modules/api-keys/service.d.ts +3 -1
- package/dist/modules/api-keys/service.d.ts.map +1 -1
- package/dist/modules/api-keys/service.js +26 -1
- package/dist/modules/api-keys/service.js.map +1 -1
- package/dist/modules/auth/credentials.d.ts.map +1 -1
- package/dist/modules/auth/credentials.js +2 -0
- package/dist/modules/auth/credentials.js.map +1 -1
- package/dist/modules/consent-purposes/index.d.ts +1 -1
- package/dist/modules/consent-purposes/index.js +1 -1
- package/dist/modules/consent-purposes/schema.d.ts +3 -3
- package/dist/modules/consent-purposes/schema.js +3 -3
- package/dist/modules/consent-purposes/service.d.ts +1 -1
- package/dist/modules/consent-purposes/service.d.ts.map +1 -1
- package/dist/modules/consent-purposes/service.js +7 -16
- package/dist/modules/consent-purposes/service.js.map +1 -1
- package/dist/modules/consent-purposes/starters.d.ts +1 -1
- package/dist/modules/consent-purposes/tools.js +1 -1
- package/dist/modules/consent-purposes/tools.js.map +1 -1
- package/dist/modules/conversions/clearPointers.d.ts +10 -0
- package/dist/modules/conversions/clearPointers.d.ts.map +1 -0
- package/dist/modules/conversions/clearPointers.js +40 -0
- package/dist/modules/conversions/clearPointers.js.map +1 -0
- package/dist/modules/conversions/factory.d.ts +5 -0
- package/dist/modules/conversions/factory.d.ts.map +1 -0
- package/dist/modules/conversions/factory.js +18 -0
- package/dist/modules/conversions/factory.js.map +1 -0
- package/dist/modules/conversions/fieldMap.d.ts +55 -0
- package/dist/modules/conversions/fieldMap.d.ts.map +1 -0
- package/dist/modules/conversions/fieldMap.js +398 -0
- package/dist/modules/conversions/fieldMap.js.map +1 -0
- package/dist/modules/conversions/index.d.ts +7 -0
- package/dist/modules/conversions/index.d.ts.map +1 -0
- package/dist/modules/conversions/index.js +6 -0
- package/dist/modules/conversions/index.js.map +1 -0
- package/dist/modules/conversions/mcp.d.ts +7 -0
- package/dist/modules/conversions/mcp.d.ts.map +1 -0
- package/dist/modules/conversions/mcp.js +47 -0
- package/dist/modules/conversions/mcp.js.map +1 -0
- package/dist/modules/conversions/repoint.d.ts +19 -0
- package/dist/modules/conversions/repoint.d.ts.map +1 -0
- package/dist/modules/conversions/repoint.js +51 -0
- package/dist/modules/conversions/repoint.js.map +1 -0
- package/dist/modules/conversions/routes.d.ts +26 -0
- package/dist/modules/conversions/routes.d.ts.map +1 -0
- package/dist/modules/conversions/routes.js +23 -0
- package/dist/modules/conversions/routes.js.map +1 -0
- package/dist/modules/conversions/service.d.ts +28 -0
- package/dist/modules/conversions/service.d.ts.map +1 -0
- package/dist/modules/conversions/service.js +170 -0
- package/dist/modules/conversions/service.js.map +1 -0
- package/dist/modules/conversions/wire.d.ts +4 -0
- package/dist/modules/conversions/wire.d.ts.map +1 -0
- package/dist/modules/conversions/wire.js +28 -0
- package/dist/modules/conversions/wire.js.map +1 -0
- package/dist/modules/deals/events.d.ts +9 -0
- package/dist/modules/deals/events.d.ts.map +1 -1
- package/dist/modules/deals/events.js +4 -0
- package/dist/modules/deals/events.js.map +1 -1
- package/dist/modules/deals/index.d.ts.map +1 -1
- package/dist/modules/deals/index.js +4 -2
- package/dist/modules/deals/index.js.map +1 -1
- package/dist/modules/deals/routes.d.ts +2 -0
- package/dist/modules/deals/routes.d.ts.map +1 -1
- package/dist/modules/deals/routes.js +8 -1
- package/dist/modules/deals/routes.js.map +1 -1
- package/dist/modules/deals/schema.d.ts +34 -0
- package/dist/modules/deals/schema.d.ts.map +1 -1
- package/dist/modules/deals/schema.js +7 -2
- package/dist/modules/deals/schema.js.map +1 -1
- package/dist/modules/deals/service.d.ts.map +1 -1
- package/dist/modules/deals/service.js +2 -0
- package/dist/modules/deals/service.js.map +1 -1
- package/dist/modules/deals/tools.d.ts +2 -1
- package/dist/modules/deals/tools.d.ts.map +1 -1
- package/dist/modules/deals/tools.js +3 -1
- package/dist/modules/deals/tools.js.map +1 -1
- package/dist/modules/decisions/repository.d.ts +2 -1
- package/dist/modules/decisions/repository.d.ts.map +1 -1
- package/dist/modules/decisions/repository.js +9 -1
- package/dist/modules/decisions/repository.js.map +1 -1
- package/dist/modules/enquiries/events.d.ts +6 -2
- package/dist/modules/enquiries/events.d.ts.map +1 -1
- package/dist/modules/enquiries/events.js +5 -1
- package/dist/modules/enquiries/events.js.map +1 -1
- package/dist/modules/enquiries/index.d.ts.map +1 -1
- package/dist/modules/enquiries/index.js +4 -2
- package/dist/modules/enquiries/index.js.map +1 -1
- package/dist/modules/enquiries/routes.d.ts +2 -0
- package/dist/modules/enquiries/routes.d.ts.map +1 -1
- package/dist/modules/enquiries/routes.js +9 -9
- package/dist/modules/enquiries/routes.js.map +1 -1
- package/dist/modules/enquiries/schema.d.ts +36 -1
- package/dist/modules/enquiries/schema.d.ts.map +1 -1
- package/dist/modules/enquiries/schema.js +9 -3
- package/dist/modules/enquiries/schema.js.map +1 -1
- package/dist/modules/enquiries/service.d.ts +0 -8
- package/dist/modules/enquiries/service.d.ts.map +1 -1
- package/dist/modules/enquiries/service.js +3 -95
- package/dist/modules/enquiries/service.js.map +1 -1
- package/dist/modules/enquiries/tools.d.ts +2 -1
- package/dist/modules/enquiries/tools.d.ts.map +1 -1
- package/dist/modules/enquiries/tools.js +4 -16
- package/dist/modules/enquiries/tools.js.map +1 -1
- package/dist/modules/forms/applyMappedFields.d.ts +20 -0
- package/dist/modules/forms/applyMappedFields.d.ts.map +1 -0
- package/dist/modules/forms/applyMappedFields.js +169 -0
- package/dist/modules/forms/applyMappedFields.js.map +1 -0
- package/dist/modules/forms/applySubmissionFields.d.ts +18 -0
- package/dist/modules/forms/applySubmissionFields.d.ts.map +1 -0
- package/dist/modules/forms/applySubmissionFields.js +230 -0
- package/dist/modules/forms/applySubmissionFields.js.map +1 -0
- package/dist/modules/forms/fields.d.ts +7 -2
- package/dist/modules/forms/fields.d.ts.map +1 -1
- package/dist/modules/forms/fields.js +17 -6
- package/dist/modules/forms/fields.js.map +1 -1
- package/dist/modules/forms/mapping.d.ts +8 -2
- package/dist/modules/forms/mapping.d.ts.map +1 -1
- package/dist/modules/forms/mapping.js +11 -0
- package/dist/modules/forms/mapping.js.map +1 -1
- package/dist/modules/forms/repository.d.ts +0 -5
- package/dist/modules/forms/repository.d.ts.map +1 -1
- package/dist/modules/forms/repository.js +0 -2
- package/dist/modules/forms/repository.js.map +1 -1
- package/dist/modules/forms/routes.d.ts +2 -30
- package/dist/modules/forms/routes.d.ts.map +1 -1
- package/dist/modules/forms/routes.js +2 -2
- package/dist/modules/forms/routes.js.map +1 -1
- package/dist/modules/forms/schema.d.ts.map +1 -1
- package/dist/modules/forms/schema.js +1 -2
- package/dist/modules/forms/schema.js.map +1 -1
- package/dist/modules/forms/service.d.ts.map +1 -1
- package/dist/modules/forms/service.js +18 -3
- package/dist/modules/forms/service.js.map +1 -1
- package/dist/modules/forms/starters.d.ts +31 -0
- package/dist/modules/forms/starters.d.ts.map +1 -0
- package/dist/modules/forms/starters.js +94 -0
- package/dist/modules/forms/starters.js.map +1 -0
- package/dist/modules/forms/submission.d.ts +1 -0
- package/dist/modules/forms/submission.d.ts.map +1 -1
- package/dist/modules/forms/submission.js +58 -37
- package/dist/modules/forms/submission.js.map +1 -1
- package/dist/modules/import-export/customFieldCsv.d.ts +9 -0
- package/dist/modules/import-export/customFieldCsv.d.ts.map +1 -0
- package/dist/modules/import-export/customFieldCsv.js +39 -0
- package/dist/modules/import-export/customFieldCsv.js.map +1 -0
- package/dist/modules/import-export/customFieldImport.d.ts +19 -0
- package/dist/modules/import-export/customFieldImport.d.ts.map +1 -0
- package/dist/modules/import-export/customFieldImport.js +76 -0
- package/dist/modules/import-export/customFieldImport.js.map +1 -0
- package/dist/modules/import-export/drafts.d.ts +57 -3
- package/dist/modules/import-export/drafts.d.ts.map +1 -1
- package/dist/modules/import-export/drafts.js +65 -3
- package/dist/modules/import-export/drafts.js.map +1 -1
- package/dist/modules/import-export/exportRows.d.ts +15 -13
- package/dist/modules/import-export/exportRows.d.ts.map +1 -1
- package/dist/modules/import-export/exportRows.js +99 -26
- package/dist/modules/import-export/exportRows.js.map +1 -1
- package/dist/modules/import-export/plan.d.ts +42 -11
- package/dist/modules/import-export/plan.d.ts.map +1 -1
- package/dist/modules/import-export/plan.js +198 -56
- package/dist/modules/import-export/plan.js.map +1 -1
- package/dist/modules/import-export/repository.d.ts +58 -2
- package/dist/modules/import-export/repository.d.ts.map +1 -1
- package/dist/modules/import-export/repository.js +201 -12
- 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 +5 -5
- package/dist/modules/import-export/routes.js.map +1 -1
- package/dist/modules/import-export/service.d.ts +8 -3
- package/dist/modules/import-export/service.d.ts.map +1 -1
- package/dist/modules/import-export/service.js +133 -40
- package/dist/modules/import-export/service.js.map +1 -1
- package/dist/modules/import-export/streams.d.ts +2 -2
- package/dist/modules/import-export/streams.d.ts.map +1 -1
- package/dist/modules/import-export/streams.js +50 -9
- 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 +13 -7
- package/dist/modules/import-export/tools.js.map +1 -1
- package/dist/modules/import-export/validation.d.ts +5 -1
- package/dist/modules/import-export/validation.d.ts.map +1 -1
- package/dist/modules/import-export/validation.js +89 -2
- package/dist/modules/import-export/validation.js.map +1 -1
- package/dist/modules/import-export/writes.d.ts +2 -1
- package/dist/modules/import-export/writes.d.ts.map +1 -1
- package/dist/modules/import-export/writes.js +358 -25
- package/dist/modules/import-export/writes.js.map +1 -1
- package/dist/modules/lists/repository.d.ts +0 -1
- package/dist/modules/lists/repository.d.ts.map +1 -1
- package/dist/modules/lists/repository.js +0 -1
- package/dist/modules/lists/repository.js.map +1 -1
- package/dist/modules/lists/routes.d.ts +0 -2
- package/dist/modules/lists/routes.d.ts.map +1 -1
- package/dist/modules/lists/routes.js +0 -8
- package/dist/modules/lists/routes.js.map +1 -1
- package/dist/modules/lists/schema.d.ts +0 -17
- package/dist/modules/lists/schema.d.ts.map +1 -1
- package/dist/modules/lists/schema.js +0 -10
- package/dist/modules/lists/schema.js.map +1 -1
- package/dist/modules/lists/service.d.ts +2 -14
- package/dist/modules/lists/service.d.ts.map +1 -1
- package/dist/modules/lists/service.js +7 -53
- package/dist/modules/lists/service.js.map +1 -1
- package/dist/modules/lists/starters.d.ts +12 -0
- package/dist/modules/lists/starters.d.ts.map +1 -0
- package/dist/modules/lists/starters.js +4 -0
- package/dist/modules/lists/starters.js.map +1 -0
- package/dist/modules/mcp/protocol.d.ts.map +1 -1
- package/dist/modules/mcp/protocol.js +13 -0
- package/dist/modules/mcp/protocol.js.map +1 -1
- package/dist/modules/notes/repository.d.ts +2 -0
- package/dist/modules/notes/repository.d.ts.map +1 -1
- package/dist/modules/notes/repository.js +9 -0
- package/dist/modules/notes/repository.js.map +1 -1
- package/dist/modules/opportunities/events.d.ts +9 -0
- package/dist/modules/opportunities/events.d.ts.map +1 -1
- package/dist/modules/opportunities/events.js +4 -0
- package/dist/modules/opportunities/events.js.map +1 -1
- package/dist/modules/opportunities/index.d.ts.map +1 -1
- package/dist/modules/opportunities/index.js +4 -2
- package/dist/modules/opportunities/index.js.map +1 -1
- package/dist/modules/opportunities/routes.d.ts +2 -0
- package/dist/modules/opportunities/routes.d.ts.map +1 -1
- package/dist/modules/opportunities/routes.js +8 -1
- package/dist/modules/opportunities/routes.js.map +1 -1
- package/dist/modules/opportunities/schema.d.ts +34 -0
- package/dist/modules/opportunities/schema.d.ts.map +1 -1
- package/dist/modules/opportunities/schema.js +7 -2
- package/dist/modules/opportunities/schema.js.map +1 -1
- package/dist/modules/opportunities/service.d.ts.map +1 -1
- package/dist/modules/opportunities/service.js +2 -0
- package/dist/modules/opportunities/service.js.map +1 -1
- package/dist/modules/opportunities/tools.d.ts +2 -1
- package/dist/modules/opportunities/tools.d.ts.map +1 -1
- package/dist/modules/opportunities/tools.js +3 -1
- package/dist/modules/opportunities/tools.js.map +1 -1
- package/dist/modules/partnerships/events.d.ts +9 -0
- package/dist/modules/partnerships/events.d.ts.map +1 -1
- package/dist/modules/partnerships/events.js +4 -0
- package/dist/modules/partnerships/events.js.map +1 -1
- package/dist/modules/partnerships/index.d.ts.map +1 -1
- package/dist/modules/partnerships/index.js +4 -2
- package/dist/modules/partnerships/index.js.map +1 -1
- package/dist/modules/partnerships/routes.d.ts +2 -0
- package/dist/modules/partnerships/routes.d.ts.map +1 -1
- package/dist/modules/partnerships/routes.js +8 -1
- package/dist/modules/partnerships/routes.js.map +1 -1
- package/dist/modules/partnerships/schema.d.ts +34 -0
- package/dist/modules/partnerships/schema.d.ts.map +1 -1
- package/dist/modules/partnerships/schema.js +7 -2
- package/dist/modules/partnerships/schema.js.map +1 -1
- package/dist/modules/partnerships/service.d.ts.map +1 -1
- package/dist/modules/partnerships/service.js +2 -0
- package/dist/modules/partnerships/service.js.map +1 -1
- package/dist/modules/partnerships/tools.d.ts +2 -1
- package/dist/modules/partnerships/tools.d.ts.map +1 -1
- package/dist/modules/partnerships/tools.js +3 -1
- package/dist/modules/partnerships/tools.js.map +1 -1
- package/dist/modules/people/personConsentWrites.d.ts +1 -1
- package/dist/modules/people/schema.js +1 -1
- package/dist/modules/people/schema.js.map +1 -1
- package/dist/modules/plans/repository.d.ts +2 -0
- package/dist/modules/plans/repository.d.ts.map +1 -1
- package/dist/modules/plans/repository.js +9 -0
- package/dist/modules/plans/repository.js.map +1 -1
- package/dist/modules/raises/events.d.ts +9 -0
- package/dist/modules/raises/events.d.ts.map +1 -1
- package/dist/modules/raises/events.js +4 -0
- package/dist/modules/raises/events.js.map +1 -1
- package/dist/modules/raises/index.d.ts.map +1 -1
- package/dist/modules/raises/index.js +4 -2
- package/dist/modules/raises/index.js.map +1 -1
- package/dist/modules/raises/routes.d.ts +2 -0
- package/dist/modules/raises/routes.d.ts.map +1 -1
- package/dist/modules/raises/routes.js +8 -1
- package/dist/modules/raises/routes.js.map +1 -1
- package/dist/modules/raises/schema.d.ts +34 -0
- package/dist/modules/raises/schema.d.ts.map +1 -1
- package/dist/modules/raises/schema.js +7 -2
- package/dist/modules/raises/schema.js.map +1 -1
- package/dist/modules/raises/service.d.ts.map +1 -1
- package/dist/modules/raises/service.js +2 -0
- package/dist/modules/raises/service.js.map +1 -1
- package/dist/modules/raises/tools.d.ts +2 -1
- package/dist/modules/raises/tools.d.ts.map +1 -1
- package/dist/modules/raises/tools.js +3 -1
- package/dist/modules/raises/tools.js.map +1 -1
- package/dist/modules/workspace/routes.d.ts +0 -2
- package/dist/modules/workspace/routes.d.ts.map +1 -1
- package/dist/modules/workspace/routes.js +0 -6
- package/dist/modules/workspace/routes.js.map +1 -1
- package/dist/modules/workspace/schema.d.ts +0 -34
- package/dist/modules/workspace/schema.d.ts.map +1 -1
- package/dist/modules/workspace/schema.js +0 -2
- package/dist/modules/workspace/schema.js.map +1 -1
- package/dist/modules/workspace/seedStarterForms.d.ts +17 -0
- package/dist/modules/workspace/seedStarterForms.d.ts.map +1 -0
- package/dist/modules/workspace/seedStarterForms.js +71 -0
- package/dist/modules/workspace/seedStarterForms.js.map +1 -0
- package/dist/modules/workspace/service.d.ts +0 -4
- package/dist/modules/workspace/service.d.ts.map +1 -1
- package/dist/modules/workspace/service.js +20 -10
- package/dist/modules/workspace/service.js.map +1 -1
- package/dist/modules/workspace/tools.js +1 -1
- package/dist/modules/workspace/tools.js.map +1 -1
- package/dist/testing/fixtures.d.ts.map +1 -1
- package/dist/testing/fixtures.js +1 -0
- package/dist/testing/fixtures.js.map +1 -1
- package/migrations/0037_drop_lists_consent_purpose_id.sql +2 -0
- package/migrations/0038_smart_white_queen.sql +2 -0
- package/migrations/0039_form_map_to_open.sql +1 -0
- package/migrations/0040_pipeline_converted_to.sql +20 -0
- package/migrations/0041_api_key_scopes.sql +1 -0
- package/migrations/0042_drop_workspace_identity.sql +2 -0
- package/migrations/meta/0038_snapshot.json +6554 -0
- package/migrations/meta/_journal.json +42 -0
- package/package.json +2 -2
- package/src/app.ts +3 -0
- package/src/lib/actor.ts +3 -1
- package/src/lib/apiKeyScopes.ts +213 -0
- package/src/modules/activities/repository.ts +24 -0
- package/src/modules/agent-tasks/repository.ts +24 -0
- package/src/modules/api-keys/routes.ts +5 -0
- package/src/modules/api-keys/schema.ts +2 -0
- package/src/modules/api-keys/scopeMiddleware.ts +30 -0
- package/src/modules/api-keys/service.ts +36 -2
- package/src/modules/auth/credentials.ts +4 -0
- package/src/modules/consent-purposes/index.ts +1 -1
- package/src/modules/consent-purposes/schema.ts +3 -3
- package/src/modules/consent-purposes/service.ts +7 -16
- package/src/modules/consent-purposes/starters.ts +1 -1
- package/src/modules/consent-purposes/tools.ts +1 -1
- package/src/modules/conversions/clearPointers.ts +81 -0
- package/src/modules/conversions/factory.ts +20 -0
- package/src/modules/conversions/fieldMap.ts +548 -0
- package/src/modules/conversions/index.ts +6 -0
- package/src/modules/conversions/mcp.ts +71 -0
- package/src/modules/conversions/repoint.ts +146 -0
- package/src/modules/conversions/routes.ts +68 -0
- package/src/modules/conversions/service.ts +310 -0
- package/src/modules/conversions/wire.ts +42 -0
- package/src/modules/deals/events.ts +9 -0
- package/src/modules/deals/index.ts +4 -2
- package/src/modules/deals/routes.ts +11 -1
- package/src/modules/deals/schema.ts +10 -2
- package/src/modules/deals/service.ts +3 -0
- package/src/modules/deals/tools.ts +9 -1
- package/src/modules/decisions/repository.ts +23 -1
- package/src/modules/enquiries/events.ts +8 -2
- package/src/modules/enquiries/index.ts +4 -2
- package/src/modules/enquiries/routes.ts +11 -13
- package/src/modules/enquiries/schema.ts +12 -3
- package/src/modules/enquiries/service.ts +3 -150
- package/src/modules/enquiries/tools.ts +9 -18
- package/src/modules/forms/applyMappedFields.ts +248 -0
- package/src/modules/forms/applySubmissionFields.ts +435 -0
- package/src/modules/forms/fields.ts +31 -7
- package/src/modules/forms/mapping.ts +20 -3
- package/src/modules/forms/repository.ts +0 -7
- package/src/modules/forms/routes.ts +1 -2
- package/src/modules/forms/schema.ts +0 -2
- package/src/modules/forms/service.ts +31 -4
- package/src/modules/forms/starters.ts +129 -0
- package/src/modules/forms/submission.ts +135 -69
- package/src/modules/import-export/customFieldCsv.ts +55 -0
- package/src/modules/import-export/customFieldImport.ts +111 -0
- package/src/modules/import-export/drafts.ts +151 -3
- package/src/modules/import-export/exportRows.ts +222 -68
- package/src/modules/import-export/plan.ts +321 -67
- package/src/modules/import-export/repository.ts +356 -14
- package/src/modules/import-export/routes.ts +8 -8
- package/src/modules/import-export/service.ts +208 -45
- package/src/modules/import-export/streams.ts +95 -13
- package/src/modules/import-export/tools.ts +14 -6
- package/src/modules/import-export/validation.ts +128 -0
- package/src/modules/import-export/writes.ts +559 -27
- package/src/modules/lists/repository.ts +0 -2
- package/src/modules/lists/routes.ts +0 -8
- package/src/modules/lists/schema.ts +0 -10
- package/src/modules/lists/service.ts +9 -107
- package/src/modules/lists/starters.ts +16 -0
- package/src/modules/mcp/protocol.ts +18 -0
- package/src/modules/notes/repository.ts +24 -0
- package/src/modules/opportunities/events.ts +9 -0
- package/src/modules/opportunities/index.ts +4 -2
- package/src/modules/opportunities/routes.ts +11 -1
- package/src/modules/opportunities/schema.ts +10 -2
- package/src/modules/opportunities/service.ts +3 -0
- package/src/modules/opportunities/tools.ts +9 -1
- package/src/modules/partnerships/events.ts +9 -0
- package/src/modules/partnerships/index.ts +4 -2
- package/src/modules/partnerships/routes.ts +11 -1
- package/src/modules/partnerships/schema.ts +10 -2
- package/src/modules/partnerships/service.ts +3 -0
- package/src/modules/partnerships/tools.ts +9 -1
- package/src/modules/people/personConsentWrites.ts +1 -1
- package/src/modules/people/schema.ts +1 -1
- package/src/modules/plans/repository.ts +24 -0
- package/src/modules/raises/events.ts +9 -0
- package/src/modules/raises/index.ts +4 -2
- package/src/modules/raises/routes.ts +11 -1
- package/src/modules/raises/schema.ts +10 -2
- package/src/modules/raises/service.ts +3 -0
- package/src/modules/raises/tools.ts +9 -1
- package/src/modules/workspace/routes.ts +0 -6
- package/src/modules/workspace/schema.ts +0 -2
- package/src/modules/workspace/seedStarterForms.ts +98 -0
- package/src/modules/workspace/service.ts +23 -15
- package/src/modules/workspace/tools.ts +1 -1
- package/src/testing/fixtures.ts +1 -0
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isCompatibleFormFieldType,
|
|
3
|
+
isKnownMapTarget,
|
|
4
|
+
isRepeatableMapTarget,
|
|
5
|
+
} from '@kelpie/schemas'
|
|
6
|
+
import type { CustomFieldDefinitionRef, FormFieldType } from '@kelpie/schemas'
|
|
7
|
+
|
|
1
8
|
import type { ErrorDetail } from '../../lib/errors.ts'
|
|
2
9
|
import type { StoredFormFieldOption } from './schema.ts'
|
|
3
10
|
import { PERSON_EMAIL_TARGET } from './schema.ts'
|
|
4
|
-
import type { FormFieldMapTarget,
|
|
11
|
+
import type { FormFieldMapTarget, FormOptionValueType } from './schema.ts'
|
|
5
12
|
|
|
6
13
|
/** The map target for a consent field. Repeatable, unique per purpose_id. */
|
|
7
14
|
const PERSON_CONSENT_TARGET = 'person.consent'
|
|
@@ -40,15 +47,18 @@ export interface OptionDraft {
|
|
|
40
47
|
/**
|
|
41
48
|
* Targets a form may map more than one field to.
|
|
42
49
|
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* one of them by field order, which is not a decision a form author made.
|
|
50
|
+
* `submission` writes no CRM field; `person.consent` is read separately per
|
|
51
|
+
* purpose. Everything else is unique per form.
|
|
46
52
|
*/
|
|
47
|
-
const REPEATABLE_TARGETS: ReadonlySet<string> = new Set(['submission'])
|
|
48
53
|
|
|
49
54
|
/** The two targets that establish a company for a submit to attach a Deal to. */
|
|
50
55
|
const COMPANY_TARGETS: readonly string[] = ['company.name', 'company.domain']
|
|
51
56
|
|
|
57
|
+
export interface FindFieldProblemsOptions {
|
|
58
|
+
readonly createsPartnership?: boolean
|
|
59
|
+
readonly customFieldDefinitions?: readonly CustomFieldDefinitionRef[]
|
|
60
|
+
}
|
|
61
|
+
|
|
52
62
|
/**
|
|
53
63
|
* Everything wrong with a field list, as `api.md` field details.
|
|
54
64
|
*
|
|
@@ -69,11 +79,13 @@ const COMPANY_TARGETS: readonly string[] = ['company.name', 'company.domain']
|
|
|
69
79
|
export function findFieldProblems(
|
|
70
80
|
fields: readonly FieldShape[],
|
|
71
81
|
createsDeal: boolean,
|
|
72
|
-
|
|
82
|
+
options: FindFieldProblemsOptions = {},
|
|
73
83
|
): readonly ErrorDetail[] {
|
|
74
84
|
const problems: ErrorDetail[] = []
|
|
75
85
|
const seenTargets = new Set<string>()
|
|
76
86
|
const usedConsentPurposes = new Set<string>()
|
|
87
|
+
const customFieldDefinitions = options.customFieldDefinitions ?? []
|
|
88
|
+
const createsPartnership = options.createsPartnership ?? false
|
|
77
89
|
|
|
78
90
|
if (!fields.some((field) => field.mapTo === PERSON_EMAIL_TARGET)) {
|
|
79
91
|
problems.push({
|
|
@@ -101,6 +113,18 @@ export function findFieldProblems(
|
|
|
101
113
|
for (const [index, field] of fields.entries()) {
|
|
102
114
|
const at = `fields.${String(index)}`
|
|
103
115
|
|
|
116
|
+
if (!isKnownMapTarget(field.mapTo, customFieldDefinitions)) {
|
|
117
|
+
problems.push({ field: `${at}.map_to`, message: `Unknown map target ${field.mapTo}` })
|
|
118
|
+
} else if (
|
|
119
|
+
field.mapTo !== PERSON_CONSENT_TARGET &&
|
|
120
|
+
!isCompatibleFormFieldType(field.type as FormFieldType, field.mapTo, customFieldDefinitions)
|
|
121
|
+
) {
|
|
122
|
+
problems.push({
|
|
123
|
+
field: `${at}.type`,
|
|
124
|
+
message: `A ${field.type} field cannot map to ${field.mapTo}`,
|
|
125
|
+
})
|
|
126
|
+
}
|
|
127
|
+
|
|
104
128
|
// `person.consent` is repeatable — a form may carry more than one consent
|
|
105
129
|
// (checkbox) or notice (implicit) field, each offering its own list of
|
|
106
130
|
// purposes — but no purpose may appear on two fields, whether as the
|
|
@@ -153,7 +177,7 @@ export function findFieldProblems(
|
|
|
153
177
|
field: `${at}.map_to`,
|
|
154
178
|
message: 'A consent or notice field must map to person.consent',
|
|
155
179
|
})
|
|
156
|
-
} else if (!
|
|
180
|
+
} else if (!isRepeatableMapTarget(field.mapTo)) {
|
|
157
181
|
if (seenTargets.has(field.mapTo)) {
|
|
158
182
|
problems.push({ field: `${at}.map_to`, message: `Another field already maps to ${field.mapTo}` })
|
|
159
183
|
}
|
|
@@ -4,7 +4,6 @@ import type { ErrorDetail } from '../../lib/errors.ts'
|
|
|
4
4
|
import { normaliseDomain, normaliseEmail } from '../../lib/normalisation.ts'
|
|
5
5
|
import type { FormFieldRecord } from './repository.ts'
|
|
6
6
|
import { PERSON_EMAIL_TARGET } from './schema.ts'
|
|
7
|
-
import type { FormFieldMapTarget } from './schema.ts'
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* The submit rules from `forms.md` that need no database: what an answer map
|
|
@@ -19,7 +18,7 @@ import type { FormFieldMapTarget } from './schema.ts'
|
|
|
19
18
|
export type Answers = Readonly<Record<string, string>>
|
|
20
19
|
|
|
21
20
|
/** Answers keyed by what they write rather than by which field carried them. */
|
|
22
|
-
export type MappedAnswers =
|
|
21
|
+
export type MappedAnswers = Record<string, string>
|
|
23
22
|
|
|
24
23
|
/**
|
|
25
24
|
* What a submit will write, once the blanks are known.
|
|
@@ -40,6 +39,8 @@ export interface SubmitIntent {
|
|
|
40
39
|
/** The `person.first_name` answer only. Never split out of `personName`. */
|
|
41
40
|
readonly personFirstName: string | undefined
|
|
42
41
|
readonly personLastName: string | undefined
|
|
42
|
+
/** The `person.phones` answer only. Written when the person's phone list is empty. */
|
|
43
|
+
readonly personPhone: string | undefined
|
|
43
44
|
readonly companyName: string | undefined
|
|
44
45
|
/** The `company.domain` answer only. Never derived from the address; see `resolveDomain`. */
|
|
45
46
|
readonly companyDomain: string | undefined
|
|
@@ -99,7 +100,7 @@ export function mapAnswers(fields: readonly FormFieldRecord[], answers: Answers)
|
|
|
99
100
|
continue
|
|
100
101
|
}
|
|
101
102
|
|
|
102
|
-
mapped[field.mapTo
|
|
103
|
+
mapped[field.mapTo] = value
|
|
103
104
|
}
|
|
104
105
|
|
|
105
106
|
return mapped
|
|
@@ -286,6 +287,7 @@ export function readIntent(mapped: MappedAnswers): SubmitIntent | undefined {
|
|
|
286
287
|
email,
|
|
287
288
|
personFirstName: firstName,
|
|
288
289
|
personLastName: lastName,
|
|
290
|
+
personPhone: mapped['person.phones'],
|
|
289
291
|
companyName: mapped['company.name'],
|
|
290
292
|
companyDomain: resolveDomain(mapped),
|
|
291
293
|
positionTitle: mapped['position.title'],
|
|
@@ -314,6 +316,21 @@ export function fillBlank(stored: string | null, inbound: string | undefined): s
|
|
|
314
316
|
return stored === null || stored.trim().length === 0 ? inbound : undefined
|
|
315
317
|
}
|
|
316
318
|
|
|
319
|
+
/**
|
|
320
|
+
* The merge rule for `person.phones`: fill when the stored list is empty, never
|
|
321
|
+
* append to a list the team has already set.
|
|
322
|
+
*/
|
|
323
|
+
export function fillPhonesBlank(
|
|
324
|
+
stored: readonly string[],
|
|
325
|
+
inbound: string | undefined,
|
|
326
|
+
): readonly string[] | undefined {
|
|
327
|
+
if (inbound === undefined || inbound.length === 0) {
|
|
328
|
+
return undefined
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
return stored.length === 0 ? [inbound] : undefined
|
|
332
|
+
}
|
|
333
|
+
|
|
317
334
|
/** What a new Company is called when the answers named a domain and no name. */
|
|
318
335
|
export function companyNameFrom(intent: SubmitIntent): string | undefined {
|
|
319
336
|
return intent.companyName ?? intent.companyDomain
|
|
@@ -296,11 +296,6 @@ export async function insertSubmission(
|
|
|
296
296
|
export interface FormListRow {
|
|
297
297
|
readonly listId: string
|
|
298
298
|
readonly targetType: RecordTargetType
|
|
299
|
-
/**
|
|
300
|
-
* When the list has a consent purpose, form-driven adds capture consent
|
|
301
|
-
* against it. Carried through so submission.ts needs no second query.
|
|
302
|
-
*/
|
|
303
|
-
readonly consentPurposeId: string | null
|
|
304
299
|
}
|
|
305
300
|
|
|
306
301
|
export async function listFormLists(db: Queryable, formId: string): Promise<FormListRow[]> {
|
|
@@ -308,7 +303,6 @@ export async function listFormLists(db: Queryable, formId: string): Promise<Form
|
|
|
308
303
|
.select({
|
|
309
304
|
listId: formLists.listId,
|
|
310
305
|
targetType: lists.targetType,
|
|
311
|
-
consentPurposeId: lists.consentPurposeId,
|
|
312
306
|
})
|
|
313
307
|
.from(formLists)
|
|
314
308
|
.innerJoin(lists, eq(lists.id, formLists.listId))
|
|
@@ -318,7 +312,6 @@ export async function listFormLists(db: Queryable, formId: string): Promise<Form
|
|
|
318
312
|
return rows.map((row) => ({
|
|
319
313
|
listId: row.listId,
|
|
320
314
|
targetType: row.targetType as RecordTargetType,
|
|
321
|
-
consentPurposeId: row.consentPurposeId,
|
|
322
315
|
}))
|
|
323
316
|
}
|
|
324
317
|
|
|
@@ -17,7 +17,6 @@ import type { CredentialDependencies } from '../auth/credentials.ts'
|
|
|
17
17
|
import { embedSnippets } from './embed.ts'
|
|
18
18
|
import type { FieldDraft } from './fields.ts'
|
|
19
19
|
import {
|
|
20
|
-
FORM_FIELD_MAP_TARGETS,
|
|
21
20
|
FORM_FIELD_TYPES,
|
|
22
21
|
FORM_OPTION_VALUE_TYPES,
|
|
23
22
|
FORM_STATUSES,
|
|
@@ -51,7 +50,7 @@ const fieldBody = z.strictObject({
|
|
|
51
50
|
label: z.string().min(1),
|
|
52
51
|
type: z.enum(FORM_FIELD_TYPES),
|
|
53
52
|
required: z.boolean().default(false),
|
|
54
|
-
map_to: z.
|
|
53
|
+
map_to: z.string().min(1),
|
|
55
54
|
options: z.array(optionBody).default([]),
|
|
56
55
|
placeholder: z.string().nullable().default(null),
|
|
57
56
|
statement: z.string().nullable().default(null),
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
FORM_FIELD_MAP_TARGETS,
|
|
3
2
|
FORM_FIELD_TYPES,
|
|
4
3
|
FORM_STATUSES,
|
|
5
4
|
PIPELINE_KINDS,
|
|
@@ -250,7 +249,6 @@ export const formFields = pgTable(
|
|
|
250
249
|
(table) => [
|
|
251
250
|
index('form_fields_form_idx').on(table.formId),
|
|
252
251
|
checkOneOf('form_fields_type_check', table.type, FORM_FIELD_TYPES),
|
|
253
|
-
checkOneOf('form_fields_map_to_check', table.mapTo, FORM_FIELD_MAP_TARGETS),
|
|
254
252
|
],
|
|
255
253
|
)
|
|
256
254
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CustomFieldDefinitionRef, CustomFieldObjectType, CustomFieldType } from '@kelpie/schemas'
|
|
1
2
|
import type {
|
|
2
3
|
FormAttachTarget,
|
|
3
4
|
FormSubmissionLinkTarget,
|
|
@@ -18,6 +19,8 @@ import type { Actor } from '../auth/actor.ts'
|
|
|
18
19
|
import { requireWorkspaceId } from '../auth/actor.ts'
|
|
19
20
|
import './events.ts'
|
|
20
21
|
import * as consentPurposesRepository from '../consent-purposes/repository.ts'
|
|
22
|
+
import * as customFieldsRepository from '../custom-fields/repository.ts'
|
|
23
|
+
import { CUSTOM_FIELD_OBJECT_TYPES } from '../custom-fields/schema.ts'
|
|
21
24
|
import * as listsRepository from '../lists/repository.ts'
|
|
22
25
|
import * as pipelineRepository from '../pipelines/repository.ts'
|
|
23
26
|
import { missingTargets } from '../recordTargets.ts'
|
|
@@ -328,18 +331,42 @@ export function createFormsService(dependencies: FormsDependencies): FormsServic
|
|
|
328
331
|
/**
|
|
329
332
|
* @throws AppError 422 listing every problem with the field list at once.
|
|
330
333
|
*/
|
|
331
|
-
function requireUsableFields(
|
|
334
|
+
async function requireUsableFields(
|
|
335
|
+
workspaceId: string,
|
|
332
336
|
fields: readonly FieldShape[],
|
|
333
337
|
createsDeal: boolean,
|
|
334
338
|
createsPartnership: boolean,
|
|
335
|
-
): void {
|
|
336
|
-
const
|
|
339
|
+
): Promise<void> {
|
|
340
|
+
const customFieldDefinitions = await loadCustomFieldDefinitions(workspaceId)
|
|
341
|
+
const problems = findFieldProblems(fields, createsDeal, {
|
|
342
|
+
createsPartnership,
|
|
343
|
+
customFieldDefinitions,
|
|
344
|
+
})
|
|
337
345
|
|
|
338
346
|
if (problems.length > 0) {
|
|
339
347
|
throw AppError.validationFailed('That field list cannot process a submission', problems)
|
|
340
348
|
}
|
|
341
349
|
}
|
|
342
350
|
|
|
351
|
+
async function loadCustomFieldDefinitions(
|
|
352
|
+
workspaceId: string,
|
|
353
|
+
): Promise<readonly CustomFieldDefinitionRef[]> {
|
|
354
|
+
const rows = await Promise.all(
|
|
355
|
+
CUSTOM_FIELD_OBJECT_TYPES.map((objectType) =>
|
|
356
|
+
customFieldsRepository.definitionsForObject(dependencies.db, workspaceId, objectType),
|
|
357
|
+
),
|
|
358
|
+
)
|
|
359
|
+
|
|
360
|
+
return rows.flat().map(
|
|
361
|
+
(row): CustomFieldDefinitionRef => ({
|
|
362
|
+
objectType: row.objectType as CustomFieldObjectType,
|
|
363
|
+
key: row.key,
|
|
364
|
+
label: row.label,
|
|
365
|
+
type: row.type as CustomFieldType,
|
|
366
|
+
}),
|
|
367
|
+
)
|
|
368
|
+
}
|
|
369
|
+
|
|
343
370
|
/**
|
|
344
371
|
* The lists an action-configured form names must exist in this workspace and
|
|
345
372
|
* target `person` or `company`. A list of another target type would never
|
|
@@ -479,7 +506,7 @@ export function createFormsService(dependencies: FormsDependencies): FormsServic
|
|
|
479
506
|
workspaceId: string,
|
|
480
507
|
state: ResultingState,
|
|
481
508
|
): Promise<void> {
|
|
482
|
-
requireUsableFields(state.fields, state.createDeal, state.createPartnership)
|
|
509
|
+
await requireUsableFields(workspaceId, state.fields, state.createDeal, state.createPartnership)
|
|
483
510
|
await requireConsentPurposes(workspaceId, state.fields)
|
|
484
511
|
await requireActionLists(workspaceId, state.listIds)
|
|
485
512
|
await requireAttachTargets(workspaceId, state.attachTargets)
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import type { FormFieldMapTarget, FormFieldType } from '@kelpie/schemas'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The forms a new workspace starts with. Data, not migrations: a workspace
|
|
5
|
+
* owner may rename, pause, or delete them, and add any others they need.
|
|
6
|
+
*
|
|
7
|
+
* Consent fields name a purpose by slug; `seedStarterForms` resolves those to
|
|
8
|
+
* the ids assigned when `STARTER_CONSENT_PURPOSES` is inserted.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export type StarterFormSlug = 'contact' | 'newsletter'
|
|
12
|
+
|
|
13
|
+
export type StarterConsentPurposeSlug = 'contact' | 'marketing'
|
|
14
|
+
|
|
15
|
+
export type StarterListSlug = 'newsletter'
|
|
16
|
+
|
|
17
|
+
export interface StarterFormField {
|
|
18
|
+
readonly label: string
|
|
19
|
+
readonly type: FormFieldType
|
|
20
|
+
readonly required: boolean
|
|
21
|
+
readonly mapTo: FormFieldMapTarget
|
|
22
|
+
readonly placeholder?: string | null
|
|
23
|
+
readonly statement?: string
|
|
24
|
+
readonly consentPurposeSlug?: StarterConsentPurposeSlug
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface StarterForm {
|
|
28
|
+
readonly slug: StarterFormSlug
|
|
29
|
+
readonly name: string
|
|
30
|
+
readonly title: string
|
|
31
|
+
readonly description: string
|
|
32
|
+
readonly thankYouMessage: string
|
|
33
|
+
readonly linkedListSlug?: StarterListSlug
|
|
34
|
+
readonly fields: readonly StarterFormField[]
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const STARTER_FORMS: readonly StarterForm[] = [
|
|
38
|
+
{
|
|
39
|
+
slug: 'contact',
|
|
40
|
+
name: 'Contact',
|
|
41
|
+
title: 'Contact us',
|
|
42
|
+
description: 'General enquiries from your website.',
|
|
43
|
+
thankYouMessage: 'Thanks. We will be in touch.',
|
|
44
|
+
fields: [
|
|
45
|
+
{
|
|
46
|
+
label: 'Name',
|
|
47
|
+
type: 'text',
|
|
48
|
+
required: true,
|
|
49
|
+
mapTo: 'person.name',
|
|
50
|
+
placeholder: 'Your name',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: 'Email',
|
|
54
|
+
type: 'email',
|
|
55
|
+
required: true,
|
|
56
|
+
mapTo: 'person.email',
|
|
57
|
+
placeholder: 'you@company.com',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: 'Job title',
|
|
61
|
+
type: 'text',
|
|
62
|
+
required: false,
|
|
63
|
+
mapTo: 'position.title',
|
|
64
|
+
placeholder: 'Your role',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: 'Company',
|
|
68
|
+
type: 'text',
|
|
69
|
+
required: false,
|
|
70
|
+
mapTo: 'company.name',
|
|
71
|
+
placeholder: 'Company name',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
label: 'Phone',
|
|
75
|
+
type: 'text',
|
|
76
|
+
required: false,
|
|
77
|
+
mapTo: 'person.phones',
|
|
78
|
+
placeholder: 'Phone number',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
label: 'Message',
|
|
82
|
+
type: 'textarea',
|
|
83
|
+
required: false,
|
|
84
|
+
mapTo: 'submission',
|
|
85
|
+
placeholder: 'How can we help?',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
label: 'Consent',
|
|
89
|
+
type: 'consent',
|
|
90
|
+
required: true,
|
|
91
|
+
mapTo: 'person.consent',
|
|
92
|
+
statement: 'Please tell us how we can contact you about your enquiry.',
|
|
93
|
+
consentPurposeSlug: 'contact',
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
slug: 'newsletter',
|
|
99
|
+
name: 'Newsletter',
|
|
100
|
+
title: 'Newsletter signup',
|
|
101
|
+
description: 'Subscribe to product updates and campaigns.',
|
|
102
|
+
thankYouMessage: 'Thanks for subscribing.',
|
|
103
|
+
linkedListSlug: 'newsletter',
|
|
104
|
+
fields: [
|
|
105
|
+
{
|
|
106
|
+
label: 'Name',
|
|
107
|
+
type: 'text',
|
|
108
|
+
required: false,
|
|
109
|
+
mapTo: 'person.name',
|
|
110
|
+
placeholder: 'Your name',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
label: 'Email',
|
|
114
|
+
type: 'email',
|
|
115
|
+
required: true,
|
|
116
|
+
mapTo: 'person.email',
|
|
117
|
+
placeholder: 'you@company.com',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
label: 'Consent',
|
|
121
|
+
type: 'consent',
|
|
122
|
+
required: true,
|
|
123
|
+
mapTo: 'person.consent',
|
|
124
|
+
statement: 'Please confirm you want to hear from us.',
|
|
125
|
+
consentPurposeSlug: 'marketing',
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
]
|