@cclabsnz/sf-core 0.1.0 → 0.1.2
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/lib/schemas/index.d.ts +20 -2
- package/package.json +12 -2
- package/schemas/coupling-graph.schema.json +133 -25
package/lib/schemas/index.d.ts
CHANGED
|
@@ -6,8 +6,24 @@ export interface CouplingGraphProvenance {
|
|
|
6
6
|
toolVersion: string;
|
|
7
7
|
generatedAt: string;
|
|
8
8
|
orgId: string;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Tier measured by `intel probe`, or null when no probe has graded this org.
|
|
11
|
+
*
|
|
12
|
+
* Nullable rather than optional on purpose: a reader that forgets null gets a loud
|
|
13
|
+
* undefined, whereas an absent key reads as "no tier information" — the same ambiguity
|
|
14
|
+
* that let `intel map` stamp a fabricated 'C' into published IR.
|
|
15
|
+
*/
|
|
16
|
+
evidenceTier: EvidenceTier | null;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Architectural layer of an object, ordered from the business core outwards.
|
|
20
|
+
*
|
|
21
|
+
* A real org's coupling graph is dominated by objects carrying no business process — identity,
|
|
22
|
+
* logging, custom metadata — because Apex references them constantly. The layer lets a consumer
|
|
23
|
+
* separate those without reimplementing the classifier, and without discarding them: on a
|
|
24
|
+
* production org, business-to-security was the second-heaviest relationship in the graph.
|
|
25
|
+
*/
|
|
26
|
+
export type ObjectLayer = 'integration' | 'configuration' | 'business' | 'content' | 'sharing' | 'security' | 'observability';
|
|
11
27
|
export interface CouplingGraphNode {
|
|
12
28
|
object: string;
|
|
13
29
|
custom: boolean;
|
|
@@ -17,6 +33,8 @@ export interface CouplingGraphNode {
|
|
|
17
33
|
approvals: number;
|
|
18
34
|
};
|
|
19
35
|
recordCount90d: number;
|
|
36
|
+
/** Optional for back-compatibility; current emitters always set it. */
|
|
37
|
+
layer?: ObjectLayer;
|
|
20
38
|
}
|
|
21
39
|
export interface CouplingComponentRef {
|
|
22
40
|
type: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cclabsnz/sf-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Shared platform layer for CloudCounsel Salesforce sf plugins \u2014 API clients, org context, event log pull, report shell, and versioned IR schemas.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"@jest/globals": "^29.7.0",
|
|
33
33
|
"@types/jest": "^29",
|
|
34
34
|
"@types/node": "^22",
|
|
35
|
+
"ajv": "^8",
|
|
35
36
|
"jest": "^29",
|
|
36
37
|
"ts-jest": "^29",
|
|
37
38
|
"ts-node": "^10.9.2",
|
|
@@ -68,5 +69,14 @@
|
|
|
68
69
|
"access": "public",
|
|
69
70
|
"provenance": true
|
|
70
71
|
},
|
|
71
|
-
"packageManager": "pnpm@10.33.0"
|
|
72
|
+
"packageManager": "pnpm@10.33.0",
|
|
73
|
+
"pnpm": {
|
|
74
|
+
"overrides": {
|
|
75
|
+
"form-data": "^4.0.6",
|
|
76
|
+
"js-yaml@3": "^3.15.0",
|
|
77
|
+
"handlebars": "^4.7.9",
|
|
78
|
+
"brace-expansion": "^5.0.8",
|
|
79
|
+
"fast-uri@3": "^3.1.4"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
72
82
|
}
|
|
@@ -5,19 +5,54 @@
|
|
|
5
5
|
"description": "Object-pair coupling graph emitted by `sf intel map`. Nodes are Salesforce objects; edges are aggregated cross-object couplings derived from flows, triggers, and Apex.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
|
-
"required": [
|
|
8
|
+
"required": [
|
|
9
|
+
"version",
|
|
10
|
+
"provenance",
|
|
11
|
+
"nodes",
|
|
12
|
+
"edges"
|
|
13
|
+
],
|
|
9
14
|
"properties": {
|
|
10
|
-
"version": {
|
|
15
|
+
"version": {
|
|
16
|
+
"const": 1
|
|
17
|
+
},
|
|
11
18
|
"provenance": {
|
|
12
19
|
"type": "object",
|
|
13
20
|
"additionalProperties": false,
|
|
14
|
-
"required": [
|
|
21
|
+
"required": [
|
|
22
|
+
"tool",
|
|
23
|
+
"toolVersion",
|
|
24
|
+
"generatedAt",
|
|
25
|
+
"orgId",
|
|
26
|
+
"evidenceTier"
|
|
27
|
+
],
|
|
15
28
|
"properties": {
|
|
16
|
-
"tool": {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
29
|
+
"tool": {
|
|
30
|
+
"const": "orgintel"
|
|
31
|
+
},
|
|
32
|
+
"toolVersion": {
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
"generatedAt": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"format": "date-time"
|
|
38
|
+
},
|
|
39
|
+
"orgId": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"evidenceTier": {
|
|
43
|
+
"type": [
|
|
44
|
+
"string",
|
|
45
|
+
"null"
|
|
46
|
+
],
|
|
47
|
+
"enum": [
|
|
48
|
+
"A",
|
|
49
|
+
"B",
|
|
50
|
+
"C",
|
|
51
|
+
"D",
|
|
52
|
+
null
|
|
53
|
+
],
|
|
54
|
+
"description": "Evidence tier measured by `intel probe`, or null when no probe has graded this org. Null means not measured \u2014 never assume a default."
|
|
55
|
+
}
|
|
21
56
|
}
|
|
22
57
|
},
|
|
23
58
|
"nodes": {
|
|
@@ -25,21 +60,59 @@
|
|
|
25
60
|
"items": {
|
|
26
61
|
"type": "object",
|
|
27
62
|
"additionalProperties": false,
|
|
28
|
-
"required": [
|
|
63
|
+
"required": [
|
|
64
|
+
"object",
|
|
65
|
+
"custom",
|
|
66
|
+
"automationCounts",
|
|
67
|
+
"recordCount90d"
|
|
68
|
+
],
|
|
29
69
|
"properties": {
|
|
30
|
-
"object": {
|
|
31
|
-
|
|
70
|
+
"object": {
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"custom": {
|
|
74
|
+
"type": "boolean"
|
|
75
|
+
},
|
|
32
76
|
"automationCounts": {
|
|
33
77
|
"type": "object",
|
|
34
78
|
"additionalProperties": false,
|
|
35
|
-
"required": [
|
|
79
|
+
"required": [
|
|
80
|
+
"flows",
|
|
81
|
+
"triggers",
|
|
82
|
+
"approvals"
|
|
83
|
+
],
|
|
36
84
|
"properties": {
|
|
37
|
-
"flows": {
|
|
38
|
-
|
|
39
|
-
|
|
85
|
+
"flows": {
|
|
86
|
+
"type": "integer",
|
|
87
|
+
"minimum": 0
|
|
88
|
+
},
|
|
89
|
+
"triggers": {
|
|
90
|
+
"type": "integer",
|
|
91
|
+
"minimum": 0
|
|
92
|
+
},
|
|
93
|
+
"approvals": {
|
|
94
|
+
"type": "integer",
|
|
95
|
+
"minimum": 0
|
|
96
|
+
}
|
|
40
97
|
}
|
|
41
98
|
},
|
|
42
|
-
"recordCount90d": {
|
|
99
|
+
"recordCount90d": {
|
|
100
|
+
"type": "integer",
|
|
101
|
+
"minimum": 0
|
|
102
|
+
},
|
|
103
|
+
"layer": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"enum": [
|
|
106
|
+
"integration",
|
|
107
|
+
"configuration",
|
|
108
|
+
"business",
|
|
109
|
+
"content",
|
|
110
|
+
"sharing",
|
|
111
|
+
"security",
|
|
112
|
+
"observability"
|
|
113
|
+
],
|
|
114
|
+
"description": "Architectural layer, ordered from the business core outwards. Optional for back-compatibility with documents emitted before the field existed; current emitters always set it."
|
|
115
|
+
}
|
|
43
116
|
}
|
|
44
117
|
}
|
|
45
118
|
},
|
|
@@ -48,25 +121,60 @@
|
|
|
48
121
|
"items": {
|
|
49
122
|
"type": "object",
|
|
50
123
|
"additionalProperties": false,
|
|
51
|
-
"required": [
|
|
124
|
+
"required": [
|
|
125
|
+
"from",
|
|
126
|
+
"to",
|
|
127
|
+
"weight",
|
|
128
|
+
"operations",
|
|
129
|
+
"components"
|
|
130
|
+
],
|
|
52
131
|
"properties": {
|
|
53
|
-
"from": {
|
|
54
|
-
|
|
55
|
-
|
|
132
|
+
"from": {
|
|
133
|
+
"type": "string"
|
|
134
|
+
},
|
|
135
|
+
"to": {
|
|
136
|
+
"type": "string"
|
|
137
|
+
},
|
|
138
|
+
"weight": {
|
|
139
|
+
"type": "integer",
|
|
140
|
+
"minimum": 0
|
|
141
|
+
},
|
|
56
142
|
"operations": {
|
|
57
143
|
"type": "array",
|
|
58
|
-
"items": {
|
|
144
|
+
"items": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"enum": [
|
|
147
|
+
"read",
|
|
148
|
+
"create",
|
|
149
|
+
"update",
|
|
150
|
+
"delete"
|
|
151
|
+
]
|
|
152
|
+
}
|
|
59
153
|
},
|
|
60
154
|
"components": {
|
|
61
155
|
"type": "array",
|
|
62
156
|
"items": {
|
|
63
157
|
"type": "object",
|
|
64
158
|
"additionalProperties": false,
|
|
65
|
-
"required": [
|
|
159
|
+
"required": [
|
|
160
|
+
"type",
|
|
161
|
+
"name",
|
|
162
|
+
"confidence"
|
|
163
|
+
],
|
|
66
164
|
"properties": {
|
|
67
|
-
"type": {
|
|
68
|
-
|
|
69
|
-
|
|
165
|
+
"type": {
|
|
166
|
+
"type": "string"
|
|
167
|
+
},
|
|
168
|
+
"name": {
|
|
169
|
+
"type": "string"
|
|
170
|
+
},
|
|
171
|
+
"confidence": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"enum": [
|
|
174
|
+
"high",
|
|
175
|
+
"approximate"
|
|
176
|
+
]
|
|
177
|
+
}
|
|
70
178
|
}
|
|
71
179
|
}
|
|
72
180
|
}
|