@salla.sa/twilight 2.10.7 → 2.11.1

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.10.7",
3
+ "version": "2.11.1",
4
4
  "description": "Salla Theme Toolkit, Webcomponents, Events, Requests, Utils",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -32,7 +32,7 @@
32
32
  "homepage": "https://salla.dev",
33
33
  "dependencies": {
34
34
  "@salla.sa/base": "^2.10.7",
35
- "@salla.sa/twilight-tailwind-theme": "^2.10.7",
35
+ "@salla.sa/twilight-tailwind-theme": "^2.11.1",
36
36
  "axios": "^0.27.2",
37
37
  "infinite-scroll": "^4.0.1",
38
38
  "jwt-decode": "^3.1.2",
@@ -61,5 +61,5 @@
61
61
  "peerDependencies": {
62
62
  "webpack": "^4 || ^5"
63
63
  },
64
- "gitHead": "8ddc52a7ea2eaee90456d57974a9a7f19746e2d9"
64
+ "gitHead": "1aaf756"
65
65
  }
@@ -1,10 +1,11 @@
1
- import { SuccessResponse } from "../../common";
2
- import { ProductResponse } from "./response";
3
- import { ProductRequest } from "./request";
1
+ import {SuccessResponse} from "../../common";
2
+ import {ProductResponse} from "./response";
3
+ import {ProductRequest} from "./request";
4
4
 
5
5
  export * from "./request";
6
6
  export * from "./response";
7
7
 
