@viu/emporix-sdk 4.6.4 → 4.6.6

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,21 @@
1
1
  # @viu/emporix-sdk
2
2
 
3
+ ## 4.6.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#417](https://github.com/viuteam/emporix-sdk/pull/417) [`82a17b9`](https://github.com/viuteam/emporix-sdk/commit/82a17b948e19abe97e9742bb2b0621a16f62da23) Thanks [@amnael1](https://github.com/amnael1)! - docs(sdk): sync the search service spec for the CONTAINS filter
8
+
9
+ Search filters gain the `CONTAINS` operator: a case- and diacritic-insensitive substring match on a field indexed with `text: true`. It is available on `client.search.search` through `SearchFilterNode` without an SDK change. The search docs now list it, and their examples write the custom schema type in upper case (`VEHICLE`), as upstream does.
10
+
11
+ ## 4.6.5
12
+
13
+ ### Patch Changes
14
+
15
+ - [#413](https://github.com/viuteam/emporix-sdk/pull/413) [`db008c3`](https://github.com/viuteam/emporix-sdk/commit/db008c3e393c032aa56312e045fde456979a220a) Thanks [@viu-release-bot](https://github.com/apps/viu-release-bot)! - chore(sdk): sync generated types with upstream Emporix API specs
16
+
17
+ Updated services: cart,coupon,order-v2
18
+
3
19
  ## 4.6.4
4
20
 
5
21
  ### Patch Changes
package/dist/cart.d.cts CHANGED
@@ -837,11 +837,46 @@ type DiscountResponse = {
837
837
  */
838
838
  links?: Array<Link>;
839
839
  discountValidationDetails?: DiscountValidationDetails;
840
+ /**
841
+ * Indicates whether the discount is limited to the vendors in `restrictions.vendors`.
842
+ */
843
+ vendorRestricted?: boolean;
844
+ restrictions?: DiscountRestrictions;
840
845
  /**
841
846
  * The index of the discount. It represents the discount position in the cart discounts array.
842
847
  */
843
848
  discountIndex?: number;
844
849
  };
850
+ /**
851
+ * Restrictions copied from the coupon.
852
+ */
853
+ type DiscountRestrictions = {
854
+ /**
855
+ * Start of the discount validity period.
856
+ */
857
+ validFrom?: string;
858
+ /**
859
+ * End of the discount validity period.
860
+ */
861
+ validUntil?: string;
862
+ minOrderValue?: Price & unknown;
863
+ /**
864
+ * Categories to which the discount applies.
865
+ */
866
+ includedCategories?: Array<string>;
867
+ /**
868
+ * Categories to which the discount does not apply.
869
+ */
870
+ excludedCategories?: Array<string>;
871
+ /**
872
+ * Customer segments to which the discount applies.
873
+ */
874
+ segments?: Array<string>;
875
+ /**
876
+ * Vendor identifiers to which the discount applies.
877
+ */
878
+ vendors?: Array<string>;
879
+ };
845
880
  type DiscountValidationDetails = {
846
881
  message?: string;
847
882
  details?: Array<string>;
package/dist/cart.d.ts CHANGED
@@ -837,11 +837,46 @@ type DiscountResponse = {
837
837
  */
838
838
  links?: Array<Link>;
839
839
  discountValidationDetails?: DiscountValidationDetails;
840
+ /**
841
+ * Indicates whether the discount is limited to the vendors in `restrictions.vendors`.
842
+ */
843
+ vendorRestricted?: boolean;
844
+ restrictions?: DiscountRestrictions;
840
845
  /**
841
846
  * The index of the discount. It represents the discount position in the cart discounts array.
842
847
  */
843
848
  discountIndex?: number;
844
849
  };
850
+ /**
851
+ * Restrictions copied from the coupon.
852
+ */
853
+ type DiscountRestrictions = {
854
+ /**
855
+ * Start of the discount validity period.
856
+ */
857
+ validFrom?: string;
858
+ /**
859
+ * End of the discount validity period.
860
+ */
861
+ validUntil?: string;
862
+ minOrderValue?: Price & unknown;
863
+ /**
864
+ * Categories to which the discount applies.
865
+ */
866
+ includedCategories?: Array<string>;
867
+ /**
868
+ * Categories to which the discount does not apply.
869
+ */
870
+ excludedCategories?: Array<string>;
871
+ /**
872
+ * Customer segments to which the discount applies.
873
+ */
874
+ segments?: Array<string>;
875
+ /**
876
+ * Vendor identifiers to which the discount applies.
877
+ */
878
+ vendors?: Array<string>;
879
+ };
845
880
  type DiscountValidationDetails = {
846
881
  message?: string;
847
882
  details?: Array<string>;
package/dist/index.cjs CHANGED
@@ -1244,7 +1244,7 @@ var HttpClient = class {
1244
1244
  };
1245
1245
 
1246
1246
  // package.json
1247
- var version = "4.6.4";
1247
+ var version = "4.6.6";
1248
1248
 
1249
1249
  // src/version.ts
1250
1250
  var SDK_VERSION = version;
@@ -8469,13 +8469,13 @@ var SearchService = class {
8469
8469
  * Search the documents of one custom schema type. Paging, `sort` and
8470
8470
  * `fields` travel as query parameters, not in the body.
8471
8471
  *
8472
- * Filter and sort fields must be indexed on the index the search uses, or the
8473
- * call answers `400`. A saved-search call (`{ searchQueryId, query }`) answers
8472
+ * Filter and sort fields must be indexed on the index the search uses —
8473
+ * `exact`, or `text: true` for a `CONTAINS` filter — or the call answers `400`. A saved-search call (`{ searchQueryId, query }`) answers
8474
8474
  * `404` when no saved search has that id for `type`, and `502` means the
8475
8475
  * Schema Service could not confirm that `type` is a custom entity.
8476
8476
  *
8477
8477
  * @example
8478
- * const hits = await client.search.search("vehicle", {
8478
+ * const hits = await client.search.search("VEHICLE", {
8479
8479
  * index: "vehicles",
8480
8480
  * queries: [{ type: "TEXT", query: "diesel", field: "name.en" }],
8481
8481
  * filters: { field: "status", operator: "EQ", value: "ACTIVE" },