@odla-ai/crm 0.6.0 → 0.7.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/index.cjs +55 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -1
- package/dist/index.d.ts +56 -1
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -1
- package/dist/ui/index.d.ts +9 -0
- package/package.json +4 -1
package/dist/ui/index.d.ts
CHANGED
|
@@ -67,6 +67,9 @@ interface CrmRule {
|
|
|
67
67
|
/** Namespace → rule set, as installed at `/app/:id/admin/rules`. */
|
|
68
68
|
type CrmRules = Record<string, CrmRule>;
|
|
69
69
|
|
|
70
|
+
/** A CEL expression over `values`, e.g. `values.country == "US"`. */
|
|
71
|
+
type FieldCondition = string;
|
|
72
|
+
|
|
70
73
|
/** Scalar values odla-db attrs and where-clauses accept. */
|
|
71
74
|
type CrmScalar = string | number | boolean | null;
|
|
72
75
|
/** Attr payload of one op. Typed `any` on purpose: the real odla-db
|
|
@@ -246,6 +249,12 @@ interface FieldDef {
|
|
|
246
249
|
slot?: CrmSlot;
|
|
247
250
|
/** Include in the FTS haystack. Defaults to true for string-ish fields. */
|
|
248
251
|
search?: boolean;
|
|
252
|
+
/** Show this field only while the CEL condition holds, e.g.
|
|
253
|
+
* `values.country == "US"`. Absent means always visible. */
|
|
254
|
+
visibleWhen?: FieldCondition;
|
|
255
|
+
/** Demand a value only while the CEL condition holds. Absent falls back to
|
|
256
|
+
* `required`. A hidden field is never required. */
|
|
257
|
+
requiredWhen?: FieldCondition;
|
|
249
258
|
}
|
|
250
259
|
/** One pipeline stage; declaration order is the sort order (`stageIndex`). */
|
|
251
260
|
interface StageDef {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odla-ai/crm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "A flexible CRM layer for odla apps — configurable record types (people, companies, anything), pipelines with gated transitions, tags, notes and follow-ups, email consent + audited sends, and saved views, all on odla-db with a mountable route factory and an admin UI kit over @odla-ai/ui.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://odla.ai/docs/packages/crm",
|
|
@@ -78,5 +78,8 @@
|
|
|
78
78
|
"tsup": "^8.3.0",
|
|
79
79
|
"typescript": "^6.0.3",
|
|
80
80
|
"vitest": "^4.1.9"
|
|
81
|
+
},
|
|
82
|
+
"dependencies": {
|
|
83
|
+
"@marcbachmann/cel-js": "^7.6.1"
|
|
81
84
|
}
|
|
82
85
|
}
|