@elevasis/sdk 1.15.0 → 1.15.1
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/cli.cjs +1 -1
- package/dist/index.d.ts +510 -359
- package/dist/index.js +74 -2
- package/dist/test-utils/index.d.ts +497 -358
- package/dist/test-utils/index.js +2 -0
- package/dist/types/worker/adapters/lead.d.ts +1 -1
- package/dist/worker/index.js +1 -0
- package/package.json +2 -2
- package/reference/claude-config/rules/ui.md +2 -6
- package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +58 -0
- package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +56 -0
- package/reference/scaffold/recipes/customize-crm-actions.md +433 -433
- package/reference/scaffold/recipes/extend-crm.md +12 -8
- package/reference/scaffold/recipes/extend-lead-gen.md +78 -4
- package/reference/scaffold/reference/contracts.md +826 -703
package/dist/test-utils/index.js
CHANGED
|
@@ -6752,6 +6752,7 @@ createAdapter("acqDb", [
|
|
|
6752
6752
|
"markProposalReviewed",
|
|
6753
6753
|
"updateCloseLostReason",
|
|
6754
6754
|
"updateFees",
|
|
6755
|
+
"cacheInstantlyThreadIds",
|
|
6755
6756
|
"transitionItem",
|
|
6756
6757
|
"setContactNurture",
|
|
6757
6758
|
"cancelSchedulesAndHitlByEmail",
|
|
@@ -24262,6 +24263,7 @@ var mockAcqDb = (overrides) => createMockAdapter(
|
|
|
24262
24263
|
"markProposalReviewed",
|
|
24263
24264
|
"updateCloseLostReason",
|
|
24264
24265
|
"updateFees",
|
|
24266
|
+
"cacheInstantlyThreadIds",
|
|
24265
24267
|
"transitionItem",
|
|
24266
24268
|
"setContactNurture",
|
|
24267
24269
|
"cancelSchedulesAndHitlByEmail",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Typed wrapper over platform.call() for acquisition lead management.
|
|
5
5
|
* Singleton export -- no credential needed (platform tool).
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* 56 methods covering lists, companies, contacts, deals, list-stage updates, deal-sync, deal notes, deal tasks, enrichment, and social monitoring operations.
|
|
8
8
|
* organizationId is injected server-side by the dispatcher -- never sent from the SDK.
|
|
9
9
|
*/
|
|
10
10
|
import { type TypedAdapter } from './create-adapter.js';
|
package/dist/worker/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/sdk",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.1",
|
|
4
4
|
"description": "SDK for building Elevasis organization resources",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"tsup": "^8.0.0",
|
|
51
51
|
"typescript": "5.9.2",
|
|
52
52
|
"zod": "^4.1.0",
|
|
53
|
-
"@repo/core": "0.15.
|
|
53
|
+
"@repo/core": "0.15.1",
|
|
54
54
|
"@repo/typescript-config": "0.0.0"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
@@ -104,13 +104,9 @@ For real-time updates, feature surfaces use the local singleton wrapper:
|
|
|
104
104
|
import { sseConnectionManager } from '@/lib/sse/SSEConnectionManager'
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
-
**
|
|
107
|
+
**WorkOS config:**
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
VITE_WORKOS_CLIENT_ID=client_...
|
|
111
|
-
VITE_WORKOS_REDIRECT_URI=http://localhost:4300/auth-redirect
|
|
112
|
-
VITE_WORKOS_SIGNOUT_URI=http://localhost:4300/login
|
|
113
|
-
```
|
|
109
|
+
WorkOS `clientId`, `redirectUri`, and `signoutUri` are hardcoded in `ui/src/config/workos.ts` -- no UI env vars are required to run the template. Edit that file if a fork needs a different WorkOS client. The dev server runs on port `4300` with Vite `strictPort: true`, so a second `pnpm -C ui dev` on the same machine fails fast instead of drifting.
|
|
114
110
|
|
|
115
111
|
The API URL is centralized in `ui/src/lib/constants/api.ts`. In the current template it is hard-coded to `https://api.elevasis.io`, so if the bootstrap is repointed to another API target, that file is the source of truth.
|
|
116
112
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# CRM Ownership and Next-Action Projection
|
|
2
|
+
|
|
3
|
+
## Why this note exists
|
|
4
|
+
|
|
5
|
+
This release train ships CRM ownership and next-action projection across the shared core, UI, API, and Elevasis operations bundle.
|
|
6
|
+
|
|
7
|
+
Shared CRM deal responses now carry nullable `ownership` and `nextAction` values derived from activity history. The CRM list and detail surfaces render the move owner directly, and detail actions prefer the projected `nextAction` before falling back to ownership-aware derivation. The Elevasis operations bundle also writes canonical follow-up and deferred-next-step activity events so ownership can sort consistently.
|
|
8
|
+
|
|
9
|
+
## Applies to
|
|
10
|
+
|
|
11
|
+
Template-derived projects that:
|
|
12
|
+
|
|
13
|
+
- consume `@elevasis/core/business/acquisition/api-schemas` deal list or detail response types
|
|
14
|
+
- render CRM list, detail, or action surfaces from `@elevasis/ui`
|
|
15
|
+
- author CRM operations workflows that append or interpret deal activity events
|
|
16
|
+
- read `activity_log` rows and classify who owns the next move
|
|
17
|
+
|
|
18
|
+
Projects with no CRM surface and no `acq_deals` workflow logic can ignore this train.
|
|
19
|
+
|
|
20
|
+
## Required actions
|
|
21
|
+
|
|
22
|
+
1. Pull template changes with `/git-sync` after this train publishes so package baselines for `@elevasis/core` and `@elevasis/ui` are refreshed.
|
|
23
|
+
|
|
24
|
+
2. Upgrade shared packages in the derived project after the publish stages complete:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pnpm up @elevasis/core @elevasis/ui --latest
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
3. Audit any project-owned CRM workflow code that writes activity events. Outbound follow-up should emit `followup_email_sent`, and "lead will check / get back to us" replies should emit `lead_deferred_next_step` when they defer our next action.
|
|
31
|
+
|
|
32
|
+
4. Audit any project-owned CRM UI code that computes available actions locally. Prefer the server-projected `nextAction` when present, and suppress send-reply affordances when `ownership` is `them`.
|
|
33
|
+
|
|
34
|
+
5. If the project deploys an operations bundle with CRM reply or follow-up handlers, redeploy that bundle after package upgrades so runtime activity writes match the new ownership derivation:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pnpm -C operations exec elevasis-sdk deploy --prod
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Verification
|
|
41
|
+
|
|
42
|
+
After upgrading:
|
|
43
|
+
|
|
44
|
+
- `pnpm check-types` passes in project packages that consume CRM types or UI.
|
|
45
|
+
- CRM list rows show the expected move owner for deals with inbound replies, outbound replies, follow-ups, reminders, booking nudges, and deferred-next-step replies.
|
|
46
|
+
- CRM detail actions expose Send Reply only when the server-projected action and ownership allow it.
|
|
47
|
+
- Operations tests or smoke probes confirm follow-up handlers emit `followup_email_sent`.
|
|
48
|
+
- A CRM reply where the lead says they will check internally records `lead_deferred_next_step` and sorts after the inbound reply event.
|
|
49
|
+
|
|
50
|
+
## Not handled by /git-sync
|
|
51
|
+
|
|
52
|
+
`/git-sync` does not:
|
|
53
|
+
|
|
54
|
+
- publish `@elevasis/core` or `@elevasis/ui`
|
|
55
|
+
- run package upgrades inside derived projects
|
|
56
|
+
- redeploy project-owned operations bundles
|
|
57
|
+
- rewrite project-owned CRM workflow logic that still emits legacy activity event names
|
|
58
|
+
- verify or repair historical `activity_log` rows in project databases
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Template WorkOS Hardcode + Strict Dev Port
|
|
2
|
+
|
|
3
|
+
## Why this note exists
|
|
4
|
+
|
|
5
|
+
The template UI no longer reads WorkOS configuration from `VITE_WORKOS_*` env vars. WorkOS `clientId`, `redirectUri`, and `signoutUri` are hardcoded in a new file `ui/src/config/workos.ts` so a freshly bootstrapped template runs without any UI `.env` setup. The Vite dev server now uses `strictPort: true` on port `4300` so a second `pnpm -C ui dev` on the same machine fails fast instead of silently drifting to another port.
|
|
6
|
+
|
|
7
|
+
This sync moves three pieces into derived projects:
|
|
8
|
+
|
|
9
|
+
- `ui/src/config/workos.ts` -- new merge-baseline file holding `clientId`, `redirectUri`, `signoutUri`
|
|
10
|
+
- `ui/src/main.tsx` and `ui/src/routes/__root.tsx` -- merge-regions updates that import `WORKOS_CONFIG` from `@/config/workos` instead of reading `import.meta.env.VITE_WORKOS_*`
|
|
11
|
+
- `ui/vite.config.ts` -- `strictPort: true` added next to `port: 4300`
|
|
12
|
+
- `ui/.env.example` -- WorkOS section removed (replaced with a single comment pointing at `ui/src/config/workos.ts`)
|
|
13
|
+
- `.claude/rules/ui.md` and `CLAUDE.md` -- prose updated; project-owned `CLAUDE.md` is verify-only and the project keeps its own narrative
|
|
14
|
+
|
|
15
|
+
`nirvana-marketing` and `ZentaraHQ` already received `ui/src/config/workos.ts`, the `strictPort` flag, and the `.claude/rules/ui.md` baseline as prep-gate repairs in the previous train. This note formally attributes those changes to an owning task doc and covers any remaining template-derived projects.
|
|
16
|
+
|
|
17
|
+
## Applies to
|
|
18
|
+
|
|
19
|
+
Template-derived projects that:
|
|
20
|
+
|
|
21
|
+
- run a WorkOS-authenticated UI from `ui/src/main.tsx` and `ui/src/routes/__root.tsx`
|
|
22
|
+
- run the Vite dev server on port `4300`
|
|
23
|
+
- have a project-owned `ui/src/config/workos.ts` (created via prep-gate repair) or are seeing it land for the first time on this sync
|
|
24
|
+
- maintain a `ui/.env` file that previously set `VITE_WORKOS_CLIENT_ID`, `VITE_WORKOS_REDIRECT_URI`, or `VITE_WORKOS_SIGNOUT_URI`
|
|
25
|
+
|
|
26
|
+
Projects with no WorkOS surface or no Vite dev server are not affected.
|
|
27
|
+
|
|
28
|
+
## Required actions
|
|
29
|
+
|
|
30
|
+
1. Pull template changes with `/git-sync` after this train publishes so the WorkOS hardcode and strict-port baselines reach the project's UI shell.
|
|
31
|
+
|
|
32
|
+
2. Confirm the project's `ui/src/config/workos.ts` reflects the WorkOS client ID the project should authenticate against. The template ships the platform team's dev-tier `clientId`; client-facing projects must overwrite that value with the project's own WorkOS client ID before going to production. Edit the literal in `ui/src/config/workos.ts` -- no env vars are involved.
|
|
33
|
+
|
|
34
|
+
3. Stop providing `VITE_WORKOS_CLIENT_ID`, `VITE_WORKOS_REDIRECT_URI`, and `VITE_WORKOS_SIGNOUT_URI` in `ui/.env`. They are no longer read. Delete the entries to keep the file honest. The WorkOS values now live in `ui/src/config/workos.ts`.
|
|
35
|
+
|
|
36
|
+
4. Confirm `ui/vite.config.ts` carries `strictPort: true` next to `server.port: 4300`. If a second dev server starts on the same port, expect a hard failure instead of a drift to `4301`.
|
|
37
|
+
|
|
38
|
+
5. If the project hand-rolled an env-vars notice component or a `REQUIRED_ENV_VARS` array around WorkOS, remove it. `createElevasisApp` no longer needs the `MissingEnvNotice` prop now that `clientId` is always truthy.
|
|
39
|
+
|
|
40
|
+
## Verification
|
|
41
|
+
|
|
42
|
+
After upgrading:
|
|
43
|
+
|
|
44
|
+
- `pnpm -C ui check-types` and `pnpm -C ui build` pass with `WORKOS_CONFIG` imported from `@/config/workos`.
|
|
45
|
+
- `pnpm -C ui dev` boots on `4300`. Starting a second `pnpm -C ui dev` in another terminal fails with a port-in-use error instead of incrementing to `4301`.
|
|
46
|
+
- WorkOS sign-in and sign-out still round-trip through the project's WorkOS tenant. Sign-out lands on the URL configured in `ui/src/config/workos.ts` (`signoutUri`).
|
|
47
|
+
- `grep -r VITE_WORKOS_ ui/src` returns nothing.
|
|
48
|
+
|
|
49
|
+
## Not handled by /git-sync
|
|
50
|
+
|
|
51
|
+
`/git-sync` does not:
|
|
52
|
+
|
|
53
|
+
- delete `VITE_WORKOS_*` entries from project-local `ui/.env` files
|
|
54
|
+
- overwrite `ui/src/config/workos.ts` if the project has already customized the `clientId` for a non-default WorkOS tenant (the file is merge-baseline; customizations are preserved)
|
|
55
|
+
- update WorkOS dashboard redirect URIs or CORS origins for projects that run the dev server on a non-`4300` port; if the project changed the dev port, it must also change the WorkOS dashboard accordingly
|
|
56
|
+
- redeploy any project-owned operations bundle; this train is UI-shell only
|