@x12i/memorix-service 3.9.2 → 3.11.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 (80) hide show
  1. package/dist/analytics/content-allow.d.ts +17 -0
  2. package/dist/analytics/content-allow.d.ts.map +1 -0
  3. package/dist/analytics/content-allow.js +39 -0
  4. package/dist/analytics/content-allow.js.map +1 -0
  5. package/dist/analytics/definition.d.ts +179 -0
  6. package/dist/analytics/definition.d.ts.map +1 -0
  7. package/dist/analytics/definition.js +524 -0
  8. package/dist/analytics/definition.js.map +1 -0
  9. package/dist/analytics/engine.d.ts +63 -0
  10. package/dist/analytics/engine.d.ts.map +1 -0
  11. package/dist/analytics/engine.js +181 -0
  12. package/dist/analytics/engine.js.map +1 -0
  13. package/dist/analytics/host.d.ts +15 -0
  14. package/dist/analytics/host.d.ts.map +1 -0
  15. package/dist/analytics/host.js +143 -0
  16. package/dist/analytics/host.js.map +1 -0
  17. package/dist/analytics/index-store.d.ts +98 -0
  18. package/dist/analytics/index-store.d.ts.map +1 -0
  19. package/dist/analytics/index-store.js +295 -0
  20. package/dist/analytics/index-store.js.map +1 -0
  21. package/dist/analytics/materializer.d.ts +88 -0
  22. package/dist/analytics/materializer.d.ts.map +1 -0
  23. package/dist/analytics/materializer.js +364 -0
  24. package/dist/analytics/materializer.js.map +1 -0
  25. package/dist/analytics/pipeline-port.d.ts +10 -0
  26. package/dist/analytics/pipeline-port.d.ts.map +1 -0
  27. package/dist/analytics/pipeline-port.js +42 -0
  28. package/dist/analytics/pipeline-port.js.map +1 -0
  29. package/dist/analytics/projector.d.ts +60 -0
  30. package/dist/analytics/projector.d.ts.map +1 -0
  31. package/dist/analytics/projector.js +270 -0
  32. package/dist/analytics/projector.js.map +1 -0
  33. package/dist/analytics/property-index.d.ts +87 -0
  34. package/dist/analytics/property-index.d.ts.map +1 -0
  35. package/dist/analytics/property-index.js +537 -0
  36. package/dist/analytics/property-index.js.map +1 -0
  37. package/dist/analytics/state.d.ts +83 -0
  38. package/dist/analytics/state.d.ts.map +1 -0
  39. package/dist/analytics/state.js +273 -0
  40. package/dist/analytics/state.js.map +1 -0
  41. package/dist/analytics/tracker.d.ts +215 -0
  42. package/dist/analytics/tracker.d.ts.map +1 -0
  43. package/dist/analytics/tracker.js +1515 -0
  44. package/dist/analytics/tracker.js.map +1 -0
  45. package/dist/app.d.ts.map +1 -1
  46. package/dist/app.js +6 -0
  47. package/dist/app.js.map +1 -1
  48. package/dist/content-census-countex.d.ts +15 -0
  49. package/dist/content-census-countex.d.ts.map +1 -0
  50. package/dist/content-census-countex.js +18 -0
  51. package/dist/content-census-countex.js.map +1 -0
  52. package/dist/datasource-backfill.d.ts +2 -0
  53. package/dist/datasource-backfill.d.ts.map +1 -1
  54. package/dist/datasource-backfill.js +5 -1
  55. package/dist/datasource-backfill.js.map +1 -1
  56. package/dist/index.d.ts +4 -0
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +3 -0
  59. package/dist/index.js.map +1 -1
  60. package/dist/openapi/openapi.json +955 -210
  61. package/dist/platform.d.ts +6 -0
  62. package/dist/platform.d.ts.map +1 -1
  63. package/dist/platform.js +69 -4
  64. package/dist/platform.js.map +1 -1
  65. package/dist/routes/analytics-counters.d.ts +8 -0
  66. package/dist/routes/analytics-counters.d.ts.map +1 -0
  67. package/dist/routes/analytics-counters.js +100 -0
  68. package/dist/routes/analytics-counters.js.map +1 -0
  69. package/dist/routes/analytics-indexes.d.ts +8 -0
  70. package/dist/routes/analytics-indexes.d.ts.map +1 -0
  71. package/dist/routes/analytics-indexes.js +80 -0
  72. package/dist/routes/analytics-indexes.js.map +1 -0
  73. package/dist/routes/data.d.ts.map +1 -1
  74. package/dist/routes/data.js +22 -0
  75. package/dist/routes/data.js.map +1 -1
  76. package/dist/routes/datasource-backfill.d.ts.map +1 -1
  77. package/dist/routes/datasource-backfill.js +8 -1
  78. package/dist/routes/datasource-backfill.js.map +1 -1
  79. package/openapi/openapi.json +955 -210
  80. package/package.json +5 -5
@@ -2417,7 +2417,8 @@
2417
2417
  "ingress": {
2418
2418
  "type": "string",
2419
2419
  "enum": ["push", "import", "sync", "derive", "migrate", "manual", "replicate"]
2420
- }
2420
+ },
2421
+ "sources": { "$ref": "#/components/schemas/DatasourceSourcesDeclaration" }
2421
2422
  }
