@goweekdays/core 2.15.7 → 2.15.8

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @goweekdays/core
2
2
 
3
+ ## 2.15.8
4
+
5
+ ### Patch Changes
6
+
7
+ - c402102: Update asset item model
8
+
3
9
  ## 2.15.7
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -2237,6 +2237,8 @@ type TAssetItem = {
2237
2237
  purpose: TAssetItemPurpose;
2238
2238
  unit: string;
2239
2239
  price?: number;
2240
+ marketplacePrice?: number;
2241
+ isPublic: boolean;
2240
2242
  sku?: string;
2241
2243
  itemRefId?: string | ObjectId;
2242
2244
  remarks?: string;
package/dist/index.js CHANGED
@@ -22633,6 +22633,11 @@ function modelAssetItem(data) {
22633
22633
  "Price must be greater than 0 for items marked as 'for-sale'."
22634
22634
  );
22635
22635
  }
22636
+ if (data.isPublic && (data.marketplacePrice === void 0 || data.marketplacePrice === null)) {
22637
+ throw new import_utils115.BadRequestError(
22638
+ "Marketplace price is required for items marked as public."
22639
+ );
22640
+ }
22636
22641
  return {
22637
22642
  _id: data._id,
22638
22643
  orgId: data.orgId,
@@ -22642,6 +22647,8 @@ function modelAssetItem(data) {
22642
22647
  assetClass: data.assetClass,
22643
22648
  unit: data.unit ?? "",
22644
22649
  price: data.price ?? 0,
22650
+ marketplacePrice: data.marketplacePrice ?? 0,
22651
+ isPublic: data.isPublic ?? false,
22645
22652
  sku: data.sku ?? "",
22646
22653
  brand: data.brand ?? "",
22647
22654
  trackingType: data.trackingType,