@classytic/crm 1.1.0 → 1.1.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/CHANGELOG.md +5 -0
- package/dist/events.d.ts +27 -3
- package/dist/index.d.ts +27 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@classytic/crm` are documented here.
|
|
4
4
|
|
|
5
|
+
## 1.1.1 - 2026-08-20
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- `RmaEventSchema` (and equivalent CRM event schemas) declare `type: 'object'` so hosts can register them without a cast.
|
|
9
|
+
|
|
5
10
|
## 1.1.0 - 2026-08-17
|
|
6
11
|
|
|
7
12
|
### Changed
|
package/dist/events.d.ts
CHANGED
|
@@ -83,9 +83,33 @@ declare const CRM_EVENTS: {
|
|
|
83
83
|
type CrmEventName = (typeof CRM_EVENTS)[keyof typeof CRM_EVENTS];
|
|
84
84
|
//#endregion
|
|
85
85
|
//#region src/events/event-catalog.d.ts
|
|
86
|
-
/**
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
/**
|
|
87
|
+
* JSON-Schema object produced by `z.toJSONSchema` — what arc's registry consumes.
|
|
88
|
+
*
|
|
89
|
+
* `type` is DECLARED. This was `Record<string, unknown>`, which is neither what
|
|
90
|
+
* `z.toJSONSchema` returns for an object schema nor what arc's `EventSchema`
|
|
91
|
+
* accepts — arc requires `type: 'object'`. So the comment below claiming
|
|
92
|
+
* structural identity with arc's `EventDefinitionOutput` was false, and a host
|
|
93
|
+
* registering this catalog got a type error whose only cheap escapes were a
|
|
94
|
+
* cast or re-declaring the events locally. Every runtime value already carries
|
|
95
|
+
* `type: 'object'`; only the declaration was loose.
|
|
96
|
+
*
|
|
97
|
+
* Same fix, same reason, as `@classytic/transfer`'s `TransferEventSchema` —
|
|
98
|
+
* read the note there. Enforcement is at the CONSUMER: be-prod's
|
|
99
|
+
* `shared/event-registry.ts` hands these straight to arc, so drift fails that
|
|
100
|
+
* build. A kernel must not import arc, which is why the claim can only be
|
|
101
|
+
* checked where both are visible.
|
|
102
|
+
*/
|
|
103
|
+
interface CrmEventSchema {
|
|
104
|
+
type: 'object';
|
|
105
|
+
properties?: Record<string, {
|
|
106
|
+
type?: string;
|
|
107
|
+
[key: string]: unknown;
|
|
108
|
+
}>;
|
|
109
|
+
required?: string[];
|
|
110
|
+
[key: string]: unknown;
|
|
111
|
+
}
|
|
112
|
+
/** Structurally assignable to arc's `EventDefinitionOutput` — do NOT import arc. */
|
|
89
113
|
interface CrmEventDefinition<TSchema extends z.ZodType = z.ZodType> {
|
|
90
114
|
name: CrmEventName;
|
|
91
115
|
version: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -1855,9 +1855,33 @@ declare const CRM_EVENTS: {
|
|
|
1855
1855
|
type CrmEventName = (typeof CRM_EVENTS)[keyof typeof CRM_EVENTS];
|
|
1856
1856
|
//#endregion
|
|
1857
1857
|
//#region src/events/event-catalog.d.ts
|
|
1858
|
-
/**
|
|
1859
|
-
|
|
1860
|
-
|
|
1858
|
+
/**
|
|
1859
|
+
* JSON-Schema object produced by `z.toJSONSchema` — what arc's registry consumes.
|
|
1860
|
+
*
|
|
1861
|
+
* `type` is DECLARED. This was `Record<string, unknown>`, which is neither what
|
|
1862
|
+
* `z.toJSONSchema` returns for an object schema nor what arc's `EventSchema`
|
|
1863
|
+
* accepts — arc requires `type: 'object'`. So the comment below claiming
|
|
1864
|
+
* structural identity with arc's `EventDefinitionOutput` was false, and a host
|
|
1865
|
+
* registering this catalog got a type error whose only cheap escapes were a
|
|
1866
|
+
* cast or re-declaring the events locally. Every runtime value already carries
|
|
1867
|
+
* `type: 'object'`; only the declaration was loose.
|
|
1868
|
+
*
|
|
1869
|
+
* Same fix, same reason, as `@classytic/transfer`'s `TransferEventSchema` —
|
|
1870
|
+
* read the note there. Enforcement is at the CONSUMER: be-prod's
|
|
1871
|
+
* `shared/event-registry.ts` hands these straight to arc, so drift fails that
|
|
1872
|
+
* build. A kernel must not import arc, which is why the claim can only be
|
|
1873
|
+
* checked where both are visible.
|
|
1874
|
+
*/
|
|
1875
|
+
interface CrmEventSchema {
|
|
1876
|
+
type: 'object';
|
|
1877
|
+
properties?: Record<string, {
|
|
1878
|
+
type?: string;
|
|
1879
|
+
[key: string]: unknown;
|
|
1880
|
+
}>;
|
|
1881
|
+
required?: string[];
|
|
1882
|
+
[key: string]: unknown;
|
|
1883
|
+
}
|
|
1884
|
+
/** Structurally assignable to arc's `EventDefinitionOutput` — do NOT import arc. */
|
|
1861
1885
|
interface CrmEventDefinition<TSchema extends z.ZodType = z.ZodType> {
|
|
1862
1886
|
name: CrmEventName;
|
|
1863
1887
|
version: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@classytic/crm",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Engine-factory CRM package — leads, accounts, contacts, opportunities, pipelines, campaigns, subscriptions, activities, notes, email engagement. PACKAGE_RULES compliant; built on Mongoose + mongokit + arc primitives.",
|
|
5
5
|
"author": "Classytic",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|