2422
2423
  }
2423
2424
  }
@@ -2830,7 +2831,8 @@
2830
2831
  "ingress": {
2831
2832
  "type": "string",
2832
2833
  "enum": ["push", "import", "sync", "derive", "migrate", "manual", "replicate"]
2833
- }
2834
+ },
2835
+ "sources": { "$ref": "#/components/schemas/DatasourceSourcesDeclaration" }
2834
2836
  },
2835
2837
  "additionalProperties": true
2836
2838
  },
@@ -13935,228 +13937,821 @@
13935
13937
  }
13936
13938
  }
13937
13939
  }
13938
- }
13939
- },
13940
- "components": {
13941
- "parameters": {
13942
- "XMemorixOrgId": {
13943
- "name": "x-memorix-org-id",
13944
- "in": "header",
13945
- "required": true,
13946
- "schema": {
13947
- "type": "string",
13948
- "minLength": 1
13949
- },
13950
- "description": "Organization / data-universe id"
13951
- },
13952
- "XMemorixAgentIds": {
13953
- "name": "x-memorix-agent-ids",
13954
- "in": "header",
13955
- "required": true,
13956
- "schema": {
13957
- "type": "string",
13958
- "minLength": 1
13959
- },
13960
- "description": "Comma-separated agentIds for effective metadata",
13961
- "example": "ops,fieldstone"
13962
- },
13963
- "XMemorixCaller": {
13964
- "name": "x-memorix-caller",
13965
- "in": "header",
13966
- "required": true,
13967
- "schema": {
13968
- "type": "string",
13969
- "minLength": 1,
13970
- "maxLength": 128,
13971
- "pattern": "^[a-zA-Z0-9@][a-zA-Z0-9._@/-]*$"
13972
- },
13973
- "description": "MX-CALLER-01: calling application id (e.g. synapix-lander, map-store, memorix-studio, @x12i/memorix-client)",
13974
- "example": "memorix-studio"
13975
- }
13976
13940
  },
13977
- "schemas": {
13978
- "MemorixScope": {
13979
- "type": "object",
13980
- "required": [
13981
- "orgId",
13982
- "agentIds"
13941
+ "/api/analytics/counters": {
13942
+ "get": {
13943
+ "operationId": "analyticsCountersList",
13944
+ "summary": "List registered counters (pack analytics[], API registrations, built-ins)",
13945
+ "tags": [
13946
+ "Analytics"
13983
13947
  ],
13984
- "additionalProperties": false,
13985
- "properties": {
13986
- "orgId": {
13987
- "type": "string",
13988
- "minLength": 1,
13989
- "description": "Data universe / org isolation key"
13948
+ "parameters": [
13949
+ {
13950
+ "$ref": "#/components/parameters/XMemorixCaller"
13990
13951
  },
13991
- "agentIds": {
13992
- "type": "array",
13993
- "items": {
13994
- "type": "string",
13995
- "minLength": 1
13996
- },
13997
- "minItems": 1,
13998
- "uniqueItems": true,
13999
- "description": "Effective metadata agent chain (canonicalized/sorted)"
13952
+ {
13953
+ "$ref": "#/components/parameters/XMemorixOrgId"
13954
+ },
13955
+ {
13956
+ "$ref": "#/components/parameters/XMemorixAgentIds"
14000
13957
  }
14001
- },
14002
- "example": {
14003
- "orgId": "acme",
14004
- "agentIds": [
14005
- "opx",
14006
- "fieldstone"
14007
- ]
14008
- }
14009
- },
14010
- "ConnectorCatalogEntry": {
14011
- "type": "object",
14012
- "required": [
14013
- "id",
14014
- "version",
14015
- "protocol",
14016
- "enabled",
14017
- "framework",
14018
- "displayName",
14019
- "capabilities",
14020
- "isSource",
14021
- "isTarget",
14022
- "origin"
14023
13958
  ],
14024
- "properties": {
14025
- "id": {
14026
- "type": "string",
14027
- "description": "Connector package id (connectorRef)"
14028
- },
14029
- "version": {
14030
- "type": "string"
14031
- },
14032
- "protocol": {
14033
- "type": "string",
14034
- "example": "memorix-connector/1"
14035
- },
14036
- "enabled": {
14037
- "type": "boolean"
14038
- },
14039
- "framework": {
14040
- "type": "boolean"
14041
- },
14042
- "displayName": {
14043
- "type": "string"
14044
- },
14045
- "capabilities": {
14046
- "type": "object",
14047
- "additionalProperties": true
14048
- },
14049
- "connectorRole": {
14050
- "type": "string",
14051
- "enum": [
14052
- "source",
14053
- "target",
14054
- "both"
14055
- ],
14056
- "nullable": true,
14057
- "description": "Authoritative direction when set (prefer over id suffix)."
14058
- },
14059
- "isSource": {
14060
- "type": "boolean"
14061
- },
14062
- "isTarget": {
14063
- "type": "boolean"
14064
- },
14065
- "origin": {
14066
- "type": "string",
14067
- "enum": [
14068
- "registry",
14069
- "builtin",
14070
- "generic-connectors"
14071
- ]
14072
- },
14073
- "hostBaseUrl": {
14074
- "type": "string",
14075
- "description": "MGC host base when origin is generic-connectors"
14076
- },
14077
- "remoteHosting": {
14078
- "type": "boolean"
14079
- },
14080
- "unavailableReason": {
14081
- "type": "string",
14082
- "description": "Set when the row is listed but not usable (e.g. host URL unset for stubs)"
14083
- },
14084
- "definitionHash": {
14085
- "type": "string",
14086
- "description": "Pinned hash from host catalog when available"
14087
- },
14088
- "description": {
14089
- "type": "string"
14090
- },
14091
- "purpose": {
14092
- "type": "string"
14093
- },
14094
- "classification": {
14095
- "type": "string",
14096
- "description": "Domain classification from pack catalog (e.g. cybersecurity)"
14097
- },
14098
- "tags": {
14099
- "type": "array",
14100
- "items": {
14101
- "type": "string"
13959
+ "responses": {
13960
+ "200": {
13961
+ "description": "Counters for the organization",
13962
+ "content": {
13963
+ "application/json": {
13964
+ "schema": {
13965
+ "type": "object",
13966
+ "required": [
13967
+ "items"
13968
+ ],
13969
+ "properties": {
13970
+ "items": {
13971
+ "type": "array",
13972
+ "items": {
13973
+ "$ref": "#/components/schemas/AnalyticsCounter"
13974
+ }
13975
+ }
13976
+ }
13977
+ }
13978
+ }
14102
13979
  }
14103
13980
  },
14104
- "usageModel": {
14105
- "type": "string",
14106
- "enum": [
14107
- "stream",
14108
- "service"
14109
- ],
14110
- "description": "stream = continuous sync; service = on-demand enrichment. Protocol role remains source|target only."
13981
+ "503": {
13982
+ "description": "Analytics counters unavailable (no Mongo, or MEMORIX_ANALYTICS=0)",
13983
+ "content": {
13984
+ "application/json": {
13985
+ "schema": {
13986
+ "$ref": "#/components/schemas/ErrorEnvelope"
13987
+ }
13988
+ }
13989
+ }
14111
13990
  }
14112
13991
  }
14113
13992
  },
14114
- "MemorixIdentifier": {
14115
- "type": "object",
14116
- "required": [
14117
- "kind",
14118
- "value"
13993
+ "post": {
13994
+ "operationId": "analyticsCountersRegister",
13995
+ "summary": "Register a counter; results are read from its target record with GET /api/data/content",
13996
+ "tags": [
13997
+ "Analytics"
14119
13998
  ],
14120
- "properties": {
14121
- "kind": {
14122
- "type": "string"
14123
- },
14124
- "value": {
14125
- "type": "string"
13999
+ "parameters": [
14000
+ {
14001
+ "$ref": "#/components/parameters/XMemorixCaller"
14126
14002
  },
14127
- "issuer": {
14128
- "type": "string"
14003
+ {
14004
+ "$ref": "#/components/parameters/XMemorixOrgId"
14129
14005
  },
14130
- "normalizedValue": {
14131
- "type": "string"
14006
+ {
14007
+ "$ref": "#/components/parameters/XMemorixAgentIds"
14132
14008
  }
14133
- }
14134
- },
14135
- "MemorixRecordV2": {
14136
- "type": "object",
14137
- "required": [
14138
- "format",
14139
- "recordId",
14140
- "revision",
14141
- "objectType",
14142
- "contentType",
14143
- "dataCategory",
14144
- "concept",
14145
- "data",
14146
- "_system"
14147
14009
  ],
14148
- "properties": {
14149
- "format": {
14150
- "type": "string",
14151
- "enum": [
14152
- "memorix-record/2"
14153
- ]
14154
- },
14155
- "recordId": {
14156
- "type": "string"
14157
- },
14158
- "revision": {
14159
- "type": "integer",
14010
+ "requestBody": {
14011
+ "required": true,
14012
+ "content": {
14013
+ "application/json": {
14014
+ "schema": {
14015
+ "type": "object",
14016
+ "required": [
14017
+ "definition"
14018
+ ],
14019
+ "properties": {
14020
+ "definition": {
14021
+ "type": "object",
14022
+ "additionalProperties": true,
14023
+ "description": "An analytics definition (same shape as a pack analytics[] item). A measure, group, or split may name abstractType, or objectType plus contentType and a stored property path."
14024
+ },
14025
+ "replace": {
14026
+ "type": "boolean",
14027
+ "description": "Rebuild when a counter with this id exists with a different definition"
14028
+ }
14029
+ }
14030
+ }
14031
+ }
14032
+ }
14033
+ },
14034
+ "responses": {
14035
+ "202": {
14036
+ "description": "Accepted; the counter backfills once, then stays current from writes",
14037
+ "content": {
14038
+ "application/json": {
14039
+ "schema": {
14040
+ "type": "object",
14041
+ "required": [
14042
+ "id",
14043
+ "status",
14044
+ "counter"
14045
+ ],
14046
+ "properties": {
14047
+ "id": {
14048
+ "type": "string"
14049
+ },
14050
+ "status": {
14051
+ "type": "string"
14052
+ },
14053
+ "counter": {
14054
+ "$ref": "#/components/schemas/AnalyticsCounter"
14055
+ }
14056
+ }
14057
+ }
14058
+ }
14059
+ }
14060
+ },
14061
+ "400": {
14062
+ "description": "Definition invalid (error.details.issues)",
14063
+ "content": {
14064
+ "application/json": {
14065
+ "schema": {
14066
+ "$ref": "#/components/schemas/ErrorEnvelope"
14067
+ }
14068
+ }
14069
+ }
14070
+ },
14071
+ "409": {
14072
+ "description": "Id taken by a pack or built-in counter, definition differs without replace, or target already used",
14073
+ "content": {
14074
+ "application/json": {
14075
+ "schema": {
14076
+ "$ref": "#/components/schemas/ErrorEnvelope"
14077
+ }
14078
+ }
14079
+ }
14080
+ },
14081
+ "503": {
14082
+ "description": "Analytics counters unavailable",
14083
+ "content": {
14084
+ "application/json": {
14085
+ "schema": {
14086
+ "$ref": "#/components/schemas/ErrorEnvelope"
14087
+ }
14088
+ }
14089
+ }
14090
+ }
14091
+ }
14092
+ }
14093
+ },
14094
+ "/api/analytics/counters/validate": {
14095
+ "post": {
14096
+ "operationId": "analyticsCountersValidate",
14097
+ "summary": "Validate a counter definition without registering it",
14098
+ "tags": [
14099
+ "Analytics"
14100
+ ],
14101
+ "parameters": [
14102
+ {
14103
+ "$ref": "#/components/parameters/XMemorixCaller"
14104
+ },
14105
+ {
14106
+ "$ref": "#/components/parameters/XMemorixOrgId"
14107
+ },
14108
+ {
14109
+ "$ref": "#/components/parameters/XMemorixAgentIds"
14110
+ }
14111
+ ],
14112
+ "requestBody": {
14113
+ "required": true,
14114
+ "content": {
14115
+ "application/json": {
14116
+ "schema": {
14117
+ "type": "object",
14118
+ "properties": {
14119
+ "definition": {
14120
+ "type": "object",
14121
+ "additionalProperties": true
14122
+ }
14123
+ }
14124
+ }
14125
+ }
14126
+ }
14127
+ },
14128
+ "responses": {
14129
+ "200": {
14130
+ "description": "Validation result",
14131
+ "content": {
14132
+ "application/json": {
14133
+ "schema": {
14134
+ "type": "object",
14135
+ "required": [
14136
+ "ok",
14137
+ "issues"
14138
+ ],
14139
+ "properties": {
14140
+ "ok": {
14141
+ "type": "boolean"
14142
+ },
14143
+ "issues": {
14144
+ "type": "array",
14145
+ "items": {
14146
+ "type": "object",
14147
+ "additionalProperties": true
14148
+ }
14149
+ }
14150
+ }
14151
+ }
14152
+ }
14153
+ }
14154
+ },
14155
+ "503": {
14156
+ "description": "Analytics counters unavailable",
14157
+ "content": {
14158
+ "application/json": {
14159
+ "schema": {
14160
+ "$ref": "#/components/schemas/ErrorEnvelope"
14161
+ }
14162
+ }
14163
+ }
14164
+ }
14165
+ }
14166
+ }
14167
+ },
14168
+ "/api/analytics/counters/{id}": {
14169
+ "get": {
14170
+ "operationId": "analyticsCounterGet",
14171
+ "summary": "Counter status, backfill progress, target address and lastMaterializedAt",
14172
+ "tags": [
14173
+ "Analytics"
14174
+ ],
14175
+ "parameters": [
14176
+ {
14177
+ "$ref": "#/components/parameters/XMemorixCaller"
14178
+ },
14179
+ {
14180
+ "$ref": "#/components/parameters/XMemorixOrgId"
14181
+ },
14182
+ {
14183
+ "$ref": "#/components/parameters/XMemorixAgentIds"
14184
+ },
14185
+ {
14186
+ "name": "id",
14187
+ "in": "path",
14188
+ "required": true,
14189
+ "schema": {
14190
+ "type": "string"
14191
+ }
14192
+ }
14193
+ ],
14194
+ "responses": {
14195
+ "200": {
14196
+ "description": "Counter",
14197
+ "content": {
14198
+ "application/json": {
14199
+ "schema": {
14200
+ "$ref": "#/components/schemas/AnalyticsCounter"
14201
+ }
14202
+ }
14203
+ }
14204
+ },
14205
+ "404": {
14206
+ "description": "Counter not found",
14207
+ "content": {
14208
+ "application/json": {
14209
+ "schema": {
14210
+ "$ref": "#/components/schemas/ErrorEnvelope"
14211
+ }
14212
+ }
14213
+ }
14214
+ },
14215
+ "503": {
14216
+ "description": "Analytics counters unavailable",
14217
+ "content": {
14218
+ "application/json": {
14219
+ "schema": {
14220
+ "$ref": "#/components/schemas/ErrorEnvelope"
14221
+ }
14222
+ }
14223
+ }
14224
+ }
14225
+ }
14226
+ },
14227
+ "delete": {
14228
+ "operationId": "analyticsCounterDelete",
14229
+ "summary": "Unregister an API-registered counter (pack counters are removed from the pack)",
14230
+ "tags": [
14231
+ "Analytics"
14232
+ ],
14233
+ "parameters": [
14234
+ {
14235
+ "$ref": "#/components/parameters/XMemorixCaller"
14236
+ },
14237
+ {
14238
+ "$ref": "#/components/parameters/XMemorixOrgId"
14239
+ },
14240
+ {
14241
+ "$ref": "#/components/parameters/XMemorixAgentIds"
14242
+ },
14243
+ {
14244
+ "name": "id",
14245
+ "in": "path",
14246
+ "required": true,
14247
+ "schema": {
14248
+ "type": "string"
14249
+ }
14250
+ }
14251
+ ],
14252
+ "responses": {
14253
+ "200": {
14254
+ "description": "Removed",
14255
+ "content": {
14256
+ "application/json": {
14257
+ "schema": {
14258
+ "type": "object",
14259
+ "properties": {
14260
+ "id": {
14261
+ "type": "string"
14262
+ },
14263
+ "removed": {
14264
+ "type": "boolean"
14265
+ }
14266
+ }
14267
+ }
14268
+ }
14269
+ }
14270
+ },
14271
+ "404": {
14272
+ "description": "Counter not found",
14273
+ "content": {
14274
+ "application/json": {
14275
+ "schema": {
14276
+ "$ref": "#/components/schemas/ErrorEnvelope"
14277
+ }
14278
+ }
14279
+ }
14280
+ },
14281
+ "409": {
14282
+ "description": "Pack or built-in counter",
14283
+ "content": {
14284
+ "application/json": {
14285
+ "schema": {
14286
+ "$ref": "#/components/schemas/ErrorEnvelope"
14287
+ }
14288
+ }
14289
+ }
14290
+ },
14291
+ "503": {
14292
+ "description": "Analytics counters unavailable",
14293
+ "content": {
14294
+ "application/json": {
14295
+ "schema": {
14296
+ "$ref": "#/components/schemas/ErrorEnvelope"
14297
+ }
14298
+ }
14299
+ }
14300
+ }
14301
+ }
14302
+ }
14303
+ },
14304
+ "/api/analytics/counters/{id}/rebuild": {
14305
+ "post": {
14306
+ "operationId": "analyticsCounterRebuild",
14307
+ "summary": "Drop the counter's cells and ledger, then backfill again",
14308
+ "tags": [
14309
+ "Analytics"
14310
+ ],
14311
+ "parameters": [
14312
+ {
14313
+ "$ref": "#/components/parameters/XMemorixCaller"
14314
+ },
14315
+ {
14316
+ "$ref": "#/components/parameters/XMemorixOrgId"
14317
+ },
14318
+ {
14319
+ "$ref": "#/components/parameters/XMemorixAgentIds"
14320
+ },
14321
+ {
14322
+ "name": "id",
14323
+ "in": "path",
14324
+ "required": true,
14325
+ "schema": {
14326
+ "type": "string"
14327
+ }
14328
+ }
14329
+ ],
14330
+ "responses": {
14331
+ "202": {
14332
+ "description": "Accepted; the counter backfills once, then stays current from writes",
14333
+ "content": {
14334
+ "application/json": {
14335
+ "schema": {
14336
+ "type": "object",
14337
+ "required": [
14338
+ "id",
14339
+ "status",
14340
+ "counter"
14341
+ ],
14342
+ "properties": {
14343
+ "id": {
14344
+ "type": "string"
14345
+ },
14346
+ "status": {
14347
+ "type": "string"
14348
+ },
14349
+ "counter": {
14350
+ "$ref": "#/components/schemas/AnalyticsCounter"
14351
+ }
14352
+ }
14353
+ }
14354
+ }
14355
+ }
14356
+ },
14357
+ "404": {
14358
+ "description": "Counter not found",
14359
+ "content": {
14360
+ "application/json": {
14361
+ "schema": {
14362
+ "$ref": "#/components/schemas/ErrorEnvelope"
14363
+ }
14364
+ }
14365
+ }
14366
+ },
14367
+ "503": {
14368
+ "description": "Analytics counters unavailable",
14369
+ "content": {
14370
+ "application/json": {
14371
+ "schema": {
14372
+ "$ref": "#/components/schemas/ErrorEnvelope"
14373
+ }
14374
+ }
14375
+ }
14376
+ }
14377
+ }
14378
+ }
14379
+ },
14380
+ "/api/analytics/source-census": {
14381
+ "get": {
14382
+ "operationId": "analyticsSourceCensus",
14383
+ "summary": "Current records by data source (built-in @datasources counter)",
14384
+ "tags": [
14385
+ "Analytics"
14386
+ ],
14387
+ "parameters": [
14388
+ {
14389
+ "$ref": "#/components/parameters/XMemorixCaller"
14390
+ },
14391
+ {
14392
+ "$ref": "#/components/parameters/XMemorixOrgId"
14393
+ },
14394
+ {
14395
+ "$ref": "#/components/parameters/XMemorixAgentIds"
14396
+ }
14397
+ ],
14398
+ "responses": {
14399
+ "200": {
14400
+ "description": "Census",
14401
+ "content": {
14402
+ "application/json": {
14403
+ "schema": {
14404
+ "type": "object",
14405
+ "required": [
14406
+ "ok",
14407
+ "censusId",
14408
+ "timestamp",
14409
+ "status",
14410
+ "subjects",
14411
+ "heads"
14412
+ ],
14413
+ "properties": {
14414
+ "ok": {
14415
+ "type": "boolean"
14416
+ },
14417
+ "censusId": {
14418
+ "type": [
14419
+ "string",
14420
+ "null"
14421
+ ]
14422
+ },
14423
+ "timestamp": {
14424
+ "type": "string",
14425
+ "format": "date-time"
14426
+ },
14427
+ "status": {
14428
+ "type": "string",
14429
+ "enum": [
14430
+ "live",
14431
+ "backfilling",
14432
+ "error",
14433
+ "disabled"
14434
+ ]
14435
+ },
14436
+ "subjects": {
14437
+ "type": "array",
14438
+ "items": {
14439
+ "type": "object",
14440
+ "required": [
14441
+ "system",
14442
+ "name",
14443
+ "total",
14444
+ "kinds"
14445
+ ],
14446
+ "properties": {
14447
+ "system": {
14448
+ "type": "string"
14449
+ },
14450
+ "name": {
14451
+ "type": "string"
14452
+ },
14453
+ "total": {
14454
+ "type": "integer"
14455
+ },
14456
+ "kinds": {
14457
+ "type": "array",
14458
+ "items": {
14459
+ "type": "object",
14460
+ "required": [
14461
+ "kind",
14462
+ "label",
14463
+ "count"
14464
+ ],
14465
+ "properties": {
14466
+ "kind": {
14467
+ "type": "string"
14468
+ },
14469
+ "label": {
14470
+ "type": "string"
14471
+ },
14472
+ "count": {
14473
+ "type": "integer"
14474
+ }
14475
+ }
14476
+ }
14477
+ }
14478
+ }
14479
+ }
14480
+ },
14481
+ "heads": {
14482
+ "type": "array",
14483
+ "items": {
14484
+ "type": "object",
14485
+ "required": [
14486
+ "system",
14487
+ "name",
14488
+ "total",
14489
+ "kinds"
14490
+ ],
14491
+ "properties": {
14492
+ "system": {
14493
+ "type": "string"
14494
+ },
14495
+ "name": {
14496
+ "type": "string"
14497
+ },
14498
+ "total": {
14499
+ "type": "integer"
14500
+ },
14501
+ "kinds": {
14502
+ "type": "array",
14503
+ "items": {
14504
+ "type": "object",
14505
+ "required": [
14506
+ "kind",
14507
+ "label",
14508
+ "count"
14509
+ ],
14510
+ "properties": {
14511
+ "kind": {
14512
+ "type": "string"
14513
+ },
14514
+ "label": {
14515
+ "type": "string"
14516
+ },
14517
+ "count": {
14518
+ "type": "integer"
14519
+ }
14520
+ }
14521
+ }
14522
+ }
14523
+ }
14524
+ }
14525
+ }
14526
+ }
14527
+ }
14528
+ }
14529
+ }
14530
+ }
14531
+ }
14532
+ }
14533
+ }
14534
+ },
14535
+ "components": {
14536
+ "parameters": {
14537
+ "XMemorixOrgId": {
14538
+ "name": "x-memorix-org-id",
14539
+ "in": "header",
14540
+ "required": true,
14541
+ "schema": {
14542
+ "type": "string",
14543
+ "minLength": 1
14544
+ },
14545
+ "description": "Organization / data-universe id"
14546
+ },
14547
+ "XMemorixAgentIds": {
14548
+ "name": "x-memorix-agent-ids",
14549
+ "in": "header",
14550
+ "required": true,
14551
+ "schema": {
14552
+ "type": "string",
14553
+ "minLength": 1
14554
+ },
14555
+ "description": "Comma-separated agentIds for effective metadata",
14556
+ "example": "ops,fieldstone"
14557
+ },
14558
+ "XMemorixCaller": {
14559
+ "name": "x-memorix-caller",
14560
+ "in": "header",
14561
+ "required": true,
14562
+ "schema": {
14563
+ "type": "string",
14564
+ "minLength": 1,
14565
+ "maxLength": 128,
14566
+ "pattern": "^[a-zA-Z0-9@][a-zA-Z0-9._@/-]*$"
14567
+ },
14568
+ "description": "MX-CALLER-01: calling application id (e.g. synapix-lander, map-store, memorix-studio, @x12i/memorix-client)",
14569
+ "example": "memorix-studio"
14570
+ }
14571
+ },
14572
+ "schemas": {
14573
+ "MemorixScope": {
14574
+ "type": "object",
14575
+ "required": [
14576
+ "orgId",
14577
+ "agentIds"
14578
+ ],
14579
+ "additionalProperties": false,
14580
+ "properties": {
14581
+ "orgId": {
14582
+ "type": "string",
14583
+ "minLength": 1,
14584
+ "description": "Data universe / org isolation key"
14585
+ },
14586
+ "agentIds": {
14587
+ "type": "array",
14588
+ "items": {
14589
+ "type": "string",
14590
+ "minLength": 1
14591
+ },
14592
+ "minItems": 1,
14593
+ "uniqueItems": true,
14594
+ "description": "Effective metadata agent chain (canonicalized/sorted)"
14595
+ }
14596
+ },
14597
+ "example": {
14598
+ "orgId": "acme",
14599
+ "agentIds": [
14600
+ "opx",
14601
+ "fieldstone"
14602
+ ]
14603
+ }
14604
+ },
14605
+ "ConnectorCatalogEntry": {
14606
+ "type": "object",
14607
+ "required": [
14608
+ "id",
14609
+ "version",
14610
+ "protocol",
14611
+ "enabled",
14612
+ "framework",
14613
+ "displayName",
14614
+ "capabilities",
14615
+ "isSource",
14616
+ "isTarget",
14617
+ "origin"
14618
+ ],
14619
+ "properties": {
14620
+ "id": {
14621
+ "type": "string",
14622
+ "description": "Connector package id (connectorRef)"
14623
+ },
14624
+ "version": {
14625
+ "type": "string"
14626
+ },
14627
+ "protocol": {
14628
+ "type": "string",
14629
+ "example": "memorix-connector/1"
14630
+ },
14631
+ "enabled": {
14632
+ "type": "boolean"
14633
+ },
14634
+ "framework": {
14635
+ "type": "boolean"
14636
+ },
14637
+ "displayName": {
14638
+ "type": "string"
14639
+ },
14640
+ "capabilities": {
14641
+ "type": "object",
14642
+ "additionalProperties": true
14643
+ },
14644
+ "connectorRole": {
14645
+ "type": "string",
14646
+ "enum": [
14647
+ "source",
14648
+ "target",
14649
+ "both"
14650
+ ],
14651
+ "nullable": true,
14652
+ "description": "Authoritative direction when set (prefer over id suffix)."
14653
+ },
14654
+ "isSource": {
14655
+ "type": "boolean"
14656
+ },
14657
+ "isTarget": {
14658
+ "type": "boolean"
14659
+ },
14660
+ "origin": {
14661
+ "type": "string",
14662
+ "enum": [
14663
+ "registry",
14664
+ "builtin",
14665
+ "generic-connectors"
14666
+ ]
14667
+ },
14668
+ "hostBaseUrl": {
14669
+ "type": "string",
14670
+ "description": "MGC host base when origin is generic-connectors"
14671
+ },
14672
+ "remoteHosting": {
14673
+ "type": "boolean"
14674
+ },
14675
+ "unavailableReason": {
14676
+ "type": "string",
14677
+ "description": "Set when the row is listed but not usable (e.g. host URL unset for stubs)"
14678
+ },
14679
+ "definitionHash": {
14680
+ "type": "string",
14681
+ "description": "Pinned hash from host catalog when available"
14682
+ },
14683
+ "description": {
14684
+ "type": "string"
14685
+ },
14686
+ "purpose": {
14687
+ "type": "string"
14688
+ },
14689
+ "classification": {
14690
+ "type": "string",
14691
+ "description": "Domain classification from pack catalog (e.g. cybersecurity)"
14692
+ },
14693
+ "tags": {
14694
+ "type": "array",
14695
+ "items": {
14696
+ "type": "string"
14697
+ }
14698
+ },
14699
+ "usageModel": {
14700
+ "type": "string",
14701
+ "enum": [
14702
+ "stream",
14703
+ "service"
14704
+ ],
14705
+ "description": "stream = continuous sync; service = on-demand enrichment. Protocol role remains source|target only."
14706
+ }
14707
+ }
14708
+ },
14709
+ "MemorixIdentifier": {
14710
+ "type": "object",
14711
+ "required": [
14712
+ "kind",
14713
+ "value"
14714
+ ],
14715
+ "properties": {
14716
+ "kind": {
14717
+ "type": "string"
14718
+ },
14719
+ "value": {
14720
+ "type": "string"
14721
+ },
14722
+ "issuer": {
14723
+ "type": "string"
14724
+ },
14725
+ "normalizedValue": {
14726
+ "type": "string"
14727
+ }
14728
+ }
14729
+ },
14730
+ "MemorixRecordV2": {
14731
+ "type": "object",
14732
+ "required": [
14733
+ "format",
14734
+ "recordId",
14735
+ "revision",
14736
+ "objectType",
14737
+ "contentType",
14738
+ "dataCategory",
14739
+ "concept",
14740
+ "data",
14741
+ "_system"
14742
+ ],
14743
+ "properties": {
14744
+ "format": {
14745
+ "type": "string",
14746
+ "enum": [
14747
+ "memorix-record/2"
14748
+ ]
14749
+ },
14750
+ "recordId": {
14751
+ "type": "string"
14752
+ },
14753
+ "revision": {
14754
+ "type": "integer",
14160
14755
  "minimum": 1
14161
14756
  },
14162
14757
  "objectType": {
@@ -14319,7 +14914,29 @@
14319
14914
  "origin": { "type": "string" },
14320
14915
  "channel": { "type": "string" },
14321
14916
  "originRecordId": { "type": "string" },
14322
- "originAt": { "type": "string", "format": "date-time" }
14917
+ "originAt": { "type": "string", "format": "date-time" },
14918
+ "sources": {
14919
+ "type": "array",
14920
+ "items": {
14921
+ "type": "object",
14922
+ "required": ["system", "name"],
14923
+ "properties": { "system": { "type": "string" }, "name": { "type": "string" } }
14924
+ }
14925
+ }
14926
+ }
14927
+ },
14928
+ "DatasourceSourcesDeclaration": {
14929
+ "description": "Connector the record came from; the census and @datasource groups file it under sources[0]. Replaces stored sources; null or [] clears them; omit to keep them.",
14930
+ "type": "array",
14931
+ "nullable": true,
14932
+ "maxItems": 8,
14933
+ "items": {
14934
+ "type": "object",
14935
+ "required": ["system", "name"],
14936
+ "properties": {
14937
+ "system": { "type": "string", "pattern": "^[a-zA-Z0-9@][a-zA-Z0-9._@/-]*$", "maxLength": 128 },
14938
+ "name": { "type": "string", "minLength": 1, "maxLength": 128 }
14939
+ }
14323
14940
  }
14324
14941
  },
14325
14942
  "PublicationMember": {
@@ -16256,6 +16873,134 @@
16256
16873
  }
16257
16874
  }
16258
16875
  }
16876
+ },
16877
+ "AnalyticsCounter": {
16878
+ "type": "object",
16879
+ "required": [
16880
+ "id",
16881
+ "origin",
16882
+ "status",
16883
+ "generation",
16884
+ "target",
16885
+ "backfill"
16886
+ ],
16887
+ "properties": {
16888
+ "id": {
16889
+ "type": "string"
16890
+ },
16891
+ "name": {
16892
+ "type": [
16893
+ "string",
16894
+ "null"
16895
+ ]
16896
+ },
16897
+ "origin": {
16898
+ "type": "string",
16899
+ "enum": [
16900
+ "pack",
16901
+ "api",
16902
+ "builtin"
16903
+ ]
16904
+ },
16905
+ "status": {
16906
+ "type": "string",
16907
+ "enum": [
16908
+ "backfilling",
16909
+ "live",
16910
+ "error"
16911
+ ]
16912
+ },
16913
+ "generation": {
16914
+ "type": "integer"
16915
+ },
16916
+ "hash": {
16917
+ "type": "string"
16918
+ },
16919
+ "agentIds": {
16920
+ "type": "array",
16921
+ "items": {
16922
+ "type": "string"
16923
+ }
16924
+ },
16925
+ "target": {
16926
+ "type": [
16927
+ "object",
16928
+ "null"
16929
+ ],
16930
+ "properties": {
16931
+ "objectType": {
16932
+ "type": "string"
16933
+ },
16934
+ "contentType": {
16935
+ "type": "string"
16936
+ },
16937
+ "recordId": {
16938
+ "type": "string"
16939
+ }
16940
+ }
16941
+ },
16942
+ "history": {
16943
+ "type": [
16944
+ "object",
16945
+ "null"
16946
+ ],
16947
+ "additionalProperties": true
16948
+ },
16949
+ "backfill": {
16950
+ "type": "object",
16951
+ "additionalProperties": {
16952
+ "type": "object",
16953
+ "properties": {
16954
+ "cursor": {
16955
+ "type": [
16956
+ "string",
16957
+ "null"
16958
+ ]
16959
+ },
16960
+ "done": {
16961
+ "type": "boolean"
16962
+ },
16963
+ "seen": {
16964
+ "type": "integer"
16965
+ }
16966
+ }
16967
+ }
16968
+ },
16969
+ "registeredAt": {
16970
+ "type": "string",
16971
+ "format": "date-time"
16972
+ },
16973
+ "registeredBy": {
16974
+ "type": [
16975
+ "string",
16976
+ "null"
16977
+ ]
16978
+ },
16979
+ "updatedAt": {
16980
+ "type": "string",
16981
+ "format": "date-time"
16982
+ },
16983
+ "liveAt": {
16984
+ "type": [
16985
+ "string",
16986
+ "null"
16987
+ ],
16988
+ "format": "date-time"
16989
+ },
16990
+ "lastMaterializedAt": {
16991
+ "type": [
16992
+ "string",
16993
+ "null"
16994
+ ],
16995
+ "format": "date-time"
16996
+ },
16997
+ "error": {
16998
+ "type": [
16999
+ "string",
17000
+ "null"
17001
+ ]
17002
+ }
17003
+ }
16259
17004
  }
16260
17005
  }
16261
17006
  }