@timardex/cluemart-server-shared 2.0.0 → 2.0.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/dist/index.d.mts CHANGED
@@ -1017,14 +1017,17 @@ declare function updateSingleDateTimeStatus<T extends DateTimeType>(dateTime: T,
1017
1017
  */
1018
1018
  declare function updateAllEventDateTimeStatuses(): Promise<void>;
1019
1019
 
1020
- type EventOrMarket = Pick<EventListItemType, "_id" | "name" | "dateTime"> | null;
1020
+ type EventOrMarket = (Pick<EventListItemType, "_id" | "name" | "dateTime"> & {
1021
+ /** Present on owned EventModel docs; absent on Google-imported markets. */
1022
+ owner?: SchemaOwnerType;
1023
+ }) | null;
1021
1024
  /**
1022
1025
  * This function attempts to find an Event or a Google Imported Market by the given resource ID.
1023
1026
  * It first normalizes the resource ID to a string format, then performs parallel queries to both collections.
1024
1027
  * If an Event is found, it returns that; otherwise, it checks for a Google Imported Market and returns it if found.
1025
1028
  * If neither is found, it returns null.
1026
1029
  * @param resourceId - The ID of the resource to find, which can be an ObjectId, string, null, or undefined.
1027
- * @returns A promise that resolves to either an Event or a Google Imported Market object containing _id, name, and dateTime, or null if not found.
1030
+ * @returns A promise that resolves to either an Event or a Google Imported Market object containing _id, name, dateTime, and owner (events only), or null if not found.
1028
1031
  */
1029
1032
  declare function findEventOrImportedMarketById(resourceId: ObjectId | string | null | undefined): Promise<EventOrMarket>;
1030
1033
 
package/dist/index.d.ts CHANGED
@@ -1017,14 +1017,17 @@ declare function updateSingleDateTimeStatus<T extends DateTimeType>(dateTime: T,
1017
1017
  */
1018
1018
  declare function updateAllEventDateTimeStatuses(): Promise<void>;
1019
1019
 
1020
- type EventOrMarket = Pick<EventListItemType, "_id" | "name" | "dateTime"> | null;
1020
+ type EventOrMarket = (Pick<EventListItemType, "_id" | "name" | "dateTime"> & {
1021
+ /** Present on owned EventModel docs; absent on Google-imported markets. */
1022
+ owner?: SchemaOwnerType;
1023
+ }) | null;
1021
1024
  /**
1022
1025
  * This function attempts to find an Event or a Google Imported Market by the given resource ID.
1023
1026
  * It first normalizes the resource ID to a string format, then performs parallel queries to both collections.
1024
1027
  * If an Event is found, it returns that; otherwise, it checks for a Google Imported Market and returns it if found.
1025
1028
  * If neither is found, it returns null.
1026
1029
  * @param resourceId - The ID of the resource to find, which can be an ObjectId, string, null, or undefined.
1027
- * @returns A promise that resolves to either an Event or a Google Imported Market object containing _id, name, and dateTime, or null if not found.
1030
+ * @returns A promise that resolves to either an Event or a Google Imported Market object containing _id, name, dateTime, and owner (events only), or null if not found.
1028
1031
  */
1029
1032
  declare function findEventOrImportedMarketById(resourceId: ObjectId | string | null | undefined): Promise<EventOrMarket>;
1030
1033