@x12i/memorix-metadata 3.0.3 → 3.2.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.
Files changed (56) hide show
  1. package/README.md +4 -0
  2. package/dist/abstracts.d.ts +9 -3
  3. package/dist/abstracts.d.ts.map +1 -1
  4. package/dist/abstracts.js +70 -66
  5. package/dist/abstracts.js.map +1 -1
  6. package/dist/fold-bindings.d.ts +19 -0
  7. package/dist/fold-bindings.d.ts.map +1 -0
  8. package/dist/fold-bindings.js +103 -0
  9. package/dist/fold-bindings.js.map +1 -0
  10. package/dist/index.d.ts +3 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +3 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/kind-fields.d.ts.map +1 -1
  15. package/dist/kind-fields.js +0 -1
  16. package/dist/kind-fields.js.map +1 -1
  17. package/dist/kinds.d.ts +2 -2
  18. package/dist/kinds.d.ts.map +1 -1
  19. package/dist/kinds.js +9 -11
  20. package/dist/kinds.js.map +1 -1
  21. package/dist/normalize.d.ts +1 -0
  22. package/dist/normalize.d.ts.map +1 -1
  23. package/dist/normalize.js +5 -1
  24. package/dist/normalize.js.map +1 -1
  25. package/dist/resolve.d.ts.map +1 -1
  26. package/dist/resolve.js +14 -3
  27. package/dist/resolve.js.map +1 -1
  28. package/dist/topology.d.ts +52 -0
  29. package/dist/topology.d.ts.map +1 -0
  30. package/dist/topology.js +376 -0
  31. package/dist/topology.js.map +1 -0
  32. package/dist/types.d.ts +146 -16
  33. package/dist/types.d.ts.map +1 -1
  34. package/dist/validate.d.ts.map +1 -1
  35. package/dist/validate.js +179 -64
  36. package/dist/validate.js.map +1 -1
  37. package/examples/invalid/agent-classification.json +31 -31
  38. package/examples/invalid/broken-binding.json +27 -27
  39. package/examples/invalid/completion-mapping-with-exec-policy.json +31 -31
  40. package/examples/invalid/missing-parent.json +31 -31
  41. package/examples/invalid/operational-kind-root.json +31 -31
  42. package/examples/invalid/pipeline-unknown-service.json +31 -31
  43. package/examples/invalid/relationship-missing-rules.json +24 -24
  44. package/examples/invalid/relationship-with-storage.json +24 -24
  45. package/examples/invalid/service-with-secrets.json +27 -27
  46. package/examples/knowx/normalized/pack.json +1133 -173
  47. package/examples/opx/normalized/pack.json +309 -291
  48. package/examples/opx/raw/abstract-types.json +223 -7
  49. package/examples/opx/raw/object-types.json +26 -95
  50. package/examples/opx/raw/pipelines-and-sources.json +66 -18
  51. package/examples/opx/raw/relationship-definitions.json +17 -47
  52. package/examples/opx/raw/view-definitions.json +6 -20
  53. package/examples/opx/raw/write-and-source-mappings.json +135 -20
  54. package/examples/project-opx/normalized/pack.json +355 -263
  55. package/package.json +1 -1
  56. package/examples/opx/raw/abstract-bindings.json +0 -38
@@ -3,42 +3,28 @@
3
3
  {
4
4
  "id": "opx-work-items-list",
5
5
  "kind": "list",
6
- "objectType": "work-items",
6
+ "abstractType": "WorkItems",
7
7
  "title": "Work items",
8
- "columns": [
9
- "concept.title",
10
- "data.status",
11
- "data.priority"
12
- ]
8
+ "columns": ["concept.title", "data.status", "data.priority"]
13
9
  },
14
10
  {
15
11
  "id": "opx-work-items-item",
16
12
  "kind": "item",
17
- "objectType": "work-items",
13
+ "abstractType": "WorkItems",
18
14
  "title": "Work item",
19
- "sections": [
20
- "concept",
21
- "data",
22
- "workflow",
23
- "analysis",
24
- "decisions"
25
- ]
15
+ "sections": ["concept", "data", "workflow", "analysis", "decisions"]
26
16
  },
27
17
  {
28
18
  "id": "opx-people-list",
29
19
  "kind": "list",
30
20
  "abstractType": "People",
31
21
  "title": "People",
32
- "columns": [
33
- "concept.title",
34
- "objectType",
35
- "data.role"
36
- ]
22
+ "columns": ["concept.title", "objectType", "data.role"]
37
23
  },
38
24
  {
39
25
  "id": "opx-work-item-expand-people",
40
26
  "kind": "relationship-expansion",
41
- "objectType": "work-items",
27
+ "abstractType": "WorkItems",
42
28
  "relationshipDefinitionId": "people-assigned-to-work-items",
43
29
  "direction": "to-from"
44
30
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "writeDefinitions": [
3
3
  {
4
- "id": "opx-employees-snapshots",
5
- "objectType": "employees",
4
+ "id": "opx-people-employee-snapshots",
5
+ "objectType": "people",
6
6
  "contentType": "snapshots",
7
7
  "identity": {
8
8
  "primaryKind": "employeeId",
@@ -10,11 +10,11 @@
10
10
  }
11
11
  },
12
12
  {
13
- "id": "opx-contractors-snapshots",
14
- "objectType": "contractors",
13
+ "id": "opx-people-external-snapshots",
14
+ "objectType": "people",
15
15
  "contentType": "snapshots",
16
16
  "identity": {
17
- "primaryKind": "contractorId",
17
+ "primaryKind": "externalPersonId",
18
18
  "issuer": "opx-source"
19
19
  }
20
20
  },
@@ -28,11 +28,11 @@
28
28
  }
29
29
  },
