@salla.sa/twilight 2.11.113 → 2.11.115
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/dist/@salla.sa/twilight.min.js +2 -2
- package/dist/@salla.sa/twilight.min.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
- package/types/api/product/request.d.ts +1 -2
- package/types/api/product/response.d.ts +93 -130
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salla.sa/twilight",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.115",
|
|
4
4
|
"description": "Salla Theme Toolkit, Webcomponents, Events, Requests, Utils",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"webpack": "^4 || ^5"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "bcc45f52d780e4f487996c506a3691c0c03e14e4"
|
|
71
71
|
}
|
|
@@ -6,7 +6,6 @@ export interface Category {
|
|
|
6
6
|
sub_categories: Category[];
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export type ProductOption = { [key: number]: number | string | number[] };
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
export interface Receiver {
|
|
@@ -20,7 +19,7 @@ export namespace ProductRequest {
|
|
|
20
19
|
export interface addItem {
|
|
21
20
|
id: number;
|
|
22
21
|
quantity: 1 | number;
|
|
23
|
-
options?:
|
|
22
|
+
options?: Array<{ [key: number]: number | string | number[] }>;
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
export interface search {
|
|
@@ -62,141 +62,131 @@ export interface GiftText {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
export interface ProductDetail {
|
|
65
|
-
calories: null;
|
|
66
|
-
cost_price: string;
|
|
67
|
-
customized_sku_quantity: boolean;
|
|
68
|
-
description: string;
|
|
69
|
-
favorite: null;
|
|
70
|
-
features: Features;
|
|
71
|
-
gtin: null;
|
|
72
|
-
has_size_guide: boolean;
|
|
73
|
-
is_on_sale: boolean;
|
|
74
|
-
hide_quantity: boolean;
|
|
75
65
|
id: number;
|
|
76
|
-
image: { alt:string; url:string };
|
|
77
|
-
images: Image[];
|
|
78
|
-
included_tax: boolean;
|
|
79
|
-
is_available: boolean;
|
|
80
|
-
managed_by_branches: boolean;
|
|
81
|
-
max_items_per_user: number;
|
|
82
|
-
maximum_quantity_per_order: null;
|
|
83
|
-
mpn: null;
|
|
84
66
|
name: string;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
67
|
+
description: string;
|
|
68
|
+
url: string;
|
|
69
|
+
promotion_title: string;
|
|
70
|
+
subtitle: string;
|
|
71
|
+
type: string;
|
|
72
|
+
status: string;
|
|
73
|
+
weight?: string;
|
|
74
|
+
calories?: number;
|
|
75
|
+
sku?: string;
|
|
76
|
+
rating?: Rating;
|
|
88
77
|
price: number;
|
|
89
|
-
|
|
90
|
-
quantity: null;
|
|
91
|
-
rating: Rating;
|
|
78
|
+
sale_price: number;
|
|
92
79
|
regular_price: number;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
sale_price: PreTaxPrice;
|
|
96
|
-
services_blocks: ServicesBlocks;
|
|
97
|
-
short_link_code: string;
|
|
98
|
-
show_in_app: boolean;
|
|
99
|
-
show_purchase_count: boolean;
|
|
100
|
-
sku: string;
|
|
101
|
-
skus: Skus[];
|
|
80
|
+
starting_price?: number;
|
|
81
|
+
quantity?: number;
|
|
102
82
|
sold_quantity: number;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
83
|
+
max_quantity: number;
|
|
84
|
+
discount_ends?: Date;
|
|
85
|
+
is_taxable: boolean;
|
|
86
|
+
category?: ShortCategory;
|
|
87
|
+
image: ProductMainImage;
|
|
88
|
+
images: Image[];
|
|
89
|
+
brand?: Brand;
|
|
90
|
+
tags?: Tag[];
|
|
91
|
+
options: ProductOption[];
|
|
92
|
+
notify_availability?: ProductNotifyVisibility;
|
|
93
|
+
donation?: ProductDonation;
|
|
94
|
+
has_read_more: boolean;
|
|
95
|
+
can_add_note: boolean;
|
|
96
|
+
can_show_remained_quantity: boolean;
|
|
97
|
+
can_show_sold: boolean;
|
|
98
|
+
can_upload_file: boolean;
|
|
99
|
+
has_custom_form: boolean;
|
|
100
|
+
has_options: boolean;
|
|
101
|
+
is_on_sale: boolean;
|
|
102
|
+
is_hidden_quantity: boolean;
|
|
103
|
+
is_available: boolean;
|
|
104
|
+
is_in_wishlist: boolean;
|
|
105
|
+
is_out_of_stock: boolean;
|
|
106
|
+
is_require_shipping: boolean;
|
|
107
|
+
base_currency_price: number;
|
|
108
|
+
discount_percentage?: string;
|
|
109
|
+
has_3d_image: boolean;
|
|
110
|
+
has_size_guide: boolean;
|
|
111
|
+
is_giftable: boolean;
|
|
112
|
+
add_to_cart_label: string;
|
|
113
|
+
currency: string;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface ProductDonation {
|
|
117
|
+
target_message?: string;
|
|
118
|
+
collected_amount: number;
|
|
119
|
+
target_amount: number;
|
|
120
|
+
target_percent: number;
|
|
121
|
+
target_end_date?: Date;
|
|
122
|
+
can_donate: boolean;
|
|
117
123
|
}
|
|
118
124
|
|
|
119
|
-
export interface
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
125
|
+
export interface ProductNotifyVisibility {
|
|
126
|
+
channels: string[];
|
|
127
|
+
subscribed: boolean;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface ProductMainImage {
|
|
131
|
+
url: string;
|
|
132
|
+
alt: string;
|
|
126
133
|
}
|
|
127
134
|
|
|
128
135
|
export interface Image {
|
|
129
136
|
id: number;
|
|
130
137
|
url: string;
|
|
131
|
-
main: boolean;
|
|
132
|
-
three_d_image_url: string;
|
|
133
138
|
alt: string;
|
|
134
139
|
video_url: string;
|
|
135
140
|
type: string;
|
|
141
|
+
main: boolean;
|
|
142
|
+
three_d_image_url: string;
|
|
136
143
|
sort: number;
|
|
137
144
|
}
|
|
138
145
|
|
|
139
|
-
export interface
|
|
146
|
+
export interface Brand {
|
|
147
|
+
id: number;
|
|
148
|
+
url: string;
|
|
149
|
+
name: string;
|
|
150
|
+
logo: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface Tag {
|
|
154
|
+
name: string;
|
|
155
|
+
url: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface ProductOption {
|
|
140
159
|
id: number;
|
|
141
160
|
name: string;
|
|
142
|
-
description: null;
|
|
143
161
|
type: string;
|
|
144
162
|
required: boolean;
|
|
145
|
-
associated_with_order_time: number;
|
|
146
163
|
availability_range: boolean;
|
|
147
164
|
not_same_day_order: boolean;
|
|
148
|
-
choose_date_time: null;
|
|
149
165
|
from_date_time: null;
|
|
150
166
|
to_date_time: null;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
values: Value[];
|
|
167
|
+
placeholder?: string;
|
|
168
|
+
visibility_condition?: ProductOptionVisibilityCondition,
|
|
169
|
+
condition_attributes?: string;
|
|
170
|
+
element: string;
|
|
171
|
+
details: ProductOptionDetail[]
|
|
157
172
|
}
|
|
158
173
|
|
|
159
|
-
export interface
|
|
160
|
-
|
|
174
|
+
export interface ProductOptionVisibilityCondition {
|
|
175
|
+
option: number;
|
|
176
|
+
operator: string;
|
|
177
|
+
value: number;
|
|
161
178
|
}
|
|
162
179
|
|
|
163
|
-
export interface
|
|
164
|
-
option_name: string;
|
|
165
|
-
description: null;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export interface Value {
|
|
180
|
+
export interface ProductOptionDetail {
|
|
169
181
|
id: number;
|
|
170
182
|
name: string;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
export interface PreTaxPrice {
|
|
181
|
-
amount: number;
|
|
182
|
-
currency: Currency;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export enum Currency {
|
|
186
|
-
Sar = "SAR",
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export interface ValueTranslations {
|
|
190
|
-
ar: FluffyAr;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export interface FluffyAr {
|
|
194
|
-
option_details_name: string;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export interface Promotion {
|
|
198
|
-
title: null;
|
|
199
|
-
sub_title: null;
|
|
183
|
+
full_name: string;
|
|
184
|
+
additional_price: number;
|
|
185
|
+
option_value: string;
|
|
186
|
+
image: string;
|
|
187
|
+
color: string;
|
|
188
|
+
is_selected: boolean;
|
|
189
|
+
is_out: boolean;
|
|
200
190
|
}
|
|
201
191
|
|
|
202
192
|
export interface Rating {
|
|
@@ -205,33 +195,6 @@ export interface Rating {
|
|
|
205
195
|
rate: number;
|
|
206
196
|
}
|
|
207
197
|
|
|
208
|
-
export interface ServicesBlocks {
|
|
209
|
-
installments: any[];
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export interface Skus {
|
|
213
|
-
id: number;
|
|
214
|
-
price: PreTaxPrice;
|
|
215
|
-
regular_price: PreTaxPrice;
|
|
216
|
-
sale_price: PreTaxPrice;
|
|
217
|
-
stock_quantity: null;
|
|
218
|
-
barcode: null;
|
|
219
|
-
sku: string;
|
|
220
|
-
mpn: null;
|
|
221
|
-
gtin: null;
|
|
222
|
-
related_options: number[];
|
|
223
|
-
related_option_values: number[];
|
|
224
|
-
weight: null;
|
|
225
|
-
weight_type: null;
|
|
226
|
-
weight_label: null;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
export interface Urls {
|
|
230
|
-
customer: string;
|
|
231
|
-
admin: string;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
|
|
235
198
|
export namespace ProductResponse {
|
|
236
199
|
export interface search extends SuccessResponse {
|
|
237
200
|
data: Product[];
|