@kelpie/server 0.11.0 → 0.13.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 +13 -0
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +8 -1
- package/dist/app.js.map +1 -1
- package/dist/boot.d.ts.map +1 -1
- package/dist/boot.js +1 -0
- package/dist/boot.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/apiKeyScopes.d.ts.map +1 -1
- package/dist/lib/apiKeyScopes.js +6 -0
- package/dist/lib/apiKeyScopes.js.map +1 -1
- package/dist/lib/columns.d.ts +6 -0
- package/dist/lib/columns.d.ts.map +1 -1
- package/dist/lib/columns.js +5 -3
- package/dist/lib/columns.js.map +1 -1
- package/dist/lib/config.d.ts +17 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +3 -0
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/egress.d.ts.map +1 -1
- package/dist/lib/egress.js +8 -4
- package/dist/lib/egress.js.map +1 -1
- package/dist/lib/errors.d.ts +18 -0
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +25 -0
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/ids.d.ts +11 -0
- package/dist/lib/ids.d.ts.map +1 -1
- package/dist/lib/ids.js +11 -0
- package/dist/lib/ids.js.map +1 -1
- package/dist/lib/kelpieConfigFile.d.ts +15 -1
- package/dist/lib/kelpieConfigFile.d.ts.map +1 -1
- package/dist/lib/kelpieConfigFile.js +33 -1
- package/dist/lib/kelpieConfigFile.js.map +1 -1
- package/dist/modules/agent-tasks/catalog.d.ts.map +1 -1
- package/dist/modules/agent-tasks/catalog.js +32 -1
- package/dist/modules/agent-tasks/catalog.js.map +1 -1
- package/dist/modules/agent-tasks/index.d.ts.map +1 -1
- package/dist/modules/agent-tasks/index.js +1 -0
- package/dist/modules/agent-tasks/index.js.map +1 -1
- package/dist/modules/agent-tasks/resolve.d.ts.map +1 -1
- package/dist/modules/agent-tasks/resolve.js +5 -0
- 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 +22 -8
- package/dist/modules/attachedRecords.d.ts.map +1 -1
- package/dist/modules/attachedRecords.js +42 -5
- package/dist/modules/attachedRecords.js.map +1 -1
- package/dist/modules/auth/index.d.ts.map +1 -1
- package/dist/modules/auth/index.js +22 -4
- package/dist/modules/auth/index.js.map +1 -1
- package/dist/modules/auth/repository.d.ts +16 -1
- package/dist/modules/auth/repository.d.ts.map +1 -1
- package/dist/modules/auth/repository.js +21 -2
- 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 +32 -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 +46 -0
- package/dist/modules/auth/service.d.ts.map +1 -1
- package/dist/modules/auth/service.js +167 -10
- 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/companies/repository.d.ts.map +1 -1
- package/dist/modules/companies/repository.js +1 -1
- package/dist/modules/companies/repository.js.map +1 -1
- package/dist/modules/companies/routes.d.ts +2 -4
- package/dist/modules/companies/routes.d.ts.map +1 -1
- package/dist/modules/companies/routes.js +6 -11
- package/dist/modules/companies/routes.js.map +1 -1
- package/dist/modules/companies/schema.d.ts +13 -28
- package/dist/modules/companies/schema.d.ts.map +1 -1
- package/dist/modules/companies/schema.js +2 -2
- package/dist/modules/companies/schema.js.map +1 -1
- package/dist/modules/companies/service.d.ts +2 -3
- package/dist/modules/companies/service.d.ts.map +1 -1
- package/dist/modules/companies/service.js +4 -7
- package/dist/modules/companies/service.js.map +1 -1
- package/dist/modules/core.d.ts.map +1 -1
- package/dist/modules/core.js +2 -0
- package/dist/modules/core.js.map +1 -1
- package/dist/modules/custom-fields/repository.d.ts.map +1 -1
- package/dist/modules/custom-fields/repository.js +2 -0
- package/dist/modules/custom-fields/repository.js.map +1 -1
- package/dist/modules/custom-fields/routes.d.ts +1 -0
- package/dist/modules/custom-fields/routes.d.ts.map +1 -1
- package/dist/modules/dashboard/index.d.ts.map +1 -1
- package/dist/modules/dashboard/index.js +1 -0
- package/dist/modules/dashboard/index.js.map +1 -1
- package/dist/modules/dashboard/repository.d.ts +13 -0
- package/dist/modules/dashboard/repository.d.ts.map +1 -1
- package/dist/modules/dashboard/repository.js +36 -0
- package/dist/modules/dashboard/repository.js.map +1 -1
- package/dist/modules/dashboard/routes.d.ts.map +1 -1
- package/dist/modules/dashboard/routes.js +13 -0
- package/dist/modules/dashboard/routes.js.map +1 -1
- package/dist/modules/dashboard/service.d.ts +11 -0
- package/dist/modules/dashboard/service.d.ts.map +1 -1
- package/dist/modules/dashboard/service.js +24 -1
- package/dist/modules/dashboard/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 +2 -0
- package/dist/modules/decisions/routes.d.ts.map +1 -1
- package/dist/modules/events/attendances.d.ts +35 -0
- package/dist/modules/events/attendances.d.ts.map +1 -0
- package/dist/modules/events/attendances.js +157 -0
- package/dist/modules/events/attendances.js.map +1 -0
- package/dist/modules/events/catalog.d.ts +35 -0
- package/dist/modules/events/catalog.d.ts.map +1 -0
- package/dist/modules/events/catalog.js +11 -0
- package/dist/modules/events/catalog.js.map +1 -0
- package/dist/modules/events/index.d.ts +10 -0
- package/dist/modules/events/index.d.ts.map +1 -0
- package/dist/modules/events/index.js +47 -0
- package/dist/modules/events/index.js.map +1 -0
- package/dist/modules/events/repository.d.ts +67 -0
- package/dist/modules/events/repository.d.ts.map +1 -0
- package/dist/modules/events/repository.js +212 -0
- package/dist/modules/events/repository.js.map +1 -0
- package/dist/modules/events/routes.d.ts +136 -0
- package/dist/modules/events/routes.d.ts.map +1 -0
- package/dist/modules/events/routes.js +280 -0
- package/dist/modules/events/routes.js.map +1 -0
- package/dist/modules/events/schema.d.ts +626 -0
- package/dist/modules/events/schema.d.ts.map +1 -0
- package/dist/modules/events/schema.js +93 -0
- package/dist/modules/events/schema.js.map +1 -0
- package/dist/modules/events/service.d.ts +68 -0
- package/dist/modules/events/service.d.ts.map +1 -0
- package/dist/modules/events/service.js +262 -0
- package/dist/modules/events/service.js.map +1 -0
- package/dist/modules/events/tools.d.ts +8 -0
- package/dist/modules/events/tools.d.ts.map +1 -0
- package/dist/modules/events/tools.js +80 -0
- package/dist/modules/events/tools.js.map +1 -0
- package/dist/modules/forms/applySubmissionFields.d.ts.map +1 -1
- package/dist/modules/forms/applySubmissionFields.js +7 -5
- package/dist/modules/forms/applySubmissionFields.js.map +1 -1
- package/dist/modules/forms/fillAddresses.d.ts +4 -0
- package/dist/modules/forms/fillAddresses.d.ts.map +1 -0
- package/dist/modules/forms/fillAddresses.js +93 -0
- package/dist/modules/forms/fillAddresses.js.map +1 -0
- package/dist/modules/forms/repository.d.ts +2 -2
- package/dist/modules/forms/repository.d.ts.map +1 -1
- package/dist/modules/forms/repository.js.map +1 -1
- package/dist/modules/forms/routes.d.ts +2 -0
- 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.js +2 -2
- package/dist/modules/forms/schema.js.map +1 -1
- package/dist/modules/forms/service.js +2 -2
- package/dist/modules/forms/service.js.map +1 -1
- 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 +27 -4
- package/dist/modules/forms/submission.js.map +1 -1
- package/dist/modules/hiring/roles.d.ts.map +1 -1
- package/dist/modules/hiring/roles.js +2 -1
- package/dist/modules/hiring/roles.js.map +1 -1
- package/dist/modules/import-export/addresses.d.ts +22 -0
- package/dist/modules/import-export/addresses.d.ts.map +1 -0
- package/dist/modules/import-export/addresses.js +83 -0
- package/dist/modules/import-export/addresses.js.map +1 -0
- package/dist/modules/import-export/drafts.d.ts +3 -4
- package/dist/modules/import-export/drafts.d.ts.map +1 -1
- package/dist/modules/import-export/drafts.js +4 -5
- package/dist/modules/import-export/drafts.js.map +1 -1
- package/dist/modules/import-export/exportRows.d.ts.map +1 -1
- package/dist/modules/import-export/exportRows.js +3 -3
- package/dist/modules/import-export/exportRows.js.map +1 -1
- package/dist/modules/import-export/plan.d.ts.map +1 -1
- package/dist/modules/import-export/plan.js +17 -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 +52 -7
- package/dist/modules/import-export/presets.js.map +1 -1
- package/dist/modules/import-export/repository.d.ts +3 -4
- package/dist/modules/import-export/repository.d.ts.map +1 -1
- package/dist/modules/import-export/repository.js +2 -3
- package/dist/modules/import-export/repository.js.map +1 -1
- package/dist/modules/import-export/writes.d.ts.map +1 -1
- package/dist/modules/import-export/writes.js +8 -4
- package/dist/modules/import-export/writes.js.map +1 -1
- package/dist/modules/lists/routes.d.ts +4 -0
- package/dist/modules/lists/routes.d.ts.map +1 -1
- package/dist/modules/notes/routes.d.ts +2 -0
- package/dist/modules/notes/routes.d.ts.map +1 -1
- package/dist/modules/people/repository.d.ts.map +1 -1
- package/dist/modules/people/repository.js +1 -1
- package/dist/modules/people/repository.js.map +1 -1
- package/dist/modules/people/routes.d.ts +2 -2
- package/dist/modules/people/routes.js +6 -6
- package/dist/modules/people/routes.js.map +1 -1
- package/dist/modules/people/schema.d.ts +17 -14
- package/dist/modules/people/schema.d.ts.map +1 -1
- package/dist/modules/people/schema.js +6 -4
- package/dist/modules/people/schema.js.map +1 -1
- package/dist/modules/people/service.d.ts +2 -2
- package/dist/modules/people/service.d.ts.map +1 -1
- package/dist/modules/people/service.js +5 -4
- package/dist/modules/people/service.js.map +1 -1
- package/dist/modules/plans/repository.d.ts +2 -2
- package/dist/modules/plans/repository.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/plans/routes.js +4 -4
- package/dist/modules/plans/routes.js.map +1 -1
- package/dist/modules/plans/schema.d.ts +2 -2
- package/dist/modules/plans/schema.d.ts.map +1 -1
- package/dist/modules/plans/schema.js +3 -3
- package/dist/modules/plans/schema.js.map +1 -1
- package/dist/modules/plans/service.d.ts +2 -2
- package/dist/modules/plans/service.d.ts.map +1 -1
- package/dist/modules/plans/service.js.map +1 -1
- package/dist/modules/plans/tools.js +2 -2
- package/dist/modules/plans/tools.js.map +1 -1
- package/dist/modules/recordTargets.d.ts.map +1 -1
- package/dist/modules/recordTargets.js +11 -0
- package/dist/modules/recordTargets.js.map +1 -1
- package/dist/modules/references.d.ts.map +1 -1
- package/dist/modules/references.js +2 -0
- package/dist/modules/references.js.map +1 -1
- package/dist/modules/sample-data/fixture.d.ts +26 -4
- package/dist/modules/sample-data/fixture.d.ts.map +1 -1
- package/dist/modules/sample-data/fixture.js +157 -23
- package/dist/modules/sample-data/fixture.js.map +1 -1
- package/dist/modules/sample-data/index.d.ts +5 -2
- package/dist/modules/sample-data/index.d.ts.map +1 -1
- package/dist/modules/sample-data/index.js +7 -2
- package/dist/modules/sample-data/index.js.map +1 -1
- package/dist/modules/sample-data/routes.d.ts.map +1 -1
- package/dist/modules/sample-data/routes.js +2 -0
- package/dist/modules/sample-data/routes.js.map +1 -1
- package/dist/modules/sample-data/service.d.ts +11 -3
- package/dist/modules/sample-data/service.d.ts.map +1 -1
- package/dist/modules/sample-data/service.js +452 -363
- package/dist/modules/sample-data/service.js.map +1 -1
- package/dist/modules/sample-data/tools.d.ts.map +1 -1
- package/dist/modules/sample-data/tools.js +4 -3
- package/dist/modules/sample-data/tools.js.map +1 -1
- 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 +22 -0
- package/dist/modules/search/repository.js.map +1 -1
- package/dist/modules/search/service.d.ts +2 -2
- package/dist/modules/search/service.d.ts.map +1 -1
- package/dist/modules/search/service.js +4 -3
- package/dist/modules/search/service.js.map +1 -1
- package/dist/modules/smtp-email/index.d.ts +12 -4
- package/dist/modules/smtp-email/index.d.ts.map +1 -1
- package/dist/modules/smtp-email/index.js +25 -5
- package/dist/modules/smtp-email/index.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 +12 -0
- package/dist/modules/workspace/repository.js.map +1 -1
- package/dist/modules/workspace/routes.d.ts.map +1 -1
- package/dist/modules/workspace/routes.js +13 -0
- package/dist/modules/workspace/routes.js.map +1 -1
- package/dist/modules/workspace/service.d.ts +10 -0
- package/dist/modules/workspace/service.d.ts.map +1 -1
- package/dist/modules/workspace/service.js +34 -10
- package/dist/modules/workspace/service.js.map +1 -1
- package/dist/modules/workspace/starters.d.ts +17 -2
- package/dist/modules/workspace/starters.d.ts.map +1 -1
- package/dist/modules/workspace/starters.js +141 -14
- package/dist/modules/workspace/starters.js.map +1 -1
- package/dist/modules/workspace/workspaceAccessMiddleware.d.ts.map +1 -1
- package/dist/modules/workspace/workspaceAccessMiddleware.js +3 -4
- package/dist/modules/workspace/workspaceAccessMiddleware.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 +2 -0
- package/dist/runtime/events.js.map +1 -1
- package/dist/runtime/module.d.ts +71 -1
- package/dist/runtime/module.d.ts.map +1 -1
- package/dist/runtime/registry.d.ts.map +1 -1
- package/dist/runtime/registry.js +142 -9
- package/dist/runtime/registry.js.map +1 -1
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +1 -0
- package/dist/schema/index.js.map +1 -1
- package/dist/testing/app.d.ts +8 -0
- package/dist/testing/app.d.ts.map +1 -1
- package/dist/testing/app.js +6 -1
- package/dist/testing/app.js.map +1 -1
- package/dist/testing/client.d.ts.map +1 -1
- package/dist/testing/client.js +9 -1
- package/dist/testing/client.js.map +1 -1
- package/migrations/0043_external_sign_in.sql +2 -0
- package/migrations/0044_events.sql +79 -0
- package/migrations/0045_addresses.sql +66 -0
- package/migrations/0046_drop_company_website.sql +66 -0
- package/migrations/meta/_journal.json +28 -0
- package/package.json +3 -3
- package/src/app.ts +25 -1
- package/src/boot.ts +1 -0
- package/src/index.ts +13 -1
- package/src/lib/apiKeyScopes.ts +6 -0
- package/src/lib/columns.ts +12 -3
- package/src/lib/config.ts +21 -0
- package/src/lib/egress.ts +8 -4
- package/src/lib/errors.ts +37 -0
- package/src/lib/ids.ts +11 -0
- package/src/lib/kelpieConfigFile.ts +69 -1
- package/src/modules/agent-tasks/catalog.ts +33 -1
- package/src/modules/agent-tasks/index.ts +1 -0
- package/src/modules/agent-tasks/resolve.ts +11 -0
- package/src/modules/attachedRecords.ts +85 -13
- package/src/modules/auth/index.ts +26 -4
- package/src/modules/auth/repository.ts +36 -4
- package/src/modules/auth/routes.ts +46 -9
- package/src/modules/auth/schema.ts +12 -1
- package/src/modules/auth/service.ts +261 -10
- package/src/modules/auth/session.ts +14 -0
- package/src/modules/companies/repository.ts +1 -0
- package/src/modules/companies/routes.ts +6 -11
- package/src/modules/companies/schema.ts +3 -3
- package/src/modules/companies/service.ts +6 -10
- package/src/modules/core.ts +2 -0
- package/src/modules/custom-fields/repository.ts +2 -0
- package/src/modules/dashboard/index.ts +1 -0
- package/src/modules/dashboard/repository.ts +64 -0
- package/src/modules/dashboard/routes.ts +15 -0
- package/src/modules/dashboard/service.ts +48 -0
- package/src/modules/decisions/repository.ts +2 -0
- package/src/modules/events/attendances.ts +245 -0
- package/src/modules/events/catalog.ts +36 -0
- package/src/modules/events/index.ts +54 -0
- package/src/modules/events/repository.ts +396 -0
- package/src/modules/events/routes.ts +405 -0
- package/src/modules/events/schema.ts +148 -0
- package/src/modules/events/service.ts +443 -0
- package/src/modules/events/tools.ts +118 -0
- package/src/modules/forms/applySubmissionFields.ts +7 -5
- package/src/modules/forms/fillAddresses.ts +185 -0
- package/src/modules/forms/repository.ts +3 -3
- package/src/modules/forms/routes.ts +2 -2
- package/src/modules/forms/schema.ts +2 -2
- package/src/modules/forms/service.ts +2 -2
- package/src/modules/forms/submission.ts +34 -4
- package/src/modules/hiring/roles.ts +2 -1
- package/src/modules/import-export/addresses.ts +150 -0
- package/src/modules/import-export/drafts.ts +7 -9
- package/src/modules/import-export/exportRows.ts +3 -3
- package/src/modules/import-export/plan.ts +30 -2
- package/src/modules/import-export/presets.ts +55 -7
- package/src/modules/import-export/repository.ts +5 -7
- package/src/modules/import-export/writes.ts +8 -4
- package/src/modules/people/repository.ts +1 -0
- package/src/modules/people/routes.ts +6 -6
- package/src/modules/people/schema.ts +7 -5
- package/src/modules/people/service.ts +7 -5
- package/src/modules/plans/repository.ts +2 -2
- package/src/modules/plans/routes.ts +6 -6
- package/src/modules/plans/schema.ts +4 -4
- package/src/modules/plans/service.ts +3 -3
- package/src/modules/plans/tools.ts +2 -2
- package/src/modules/recordTargets.ts +14 -0
- package/src/modules/references.ts +2 -0
- package/src/modules/sample-data/fixture.ts +208 -27
- package/src/modules/sample-data/index.ts +7 -2
- package/src/modules/sample-data/routes.ts +2 -0
- package/src/modules/sample-data/service.ts +166 -49
- package/src/modules/sample-data/tools.ts +4 -3
- package/src/modules/search/index.ts +2 -1
- package/src/modules/search/repository.ts +32 -1
- package/src/modules/search/service.ts +6 -4
- package/src/modules/smtp-email/index.ts +32 -10
- package/src/modules/workspace/repository.ts +18 -0
- package/src/modules/workspace/routes.ts +16 -0
- package/src/modules/workspace/service.ts +59 -14
- package/src/modules/workspace/starters.ts +275 -14
- package/src/modules/workspace/workspaceAccessMiddleware.ts +3 -4
- package/src/runtime/events.ts +2 -0
- package/src/runtime/module.ts +78 -1
- package/src/runtime/registry.ts +176 -8
- package/src/schema/index.ts +1 -0
- package/src/testing/app.ts +14 -1
- package/src/testing/client.ts +11 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AccountType, CompanyStage, IcpFit, SizeBand } from '@kelpie/schemas'
|
|
1
|
+
import type { AccountType, CompanyAddress, CompanyStage, IcpFit, PersonAddress, SizeBand } from '@kelpie/schemas'
|
|
2
2
|
import type { CandidateStatus, InterviewStage, RoleStatus } from '@kelpie/schemas'
|
|
3
3
|
import type { Influence, PreferredChannel, Relationship } from '@kelpie/schemas'
|
|
4
4
|
import type { PipelineKind, PlanItemStatus, RecordTargetType } from '@kelpie/schemas'
|
|
@@ -22,8 +22,7 @@ export interface FixtureCompany {
|
|
|
22
22
|
readonly description: string
|
|
23
23
|
readonly stage: CompanyStage
|
|
24
24
|
readonly sizeBand: SizeBand
|
|
25
|
-
readonly
|
|
26
|
-
readonly website: string | null
|
|
25
|
+
readonly addresses: readonly CompanyAddress[]
|
|
27
26
|
readonly accountType: AccountType
|
|
28
27
|
readonly icpFit: IcpFit
|
|
29
28
|
readonly techStack: readonly string[]
|
|
@@ -43,7 +42,7 @@ export interface FixturePerson {
|
|
|
43
42
|
readonly firstName: string
|
|
44
43
|
readonly lastName: string
|
|
45
44
|
readonly email: string | null
|
|
46
|
-
readonly
|
|
45
|
+
readonly addresses: readonly PersonAddress[]
|
|
47
46
|
readonly preferredChannel: PreferredChannel
|
|
48
47
|
readonly influence: Influence
|
|
49
48
|
readonly relationship: Relationship
|
|
@@ -51,6 +50,43 @@ export interface FixturePerson {
|
|
|
51
50
|
readonly tags: readonly string[]
|
|
52
51
|
}
|
|
53
52
|
|
|
53
|
+
function postalAddress<Kind extends string>(
|
|
54
|
+
kind: Kind,
|
|
55
|
+
parts: {
|
|
56
|
+
readonly line1?: string
|
|
57
|
+
readonly line2?: string
|
|
58
|
+
readonly city: string
|
|
59
|
+
readonly region?: string
|
|
60
|
+
readonly postalCode?: string
|
|
61
|
+
readonly country?: string
|
|
62
|
+
readonly primary?: boolean
|
|
63
|
+
},
|
|
64
|
+
): {
|
|
65
|
+
readonly kind: Kind
|
|
66
|
+
readonly line1: string | null
|
|
67
|
+
readonly line2: string | null
|
|
68
|
+
readonly city: string
|
|
69
|
+
readonly region: string | null
|
|
70
|
+
readonly postalCode: string | null
|
|
71
|
+
readonly country: string
|
|
72
|
+
readonly primary: boolean
|
|
73
|
+
} {
|
|
74
|
+
return {
|
|
75
|
+
kind,
|
|
76
|
+
line1: parts.line1 ?? null,
|
|
77
|
+
line2: parts.line2 ?? null,
|
|
78
|
+
city: parts.city,
|
|
79
|
+
region: parts.region ?? null,
|
|
80
|
+
postalCode: parts.postalCode ?? null,
|
|
81
|
+
country: parts.country ?? 'AU',
|
|
82
|
+
primary: parts.primary ?? false,
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function cityAddress<Kind extends string>(kind: Kind, city: string): ReturnType<typeof postalAddress<Kind>> {
|
|
87
|
+
return postalAddress(kind, { city, primary: true })
|
|
88
|
+
}
|
|
89
|
+
|
|
54
90
|
export interface FixturePosition {
|
|
55
91
|
readonly personKey: string
|
|
56
92
|
readonly companyKey: string
|
|
@@ -156,6 +192,30 @@ export interface FixtureCandidate {
|
|
|
156
192
|
readonly referrerPersonKey: string | null
|
|
157
193
|
}
|
|
158
194
|
|
|
195
|
+
export interface FixtureEvent {
|
|
196
|
+
readonly key: string
|
|
197
|
+
readonly name: string
|
|
198
|
+
readonly kind: string
|
|
199
|
+
readonly startOffsetHours: number
|
|
200
|
+
readonly durationHours: number
|
|
201
|
+
readonly timezone: string
|
|
202
|
+
readonly location: string
|
|
203
|
+
readonly meetingUrl: string | null
|
|
204
|
+
readonly format: 'in_person' | 'virtual' | 'hybrid'
|
|
205
|
+
readonly details: string
|
|
206
|
+
readonly status: 'draft' | 'scheduled' | 'cancelled'
|
|
207
|
+
readonly summary: string
|
|
208
|
+
readonly tags: readonly string[]
|
|
209
|
+
readonly dealKey: string | null
|
|
210
|
+
readonly attendees: readonly FixtureAttendance[]
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export interface FixtureAttendance {
|
|
214
|
+
readonly personKey: string
|
|
215
|
+
readonly status: 'registered' | 'attended' | 'no_show' | 'cancelled'
|
|
216
|
+
readonly source: 'manual' | 'form'
|
|
217
|
+
}
|
|
218
|
+
|
|
159
219
|
export interface Fixture {
|
|
160
220
|
readonly companies: readonly FixtureCompany[]
|
|
161
221
|
readonly people: readonly FixturePerson[]
|
|
@@ -169,6 +229,7 @@ export interface Fixture {
|
|
|
169
229
|
readonly enquiries: readonly FixtureEnquiry[]
|
|
170
230
|
readonly roles: readonly FixtureRole[]
|
|
171
231
|
readonly candidates: readonly FixtureCandidate[]
|
|
232
|
+
readonly events: readonly FixtureEvent[]
|
|
172
233
|
}
|
|
173
234
|
|
|
174
235
|
export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
@@ -181,8 +242,21 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
181
242
|
description: 'Freight forwarding platform for mid-market importers.',
|
|
182
243
|
stage: 'growth',
|
|
183
244
|
sizeBand: '51-200',
|
|
184
|
-
|
|
185
|
-
|
|
245
|
+
addresses: [
|
|
246
|
+
postalAddress('hq', {
|
|
247
|
+
line1: '120 Collins Street',
|
|
248
|
+
city: 'Melbourne',
|
|
249
|
+
region: 'VIC',
|
|
250
|
+
postalCode: '3000',
|
|
251
|
+
primary: true,
|
|
252
|
+
}),
|
|
253
|
+
postalAddress('billing', {
|
|
254
|
+
line1: 'PO Box 210',
|
|
255
|
+
city: 'Melbourne',
|
|
256
|
+
region: 'VIC',
|
|
257
|
+
postalCode: '8007',
|
|
258
|
+
}),
|
|
259
|
+
],
|
|
186
260
|
accountType: 'customer',
|
|
187
261
|
icpFit: 'high',
|
|
188
262
|
techStack: ['Postgres', 'Node', 'React'],
|
|
@@ -197,8 +271,15 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
197
271
|
description: 'Industrial IoT platform for factory operators.',
|
|
198
272
|
stage: 'enterprise',
|
|
199
273
|
sizeBand: '201+',
|
|
200
|
-
|
|
201
|
-
|
|
274
|
+
addresses: [
|
|
275
|
+
postalAddress('hq', {
|
|
276
|
+
line1: 'Level 12, 1 Farrer Place',
|
|
277
|
+
city: 'Sydney',
|
|
278
|
+
region: 'NSW',
|
|
279
|
+
postalCode: '2000',
|
|
280
|
+
primary: true,
|
|
281
|
+
}),
|
|
282
|
+
],
|
|
202
283
|
accountType: 'prospect',
|
|
203
284
|
icpFit: 'medium',
|
|
204
285
|
techStack: ['Java', 'Kafka'],
|
|
@@ -213,8 +294,7 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
213
294
|
description: 'Accounts payable automation for SMBs.',
|
|
214
295
|
stage: 'startup',
|
|
215
296
|
sizeBand: '11-50',
|
|
216
|
-
|
|
217
|
-
website: 'https://initech.example',
|
|
297
|
+
addresses: [cityAddress('hq', 'Brisbane')],
|
|
218
298
|
accountType: 'prospect',
|
|
219
299
|
icpFit: 'high',
|
|
220
300
|
techStack: ['Python', 'Postgres'],
|
|
@@ -229,8 +309,7 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
229
309
|
description: 'Search and discovery for local services.',
|
|
230
310
|
stage: 'growth',
|
|
231
311
|
sizeBand: '51-200',
|
|
232
|
-
|
|
233
|
-
website: 'https://hooli.example',
|
|
312
|
+
addresses: [cityAddress('hq', 'Perth')],
|
|
234
313
|
accountType: 'partner',
|
|
235
314
|
icpFit: 'medium',
|
|
236
315
|
techStack: ['Go', 'gRPC'],
|
|
@@ -245,8 +324,7 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
245
324
|
description: 'Contract manufacturing for defence primes.',
|
|
246
325
|
stage: 'enterprise',
|
|
247
326
|
sizeBand: '201+',
|
|
248
|
-
|
|
249
|
-
website: 'https://stark.example',
|
|
327
|
+
addresses: [cityAddress('hq', 'Adelaide')],
|
|
250
328
|
accountType: 'prospect',
|
|
251
329
|
icpFit: 'low',
|
|
252
330
|
techStack: [],
|
|
@@ -261,8 +339,15 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
261
339
|
description: 'Seed-stage investor, one to five million cheque size.',
|
|
262
340
|
stage: 'other',
|
|
263
341
|
sizeBand: '11-50',
|
|
264
|
-
|
|
265
|
-
|
|
342
|
+
addresses: [
|
|
343
|
+
postalAddress('hq', {
|
|
344
|
+
line1: '88 Phillip Street',
|
|
345
|
+
city: 'Sydney',
|
|
346
|
+
region: 'NSW',
|
|
347
|
+
postalCode: '2000',
|
|
348
|
+
primary: true,
|
|
349
|
+
}),
|
|
350
|
+
],
|
|
266
351
|
accountType: 'investor',
|
|
267
352
|
icpFit: 'unknown',
|
|
268
353
|
techStack: [],
|
|
@@ -277,8 +362,7 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
277
362
|
description: 'Twelve week program with a demo day and alumni network.',
|
|
278
363
|
stage: 'other',
|
|
279
364
|
sizeBand: '11-50',
|
|
280
|
-
|
|
281
|
-
website: 'https://sandbox.example',
|
|
365
|
+
addresses: [cityAddress('hq', 'Melbourne')],
|
|
282
366
|
accountType: 'partner',
|
|
283
367
|
icpFit: 'unknown',
|
|
284
368
|
techStack: [],
|
|
@@ -294,7 +378,22 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
294
378
|
firstName: 'Ada',
|
|
295
379
|
lastName: 'Lovelace',
|
|
296
380
|
email: 'ada@northwind.dev',
|
|
297
|
-
|
|
381
|
+
addresses: [
|
|
382
|
+
postalAddress('home', {
|
|
383
|
+
line1: '42 Gertrude Street',
|
|
384
|
+
city: 'Fitzroy',
|
|
385
|
+
region: 'VIC',
|
|
386
|
+
postalCode: '3065',
|
|
387
|
+
primary: true,
|
|
388
|
+
}),
|
|
389
|
+
postalAddress('mailing', {
|
|
390
|
+
line1: 'Northwind Traders',
|
|
391
|
+
line2: '120 Collins Street',
|
|
392
|
+
city: 'Melbourne',
|
|
393
|
+
region: 'VIC',
|
|
394
|
+
postalCode: '3000',
|
|
395
|
+
}),
|
|
396
|
+
],
|
|
298
397
|
preferredChannel: 'email',
|
|
299
398
|
influence: 'champion',
|
|
300
399
|
relationship: 'strong',
|
|
@@ -307,7 +406,15 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
307
406
|
firstName: 'Grace',
|
|
308
407
|
lastName: 'Hopper',
|
|
309
408
|
email: 'grace@northwind.dev',
|
|
310
|
-
|
|
409
|
+
addresses: [
|
|
410
|
+
postalAddress('work', {
|
|
411
|
+
line1: '120 Collins Street',
|
|
412
|
+
city: 'Melbourne',
|
|
413
|
+
region: 'VIC',
|
|
414
|
+
postalCode: '3000',
|
|
415
|
+
primary: true,
|
|
416
|
+
}),
|
|
417
|
+
],
|
|
311
418
|
preferredChannel: 'email',
|
|
312
419
|
influence: 'influencer',
|
|
313
420
|
relationship: 'warm',
|
|
@@ -320,7 +427,21 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
320
427
|
firstName: 'Tom',
|
|
321
428
|
lastName: 'Anderson',
|
|
322
429
|
email: 'tom@globex.example',
|
|
323
|
-
|
|
430
|
+
addresses: [
|
|
431
|
+
postalAddress('work', {
|
|
432
|
+
line1: 'Level 12, 1 Farrer Place',
|
|
433
|
+
city: 'Sydney',
|
|
434
|
+
region: 'NSW',
|
|
435
|
+
postalCode: '2000',
|
|
436
|
+
primary: true,
|
|
437
|
+
}),
|
|
438
|
+
postalAddress('home', {
|
|
439
|
+
line1: '15/200 Kent Street',
|
|
440
|
+
city: 'Sydney',
|
|
441
|
+
region: 'NSW',
|
|
442
|
+
postalCode: '2000',
|
|
443
|
+
}),
|
|
444
|
+
],
|
|
324
445
|
preferredChannel: 'call',
|
|
325
446
|
influence: 'decision_maker',
|
|
326
447
|
relationship: 'warm',
|
|
@@ -333,7 +454,7 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
333
454
|
firstName: 'Peter',
|
|
334
455
|
lastName: 'Gibbons',
|
|
335
456
|
email: 'peter@initech.example',
|
|
336
|
-
|
|
457
|
+
addresses: [cityAddress('home', 'Brisbane')],
|
|
337
458
|
preferredChannel: 'email',
|
|
338
459
|
influence: 'influencer',
|
|
339
460
|
relationship: 'warm',
|
|
@@ -346,7 +467,7 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
346
467
|
firstName: 'Gavin',
|
|
347
468
|
lastName: 'Belson',
|
|
348
469
|
email: 'gavin@hooli.example',
|
|
349
|
-
|
|
470
|
+
addresses: [cityAddress('home', 'Perth')],
|
|
350
471
|
preferredChannel: 'linkedin',
|
|
351
472
|
influence: 'decision_maker',
|
|
352
473
|
relationship: 'warm',
|
|
@@ -359,7 +480,7 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
359
480
|
firstName: 'Roelof',
|
|
360
481
|
lastName: 'Nkosi',
|
|
361
482
|
email: 'roelof@southerncross.example',
|
|
362
|
-
|
|
483
|
+
addresses: [cityAddress('home', 'Sydney')],
|
|
363
484
|
preferredChannel: 'email',
|
|
364
485
|
influence: 'decision_maker',
|
|
365
486
|
relationship: 'warm',
|
|
@@ -372,7 +493,7 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
372
493
|
firstName: 'Mei',
|
|
373
494
|
lastName: 'Zhang',
|
|
374
495
|
email: 'mei@sandbox.example',
|
|
375
|
-
|
|
496
|
+
addresses: [cityAddress('home', 'Melbourne')],
|
|
376
497
|
preferredChannel: 'email',
|
|
377
498
|
influence: 'influencer',
|
|
378
499
|
relationship: 'warm',
|
|
@@ -385,7 +506,7 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
385
506
|
firstName: 'Charlotte',
|
|
386
507
|
lastName: 'Rivera',
|
|
387
508
|
email: 'charlotte@example.com',
|
|
388
|
-
|
|
509
|
+
addresses: [cityAddress('home', 'Melbourne')],
|
|
389
510
|
preferredChannel: 'email',
|
|
390
511
|
influence: 'end_user',
|
|
391
512
|
relationship: 'warm',
|
|
@@ -398,7 +519,7 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
398
519
|
firstName: 'Omar',
|
|
399
520
|
lastName: 'Haddad',
|
|
400
521
|
email: 'omar@example.com',
|
|
401
|
-
|
|
522
|
+
addresses: [cityAddress('home', 'Sydney')],
|
|
402
523
|
preferredChannel: 'email',
|
|
403
524
|
influence: 'end_user',
|
|
404
525
|
relationship: 'cold',
|
|
@@ -657,6 +778,66 @@ export const SAMPLE_DATA_FIXTURE: Fixture = {
|
|
|
657
778
|
referrerPersonKey: null,
|
|
658
779
|
},
|
|
659
780
|
],
|
|
781
|
+
|
|
782
|
+
events: [
|
|
783
|
+
{
|
|
784
|
+
key: 'product-webinar',
|
|
785
|
+
name: 'Product webinar — pipeline walkthrough',
|
|
786
|
+
kind: 'webinar',
|
|
787
|
+
startOffsetHours: 48,
|
|
788
|
+
durationHours: 1,
|
|
789
|
+
timezone: 'Australia/Melbourne',
|
|
790
|
+
location: 'Online',
|
|
791
|
+
meetingUrl: 'https://meet.example.com/webinar',
|
|
792
|
+
format: 'virtual',
|
|
793
|
+
details: 'Live walkthrough of the CRM for inbound leads.',
|
|
794
|
+
status: 'scheduled',
|
|
795
|
+
summary: 'Demand webinar for Q3 inbound.',
|
|
796
|
+
tags: ['demand'],
|
|
797
|
+
dealKey: 'northwind-expansion',
|
|
798
|
+
attendees: [
|
|
799
|
+
{ personKey: 'ada', status: 'registered', source: 'manual' },
|
|
800
|
+
{ personKey: 'grace', status: 'registered', source: 'form' },
|
|
801
|
+
],
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
key: 'customer-dinner',
|
|
805
|
+
name: 'Northwind customer dinner',
|
|
806
|
+
kind: 'dinner',
|
|
807
|
+
startOffsetHours: 96,
|
|
808
|
+
durationHours: 3,
|
|
809
|
+
timezone: 'Australia/Melbourne',
|
|
810
|
+
location: 'Melbourne CBD',
|
|
811
|
+
meetingUrl: null,
|
|
812
|
+
format: 'in_person',
|
|
813
|
+
details: 'Small dinner with the Northwind team.',
|
|
814
|
+
status: 'scheduled',
|
|
815
|
+
summary: 'Relationship dinner.',
|
|
816
|
+
tags: ['customer'],
|
|
817
|
+
dealKey: 'northwind-expansion',
|
|
818
|
+
attendees: [{ personKey: 'ada', status: 'registered', source: 'manual' }],
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
key: 'launch-livestream',
|
|
822
|
+
name: 'Launch livestream recap',
|
|
823
|
+
kind: 'livestream',
|
|
824
|
+
startOffsetHours: -48,
|
|
825
|
+
durationHours: 1,
|
|
826
|
+
timezone: 'Australia/Melbourne',
|
|
827
|
+
location: 'Online',
|
|
828
|
+
meetingUrl: 'https://meet.example.com/launch',
|
|
829
|
+
format: 'virtual',
|
|
830
|
+
details: 'The launch stream that already ran.',
|
|
831
|
+
status: 'scheduled',
|
|
832
|
+
summary: 'Past livestream.',
|
|
833
|
+
tags: ['launch'],
|
|
834
|
+
dealKey: null,
|
|
835
|
+
attendees: [
|
|
836
|
+
{ personKey: 'ada', status: 'attended', source: 'form' },
|
|
837
|
+
{ personKey: 'gavin', status: 'no_show', source: 'form' },
|
|
838
|
+
],
|
|
839
|
+
},
|
|
840
|
+
],
|
|
660
841
|
}
|
|
661
842
|
|
|
662
843
|
/**
|
|
@@ -4,11 +4,14 @@ import { createSampleDataService } from './service.ts'
|
|
|
4
4
|
import { registerSampleDataTools } from './tools.ts'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Sample data:
|
|
7
|
+
* Sample data: fixture install for a workspace.
|
|
8
8
|
*
|
|
9
9
|
* Owns no tables. Requires the modules whose tables the fixture writes into.
|
|
10
10
|
* A workspace admin invokes it from the setup wizard or from the admin data
|
|
11
|
-
* page; an agent invokes it through the matching MCP tool.
|
|
11
|
+
* page; an agent invokes it through the matching MCP tool. Existing records
|
|
12
|
+
* stay. The installer skips fixture rows for a toggleable module the workspace
|
|
13
|
+
* has switched off, and answers 409 when a sample email or domain already
|
|
14
|
+
* exists.
|
|
12
15
|
*/
|
|
13
16
|
export function createSampleDataModule(): KelpieModule {
|
|
14
17
|
return {
|
|
@@ -27,6 +30,7 @@ export function createSampleDataModule(): KelpieModule {
|
|
|
27
30
|
'partnerships',
|
|
28
31
|
'enquiries',
|
|
29
32
|
'hiring',
|
|
33
|
+
'events',
|
|
30
34
|
],
|
|
31
35
|
|
|
32
36
|
register(context) {
|
|
@@ -35,6 +39,7 @@ export function createSampleDataModule(): KelpieModule {
|
|
|
35
39
|
transaction: context.transaction,
|
|
36
40
|
createId: context.createId,
|
|
37
41
|
now: context.now,
|
|
42
|
+
entitlements: context.entitlements,
|
|
38
43
|
})
|
|
39
44
|
|
|
40
45
|
context.routes((router) => {
|