8
+
8
9
  export default interface ProductApi {
9
10
  getPrice: (data: /*product_id*/number | ProductRequest.addItem) => Promise<ProductResponse.getPrice>;
10
11
  availabilitySubscribe: (product_id: number | ProductRequest.availability) => Promise<SuccessResponse>;
@@ -14,4 +15,5 @@ export default interface ProductApi {
14
15
  getGiftDetails: (product_id: number) => Promise<ProductResponse.giftResponse>;
15
16
  addGiftToCart: (product_id: number, payload: Object, withRedirect: boolean) => Promise<ProductResponse.giftToCart>;
16
17
  uploadGiftImage: (multiPartData: FormData) => Promise<ProductResponse.giftImageUpload>;
18
+ getDetails: (product_id: number, advancedItems: Array<'images' | 'brand' | 'tags' | 'notify_availability' | 'rating' | 'donation' | 'options' | 'sold_quantity' | 'category'>) => Promise<ProductResponse.detail>;
17
19
  }
@@ -59,98 +59,98 @@ export interface GiftText {
59
59
  }
60
60
 
61
61
  export interface ProductDetail {
62
- id: number;
63
- promotion: Promotion;
64
- sku: string;
65
- mpn: null;
66
- gtin: null;
67
- type: string;
68
- name: string;
69
- short_link_code: string;
70
- urls: Urls;
71
- price: PreTaxPrice;
72
- taxed_price: PreTaxPrice;
73
- pre_tax_price: PreTaxPrice;
74
- tax: PreTaxPrice;
75
- description: string;
76
- quantity: null;
77
- status: string;
78
- is_available: boolean;
79
- views: null;
80
- sale_price: PreTaxPrice;
81
- sale_end: null;
82
- require_shipping: boolean;
83
- cost_price: string;
84
- weight: number;
85
- weight_type: string;
86
- weight_label: null;
87
- with_tax: boolean;
88
- included_tax: boolean;
89
- url: string;
90
- main_image: string;
91
- images: Image[];
92
- show_purchase_count: boolean;
93
- sold_quantity: number;
94
- sold_quantity_desc: string;
95
- rating: Rating;
96
- favorite: null;
97
- has_special_price: boolean;
98
- regular_price: PreTaxPrice;
99
- features: Features;
100
- max_items_per_user: number;
62
+ id: number;
63
+ promotion: Promotion;
64
+ sku: string;
65
+ mpn: null;
66
+ gtin: null;
67
+ type: string;
68
+ name: string;
69
+ short_link_code: string;
70
+ urls: Urls;
71
+ price: PreTaxPrice;
72
+ taxed_price: PreTaxPrice;
73
+ pre_tax_price: PreTaxPrice;
74
+ tax: PreTaxPrice;
75
+ description: string;
76
+ quantity: null;
77
+ status: string;
78
+ is_available: boolean;
79
+ views: null;
80
+ sale_price: PreTaxPrice;
81
+ sale_end: null;
82
+ require_shipping: boolean;
83
+ cost_price: string;
84
+ weight: number;
85
+ weight_type: string;
86
+ weight_label: null;
87
+ with_tax: boolean;
88
+ included_tax: boolean;
89
+ url: string;
90
+ main_image: string;
91
+ images: Image[];
92
+ show_purchase_count: boolean;
93
+ sold_quantity: number;
94
+ sold_quantity_desc: string;
95
+ rating: Rating;
96
+ favorite: null;
97
+ has_special_price: boolean;
98
+ regular_price: PreTaxPrice;
99
+ features: Features;
100
+ max_items_per_user: number;
101
101
  maximum_quantity_per_order: null;
102
- show_in_app: boolean;
103
- has_size_guide: boolean;
104
- notify_quantity: null;
105
- hide_quantity: boolean;
106
- unlimited_quantity: boolean;
107
- managed_by_branches: boolean;
108
- services_blocks: ServicesBlocks;
109
- calories: null;
110
- customized_sku_quantity: boolean;
111
- options: Option[];
112
- skus: Skus[];
113
- tags: any[];
102
+ show_in_app: boolean;
103
+ has_size_guide: boolean;
104
+ notify_quantity: null;
105
+ hide_quantity: boolean;
106
+ unlimited_quantity: boolean;
107
+ managed_by_branches: boolean;
108
+ services_blocks: ServicesBlocks;
109
+ calories: null;
110
+ customized_sku_quantity: boolean;
111
+ options: Option[];
112
+ skus: Skus[];
113
+ tags: any[];
114
114
  }
115
115
 
116
116
  export interface Features {
117
- show_you_may_like: boolean;
118
- show_rating: boolean;
119
- availability_notify: null;
117
+ show_you_may_like: boolean;
118
+ show_rating: boolean;
119
+ availability_notify: null;
120
120
  show_remaining_quantity: boolean;
121
- "quick-buy": boolean;
122
- buy_as_gift: boolean;
121
+ "quick-buy": boolean;
122
+ buy_as_gift: boolean;
123
123
  }
124
124
 
125
125
  export interface Image {
126
- id: number;
127
- url: string;
128
- main: boolean;
126
+ id: number;
127
+ url: string;
128
+ main: boolean;
129
129
  three_d_image_url: string;
130
- alt: string;
131
- video_url: string;
132
- type: string;
133
- sort: number;
130
+ alt: string;
131
+ video_url: string;
132
+ type: string;
133
+ sort: number;
134
134
  }
135
135
 
136
136
  export interface Option {
137
- id: number;
138
- name: string;
139
- description: null;
140
- type: string;
141
- required: boolean;
137
+ id: number;
138
+ name: string;
139
+ description: null;
140
+ type: string;
141
+ required: boolean;
142
142
  associated_with_order_time: number;
143
- availability_range: boolean;
144
- not_same_day_order: boolean;
145
- choose_date_time: null;
146
- from_date_time: null;
147
- to_date_time: null;
148
- sort: null;
149
- advance: boolean;
150
- display_type: string;
151
- visibility: string;
152
- translations: OptionTranslations;
153
- values: Value[];
143
+ availability_range: boolean;
144
+ not_same_day_order: boolean;
145
+ choose_date_time: null;
146
+ from_date_time: null;
147
+ to_date_time: null;
148
+ sort: null;
149
+ advance: boolean;
150
+ display_type: string;
151
+ visibility: string;
152
+ translations: OptionTranslations;
153
+ values: Value[];
154
154
  }
155
155
 
156
156
  export interface OptionTranslations {
@@ -163,19 +163,19 @@ export interface PurpleAr {
163
163
  }
164
164
 
165
165
  export interface Value {
166
- id: number;
167
- name: string;
168
- price: PreTaxPrice;
169
- display_value: null;
170
- advance: boolean;
171
- option_id: number;
172
- image_url: null;
166
+ id: number;
167
+ name: string;
168
+ price: PreTaxPrice;
169
+ display_value: null;
170
+ advance: boolean;
171
+ option_id: number;
172
+ image_url: null;
173
173
  hashed_display_value: null;
174
- translations: ValueTranslations;
174
+ translations: ValueTranslations;
175
175
  }
176
176
 
177
177
  export interface PreTaxPrice {
178
- amount: number;
178
+ amount: number;
179
179
  currency: Currency;
180
180
  }
181
181
 
@@ -192,14 +192,14 @@ export interface FluffyAr {
192
192
  }
193
193
 
194
194
  export interface Promotion {
195
- title: null;
195
+ title: null;
196
196
  sub_title: null;
197
197
  }
198
198
 
199
199
  export interface Rating {
200
200
  total: number;
201
201
  count: number;
202
- rate: number;
202
+ rate: number;
203
203
  }
204
204
 
205
205
  export interface ServicesBlocks {
@@ -207,25 +207,25 @@ export interface ServicesBlocks {
207
207
  }
208
208
 
209
209
  export interface Skus {
210
- id: number;
211
- price: PreTaxPrice;
212
- regular_price: PreTaxPrice;
213
- sale_price: PreTaxPrice;
214
- stock_quantity: null;
215
- barcode: null;
216
- sku: string;
217
- mpn: null;
218
- gtin: null;
219
- related_options: number[];
210
+ id: number;
211
+ price: PreTaxPrice;
212
+ regular_price: PreTaxPrice;
213
+ sale_price: PreTaxPrice;
214
+ stock_quantity: null;
215
+ barcode: null;
216
+ sku: string;
217
+ mpn: null;
218
+ gtin: null;
219
+ related_options: number[];
220
220
  related_option_values: number[];
221
- weight: null;
222
- weight_type: null;
223
- weight_label: null;
221
+ weight: null;
222
+ weight_type: null;
223
+ weight_label: null;
224
224
  }
225
225
 
226
226
  export interface Urls {
227
227
  customer: string;
228
- admin: string;
228
+ admin: string;
229
229
  }
230
230
 
231
231
 
@@ -265,11 +265,11 @@ export namespace ProductResponse {
265
265
  }
266
266
 
267
267
  export interface giftToCart extends SuccessResponse {
268
- data: Object
268
+ data: { redirect: string }
269
269
  }
270
270
 
271
271
  export interface giftImageUpload extends SuccessResponse {
272
- data: Object | String
272
+ data: { url: string }
273
273
  }
274
274
 
275
275
  export interface detail extends SuccessResponse {