bulltrackers-module 1.0.685 → 1.0.686

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.
@@ -414,6 +414,11 @@ const manageUserWatchlist = async (db, userId, instruction, payload = {}) => {
414
414
  // 3. Calculate Deltas based on Instruction
415
415
  if (instruction === 'create') {
416
416
  addedItems = payload.items || [];
417
+
418
+ // DEBUG: Log what we're receiving
419
+ console.log('[manageUserWatchlist DEBUG] payload received:', JSON.stringify(payload));
420
+ console.log('[manageUserWatchlist DEBUG] payload.type:', payload.type);
421
+
417
422
  // Create the User Document
418
423
  const newDocData = {
419
424
  ...payload,
@@ -424,6 +429,11 @@ const manageUserWatchlist = async (db, userId, instruction, payload = {}) => {
424
429
  copyCount: 0,
425
430
  isAutoGenerated: false
426
431
  };
432
+
433
+ // DEBUG: Log what we're about to save
434
+ console.log('[manageUserWatchlist DEBUG] newDocData to save:', JSON.stringify(newDocData));
435
+ console.log('[manageUserWatchlist DEBUG] newDocData.type:', newDocData.type);
436
+
427
437
  batch.set(userDocRef, newDocData);
428
438
  }
429
439
 
@@ -23,8 +23,11 @@ const watchlistManageSchema = z.object({
23
23
  watchlistId: z.string().optional(),
24
24
  name: z.string().max(200).optional(),
25
25
  description: z.string().max(1000).optional(),
26
+ type: z.enum(['static', 'dynamic']).optional(), // FIX: Allow type field!
27
+ visibility: z.enum(['public', 'private']).optional(), // FIX: Allow visibility field!
26
28
  items: z.array(z.any()).optional(),
27
- item: z.any().optional()
29
+ item: z.any().optional(),
30
+ dynamicConfig: z.any().optional() // FIX: Allow dynamicConfig for dynamic watchlists!
28
31
  })
29
32
  });
30
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bulltrackers-module",
3
- "version": "1.0.685",
3
+ "version": "1.0.686",
4
4
  "description": "Helper Functions for Bulltrackers.",
5
5
  "main": "index.js",
6
6
  "files": [