@salla.sa/twilight 2.13.82 → 2.13.84

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight",
3
- "version": "2.13.82",
3
+ "version": "2.13.84",
4
4
  "description": "Salla Theme Toolkit, Webcomponents, Events, Requests, Utils",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -33,7 +33,7 @@
33
33
  ],
34
34
  "homepage": "https://salla.dev",
35
35
  "dependencies": {
36
- "@salla.sa/base": "^2.13.82",
36
+ "@salla.sa/base": "^2.13.84",
37
37
  "axios": "^0.27.2",
38
38
  "infinite-scroll": "^4.0.1",
39
39
  "jwt-decode": "^3.1.2",
@@ -67,5 +67,5 @@
67
67
  "peerDependencies": {
68
68
  "webpack": "^4 || ^5"
69
69
  },
70
- "gitHead": "06477e8d11082a5e851ec444d74d2e414eec92ac"
70
+ "gitHead": "2ab8abc2b081254098d6b2c7d15fe756c9675db9"
71
71
  }
@@ -71,6 +71,8 @@ export type ApiActionName =
71
71
  | 'product.getGiftDetails'
72
72
  | 'product.addGiftToCart'
73
73
  | 'product.uploadGiftImage'
74
+ | 'product.fetch'
75
+ | 'product.fetchOptions'
74
76
  | 'profile.update'
75
77
  | 'profile.info'
76
78
  | 'profile.updateContacts'
@@ -18,4 +18,5 @@ export default interface ProductApi {
18
18
  getDetails: (product_id: number, withItems: Array<'images' | 'brand' | 'tags' | 'notify_availability' | 'rating' | 'donation' | 'options' | 'sold_quantity' | 'category'>) => Promise<ProductResponse.detail>;
19
19
  getSizeGuides: (product_id: number) => Promise<ProductResponse.sizeGuides>;
20
20
  fetch: (queryParam: ProductRequest.FetchProductsQueryParams) => Promise<ProductResponse.lists>
21
+ fetchOptions: (productIds: Array<number>) => Promise<ProductResponse.options>
21
22
  }
@@ -55,5 +55,6 @@ export namespace ProductRequest {
55
55
  source_value: number | string | object | string[];
56
56
  filters?: object;
57
57
  limit?: number;
58
+ includes?: Array<string>
58
59
  }
59
60
  }
@@ -246,4 +246,8 @@ export namespace ProductResponse {
246
246
  export interface lists extends SuccessResponse {
247
247
  data: Array<ProductDetail>
248
248
  }
249
+
250
+ export interface options extends SuccessResponse {
251
+ data: Array<ProductDetail>
252
+ }
249
253
  }
@@ -1,6 +1,6 @@
1
- import {OfferSummary} from "../api/cart";
2
- import {ProductResponse} from "../api/product";
3
- import {RequestError, RequestErrorEvent, RequestErrorEventWithData, SuccessResponse} from "../common";
1
+ import { OfferSummary } from "../api/cart";
2
+ import { ProductResponse } from "../api/product";
3
+ import { RequestError, RequestErrorEvent, RequestErrorEventWithData, SuccessResponse } from "../common";
4
4
 
5
5
  export default interface ProductEvent {
6
6
  onPriceUpdated: (callback: (response: ProductResponse.getPrice, product_id: number) => void) => void;
@@ -33,4 +33,7 @@ export default interface ProductEvent {
33
33
 
34
34
  onProductListFetchSucceeded: (callback: (response: ProductResponse.lists) => void) => void;
35
35
  onProductListFetchFailed: RequestErrorEvent;
36
+
37
+ onProductOptionsFetched: (callback: (response: ProductResponse.options) => void) => void;
38
+ onProductOptionsNotFetched: RequestErrorEvent
36
39
  }