@medusajs/types 2.1.4-preview-20241223150146 → 2.1.4-preview-20241223180209

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,31 +1,37 @@
1
+ import { FindParams } from "../../common";
1
2
  import { BaseProductListParams, BaseProductOptionParams, BaseProductVariantParams } from "../common";
2
3
  export interface StoreProductOptionParams extends BaseProductOptionParams {
3
4
  }
4
5
  export interface StoreProductVariantParams extends BaseProductVariantParams {
5
6
  }
6
- export interface StoreProductParams extends Omit<BaseProductListParams, "tags" | "status" | "categories" | "deleted_at"> {
7
+ export interface StoreProductPricingContext {
7
8
  /**
8
- * Filter by the product's tag(s).
9
+ * The ID of the customer's region. This parameter must be included if you want to apply taxes on the product variant's price.
9
10
  */
10
- tag_id?: string | string[];
11
+ region_id?: string;
11
12
  /**
12
- * The ID of the region the products are being viewed from. This is required if you're retrieving product variant prices with taxes.
13
- *
14
- * @privateRemarks
15
- * The region ID and currency_code are not params, but are used for the pricing context. Maybe move to separate type definition.
13
+ * The customer's country code. This parameter must be included if you want to apply taxes on the product variant's price.
16
14
  */
17
- region_id?: string;
15
+ country_code?: string;
18
16
  /**
19
- * The currency code to retrieve prices in.
17
+ * The province, which can be taken from a customer's address. This parameter helps further narrowing down the taxes applied on a the product variant's prices.
20
18
  */
21
- currency_code?: string;
19
+ province?: string;
22
20
  /**
23
- * Filter by the product's variants.
21
+ * The ID of the customer's cart, if available. If set, the cart's region and shipping address's country code and province are used instead of the `region_id`, `country_code`, and `province` parameters.
24
22
  */
25
- variants?: Pick<StoreProductVariantParams, "options">;
23
+ cart_id?: string;
24
+ }
25
+ export interface StoreProductParams extends FindParams, StoreProductPricingContext {
26
+ }
27
+ export interface StoreProductListParams extends Omit<BaseProductListParams, "tags" | "status" | "categories" | "deleted_at">, StoreProductPricingContext {
26
28
  /**
27
- * The province the products are being viewed from. This is useful to narrow down the tax context when calculating product variant prices with taxes.
29
+ * Filter by the product's tag(s).
28
30
  */
29
- province?: string;
31
+ tag_id?: string | string[];
32
+ /**
33
+ * Filter by the product's variants.
34
+ */
35
+ variants?: Pick<StoreProductVariantParams, "options">;
30
36
  }
31
37
  //# sourceMappingURL=queries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../../src/http/product/store/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,WAAW,CAAA;AAElB,MAAM,WAAW,wBAAyB,SAAQ,uBAAuB;CAAG;AAC5E,MAAM,WAAW,yBAA0B,SAAQ,wBAAwB;CAAG;AAC9E,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,qBAAqB,EAAE,MAAM,GAAG,QAAQ,GAAG,YAAY,GAAG,YAAY,CAAC;IACpF;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAA;IACrD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB"}
1
+ {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../../src/http/product/store/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,WAAW,CAAA;AAElB,MAAM,WAAW,wBAAyB,SAAQ,uBAAuB;CAAG;AAC5E,MAAM,WAAW,yBAA0B,SAAQ,wBAAwB;CAAG;AAC9E,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AACD,MAAM,WAAW,kBAAmB,SAAQ,UAAU,EAAE,0BAA0B;CAAG;AAErF,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,qBAAqB,EAAE,MAAM,GAAG,QAAQ,GAAG,YAAY,GAAG,YAAY,CAAC,EAAE,0BAA0B;IAChH;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAA;CACtD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/types",
3
- "version": "2.1.4-preview-20241223150146",
3
+ "version": "2.1.4-preview-20241223180209",
4
4
  "description": "Medusa Types definition",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",