@erp-galoper/types 1.0.1903 → 1.0.1905

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.
Files changed (2) hide show
  1. package/openapi.ts +35 -27
  2. package/package.json +1 -1
package/openapi.ts CHANGED
@@ -14524,6 +14524,8 @@ export interface paths {
14524
14524
  * - rangePricingNotAllowedForRetail
14525
14525
  * - exchangeRateRequired
14526
14526
  * - itemIsNotAssignedToADefaultSalesUnitOfMeasure
14527
+ * - invalidUnitOfMeasureForRetail
14528
+ * - duplicateItemInPriceList
14527
14529
  *
14528
14530
  * - 403: permissionDenied
14529
14531
  * - noModuleAccess
@@ -14653,6 +14655,8 @@ export interface paths {
14653
14655
  * - retailPriceListExists
14654
14656
  * - rangePricingNotAllowedForRetail
14655
14657
  * - itemIsNotAssignedToADefaultSalesUnitOfMeasure
14658
+ * - invalidUnitOfMeasureForRetail
14659
+ * - duplicateItemInPriceList
14656
14660
  *
14657
14661
  * - 403: permissionDenied
14658
14662
  * - noModuleAccess
@@ -26546,11 +26550,6 @@ export interface components {
26546
26550
  dateModified: string | null;
26547
26551
  createdBy: components["schemas"]["RecordUserSchema"];
26548
26552
  modifiedBy: components["schemas"]["RecordUserSchema"] | null;
26549
- /**
26550
- * Availableinpos
26551
- * @default false
26552
- */
26553
- availableInPos: boolean;
26554
26553
  /**
26555
26554
  * Id
26556
26555
  * Format: uuid
@@ -26814,11 +26813,6 @@ export interface components {
26814
26813
  dateModified: string | null;
26815
26814
  createdBy: components["schemas"]["RecordUserSchema"];
26816
26815
  modifiedBy: components["schemas"]["RecordUserSchema"] | null;
26817
- /**
26818
- * Availableinpos
26819
- * @default false
26820
- */
26821
- availableInPos: boolean;
26822
26816
  /**
26823
26817
  * Id
26824
26818
  * Format: uuid
@@ -27453,11 +27447,6 @@ export interface components {
27453
27447
  CostStrategy: "firstInFirstOut" | "lastInFirstOut" | "weightedAverageCost" | "marketCost";
27454
27448
  /** CreateChildItemSchema */
27455
27449
  CreateChildItemSchema: {
27456
- /**
27457
- * Availableinpos
27458
- * @default false
27459
- */
27460
- availableInPos: boolean | null;
27461
27450
  /** Index */
27462
27451
  index?: number | null;
27463
27452
  /**
@@ -27693,11 +27682,6 @@ export interface components {
27693
27682
  };
27694
27683
  /** CreateItemSchema */
27695
27684
  CreateItemSchema: {
27696
- /**
27697
- * Availableinpos
27698
- * @default false
27699
- */
27700
- availableInPos: boolean | null;
27701
27685
  /**
27702
27686
  * Image
27703
27687
  * @default default/default-product.jpg
@@ -28217,8 +28201,6 @@ export interface components {
28217
28201
  };
28218
28202
  /** PatchChildItemSchema */
28219
28203
  PatchChildItemSchema: {
28220
- /** Availableinpos */
28221
- availableInPos?: boolean | null;
28222
28204
  /** Image */
28223
28205
  image?: string | null;
28224
28206
  /**
@@ -28524,8 +28506,6 @@ export interface components {
28524
28506
  };
28525
28507
  /** PatchItemSchema */
28526
28508
  PatchItemSchema: {
28527
- /** Availableinpos */
28528
- availableInPos?: boolean | null;
28529
28509
  /** Image */
28530
28510
  image?: string | null;
28531
28511
  /**
@@ -49055,6 +49035,10 @@ export interface components {
49055
49035
  item: components["schemas"]["ItemSchema"];
49056
49036
  /** @description incase itemPackage is selected, price will be applied to the itemPackage */
49057
49037
  itemPackage: components["schemas"]["ItemPackageSchema"] | null;
49038
+ /**
49039
+ * @description Unit of measure used for pricing this line.
49040
+ * For retail price lists this is always the item's default sales UOM (or the package UOM when a package is selected).
49041
+ */
49058
49042
  unitOfMeasure: components["schemas"]["UnitOfMeasureSummaryInfo"];
49059
49043
  /**
49060
49044
  * Cost
@@ -49205,14 +49189,29 @@ export interface components {
49205
49189
  * Itempackage
49206
49190
  * Format: uuid
49207
49191
  * @description ID of the item package to which the pricing is applied. Required when the item has packages.
49192
+ *
49193
+ * When provided on a **retail** price list, `unitOfMeasure` must match this package's unit of measure.
49194
+ * Sending a mismatched unit of measure is rejected with error code `invalidUnitOfMeasureForRetail`.
49208
49195
  */
49209
49196
  itemPackage?: string;
49210
49197
  /**
49211
49198
  * Unitofmeasure
49212
49199
  * Format: uuid
49213
49200
  * @description ID of the unit of measure for the item.
49214
- * - incase of retail price list type unit of measure should the default_sale_unit_of_measure of the item
49215
- * - If itemPackage this field is required and should match the unit of measure of the item package.
49201
+ *
49202
+ * **Wholesale price lists:**
49203
+ * - The user may select any valid unit of measure for the item.
49204
+ * - Each unique combination of item + itemPackage + unitOfMeasure can appear only once in the price list.
49205
+ *
49206
+ * **Retail price lists:**
49207
+ * - This field must exactly match the item's `default_sale_unit_of_measure` when no package is selected.
49208
+ * - When `itemPackage` is provided, this field must exactly match the package's unit of measure.
49209
+ * - Sending a different unit of measure is rejected with error code `invalidUnitOfMeasureForRetail` on field `items.{index}.unitOfMeasure`.
49210
+ * - The frontend should auto-populate this field from the item's default sales UOM (or the package UOM) and should not allow the user to change it for retail lists.
49211
+ *
49212
+ * **Duplicate validation:**
49213
+ * - The same item + itemPackage + unitOfMeasure combination cannot appear more than once.
49214
+ * - For retail lists, validation uses the resolved default/package UOM, so two lines with different UOMs that both resolve to the same default will be rejected with error code `duplicateItemInPriceList` on field `items.{index}.item`.
49216
49215
  */
49217
49216
  unitOfMeasure: string;
49218
49217
  /**
@@ -49273,7 +49272,13 @@ export interface components {
49273
49272
  * @description Name of the price list.
49274
49273
  */
49275
49274
  name: string;
49276
- /** @description Type of price list, either 'wholesale' or 'retail', when retail is selected, pricing type should be fixed */
49275
+ /**
49276
+ * @description Type of price list: `wholesale` or `retail`.
49277
+ *
49278
+ * - When `retail` is selected, `pricingType` must be `fixed`.
49279
+ * - **Retail** lists always price items in the item's default sales unit of measure (or the package UOM when a package is selected). The frontend must not allow selecting a different UOM.
49280
+ * - **Wholesale** lists allow pricing the same item in multiple units of measure.
49281
+ */
49277
49282
  priceListType: components["schemas"]["PRICE_LIST_TYPE_CHOICES"];
49278
49283
  /**
49279
49284
  * Branch
@@ -49339,6 +49344,9 @@ export interface components {
49339
49344
  /**
49340
49345
  * Items
49341
49346
  * @description List of items with their corresponding prices defined in this price list. At least one item must be included.
49347
+ *
49348
+ * Each line is uniquely identified by the combination of `item`, `itemPackage`, and `unitOfMeasure`.
49349
+ * Duplicate combinations within the same request are rejected with error code `duplicateItemInPriceList`.
49342
49350
  */
49343
49351
  items: components["schemas"]["CreateUpdateSalesPriceListItemSchema"][];
49344
49352
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erp-galoper/types",
3
- "version": "1.0.1903",
3
+ "version": "1.0.1905",
4
4
  "main": "openapi.ts",
5
5
  "types": "openapi.ts",
6
6
  "files": ["openapi.ts"],