brilliant-directories-mcp 6.45.13 → 6.45.14

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/index.js CHANGED
@@ -487,10 +487,14 @@ const USER_LEAN_INCLUDE_FLAGS = [
487
487
  "include_services",
488
488
  "include_seo_hidden",
489
489
  "include_about",
490
+ "include_legacy_fields",
490
491
  ];
491
492
 
492
493
  const USER_LEAN_ALWAYS_STRIP = ["save", "form", "formname", "sized", "faction", "result"];
493
494
 
495
+ const USER_PHOTO_LEAN_KEEP = ["photo_id", "user_id", "file", "type", "date_added", "compliant"];
496
+ const USER_PHOTO_LEGACY_FIELDS = ["original", "resized", "error"];
497
+
494
498
  const USER_LEAN_SEO_BUNDLE = [
495
499
  "seo_page_title_hidden",
496
500
  "seo_page_description_hidden",
@@ -513,6 +517,7 @@ function applyUserLean(body, includeFlags) {
513
517
  services: !!includeFlags.include_services,
514
518
  seo_hidden: !!includeFlags.include_seo_hidden,
515
519
  about: !!includeFlags.include_about,
520
+ legacy_fields: !!includeFlags.include_legacy_fields,
516
521
  };
517
522
  const shapeRow = (row) => {
518
523
  if (!row || typeof row !== "object") return row;
@@ -521,6 +526,16 @@ function applyUserLean(body, includeFlags) {
521
526
  if (!include.password) delete row.password;
522
527
  if (!include.subscription) delete row.subscription_schema;
523
528
  if (!include.photos) delete row.photos_schema;
529
+ else if (Array.isArray(row.photos_schema)) {
530
+ const photoKeep = new Set(USER_PHOTO_LEAN_KEEP);
531
+ if (include.legacy_fields) for (const k of USER_PHOTO_LEGACY_FIELDS) photoKeep.add(k);
532
+ row.photos_schema = row.photos_schema.map((p) => {
533
+ if (!p || typeof p !== "object") return p;
534
+ const out = {};
535
+ for (const k of Object.keys(p)) if (photoKeep.has(k)) out[k] = p[k];
536
+ return out;
537
+ });
538
+ }
524
539
  if (!include.transactions) delete row.transactions;
525
540
  if (!include.profession) delete row.profession_schema;
526
541
  if (!include.tags) delete row.tags;
@@ -198,6 +198,19 @@
198
198
  ]
199
199
  }
200
200
  },
201
+ "include_legacy_fields": {
202
+ "name": "include_legacy_fields",
203
+ "in": "query",
204
+ "description": "Return image-import state on `photos_schema` rows: `original`, `resized`, `error`. Requires `include_photos=1`.",
205
+ "schema": {
206
+ "type": "integer",
207
+ "default": 0,
208
+ "enum": [
209
+ 0,
210
+ 1
211
+ ]
212
+ }
213
+ },
201
214
  "include_content": {
202
215
  "name": "include_content",
203
216
  "in": "query",
@@ -1548,6 +1561,9 @@
1548
1561
  },
1549
1562
  {
1550
1563
  "$ref": "#/components/parameters/include_about"
1564
+ },
1565
+ {
1566
+ "$ref": "#/components/parameters/include_legacy_fields"
1551
1567
  }
1552
1568
  ],
1553
1569
  "responses": {
@@ -1609,6 +1625,9 @@
1609
1625
  },
1610
1626
  {
1611
1627
  "$ref": "#/components/parameters/include_about"
1628
+ },
1629
+ {
1630
+ "$ref": "#/components/parameters/include_legacy_fields"
1612
1631
  }
1613
1632
  ],
1614
1633
  "responses": {
@@ -2398,6 +2417,14 @@
2398
2417
  0,
2399
2418
  1
2400
2419
  ]
2420
+ },
2421
+ "include_legacy_fields": {
2422
+ "type": "integer",
2423
+ "description": "Return image-import state on `photos_schema` rows: `original`, `resized`, `error`. Requires `include_photos=1`.",
2424
+ "enum": [
2425
+ 0,
2426
+ 1
2427
+ ]
2401
2428
  }
2402
2429
  }
2403
2430
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "brilliant-directories-mcp",
3
3
  "mcpName": "io.github.brilliantdirectories/brilliant-directories-mcp",
4
- "version": "6.45.13",
4
+ "version": "6.45.14",
5
5
  "description": "Official MCP server for Brilliant Directories — manage members, posts, leads, reviews, and more.",
6
6
  "main": "index.js",
7
7
  "bin": {