30
30
  {
31
- "id": "opx-procedures-snapshots",
32
- "objectType": "procedures",
31
+ "id": "opx-playbooks-snapshots",
32
+ "objectType": "playbooks",
33
33
  "contentType": "snapshots",
34
34
  "identity": {
35
- "primaryKind": "procedureId",
35
+ "primaryKind": "playbookId",
36
36
  "issuer": "opx-source"
37
37
  }
38
38
  },
@@ -51,37 +51,86 @@
51
51
  "id": "opx-source-employees-to-raw",
52
52
  "sourceId": "opx-source",
53
53
  "endpoint": "/employees",
54
- "objectType": "employees",
54
+ "objectType": "people",
55
55
  "contentType": "raw",
56
56
  "mode": "knowledge",
57
+ "purpose": "source",
57
58
  "map": {
58
- "data": {
59
+ "recordId": {
59
60
  "op": "path",
60
- "path": "$"
61
+ "path": "id",
62
+ "required": true
63
+ },
64
+ "objectType": {
65
+ "op": "constant",
66
+ "value": "people"
67
+ },
68
+ "data.displayName": {
69
+ "op": "path",
70
+ "path": "name",
71
+ "required": true
72
+ },
73
+ "data.role": {
74
+ "op": "path",
75
+ "path": "role",
76
+ "required": true
77
+ },
78
+ "data.email": {
79
+ "op": "path",
80
+ "path": "email"
81
+ },
82
+ "data.sourceId": {
83
+ "op": "path",
84
+ "path": "id"
61
85
  }
62
86
  }
63
87
  },
64
88
  {
65
- "id": "opx-source-work-items-to-raw",
89
+ "id": "opx-source-external-people-to-raw",
66
90
  "sourceId": "opx-source",
67
- "endpoint": "/work-items",
68
- "objectType": "work-items",
91
+ "endpoint": "/external-people",
92
+ "objectType": "people",
69
93
  "contentType": "raw",
70
94
  "mode": "knowledge",
95
+ "purpose": "source",
71
96
  "map": {
72
- "data": {
97
+ "recordId": {
73
98
  "op": "path",
74
- "path": "$"
99
+ "path": "id",
100
+ "required": true
101
+ },
102
+ "objectType": {
103
+ "op": "constant",
104
+ "value": "people"
105
+ },
106
+ "data.displayName": {
107
+ "op": "path",
108
+ "path": "name",
109
+ "required": true
110
+ },
111
+ "data.role": {
112
+ "op": "path",
113
+ "path": "role",
114
+ "required": true
115
+ },
116
+ "data.organization": {
117
+ "op": "path",
118
+ "path": "organization"
119
+ },
120
+ "data.sourceId": {
121
+ "op": "path",
122
+ "path": "id"
75
123
  }
76
124
  }
77
125
  },
78
126
  {
79
- "id": "opx-source-procedures-to-raw",
127
+ "id": "opx-source-work-items-to-raw",
80
128
  "sourceId": "opx-source",
81
- "endpoint": "/procedures",
82
- "objectType": "procedures",
129
+ "endpoint": "/work-items",
130
+ "objectType": "work-items",
83
131
  "contentType": "raw",
84
132
  "mode": "knowledge",
133
+ "purpose": "source",
85
134
  "map": {
86
135
  "data": {
87
136
  "op": "path",
@@ -94,9 +143,10 @@
94
143
  "sourceId": "opx-source",
95
144
  "endpoint": "/work-items/:id/context",
96
145
  "objectType": "work-items",
97
- "contentType": "raw",
146
+ "contentType": "context",
98
147
  "mode": "context",
99
148
  "trigger": "on-demand",
149
+ "purpose": "source",
100
150
  "map": {
101
151
  "data": {
102
152
  "op": "path",
@@ -104,5 +154,70 @@
104
154
  }
105
155
  }
106
156
  }
157
+ ],
158
+ "abstractMappings": [
159
+ {
160
+ "id": "opx-people-abstract",
161
+ "purpose": "abstract",
162
+ "abstractType": "People",
163
+ "objectType": "people",
164
+ "contentType": "snapshots",
165
+ "map": {
166
+ "title": {
167
+ "expr": {
168
+ "op": "path",
169
+ "path": "data.displayName"
170
+ },
171
+ "required": true
172
+ },
173
+ "role": {
174
+ "expr": {
175
+ "op": "path",
176
+ "path": "data.role"
177
+ },
178
+ "required": true
179
+ },
180
+ "lens": {
181
+ "op": "constant",
182
+ "value": "people"
183
+ }
184
+ },
185
+ "reverse": {
186
+ "title": {
187
+ "expr": {
188
+ "op": "path",
189
+ "path": "title"
190
+ },
191
+ "targetPath": "data.displayName"
192
+ }
193
+ }
194
+ }
195
+ ],
196
+ "completionMappings": [
197
+ {
198
+ "id": "opx-work-items-completion-priority",
199
+ "purpose": "completion",
200
+ "objectType": "work-items",
201
+ "contentType": "snapshots",
202
+ "map": {
203
+ "data.priority": {
204
+ "op": "coalesce",
205
+ "exprs": [
206
+ {
207
+ "op": "path",
208
+ "path": "priority"
209
+ },
210
+ {
211
+ "op": "constant",
212
+ "value": "normal"
213
+ }
214
+ ]
215
+ },
216
+ "data.title": {
217
+ "op": "path",
218
+ "path": "title"
219
+ }
220
+ }
221
+ }
107
222
  ]
108
223
  }