@timardex/cluemart-server-shared 2.0.1 → 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.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/service/index.cjs +1 -1
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +5 -2
- package/dist/service/index.d.ts +5 -2
- package/dist/service/index.mjs +1 -1
- package/dist/service/index.mjs.map +1 -1
- package/package.json +1 -1
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">
|
|
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
|
|
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">
|
|
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
|
|
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.mjs
CHANGED
|
@@ -2914,7 +2914,7 @@ async function findEventOrImportedMarketById(resourceId) {
|
|
|
2914
2914
|
}
|
|
2915
2915
|
const normalizedId = convertObjectIdsToStrings(resourceId);
|
|
2916
2916
|
const [eventDoc, googleImportedDoc] = await Promise.all([
|
|
2917
|
-
EventModel.findById(normalizedId).select("_id name dateTime").lean().exec(),
|
|
2917
|
+
EventModel.findById(normalizedId).select("_id name dateTime owner").lean().exec(),
|
|
2918
2918
|
GoogleImportedMarketModel.findById(normalizedId).select("_id name dateTime").lean().exec()
|
|
2919
2919
|
]);
|
|
2920
2920
|
return eventDoc ?? googleImportedDoc;
|