@clivly/core 0.9.7 → 0.10.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/README.md +17 -10
- package/dist/builder.cjs +599 -0
- package/dist/builder.d.cts +336 -0
- package/dist/builder.d.mts +336 -0
- package/dist/builder.mjs +589 -0
- package/dist/drizzle.d.cts +1 -1
- package/dist/drizzle.d.mts +1 -1
- package/dist/{entity-config-25v_udeY.cjs → entity-config-C5jBmG2C.cjs} +83 -68
- package/dist/{entity-config-buOIVtMM.d.cts → entity-config-DCa785OE.d.cts} +27 -1
- package/dist/{entity-config-buOIVtMM.d.mts → entity-config-DCa785OE.d.mts} +27 -1
- package/dist/{entity-config-DwGXbUo_.mjs → entity-config-DpHPMFIS.mjs} +71 -38
- package/dist/entity-config.cjs +1 -1
- package/dist/entity-config.d.cts +1 -1
- package/dist/entity-config.d.mts +1 -1
- package/dist/entity-config.mjs +1 -1
- package/dist/entity-heuristics.cjs +34 -1
- package/dist/entity-heuristics.d.cts +8 -2
- package/dist/entity-heuristics.d.mts +8 -2
- package/dist/entity-heuristics.mjs +34 -2
- package/dist/index.cjs +136 -199
- package/dist/index.d.cts +135 -89
- package/dist/index.d.mts +135 -89
- package/dist/index.mjs +124 -188
- package/dist/mapping-form.d.cts +1 -1
- package/dist/mapping-form.d.mts +1 -1
- package/dist/mappings-config.cjs +2 -16
- package/dist/mappings-config.d.cts +1 -1
- package/dist/mappings-config.d.mts +1 -1
- package/dist/mappings-config.mjs +1 -15
- package/dist/{projection-OJYCYmS_.cjs → projection-DFgCoyZl.cjs} +0 -6
- package/dist/{projection-BXw_iiw5.mjs → projection-SCNrLJMV.mjs} +1 -1
- package/dist/schema-meta-Ac7938mT.mjs +46 -0
- package/dist/schema-meta-Cgi0MnHh.cjs +69 -0
- package/dist/sync-engine.cjs +1 -1
- package/dist/sync-engine.d.cts +1 -1
- package/dist/sync-engine.d.mts +1 -1
- package/dist/sync-engine.mjs +1 -1
- package/dist/types.cjs +11 -0
- package/dist/types.d.cts +28 -2
- package/dist/types.d.mts +28 -2
- package/dist/types.mjs +9 -1
- package/dist/{view-compiler-u3GGRgnv.mjs → view-compiler-CLvZ0wJW.mjs} +1 -1
- package/dist/{view-compiler-D30HNRnA.cjs → view-compiler-DP4Fbj7-.cjs} +1 -1
- package/dist/view-compiler.cjs +1 -1
- package/dist/view-compiler.d.cts +1 -1
- package/dist/view-compiler.d.mts +1 -1
- package/dist/view-compiler.mjs +1 -1
- package/package.json +11 -1
package/dist/types.d.cts
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
//#region src/types.d.ts
|
|
2
2
|
type ContactStatus = "lead" | "active" | "customer" | "churned";
|
|
3
|
-
type DealStage =
|
|
3
|
+
type DealStage = string;
|
|
4
|
+
type StageType = "open" | "won" | "lost";
|
|
5
|
+
type PipelineKind = "standard" | "recurring";
|
|
6
|
+
type ValueInterval = "one_time" | "monthly" | "annual";
|
|
7
|
+
/** Named once so SQL predicates and UI fallbacks cannot drift apart. */
|
|
8
|
+
declare const OPEN_STAGE_TYPE: "open";
|
|
9
|
+
/** A closed deal is a historical fact: automation never reopens one. */
|
|
10
|
+
declare function isClosedStageType(type: StageType): boolean;
|
|
11
|
+
interface PipelineStageConfig {
|
|
12
|
+
color: string | null;
|
|
13
|
+
id: string;
|
|
14
|
+
key: DealStage;
|
|
15
|
+
label: string;
|
|
16
|
+
position: number;
|
|
17
|
+
type: StageType;
|
|
18
|
+
valueFixed: number | null;
|
|
19
|
+
}
|
|
20
|
+
interface PipelineConfig {
|
|
21
|
+
id: string;
|
|
22
|
+
isDefault: boolean;
|
|
23
|
+
kind: PipelineKind;
|
|
24
|
+
name: string;
|
|
25
|
+
slug: string;
|
|
26
|
+
sourceMappingId: string | null;
|
|
27
|
+
stages: PipelineStageConfig[];
|
|
28
|
+
}
|
|
4
29
|
type TaskStatus = "todo" | "in_progress" | "done" | "cancelled";
|
|
5
30
|
type TaskPriority = "low" | "medium" | "high";
|
|
6
31
|
type TaskEntityType = "contact" | "company" | "deal";
|
|
@@ -103,6 +128,7 @@ interface CreateDealInput {
|
|
|
103
128
|
contactId?: string;
|
|
104
129
|
name: string;
|
|
105
130
|
owner?: string;
|
|
131
|
+
pipelineId?: string;
|
|
106
132
|
stage?: DealStage;
|
|
107
133
|
value?: number;
|
|
108
134
|
}
|
|
@@ -156,4 +182,4 @@ interface TaskFilters {
|
|
|
156
182
|
status?: TaskStatus;
|
|
157
183
|
}
|
|
158
184
|
//#endregion
|
|
159
|
-
export { Activity, ActivityType, Company, Contact, ContactFilters, ContactStatus, CreateActivityInput, CreateCompanyInput, CreateContactInput, CreateDealInput, CreateTaskInput, CrmRole, Deal, DealStage, Note, RecordSource, Task, TaskEntityType, TaskFilters, TaskPriority, TaskStatus, UpdateContactInput, UpdateDealInput, UpdateTaskInput };
|
|
185
|
+
export { Activity, ActivityType, Company, Contact, ContactFilters, ContactStatus, CreateActivityInput, CreateCompanyInput, CreateContactInput, CreateDealInput, CreateTaskInput, CrmRole, Deal, DealStage, Note, OPEN_STAGE_TYPE, PipelineConfig, PipelineKind, PipelineStageConfig, RecordSource, StageType, Task, TaskEntityType, TaskFilters, TaskPriority, TaskStatus, UpdateContactInput, UpdateDealInput, UpdateTaskInput, ValueInterval, isClosedStageType };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
//#region src/types.d.ts
|
|
2
2
|
type ContactStatus = "lead" | "active" | "customer" | "churned";
|
|
3
|
-
type DealStage =
|
|
3
|
+
type DealStage = string;
|
|
4
|
+
type StageType = "open" | "won" | "lost";
|
|
5
|
+
type PipelineKind = "standard" | "recurring";
|
|
6
|
+
type ValueInterval = "one_time" | "monthly" | "annual";
|
|
7
|
+
/** Named once so SQL predicates and UI fallbacks cannot drift apart. */
|
|
8
|
+
declare const OPEN_STAGE_TYPE: "open";
|
|
9
|
+
/** A closed deal is a historical fact: automation never reopens one. */
|
|
10
|
+
declare function isClosedStageType(type: StageType): boolean;
|
|
11
|
+
interface PipelineStageConfig {
|
|
12
|
+
color: string | null;
|
|
13
|
+
id: string;
|
|
14
|
+
key: DealStage;
|
|
15
|
+
label: string;
|
|
16
|
+
position: number;
|
|
17
|
+
type: StageType;
|
|
18
|
+
valueFixed: number | null;
|
|
19
|
+
}
|
|
20
|
+
interface PipelineConfig {
|
|
21
|
+
id: string;
|
|
22
|
+
isDefault: boolean;
|
|
23
|
+
kind: PipelineKind;
|
|
24
|
+
name: string;
|
|
25
|
+
slug: string;
|
|
26
|
+
sourceMappingId: string | null;
|
|
27
|
+
stages: PipelineStageConfig[];
|
|
28
|
+
}
|
|
4
29
|
type TaskStatus = "todo" | "in_progress" | "done" | "cancelled";
|
|
5
30
|
type TaskPriority = "low" | "medium" | "high";
|
|
6
31
|
type TaskEntityType = "contact" | "company" | "deal";
|
|
@@ -103,6 +128,7 @@ interface CreateDealInput {
|
|
|
103
128
|
contactId?: string;
|
|
104
129
|
name: string;
|
|
105
130
|
owner?: string;
|
|
131
|
+
pipelineId?: string;
|
|
106
132
|
stage?: DealStage;
|
|
107
133
|
value?: number;
|
|
108
134
|
}
|
|
@@ -156,4 +182,4 @@ interface TaskFilters {
|
|
|
156
182
|
status?: TaskStatus;
|
|
157
183
|
}
|
|
158
184
|
//#endregion
|
|
159
|
-
export { Activity, ActivityType, Company, Contact, ContactFilters, ContactStatus, CreateActivityInput, CreateCompanyInput, CreateContactInput, CreateDealInput, CreateTaskInput, CrmRole, Deal, DealStage, Note, RecordSource, Task, TaskEntityType, TaskFilters, TaskPriority, TaskStatus, UpdateContactInput, UpdateDealInput, UpdateTaskInput };
|
|
185
|
+
export { Activity, ActivityType, Company, Contact, ContactFilters, ContactStatus, CreateActivityInput, CreateCompanyInput, CreateContactInput, CreateDealInput, CreateTaskInput, CrmRole, Deal, DealStage, Note, OPEN_STAGE_TYPE, PipelineConfig, PipelineKind, PipelineStageConfig, RecordSource, StageType, Task, TaskEntityType, TaskFilters, TaskPriority, TaskStatus, UpdateContactInput, UpdateDealInput, UpdateTaskInput, ValueInterval, isClosedStageType };
|
package/dist/types.mjs
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/types.ts
|
|
2
|
+
/** Named once so SQL predicates and UI fallbacks cannot drift apart. */
|
|
3
|
+
const OPEN_STAGE_TYPE = "open";
|
|
4
|
+
/** A closed deal is a historical fact: automation never reopens one. */
|
|
5
|
+
function isClosedStageType(type) {
|
|
6
|
+
return type === "won" || type === "lost";
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { OPEN_STAGE_TYPE, isClosedStageType };
|
package/dist/view-compiler.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_view_compiler = require("./view-compiler-
|
|
2
|
+
const require_view_compiler = require("./view-compiler-DP4Fbj7-.cjs");
|
|
3
3
|
exports.DEFAULT_VIEW_PREFIX = require_view_compiler.DEFAULT_VIEW_PREFIX;
|
|
4
4
|
exports.compileEntityView = require_view_compiler.compileEntityView;
|
|
5
5
|
exports.compileEntityViews = require_view_compiler.compileEntityViews;
|
package/dist/view-compiler.d.cts
CHANGED
package/dist/view-compiler.d.mts
CHANGED
package/dist/view-compiler.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as explainViewExecutionError, i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-
|
|
1
|
+
import { a as explainViewExecutionError, i as explainEntitiesConfig, n as compileEntityView, r as compileEntityViews, t as DEFAULT_VIEW_PREFIX } from "./view-compiler-CLvZ0wJW.mjs";
|
|
2
2
|
export { DEFAULT_VIEW_PREFIX, compileEntityView, compileEntityViews, explainEntitiesConfig, explainViewExecutionError };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clivly/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "ORM/auth-agnostic CRM adapter contracts and shared domain types for Clivly.",
|
|
@@ -27,6 +27,16 @@
|
|
|
27
27
|
"default": "./dist/adapter.cjs"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
+
"./builder": {
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/builder.d.mts",
|
|
33
|
+
"default": "./dist/builder.mjs"
|
|
34
|
+
},
|
|
35
|
+
"require": {
|
|
36
|
+
"types": "./dist/builder.d.cts",
|
|
37
|
+
"default": "./dist/builder.cjs"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
30
40
|
"./entity-heuristics": {
|
|
31
41
|
"import": {
|
|
32
42
|
"types": "./dist/entity-heuristics.d.mts",
|