@kelpie/server 0.10.0 → 0.12.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/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.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/lib/errors.d.ts +18 -0
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +17 -0
- package/dist/lib/errors.js.map +1 -1
- 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/auth/index.d.ts.map +1 -1
- package/dist/modules/auth/index.js +21 -4
- package/dist/modules/auth/index.js.map +1 -1
- package/dist/modules/auth/repository.d.ts +2 -1
- package/dist/modules/auth/repository.d.ts.map +1 -1
- package/dist/modules/auth/repository.js +1 -0
- package/dist/modules/auth/repository.js.map +1 -1
- package/dist/modules/auth/routes.d.ts.map +1 -1
- package/dist/modules/auth/routes.js +2 -6
- package/dist/modules/auth/routes.js.map +1 -1
- package/dist/modules/auth/schema.d.ts +18 -1
- package/dist/modules/auth/schema.d.ts.map +1 -1
- package/dist/modules/auth/schema.js +12 -1
- package/dist/modules/auth/schema.js.map +1 -1
- package/dist/modules/auth/service.d.ts +18 -0
- package/dist/modules/auth/service.d.ts.map +1 -1
- package/dist/modules/auth/service.js +95 -6
- package/dist/modules/auth/service.js.map +1 -1
- package/dist/modules/auth/session.d.ts +12 -0
- package/dist/modules/auth/session.d.ts.map +1 -1
- package/dist/modules/auth/session.js +12 -0
- package/dist/modules/auth/session.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/runtime/module.d.ts +63 -1
- package/dist/runtime/module.d.ts.map +1 -1
- package/dist/runtime/registry.d.ts.map +1 -1
- package/dist/runtime/registry.js +40 -2
- package/dist/runtime/registry.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/0043_external_sign_in.sql +2 -0
- package/migrations/meta/0038_snapshot.json +6554 -0
- package/migrations/meta/_journal.json +49 -0
- package/package.json +2 -2
- package/src/app.ts +3 -0
- package/src/index.ts +13 -1
- package/src/lib/actor.ts +3 -1
- package/src/lib/apiKeyScopes.ts +213 -0
- package/src/lib/errors.ts +30 -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/auth/index.ts +25 -4
- package/src/modules/auth/repository.ts +2 -1
- package/src/modules/auth/routes.ts +2 -8
- package/src/modules/auth/schema.ts +12 -1
- package/src/modules/auth/service.ts +143 -6
- package/src/modules/auth/session.ts +14 -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/runtime/module.ts +70 -1
- package/src/runtime/registry.ts +54 -0
- package/src/testing/fixtures.ts +1 -0
|
@@ -43,7 +43,7 @@ function enumeration(mapped, column, values) {
|
|
|
43
43
|
function present(draft) {
|
|
44
44
|
return Object.fromEntries(Object.entries(draft).filter(([, value]) => value !== undefined));
|
|
45
45
|
}
|
|
46
|
-
export function companyDraft(mapped) {
|
|
46
|
+
export function companyDraft(mapped, customFields = {}) {
|
|
47
47
|
const domain = text(mapped, 'domain');
|
|
48
48
|
return present({
|
|
49
49
|
name: text(mapped, 'name'),
|
|
@@ -58,6 +58,7 @@ export function companyDraft(mapped) {
|
|
|
58
58
|
icpFit: enumeration(mapped, 'icp_fit', ICP_FITS),
|
|
59
59
|
summary: text(mapped, 'summary'),
|
|
60
60
|
tags: list(mapped, 'tags'),
|
|
61
|
+
customFields: Object.keys(customFields).length === 0 ? undefined : customFields,
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
64
|
/**
|
|
@@ -66,7 +67,7 @@ export function companyDraft(mapped) {
|
|
|
66
67
|
* blank, and never the other way round: a `name` cell is never split to fill
|
|
67
68
|
* `first_name`, since a guessed part is stored exactly like one somebody typed.
|
|
68
69
|
*/
|
|
69
|
-
export function personDraft(mapped) {
|
|
70
|
+
export function personDraft(mapped, customFields = {}) {
|
|
70
71
|
const email = text(mapped, 'email');
|
|
71
72
|
const firstName = text(mapped, 'first_name');
|
|
72
73
|
const lastName = text(mapped, 'last_name');
|
|
@@ -87,6 +88,7 @@ export function personDraft(mapped) {
|
|
|
87
88
|
relationship: enumeration(mapped, 'relationship', RELATIONSHIP_LEVELS),
|
|
88
89
|
summary: text(mapped, 'summary'),
|
|
89
90
|
tags: list(mapped, 'tags'),
|
|
91
|
+
customFields: Object.keys(customFields).length === 0 ? undefined : customFields,
|
|
90
92
|
});
|
|
91
93
|
}
|
|
92
94
|
/**
|
|
@@ -112,13 +114,14 @@ export function affiliationCompanyDraft(mapped) {
|
|
|
112
114
|
icpFit: undefined,
|
|
113
115
|
summary: undefined,
|
|
114
116
|
tags: undefined,
|
|
117
|
+
customFields: undefined,
|
|
115
118
|
});
|
|
116
119
|
}
|
|
117
120
|
/**
|
|
118
121
|
* `value` is required, so `moneyToCents` has already been checked by
|
|
119
122
|
* `validateRow` and cannot be undefined here.
|
|
120
123
|
*/
|
|
121
|
-
export function dealFieldsDraft(mapped) {
|
|
124
|
+
export function dealFieldsDraft(mapped, customFields = {}) {
|
|
122
125
|
const cents = moneyToCents(mapped.value);
|
|
123
126
|
return present({
|
|
124
127
|
name: text(mapped, 'name'),
|
|
@@ -130,6 +133,65 @@ export function dealFieldsDraft(mapped) {
|
|
|
130
133
|
summary: text(mapped, 'summary'),
|
|
131
134
|
tags: list(mapped, 'tags'),
|
|
132
135
|
externalId: text(mapped, 'external_id'),
|
|
136
|
+
customFields: Object.keys(customFields).length === 0 ? undefined : customFields,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
export function opportunityFieldsDraft(mapped, customFields = {}) {
|
|
140
|
+
return present({
|
|
141
|
+
name: text(mapped, 'name'),
|
|
142
|
+
kind: text(mapped, 'kind'),
|
|
143
|
+
expectedClose: text(mapped, 'expected_close'),
|
|
144
|
+
summary: text(mapped, 'summary'),
|
|
145
|
+
tags: list(mapped, 'tags'),
|
|
146
|
+
customFields: Object.keys(customFields).length === 0 ? undefined : customFields,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
export function enquiryFieldsDraft(mapped, customFields = {}) {
|
|
150
|
+
return present({
|
|
151
|
+
name: text(mapped, 'name'),
|
|
152
|
+
source: text(mapped, 'source'),
|
|
153
|
+
summary: text(mapped, 'summary'),
|
|
154
|
+
tags: list(mapped, 'tags'),
|
|
155
|
+
customFields: Object.keys(customFields).length === 0 ? undefined : customFields,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
export function partnershipFieldsDraft(mapped, customFields = {}) {
|
|
159
|
+
return present({
|
|
160
|
+
name: text(mapped, 'name'),
|
|
161
|
+
kind: text(mapped, 'kind'),
|
|
162
|
+
nextTouchpoint: text(mapped, 'next_touchpoint'),
|
|
163
|
+
goals: text(mapped, 'goals'),
|
|
164
|
+
successLooksLike: text(mapped, 'success_looks_like'),
|
|
165
|
+
summary: text(mapped, 'summary'),
|
|
166
|
+
tags: list(mapped, 'tags'),
|
|
167
|
+
customFields: Object.keys(customFields).length === 0 ? undefined : customFields,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
export function raiseFieldsDraft(mapped, customFields = {}) {
|
|
171
|
+
const cents = moneyToCents(mapped.check_size);
|
|
172
|
+
return present({
|
|
173
|
+
name: text(mapped, 'name'),
|
|
174
|
+
checkSizeCents: cents === undefined ? undefined : cents,
|
|
175
|
+
currency: text(mapped, 'currency'),
|
|
176
|
+
thesisFit: text(mapped, 'thesis_fit'),
|
|
177
|
+
passReason: text(mapped, 'pass_reason'),
|
|
178
|
+
expectedClose: text(mapped, 'expected_close'),
|
|
179
|
+
summary: text(mapped, 'summary'),
|
|
180
|
+
tags: list(mapped, 'tags'),
|
|
181
|
+
customFields: Object.keys(customFields).length === 0 ? undefined : customFields,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
export function customFieldDefinitionDraft(mapped) {
|
|
185
|
+
const sortOrderRaw = text(mapped, 'sort_order');
|
|
186
|
+
const sortOrder = sortOrderRaw === undefined ? undefined : Number.parseInt(sortOrderRaw, 10);
|
|
187
|
+
return present({
|
|
188
|
+
objectType: text(mapped, 'object_type'),
|
|
189
|
+
key: text(mapped, 'key'),
|
|
190
|
+
label: text(mapped, 'label'),
|
|
191
|
+
type: text(mapped, 'type'),
|
|
192
|
+
options: list(mapped, 'options'),
|
|
193
|
+
description: text(mapped, 'description'),
|
|
194
|
+
sortOrder: sortOrder !== undefined && Number.isInteger(sortOrder) ? sortOrder : undefined,
|
|
133
195
|
});
|
|
134
196
|
}
|
|
135
197
|
//# sourceMappingURL=drafts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drafts.js","sourceRoot":"","sources":["../../../src/modules/import-export/drafts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,cAAc,EACd,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,EACV,WAAW,GACZ,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"drafts.js","sourceRoot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WAAW,EAAE,IAAI,CAAC,MAAM,EAAE,aAAa,CAAC;QACxC,SAAS,EAAE,SAAS,KAAK,SAAS,IAAI,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;KAC1F,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ExportObject } from '@kelpie/schemas';
|
|
2
|
+
import type { CustomFieldDefinitionRecord } from '../custom-fields/repository.ts';
|
|
3
|
+
import type { ExportCompanyRow, ExportDealRow, ExportEnquiryRow, ExportOpportunityRow, ExportPartnershipRow, ExportPersonRow, ExportPositionRow, ExportRaiseRow } from './repository.ts';
|
|
3
4
|
/**
|
|
4
5
|
* The header row of an export and of a template.
|
|
5
6
|
*
|
|
6
|
-
* `importOnly` columns are left out
|
|
7
|
-
*
|
|
8
|
-
* writes, but none is a field on the person row. A template also leaves out
|
|
9
|
-
* `exportOnly` columns (`do_not_contact`, `consents`), which the export writes
|
|
10
|
-
* for readability but a caller round-trips through the per-purpose columns and
|
|
11
|
-
* `consent_purpose_id` on the job.
|
|
7
|
+
* `importOnly` columns are left out. Custom field definition keys append in
|
|
8
|
+
* workspace sort order when the object type carries custom fields.
|
|
12
9
|
*/
|
|
13
|
-
export declare function headersFor(object:
|
|
10
|
+
export declare function headersFor(object: ExportObject, definitions?: readonly CustomFieldDefinitionRecord[]): readonly string[];
|
|
14
11
|
/** The template's headers — the round-trippable ones for a caller to fill in. */
|
|
15
|
-
export declare function templateHeadersFor(object:
|
|
16
|
-
export declare function companyCells(row: ExportCompanyRow): readonly string[];
|
|
17
|
-
export declare function personCells(row: ExportPersonRow): readonly string[];
|
|
12
|
+
export declare function templateHeadersFor(object: ExportObject, definitions?: readonly CustomFieldDefinitionRecord[]): readonly string[];
|
|
13
|
+
export declare function companyCells(row: ExportCompanyRow, definitions?: readonly CustomFieldDefinitionRecord[]): readonly string[];
|
|
14
|
+
export declare function personCells(row: ExportPersonRow, definitions?: readonly CustomFieldDefinitionRecord[]): readonly string[];
|
|
18
15
|
export declare function positionCells(row: ExportPositionRow): readonly string[];
|
|
19
|
-
export declare function dealCells(row: ExportDealRow, personEmails: readonly string[]): readonly string[];
|
|
16
|
+
export declare function dealCells(row: ExportDealRow, personEmails: readonly string[], definitions?: readonly CustomFieldDefinitionRecord[]): readonly string[];
|
|
17
|
+
export declare function opportunityCells(row: ExportOpportunityRow, personEmails: readonly string[], definitions?: readonly CustomFieldDefinitionRecord[]): readonly string[];
|
|
18
|
+
export declare function enquiryCells(row: ExportEnquiryRow, personEmails: readonly string[], definitions?: readonly CustomFieldDefinitionRecord[]): readonly string[];
|
|
19
|
+
export declare function partnershipCells(row: ExportPartnershipRow, personEmails: readonly string[], definitions?: readonly CustomFieldDefinitionRecord[]): readonly string[];
|
|
20
|
+
export declare function raiseCells(row: ExportRaiseRow, personEmails: readonly string[], definitions?: readonly CustomFieldDefinitionRecord[]): readonly string[];
|
|
21
|
+
export declare function customFieldDefinitionRowCells(row: CustomFieldDefinitionRecord): readonly string[];
|
|
20
22
|
//# sourceMappingURL=exportRows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exportRows.d.ts","sourceRoot":"","sources":["../../../src/modules/import-export/exportRows.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"exportRows.d.ts","sourceRoot":"","sources":["../../../src/modules/import-export/exportRows.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA+B,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEhF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AAGjF,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,cAAc,EACf,MAAM,iBAAiB,CAAA;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Ac,EACnB,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,WAAW,GAAE,SAAS,2BAA2B,EAAO,GACvD,SAAS,MAAM,EAAE,CAmBnB;AAED,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,2BAA2B,GAAG,SAAS,MAAM,EAAE,CAEjG"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { OBJECT_COLUMNS } from '@kelpie/schemas';
|
|
1
|
+
import { OBJECT_COLUMNS, customFieldObjectTypeForExport } from '@kelpie/schemas';
|
|
2
|
+
import { customFieldCells, customFieldDefinitionCells, customFieldHeaderKeys } from './customFieldCsv.js';
|
|
2
3
|
import { centsToMoney } from './mapping.js';
|
|
3
4
|
/**
|
|
4
|
-
* Records as CSV cells, in the header order of `OBJECT_COLUMNS
|
|
5
|
+
* Records as CSV cells, in the header order of `OBJECT_COLUMNS` and
|
|
6
|
+
* `EXPORT_ONLY_COLUMNS`, plus workspace custom field keys when the object
|
|
7
|
+
* carries them.
|
|
5
8
|
*
|
|
6
|
-
* An export writes what an import reads: the stage is its
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* `custom` source and no mapping at all — every header matches a column name
|
|
10
|
-
* exactly.
|
|
9
|
+
* An export writes what an import reads where import exists: the stage is its
|
|
10
|
+
* **slug**, and money is the major unit rather than cents. Custom field values
|
|
11
|
+
* append as columns named by definition key.
|
|
11
12
|
*
|
|
12
13
|
* Pure.
|
|
13
14
|
*/
|
|
@@ -15,29 +16,42 @@ import { centsToMoney } from './mapping.js';
|
|
|
15
16
|
function joinList(values) {
|
|
16
17
|
return values.join('|');
|
|
17
18
|
}
|
|
19
|
+
function baseColumnsFor(object) {
|
|
20
|
+
return OBJECT_COLUMNS[object];
|
|
21
|
+
}
|
|
18
22
|
/**
|
|
19
23
|
* The header row of an export and of a template.
|
|
20
24
|
*
|
|
21
|
-
* `importOnly` columns are left out
|
|
22
|
-
*
|
|
23
|
-
* writes, but none is a field on the person row. A template also leaves out
|
|
24
|
-
* `exportOnly` columns (`do_not_contact`, `consents`), which the export writes
|
|
25
|
-
* for readability but a caller round-trips through the per-purpose columns and
|
|
26
|
-
* `consent_purpose_id` on the job.
|
|
25
|
+
* `importOnly` columns are left out. Custom field definition keys append in
|
|
26
|
+
* workspace sort order when the object type carries custom fields.
|
|
27
27
|
*/
|
|
28
|
-
export function headersFor(object) {
|
|
29
|
-
|
|
28
|
+
export function headersFor(object, definitions = []) {
|
|
29
|
+
const base = baseColumnsFor(object)
|
|
30
30
|
.filter((column) => column.importOnly !== true)
|
|
31
31
|
.map((column) => column.key);
|
|
32
|
+
if (customFieldObjectTypeForExport(object) === null) {
|
|
33
|
+
return base;
|
|
34
|
+
}
|
|
35
|
+
return [...base, ...customFieldHeaderKeys(definitions)];
|
|
32
36
|
}
|
|
33
37
|
/** The template's headers — the round-trippable ones for a caller to fill in. */
|
|
34
|
-
export function templateHeadersFor(object) {
|
|
35
|
-
|
|
38
|
+
export function templateHeadersFor(object, definitions = []) {
|
|
39
|
+
const base = baseColumnsFor(object)
|
|
36
40
|
.filter((column) => column.importOnly !== true && column.exportOnly !== true)
|
|
37
41
|
.map((column) => column.key);
|
|
42
|
+
if (customFieldObjectTypeForExport(object) === null) {
|
|
43
|
+
return base;
|
|
44
|
+
}
|
|
45
|
+
return [...base, ...customFieldHeaderKeys(definitions)];
|
|
46
|
+
}
|
|
47
|
+
function withCustomFields(base, customFields, definitions) {
|
|
48
|
+
if (definitions.length === 0) {
|
|
49
|
+
return base;
|
|
50
|
+
}
|
|
51
|
+
return [...base, ...customFieldCells(customFields, customFieldHeaderKeys(definitions))];
|
|
38
52
|
}
|
|
39
|
-
export function companyCells(row) {
|
|
40
|
-
return [
|
|
53
|
+
export function companyCells(row, definitions = []) {
|
|
54
|
+
return withCustomFields([
|
|
41
55
|
row.name,
|
|
42
56
|
row.domain ?? '',
|
|
43
57
|
row.industry ?? '',
|
|
@@ -50,10 +64,10 @@ export function companyCells(row) {
|
|
|
50
64
|
joinList(row.tags),
|
|
51
65
|
row.website ?? '',
|
|
52
66
|
row.hq ?? '',
|
|
53
|
-
];
|
|
67
|
+
], row.customFields, definitions);
|
|
54
68
|
}
|
|
55
|
-
export function personCells(row) {
|
|
56
|
-
return [
|
|
69
|
+
export function personCells(row, definitions = []) {
|
|
70
|
+
return withCustomFields([
|
|
57
71
|
row.name,
|
|
58
72
|
row.salutation ?? '',
|
|
59
73
|
row.firstName ?? '',
|
|
@@ -70,13 +84,13 @@ export function personCells(row) {
|
|
|
70
84
|
joinList(row.phones),
|
|
71
85
|
row.doNotContact ? 'true' : 'false',
|
|
72
86
|
row.consents,
|
|
73
|
-
];
|
|
87
|
+
], row.customFields, definitions);
|
|
74
88
|
}
|
|
75
89
|
export function positionCells(row) {
|
|
76
90
|
return [row.personEmail ?? '', row.companyDomain ?? '', row.title];
|
|
77
91
|
}
|
|
78
|
-
export function dealCells(row, personEmails) {
|
|
79
|
-
return [
|
|
92
|
+
export function dealCells(row, personEmails, definitions = []) {
|
|
93
|
+
return withCustomFields([
|
|
80
94
|
row.name,
|
|
81
95
|
row.companyDomain ?? '',
|
|
82
96
|
row.stageSlug,
|
|
@@ -90,6 +104,65 @@ export function dealCells(row, personEmails) {
|
|
|
90
104
|
row.summary,
|
|
91
105
|
joinList(row.tags),
|
|
92
106
|
row.externalId ?? '',
|
|
93
|
-
];
|
|
107
|
+
], row.customFields, definitions);
|
|
108
|
+
}
|
|
109
|
+
export function opportunityCells(row, personEmails, definitions = []) {
|
|
110
|
+
return withCustomFields([
|
|
111
|
+
row.name,
|
|
112
|
+
row.kind,
|
|
113
|
+
row.companyDomain ?? '',
|
|
114
|
+
row.stageSlug,
|
|
115
|
+
row.ownerEmail ?? '',
|
|
116
|
+
row.expectedClose ?? '',
|
|
117
|
+
joinList(personEmails),
|
|
118
|
+
row.summary,
|
|
119
|
+
joinList(row.tags),
|
|
120
|
+
], row.customFields, definitions);
|
|
121
|
+
}
|
|
122
|
+
export function enquiryCells(row, personEmails, definitions = []) {
|
|
123
|
+
return withCustomFields([
|
|
124
|
+
row.name,
|
|
125
|
+
row.source,
|
|
126
|
+
row.companyDomain ?? '',
|
|
127
|
+
row.stageSlug,
|
|
128
|
+
row.ownerEmail ?? '',
|
|
129
|
+
joinList(personEmails),
|
|
130
|
+
row.summary,
|
|
131
|
+
joinList(row.tags),
|
|
132
|
+
], row.customFields, definitions);
|
|
133
|
+
}
|
|
134
|
+
export function partnershipCells(row, personEmails, definitions = []) {
|
|
135
|
+
return withCustomFields([
|
|
136
|
+
row.name,
|
|
137
|
+
row.companyDomain ?? '',
|
|
138
|
+
row.stageSlug,
|
|
139
|
+
row.kind,
|
|
140
|
+
row.nextTouchpoint ?? '',
|
|
141
|
+
row.ownerEmail ?? '',
|
|
142
|
+
row.goals,
|
|
143
|
+
row.successLooksLike,
|
|
144
|
+
joinList(personEmails),
|
|
145
|
+
row.summary,
|
|
146
|
+
joinList(row.tags),
|
|
147
|
+
], row.customFields, definitions);
|
|
148
|
+
}
|
|
149
|
+
export function raiseCells(row, personEmails, definitions = []) {
|
|
150
|
+
return withCustomFields([
|
|
151
|
+
row.name,
|
|
152
|
+
row.companyDomain ?? '',
|
|
153
|
+
row.stageSlug,
|
|
154
|
+
row.checkSizeCents === null ? '' : centsToMoney(row.checkSizeCents),
|
|
155
|
+
row.currency ?? '',
|
|
156
|
+
row.thesisFit,
|
|
157
|
+
row.passReason ?? '',
|
|
158
|
+
row.ownerEmail ?? '',
|
|
159
|
+
row.expectedClose ?? '',
|
|
160
|
+
joinList(personEmails),
|
|
161
|
+
row.summary,
|
|
162
|
+
joinList(row.tags),
|
|
163
|
+
], row.customFields, definitions);
|
|
164
|
+
}
|
|
165
|
+
export function customFieldDefinitionRowCells(row) {
|
|
166
|
+
return customFieldDefinitionCells(row);
|
|
94
167
|
}
|
|
95
168
|
//# sourceMappingURL=exportRows.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exportRows.js","sourceRoot":"","sources":["../../../src/modules/import-export/exportRows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"exportRows.js","sourceRoot":"","sources":["../../../src/modules/import-export/exportRows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAA;AAIhF,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AACzG,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAY3C;;;;;;;;;;GAUG;AAEH,8CAA8C;AAC9C,SAAS,QAAQ,CAAC,MAAyB;IACzC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACzB,CAAC;AAED,SAAS,cAAc,CAAC,MAAoB;IAC1C,OAAO,cAAc,CAAC,MAAM,CAAC,CAAA;AAC/B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CACxB,MAAoB,EACpB,WAAW,GAA2C,EAAE;IAExD,MAAM,IAAI,GAAG,cAAc,CAAC,MAAM,CAAC;SAChC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,KAAK,IAAI,CAAC;SAC9C,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAE9B,IAAI,8BAA8B,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;QACpD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAA;AACzD,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,kBAAkB,CAChC,MAAoB,EACpB,WAAW,GAA2C,EAAE;IAExD,MAAM,IAAI,GAAG,cAAc,CAAC,MAAM,CAAC;SAChC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,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AAU,IAAI,EAAE;QACpB,GAAG,CAAC,KAAK;QACT,GAAG,CAAC,gBAAgB;QACpB,QAAQ,CAAC,YAAY,CAAC;QACtB,GAAG,CAAC,OAAO;QACX,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;KACnB,EACD,GAAG,CAAC,YAAY,EAChB,WAAW,CACZ,CAAA;AACH,CAAC;AAED,MAAM,UAAU,UAAU,CACxB,GAAmB,EACnB,YAA+B,EAC/B,WAAW,GAA2C,EAAE;IAExD,OAAO,gBAAgB,CACrB;QACE,GAAG,CAAC,IAAI;QACR,GAAG,CAAC,aAAa,IAAI,EAAE;QACvB,GAAG,CAAC,SAAS;QACb,GAAG,CAAC,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,cAAc,CAAC;QACnE,GAAG,CAAC,QAAQ,IAAI,EAAE;QAClB,GAAG,CAAC,SAAS;QACb,GAAG,CAAC,UAAU,IAAI,EAAE;QACpB,GAAG,CAAC,UAAU,IAAI,EAAE;QACpB,GAAG,CAAC,aAAa,IAAI,EAAE;QACvB,QAAQ,CAAC,YAAY,CAAC;QACtB,GAAG,CAAC,OAAO;QACX,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;KACnB,EACD,GAAG,CAAC,YAAY,EAChB,WAAW,CACZ,CAAA;AACH,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,GAAgC;IAC5E,OAAO,0BAA0B,CAAC,GAAG,CAAC,CAAA;AACxC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ConsentStatus, ImportConflictMode, ImportCounts, ImportObject, MatchKeyOption, OnMissingCompany } from '@kelpie/schemas';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CustomFieldDefinitionRecord } from '../custom-fields/repository.ts';
|
|
3
|
+
import type { CompanyDraft, CustomFieldDefinitionDraft, DealFieldsDraft, EnquiryFieldsDraft, OpportunityFieldsDraft, PartnershipFieldsDraft, PersonDraft, RaiseFieldsDraft } from './drafts.ts';
|
|
3
4
|
import type { StoredRowError } from './schema.ts';
|
|
4
5
|
/**
|
|
5
6
|
* What a row would do, and to what.
|
|
@@ -20,8 +21,8 @@ export interface ImportLookups {
|
|
|
20
21
|
readonly companyIdByName: ReadonlyMap<string, string>;
|
|
21
22
|
/** Workspace member id by the address of the user behind it. */
|
|
22
23
|
readonly memberIdByEmail: ReadonlyMap<string, string>;
|
|
23
|
-
/**
|
|
24
|
-
readonly
|
|
24
|
+
/** Pipeline stage id, keyed by both its slug and its folded label. */
|
|
25
|
+
readonly stageIdByName: ReadonlyMap<string, string>;
|
|
25
26
|
}
|
|
26
27
|
export interface PlanContext {
|
|
27
28
|
readonly object: ImportObject;
|
|
@@ -32,6 +33,9 @@ export interface PlanContext {
|
|
|
32
33
|
/** The consent purpose the job grants for each row's consent_status. Null when not set. */
|
|
33
34
|
readonly consentPurposeId: string | null;
|
|
34
35
|
readonly lookups: ImportLookups;
|
|
36
|
+
/** Workspace custom field definitions when the object carries custom field values. */
|
|
37
|
+
readonly customFieldDefinitions: readonly CustomFieldDefinitionRecord[];
|
|
38
|
+
readonly baseColumnKeys: ReadonlySet<string>;
|
|
35
39
|
}
|
|
36
40
|
/**
|
|
37
41
|
* A company affiliation a People row asks for: the position to write, and
|
|
@@ -76,15 +80,42 @@ export type ImportWrite = {
|
|
|
76
80
|
readonly stageId: string;
|
|
77
81
|
readonly ownerId: string | null;
|
|
78
82
|
readonly personIds: readonly string[];
|
|
79
|
-
/**
|
|
80
|
-
* Whether the row said anything about the deal's contacts.
|
|
81
|
-
*
|
|
82
|
-
* An empty `personIds` means two different things — the column was not
|
|
83
|
-
* mapped, or it was mapped and left blank — and only a filled-in cell is
|
|
84
|
-
* the file stating the list. Without this an update would clear the
|
|
85
|
-
* contacts of every deal in a file that never carried the column.
|
|
86
|
-
*/
|
|
87
83
|
readonly setsPeople: boolean;
|
|
84
|
+
} | {
|
|
85
|
+
readonly object: 'opportunities';
|
|
86
|
+
readonly draft: OpportunityFieldsDraft;
|
|
87
|
+
readonly companyId: string | null;
|
|
88
|
+
readonly stageId: string;
|
|
89
|
+
readonly ownerId: string | null;
|
|
90
|
+
readonly personIds: readonly string[];
|
|
91
|
+
readonly setsPeople: boolean;
|
|
92
|
+
} | {
|
|
93
|
+
readonly object: 'enquiries';
|
|
94
|
+
readonly draft: EnquiryFieldsDraft;
|
|
95
|
+
readonly companyId: string | null;
|
|
96
|
+
readonly stageId: string;
|
|
97
|
+
readonly ownerId: string | null;
|
|
98
|
+
readonly personIds: readonly string[];
|
|
99
|
+
readonly setsPeople: boolean;
|
|
100
|
+
} | {
|
|
101
|
+
readonly object: 'partnerships';
|
|
102
|
+
readonly draft: PartnershipFieldsDraft;
|
|
103
|
+
readonly companyId: string;
|
|
104
|
+
readonly stageId: string;
|
|
105
|
+
readonly ownerId: string | null;
|
|
106
|
+
readonly personIds: readonly string[];
|
|
107
|
+
readonly setsPeople: boolean;
|
|
108
|
+
} | {
|
|
109
|
+
readonly object: 'raises';
|
|
110
|
+
readonly draft: RaiseFieldsDraft;
|
|
111
|
+
readonly companyId: string;
|
|
112
|
+
readonly stageId: string;
|
|
113
|
+
readonly ownerId: string | null;
|
|
114
|
+
readonly personIds: readonly string[];
|
|
115
|
+
readonly setsPeople: boolean;
|
|
116
|
+
} | {
|
|
117
|
+
readonly object: 'custom_fields';
|
|
118
|
+
readonly draft: CustomFieldDefinitionDraft;
|
|
88
119
|
};
|
|
89
120
|
export type RowPlan = {
|
|
90
121
|
readonly action: 'error';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/modules/import-export/plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,gBAAgB,
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/modules/import-export/plan.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