@erp-galoper/types 1.0.1930 → 1.0.1932

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 +175 -7
  2. package/package.json +1 -1
package/openapi.ts CHANGED
@@ -14576,6 +14576,9 @@ export interface paths {
14576
14576
  *
14577
14577
  *
14578
14578
  * Permission key: `salespricelist = ['add']`
14579
+ *
14580
+ * Query Parameters:
14581
+ * - includeItems: If True, include price list items in the response. Default: False (faster). When False, items is [].
14579
14582
  */
14580
14583
  post: operations["sales_price_list_views_create_sales_price_list"];
14581
14584
  delete?: never;
@@ -14667,6 +14670,7 @@ export interface paths {
14667
14670
  * - fullItem: If True, include full item details with images, attributes, etc. (slower). Default: False (faster).
14668
14671
  * - includeLiveCost: If True, calculate live costs for all items (slower). Default: False (faster).
14669
14672
  * - includeBarcodes: If True, include barcodes for items. Default: True.
14673
+ * - includeItems: If True, include price list items in the response. Default: False (faster). When False, items is [].
14670
14674
  *
14671
14675
  * Permission key: `salespricelist = ['view']`
14672
14676
  */
@@ -14708,6 +14712,9 @@ export interface paths {
14708
14712
  * - 500: server error
14709
14713
  *
14710
14714
  * Permission key: `salespricelist = ['change']`
14715
+ *
14716
+ * Query Parameters:
14717
+ * - includeItems: If True, include price list items in the response. Default: False (faster). When False, items is [].
14711
14718
  */
14712
14719
  put: operations["sales_price_list_views_update_sales_price_list"];
14713
14720
  post?: never;
@@ -14730,7 +14737,26 @@ export interface paths {
14730
14737
  delete: operations["sales_price_list_views_delete_sales_price_list"];
14731
14738
  options?: never;
14732
14739
  head?: never;
14733
- patch?: never;
14740
+ /**
14741
+ * Patch Sales Price List Items
14742
+ * @description Partially update a price list without resending the full payload.
14743
+ *
14744
+ * Header fields (any combination):
14745
+ * - `name`
14746
+ * - `description`
14747
+ * - `notes`
14748
+ *
14749
+ * Item operations (optional):
14750
+ * - **Create**: omit `id`
14751
+ * - **Update**: include `id` with a positive `unitPrice`
14752
+ * - **Delete**: include `id` with `unitPrice` set to 0 or null
14753
+ *
14754
+ * Permission key: `salespricelist = ['change']`
14755
+ *
14756
+ * Query Parameters:
14757
+ * - includeItems: If True, include price list items in the response. Default: False (faster). When False, items is [].
14758
+ */
14759
+ patch: operations["sales_price_list_views_patch_sales_price_list_items"];
14734
14760
  trace?: never;
14735
14761
  };
14736
14762
  "/api/v1/sales/price-list/{id}/refresh-prices/": {
@@ -49590,8 +49616,8 @@ export interface components {
49590
49616
  * - 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.
49591
49617
  *
49592
49618
  * **Duplicate validation:**
49593
- * - The same item + itemPackage + unitOfMeasure combination cannot appear more than once.
49594
- * - 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`.
49619
+ * - The same item + itemPackage + unitOfMeasure combination cannot appear more than once per price list (enforced by database unique constraint).
49620
+ * - For retail lists, unit of measure is normalized before insert, so conflicting lines are rejected at save time with error code `duplicateItemInPriceList`.
49595
49621
  */
49596
49622
  unitOfMeasure: string;
49597
49623
  /**
@@ -49725,8 +49751,7 @@ export interface components {
49725
49751
  * Items
49726
49752
  * @description List of items with their corresponding prices defined in this price list. At least one item must be included.
49727
49753
  *
49728
- * Each line is uniquely identified by the combination of `item`, `itemPackage`, and `unitOfMeasure`.
49729
- * Duplicate combinations within the same request are rejected with error code `duplicateItemInPriceList`.
49754
+ * Each line is uniquely identified by the combination of `item`, `itemPackage`, and `unitOfMeasure` (enforced by database unique constraint).
49730
49755
  */
49731
49756
  items: components["schemas"]["CreateUpdateSalesPriceListItemSchema"][];
49732
49757
  };
@@ -49805,6 +49830,80 @@ export interface components {
49805
49830
  * @enum {string}
49806
49831
  */
49807
49832
  PricingModeEnum: "unit" | "ttc";
49833
+ /** PatchSalesPriceListItemSchema */
49834
+ PatchSalesPriceListItemSchema: {
49835
+ /**
49836
+ * Id
49837
+ * Format: uuid
49838
+ * @description ID of the price list item. When provided, updates the existing line. Omit to create a new line.
49839
+ */
49840
+ id?: string;
49841
+ /**
49842
+ * Item
49843
+ * Format: uuid
49844
+ * @description ID of the item to which the pricing is applied.
49845
+ */
49846
+ item: string;
49847
+ /**
49848
+ * Itempackage
49849
+ * Format: uuid
49850
+ * @description ID of the item package. Required when the item has packages.
49851
+ */
49852
+ itemPackage?: string;
49853
+ /**
49854
+ * Unitofmeasure
49855
+ * Format: uuid
49856
+ * @description ID of the unit of measure for the item.
49857
+ */
49858
+ unitOfMeasure: string;
49859
+ /** Companyrate */
49860
+ companyRate?: string;
49861
+ /** Secondaryrate */
49862
+ secondaryRate?: string;
49863
+ /**
49864
+ * Unitprice
49865
+ * @description Unit price. When updating an existing line (id provided), 0 or null deletes the line.
49866
+ */
49867
+ unitPrice?: number;
49868
+ /**
49869
+ * Taxes
49870
+ * @description Tax IDs applied to the item (retail price lists only).
49871
+ */
49872
+ taxes?: string[] | null;
49873
+ /** Minprice */
49874
+ minPrice?: number;
49875
+ /** Maxprice */
49876
+ maxPrice?: number;
49877
+ /** Minprofit */
49878
+ minProfit?: number;
49879
+ /** Maxprofit */
49880
+ maxProfit?: number;
49881
+ /** Profit */
49882
+ profit?: number;
49883
+ /** Cost */
49884
+ cost?: number | null;
49885
+ };
49886
+ /** PatchSalesPriceListItemsSchema */
49887
+ PatchSalesPriceListItemsSchema: {
49888
+ /**
49889
+ * Name
49890
+ * @description Name of the price list.
49891
+ */
49892
+ name?: string | null;
49893
+ /** Description */
49894
+ description?: string | null;
49895
+ /** Notes */
49896
+ notes?: string | null;
49897
+ /**
49898
+ * Items
49899
+ * @description Items to create, update, or delete in the price list.
49900
+ *
49901
+ * - **Create**: omit `id`
49902
+ * - **Update**: include `id` with a positive `unitPrice`
49903
+ * - **Delete**: include `id` with `unitPrice` set to 0 or null
49904
+ */
49905
+ items?: components["schemas"]["PatchSalesPriceListItemSchema"][] | null;
49906
+ };
49808
49907
  /** ListPackageTypeSchema */
49809
49908
  ListPackageTypeSchema: {
49810
49909
  info: components["schemas"]["PageInfoSchema"];
@@ -92913,7 +93012,9 @@ export interface operations {
92913
93012
  };
92914
93013
  sales_price_list_views_create_sales_price_list: {
92915
93014
  parameters: {
92916
- query?: never;
93015
+ query?: {
93016
+ includeItems?: boolean;
93017
+ };
92917
93018
  header?: never;
92918
93019
  path?: never;
92919
93020
  cookie?: never;
@@ -93081,6 +93182,7 @@ export interface operations {
93081
93182
  fullItem?: boolean;
93082
93183
  includeLiveCost?: boolean;
93083
93184
  includeBarcodes?: boolean;
93185
+ includeItems?: boolean;
93084
93186
  };
93085
93187
  header?: never;
93086
93188
  path: {
@@ -93139,7 +93241,9 @@ export interface operations {
93139
93241
  };
93140
93242
  sales_price_list_views_update_sales_price_list: {
93141
93243
  parameters: {
93142
- query?: never;
93244
+ query?: {
93245
+ includeItems?: boolean;
93246
+ };
93143
93247
  header?: never;
93144
93248
  path: {
93145
93249
  id: string;
@@ -93255,6 +93359,70 @@ export interface operations {
93255
93359
  };
93256
93360
  };
93257
93361
  };
93362
+ sales_price_list_views_patch_sales_price_list_items: {
93363
+ parameters: {
93364
+ query?: {
93365
+ includeItems?: boolean;
93366
+ };
93367
+ header?: never;
93368
+ path: {
93369
+ id: string;
93370
+ };
93371
+ cookie?: never;
93372
+ };
93373
+ requestBody: {
93374
+ content: {
93375
+ "application/json": components["schemas"]["PatchSalesPriceListItemsSchema"];
93376
+ };
93377
+ };
93378
+ responses: {
93379
+ /** @description OK */
93380
+ 200: {
93381
+ headers: {
93382
+ [name: string]: unknown;
93383
+ };
93384
+ content: {
93385
+ "application/json": components["schemas"]["SalesPriceListSchema"];
93386
+ };
93387
+ };
93388
+ /** @description Bad Request */
93389
+ 400: {
93390
+ headers: {
93391
+ [name: string]: unknown;
93392
+ };
93393
+ content: {
93394
+ "application/json": components["schemas"]["ErrorMessages"];
93395
+ };
93396
+ };
93397
+ /** @description Forbidden */
93398
+ 403: {
93399
+ headers: {
93400
+ [name: string]: unknown;
93401
+ };
93402
+ content: {
93403
+ "application/json": components["schemas"]["MessageWithCode"];
93404
+ };
93405
+ };
93406
+ /** @description Not Found */
93407
+ 404: {
93408
+ headers: {
93409
+ [name: string]: unknown;
93410
+ };
93411
+ content: {
93412
+ "application/json": components["schemas"]["MessageWithCode"];
93413
+ };
93414
+ };
93415
+ /** @description Internal Server Error */
93416
+ 500: {
93417
+ headers: {
93418
+ [name: string]: unknown;
93419
+ };
93420
+ content: {
93421
+ "application/json": components["schemas"]["MessageWithCode"];
93422
+ };
93423
+ };
93424
+ };
93425
+ };
93258
93426
  sales_price_list_views_refresh_sales_price_list: {
93259
93427
  parameters: {
93260
93428
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erp-galoper/types",
3
- "version": "1.0.1930",
3
+ "version": "1.0.1932",
4
4
  "main": "openapi.ts",
5
5
  "types": "openapi.ts",
6
6
  "files": ["openapi.ts"],