react-native-firework-sdk 2.18.9 → 2.18.10
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/android/gradle.properties +1 -1
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoShoppingProduct.kt +12 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoShoppingProductDeserializer.kt +36 -0
- package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoShoppingProductSerializer.kt +24 -0
- package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWVideoShoppingModule.kt +17 -3
- package/ios/Modules/Shopping/Product.swift +12 -0
- package/ios/Modules/Shopping/ShoppingModule.swift +35 -0
- package/lib/typescript/commonjs/src/models/Product.d.ts +40 -0
- package/lib/typescript/commonjs/src/models/Product.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/models/ProductUnit.d.ts +4 -0
- package/lib/typescript/commonjs/src/models/ProductUnit.d.ts.map +1 -1
- package/lib/typescript/module/src/models/Product.d.ts +40 -0
- package/lib/typescript/module/src/models/Product.d.ts.map +1 -1
- package/lib/typescript/module/src/models/ProductUnit.d.ts +4 -0
- package/lib/typescript/module/src/models/ProductUnit.d.ts.map +1 -1
- package/package.json +1 -1
- package/react_native_firework_sdk.podspec +1 -1
- package/src/models/Product.ts +40 -0
- package/src/models/ProductUnit.ts +4 -0
|
@@ -3,15 +3,27 @@ package com.fireworksdk.bridge.models
|
|
|
3
3
|
data class FWVideoShoppingProduct(
|
|
4
4
|
val productId: String? = null,
|
|
5
5
|
val name: String? = null,
|
|
6
|
+
val subtitle: String? = null,
|
|
7
|
+
val currency: String? = null,
|
|
6
8
|
val description: String? = null,
|
|
7
9
|
val units: List<FWVideoProductUnit>? = null,
|
|
8
10
|
val isAvailable: Boolean = true,
|
|
11
|
+
val mainProductImage: String? = null,
|
|
12
|
+
val isDisabled: Boolean? = null,
|
|
13
|
+
val hidePrice: Boolean? = null,
|
|
14
|
+
val customCTATitleTranslation: String? = null,
|
|
15
|
+
val hidePrimaryCTA: Boolean? = null,
|
|
16
|
+
val customCTATarget: String? = null,
|
|
17
|
+
val customCTAUrl: String? = null,
|
|
18
|
+
val customCTATitle: String? = null,
|
|
19
|
+
val hidden: Boolean? = null,
|
|
9
20
|
) {
|
|
10
21
|
|
|
11
22
|
data class FWVideoProductUnit(
|
|
12
23
|
val unitId: String? = null,
|
|
13
24
|
val name: String? = null,
|
|
14
25
|
val price: FWVideoProductPrice? = null,
|
|
26
|
+
val originalPrice: FWVideoProductPrice? = null,
|
|
15
27
|
val url: String? = null,
|
|
16
28
|
val imageUrl: String? = null,
|
|
17
29
|
val options: List<FWVideoProductOption>? = null,
|
package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoShoppingProductDeserializer.kt
CHANGED
|
@@ -7,12 +7,24 @@ object FWVideoShoppingProductDeserializer {
|
|
|
7
7
|
|
|
8
8
|
private const val PRODUCT_ID_KEY = "productId"
|
|
9
9
|
private const val NAME_KEY = "name"
|
|
10
|
+
private const val SUBTITLE_KEY = "subtitle"
|
|
11
|
+
private const val CURRENCY_KEY = "currency"
|
|
10
12
|
private const val DESCRIPTION_KEY = "description"
|
|
11
13
|
private const val UNITS_KEY = "units"
|
|
12
14
|
private const val IS_AVAILABLE_KEY = "isAvailable"
|
|
15
|
+
private const val MAIN_PRODUCT_IMAGE_KEY = "mainProductImage"
|
|
16
|
+
private const val IS_DISABLED_KEY = "isDisabled"
|
|
17
|
+
private const val HIDE_PRICE_KEY = "hidePrice"
|
|
18
|
+
private const val CUSTOM_CTA_TITLE_TRANSLATION_KEY = "customCTATitleTranslation"
|
|
19
|
+
private const val HIDE_PRIMARY_CTA_KEY = "hidePrimaryCTA"
|
|
20
|
+
private const val CUSTOM_CTA_TARGET_KEY = "customCTATarget"
|
|
21
|
+
private const val CUSTOM_CTA_URL_KEY = "customCTAUrl"
|
|
22
|
+
private const val CUSTOM_CTA_TITLE_KEY = "customCTATitle"
|
|
23
|
+
private const val HIDDEN_KEY = "hidden"
|
|
13
24
|
|
|
14
25
|
private const val UNIT_ID_KEY = "unitId"
|
|
15
26
|
private const val PRICE_KEY = "price"
|
|
27
|
+
private const val ORIGINAL_PRICE_KEY = "originalPrice"
|
|
16
28
|
private const val URL_KEY = "url"
|
|
17
29
|
private const val IMAGE_URL_KEY = "imageUrl"
|
|
18
30
|
private const val OPTIONS_KEY = "options"
|
|
@@ -37,16 +49,38 @@ object FWVideoShoppingProductDeserializer {
|
|
|
37
49
|
responseJson ?: return null
|
|
38
50
|
val productId = if (responseJson.has(PRODUCT_ID_KEY)) responseJson.optString(PRODUCT_ID_KEY) else null
|
|
39
51
|
val name = if (responseJson.has(NAME_KEY)) responseJson.optString(NAME_KEY) else null
|
|
52
|
+
val subtitle = if (responseJson.has(SUBTITLE_KEY)) responseJson.optString(SUBTITLE_KEY) else null
|
|
53
|
+
val currency = if (responseJson.has(CURRENCY_KEY)) responseJson.optString(CURRENCY_KEY) else null
|
|
40
54
|
val description = if (responseJson.has(DESCRIPTION_KEY)) responseJson.optString(DESCRIPTION_KEY) else null
|
|
41
55
|
val units = deserializeUnits(responseJson.optJSONArray(UNITS_KEY))
|
|
42
56
|
val isAvailable = responseJson.optBoolean(IS_AVAILABLE_KEY, true)
|
|
57
|
+
val mainProductImage = if (responseJson.has(MAIN_PRODUCT_IMAGE_KEY)) responseJson.optString(MAIN_PRODUCT_IMAGE_KEY) else null
|
|
58
|
+
val isDisabled = if (responseJson.has(IS_DISABLED_KEY)) responseJson.optBoolean(IS_DISABLED_KEY) else null
|
|
59
|
+
val hidePrice = if (responseJson.has(HIDE_PRICE_KEY)) responseJson.optBoolean(HIDE_PRICE_KEY) else null
|
|
60
|
+
val customCTATitleTranslation = if (responseJson.has(CUSTOM_CTA_TITLE_TRANSLATION_KEY)) responseJson.optString(CUSTOM_CTA_TITLE_TRANSLATION_KEY) else null
|
|
61
|
+
val hidePrimaryCTA = if (responseJson.has(HIDE_PRIMARY_CTA_KEY)) responseJson.optBoolean(HIDE_PRIMARY_CTA_KEY) else null
|
|
62
|
+
val customCTATarget = if (responseJson.has(CUSTOM_CTA_TARGET_KEY)) responseJson.optString(CUSTOM_CTA_TARGET_KEY) else null
|
|
63
|
+
val customCTAUrl = if (responseJson.has(CUSTOM_CTA_URL_KEY)) responseJson.optString(CUSTOM_CTA_URL_KEY) else null
|
|
64
|
+
val customCTATitle = if (responseJson.has(CUSTOM_CTA_TITLE_KEY)) responseJson.optString(CUSTOM_CTA_TITLE_KEY) else null
|
|
65
|
+
val hidden = if (responseJson.has(HIDDEN_KEY)) responseJson.optBoolean(HIDDEN_KEY) else null
|
|
43
66
|
|
|
44
67
|
return FWVideoShoppingProduct(
|
|
45
68
|
productId = productId,
|
|
46
69
|
name = name,
|
|
70
|
+
subtitle = subtitle,
|
|
71
|
+
currency = currency,
|
|
47
72
|
description = description,
|
|
48
73
|
units = units,
|
|
49
74
|
isAvailable = isAvailable,
|
|
75
|
+
mainProductImage = mainProductImage,
|
|
76
|
+
isDisabled = isDisabled,
|
|
77
|
+
hidePrice = hidePrice,
|
|
78
|
+
customCTATitleTranslation = customCTATitleTranslation,
|
|
79
|
+
hidePrimaryCTA = hidePrimaryCTA,
|
|
80
|
+
customCTATarget = customCTATarget,
|
|
81
|
+
customCTAUrl = customCTAUrl,
|
|
82
|
+
customCTATitle = customCTATitle,
|
|
83
|
+
hidden = hidden,
|
|
50
84
|
)
|
|
51
85
|
}
|
|
52
86
|
|
|
@@ -66,6 +100,7 @@ object FWVideoShoppingProductDeserializer {
|
|
|
66
100
|
val unitId = if (unitsJsonObject.has(UNIT_ID_KEY)) unitsJsonObject.optString(UNIT_ID_KEY) else null
|
|
67
101
|
val name = if (unitsJsonObject.has(NAME_KEY)) unitsJsonObject.optString(NAME_KEY) else null
|
|
68
102
|
val price = deserializePrice(unitsJsonObject.optJSONObject(PRICE_KEY))
|
|
103
|
+
val originalPrice = deserializePrice(unitsJsonObject.optJSONObject(ORIGINAL_PRICE_KEY))
|
|
69
104
|
val url = if (unitsJsonObject.has(URL_KEY)) unitsJsonObject.optString(URL_KEY) else null
|
|
70
105
|
val imageUrl = if (unitsJsonObject.has(IMAGE_URL_KEY)) unitsJsonObject.optString(IMAGE_URL_KEY) else null
|
|
71
106
|
val options = deserializeOptions(unitsJsonObject.optJSONArray(OPTIONS_KEY))
|
|
@@ -75,6 +110,7 @@ object FWVideoShoppingProductDeserializer {
|
|
|
75
110
|
unitId = unitId,
|
|
76
111
|
name = name,
|
|
77
112
|
price = price,
|
|
113
|
+
originalPrice = originalPrice,
|
|
78
114
|
url = url,
|
|
79
115
|
imageUrl = imageUrl,
|
|
80
116
|
options = options,
|
package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoShoppingProductSerializer.kt
CHANGED
|
@@ -7,12 +7,24 @@ object FWVideoShoppingProductSerializer {
|
|
|
7
7
|
|
|
8
8
|
private const val PRODUCT_ID_KEY = "productId"
|
|
9
9
|
private const val NAME_KEY = "name"
|
|
10
|
+
private const val SUBTITLE_KEY = "subtitle"
|
|
11
|
+
private const val CURRENCY_KEY = "currency"
|
|
10
12
|
private const val DESCRIPTION_KEY = "description"
|
|
11
13
|
private const val UNITS_KEY = "units"
|
|
12
14
|
private const val IS_AVAILABLE_KEY = "isAvailable"
|
|
15
|
+
private const val MAIN_PRODUCT_IMAGE_KEY = "mainProductImage"
|
|
16
|
+
private const val IS_DISABLED_KEY = "isDisabled"
|
|
17
|
+
private const val HIDE_PRICE_KEY = "hidePrice"
|
|
18
|
+
private const val CUSTOM_CTA_TITLE_TRANSLATION_KEY = "customCTATitleTranslation"
|
|
19
|
+
private const val HIDE_PRIMARY_CTA_KEY = "hidePrimaryCTA"
|
|
20
|
+
private const val CUSTOM_CTA_TARGET_KEY = "customCTATarget"
|
|
21
|
+
private const val CUSTOM_CTA_URL_KEY = "customCTAUrl"
|
|
22
|
+
private const val CUSTOM_CTA_TITLE_KEY = "customCTATitle"
|
|
23
|
+
private const val HIDDEN_KEY = "hidden"
|
|
13
24
|
|
|
14
25
|
private const val UNIT_ID_KEY = "unitId"
|
|
15
26
|
private const val PRICE_KEY = "price"
|
|
27
|
+
private const val ORIGINAL_PRICE_KEY = "originalPrice"
|
|
16
28
|
private const val URL_KEY = "url"
|
|
17
29
|
private const val IMAGE_URL_KEY = "imageUrl"
|
|
18
30
|
private const val OPTIONS_KEY = "options"
|
|
@@ -27,9 +39,20 @@ object FWVideoShoppingProductSerializer {
|
|
|
27
39
|
val jsonObject = JSONObject()
|
|
28
40
|
jsonObject.put(PRODUCT_ID_KEY, model.productId)
|
|
29
41
|
jsonObject.put(NAME_KEY, model.name)
|
|
42
|
+
jsonObject.put(SUBTITLE_KEY, model.subtitle)
|
|
43
|
+
jsonObject.put(CURRENCY_KEY, model.currency)
|
|
30
44
|
jsonObject.put(DESCRIPTION_KEY, model.description)
|
|
31
45
|
jsonObject.put(UNITS_KEY, serializeUnits(model.units))
|
|
32
46
|
jsonObject.put(IS_AVAILABLE_KEY, model.isAvailable)
|
|
47
|
+
jsonObject.put(MAIN_PRODUCT_IMAGE_KEY, model.mainProductImage)
|
|
48
|
+
jsonObject.put(IS_DISABLED_KEY, model.isDisabled)
|
|
49
|
+
jsonObject.put(HIDE_PRICE_KEY, model.hidePrice)
|
|
50
|
+
jsonObject.put(CUSTOM_CTA_TITLE_TRANSLATION_KEY, model.customCTATitleTranslation)
|
|
51
|
+
jsonObject.put(HIDE_PRIMARY_CTA_KEY, model.hidePrimaryCTA)
|
|
52
|
+
jsonObject.put(CUSTOM_CTA_TARGET_KEY, model.customCTATarget)
|
|
53
|
+
jsonObject.put(CUSTOM_CTA_URL_KEY, model.customCTAUrl)
|
|
54
|
+
jsonObject.put(CUSTOM_CTA_TITLE_KEY, model.customCTATitle)
|
|
55
|
+
jsonObject.put(HIDDEN_KEY, model.hidden)
|
|
33
56
|
return jsonObject
|
|
34
57
|
}
|
|
35
58
|
|
|
@@ -48,6 +71,7 @@ object FWVideoShoppingProductSerializer {
|
|
|
48
71
|
jsonObject.put(UNIT_ID_KEY, model.unitId)
|
|
49
72
|
jsonObject.put(NAME_KEY, model.name)
|
|
50
73
|
jsonObject.put(PRICE_KEY, serializePrice(model.price))
|
|
74
|
+
jsonObject.put(ORIGINAL_PRICE_KEY, serializePrice(model.originalPrice))
|
|
51
75
|
jsonObject.put(URL_KEY, model.url)
|
|
52
76
|
jsonObject.put(IMAGE_URL_KEY, model.imageUrl)
|
|
53
77
|
jsonObject.put(OPTIONS_KEY, serializeOptions(model.options))
|
package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWVideoShoppingModule.kt
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
package com.fireworksdk.bridge.reactnative.module
|
|
2
2
|
|
|
3
|
+
import android.R.attr.subtitle
|
|
3
4
|
import android.widget.Toast
|
|
4
5
|
import com.facebook.react.bridge.*
|
|
5
6
|
import com.firework.analyticsevents.VideoInfo
|
|
@@ -109,7 +110,18 @@ class FWVideoShoppingModule(
|
|
|
109
110
|
hydrator.hydrate(id) {
|
|
110
111
|
name(name)
|
|
111
112
|
description(description)
|
|
112
|
-
|
|
113
|
+
videoProduct.subtitle?.let { subtitle(it) }
|
|
114
|
+
videoProduct.currency?.let { currency(it) }
|
|
115
|
+
videoProduct.mainProductImage?.let { mainProductImage(it) }
|
|
116
|
+
videoProduct.isDisabled?.let { isDisabled(it) }
|
|
117
|
+
videoProduct.hidePrice?.let { hidePrice(it) }
|
|
118
|
+
videoProduct.customCTATitleTranslation?.let { customCTATitleTranslation(it) }
|
|
119
|
+
videoProduct.hidePrimaryCTA?.let { hidePrimaryCTA(it) }
|
|
120
|
+
videoProduct.customCTATarget?.let { customCTATarget(it) }
|
|
121
|
+
videoProduct.customCTAUrl?.let { customCTAUrl(it) }
|
|
122
|
+
videoProduct.customCTATitle?.let { customCTATitle(it) }
|
|
123
|
+
videoProduct.hidden?.let { hidden(it) }
|
|
124
|
+
product.units.forEachIndexed { index, unit ->
|
|
113
125
|
unit.id?.let { variantId ->
|
|
114
126
|
val vpUnit = videoProduct.units?.find { vpu ->
|
|
115
127
|
vpu.unitId == variantId
|
|
@@ -125,12 +137,14 @@ class FWVideoShoppingModule(
|
|
|
125
137
|
currency(currency)
|
|
126
138
|
price(price = vpu.price?.amount ?: unit.price.amount)
|
|
127
139
|
name((vpu.name ?: unit.name) ?: "")
|
|
128
|
-
isAvailable(vpu.isAvailable)
|
|
140
|
+
isAvailable(vpu.isAvailable)
|
|
141
|
+
vpu.originalPrice?.amount?.let { originalPrice(it) }
|
|
142
|
+
this
|
|
129
143
|
}
|
|
130
144
|
}
|
|
131
145
|
}
|
|
132
146
|
}
|
|
133
|
-
isAvailable(videoProduct.isAvailable)
|
|
147
|
+
isAvailable(videoProduct.isAvailable)
|
|
134
148
|
}
|
|
135
149
|
}
|
|
136
150
|
}
|
|
@@ -10,14 +10,26 @@ import Foundation
|
|
|
10
10
|
struct Product: Codable {
|
|
11
11
|
var productId: String
|
|
12
12
|
var name: String?
|
|
13
|
+
var subtitle: String?
|
|
14
|
+
var currency: String?
|
|
13
15
|
var description: String?
|
|
14
16
|
var isAvailable: Bool?
|
|
17
|
+
var mainProductImage: String?
|
|
18
|
+
var isDisabled: Bool?
|
|
19
|
+
var hidePrice: Bool?
|
|
20
|
+
var customCTATitleTranslation: String?
|
|
21
|
+
var hidePrimaryCTA: Bool?
|
|
22
|
+
var customCTATarget: String?
|
|
23
|
+
var customCTAUrl: String?
|
|
24
|
+
var customCTATitle: String?
|
|
25
|
+
var hidden: Bool?
|
|
15
26
|
var units: [ProductUnit]?
|
|
16
27
|
|
|
17
28
|
struct ProductUnit: Codable {
|
|
18
29
|
var unitId: String
|
|
19
30
|
var name: String?
|
|
20
31
|
var price: Price?
|
|
32
|
+
var originalPrice: Price?
|
|
21
33
|
var url: String?
|
|
22
34
|
var imageUrl: String?
|
|
23
35
|
var isAvailable: Bool?
|
|
@@ -513,12 +513,42 @@ extension ShoppingModule {
|
|
|
513
513
|
if let name = product.name {
|
|
514
514
|
pbuild.name(name)
|
|
515
515
|
}
|
|
516
|
+
if let subtitle = product.subtitle {
|
|
517
|
+
pbuild.subtitle(subtitle)
|
|
518
|
+
}
|
|
519
|
+
if let currency = product.currency {
|
|
520
|
+
pbuild.currency(currency)
|
|
521
|
+
}
|
|
516
522
|
if let description = product.description {
|
|
517
523
|
pbuild.description(description)
|
|
518
524
|
}
|
|
519
525
|
if let isAvailable = product.isAvailable {
|
|
520
526
|
pbuild.isAvailable(isAvailable)
|
|
521
527
|
}
|
|
528
|
+
if let mainProductImage = product.mainProductImage {
|
|
529
|
+
pbuild.mainProductImage(mainProductImage)
|
|
530
|
+
}
|
|
531
|
+
if let hidePrice = product.hidePrice {
|
|
532
|
+
pbuild.hidePrice(hidePrice)
|
|
533
|
+
}
|
|
534
|
+
if let customCTATitleTranslation = product.customCTATitleTranslation {
|
|
535
|
+
pbuild.customCTATitleTranslation(customCTATitleTranslation)
|
|
536
|
+
}
|
|
537
|
+
if let hidePrimaryCTA = product.hidePrimaryCTA {
|
|
538
|
+
pbuild.hidePrimaryCTA(hidePrimaryCTA)
|
|
539
|
+
}
|
|
540
|
+
if let customCTATarget = product.customCTATarget {
|
|
541
|
+
pbuild.customCTATarget(customCTATarget)
|
|
542
|
+
}
|
|
543
|
+
if let customCTAUrl = product.customCTAUrl {
|
|
544
|
+
pbuild.customCTAUrl(customCTAUrl)
|
|
545
|
+
}
|
|
546
|
+
if let customCTATitle = product.customCTATitle {
|
|
547
|
+
pbuild.customCTATitle(customCTATitle)
|
|
548
|
+
}
|
|
549
|
+
if let hidden = product.hidden {
|
|
550
|
+
pbuild.hidden(hidden)
|
|
551
|
+
}
|
|
522
552
|
if let variants = product.units {
|
|
523
553
|
for variant in variants {
|
|
524
554
|
pbuild.variant(variant.unitId) { pvBuild in
|
|
@@ -546,6 +576,11 @@ extension ShoppingModule {
|
|
|
546
576
|
pvBuild.formattedPrice(Decimal(amount), currencyCode: currencyCode)
|
|
547
577
|
}
|
|
548
578
|
}
|
|
579
|
+
if let originalPrice = variant.originalPrice {
|
|
580
|
+
if let amount = originalPrice.amount, let currencyCode = originalPrice.currencyCode {
|
|
581
|
+
pvBuild.formattedOriginalPrice(Decimal(amount), currencyCode: currencyCode)
|
|
582
|
+
}
|
|
583
|
+
}
|
|
549
584
|
if let isAvailable = variant.isAvailable {
|
|
550
585
|
pvBuild.isAvailable(isAvailable)
|
|
551
586
|
}
|
|
@@ -8,6 +8,14 @@ export default interface Product {
|
|
|
8
8
|
* The name of the product.
|
|
9
9
|
*/
|
|
10
10
|
name?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* The subtitle of the product.
|
|
13
|
+
*/
|
|
14
|
+
subtitle?: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* The product-level currency string (e.g. "USD", "EUR").
|
|
17
|
+
*/
|
|
18
|
+
currency?: string;
|
|
11
19
|
/**
|
|
12
20
|
* The description of the product.
|
|
13
21
|
*/
|
|
@@ -16,6 +24,38 @@ export default interface Product {
|
|
|
16
24
|
* The availability of the product.
|
|
17
25
|
*/
|
|
18
26
|
isAvailable?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The URL of the main product image.
|
|
29
|
+
*/
|
|
30
|
+
mainProductImage?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Whether to hide the product price.
|
|
33
|
+
*/
|
|
34
|
+
hidePrice?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The translated custom CTA title.
|
|
37
|
+
*/
|
|
38
|
+
customCTATitleTranslation?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to hide the primary CTA button.
|
|
41
|
+
*/
|
|
42
|
+
hidePrimaryCTA?: boolean | null;
|
|
43
|
+
/**
|
|
44
|
+
* The custom CTA target identifier.
|
|
45
|
+
*/
|
|
46
|
+
customCTATarget?: string | null;
|
|
47
|
+
/**
|
|
48
|
+
* The custom CTA URL.
|
|
49
|
+
*/
|
|
50
|
+
customCTAUrl?: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* The custom CTA title.
|
|
53
|
+
*/
|
|
54
|
+
customCTATitle?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the product is hidden.
|
|
57
|
+
*/
|
|
58
|
+
hidden?: boolean | null;
|
|
19
59
|
/**
|
|
20
60
|
* The unit array of the product
|
|
21
61
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Product.d.ts","sourceRoot":"","sources":["../../../../../src/models/Product.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAE7C,MAAM,CAAC,OAAO,WAAW,OAAO;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;CAC9B"}
|
|
1
|
+
{"version":3,"file":"Product.d.ts","sourceRoot":"","sources":["../../../../../src/models/Product.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAE7C,MAAM,CAAC,OAAO,WAAW,OAAO;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,yBAAyB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAChC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;CAC9B"}
|
|
@@ -27,6 +27,10 @@ export default interface ProductUnit {
|
|
|
27
27
|
* The price of the product unit.
|
|
28
28
|
*/
|
|
29
29
|
price?: ProductPrice;
|
|
30
|
+
/**
|
|
31
|
+
* The original price of the product unit (before discount).
|
|
32
|
+
*/
|
|
33
|
+
originalPrice?: ProductPrice;
|
|
30
34
|
/**
|
|
31
35
|
* The availability of the product unit.
|
|
32
36
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductUnit.d.ts","sourceRoot":"","sources":["../../../../../src/models/ProductUnit.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,WAAW;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC/B"}
|
|
1
|
+
{"version":3,"file":"ProductUnit.d.ts","sourceRoot":"","sources":["../../../../../src/models/ProductUnit.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,WAAW;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC/B"}
|
|
@@ -8,6 +8,14 @@ export default interface Product {
|
|
|
8
8
|
* The name of the product.
|
|
9
9
|
*/
|
|
10
10
|
name?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* The subtitle of the product.
|
|
13
|
+
*/
|
|
14
|
+
subtitle?: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* The product-level currency string (e.g. "USD", "EUR").
|
|
17
|
+
*/
|
|
18
|
+
currency?: string;
|
|
11
19
|
/**
|
|
12
20
|
* The description of the product.
|
|
13
21
|
*/
|
|
@@ -16,6 +24,38 @@ export default interface Product {
|
|
|
16
24
|
* The availability of the product.
|
|
17
25
|
*/
|
|
18
26
|
isAvailable?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The URL of the main product image.
|
|
29
|
+
*/
|
|
30
|
+
mainProductImage?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Whether to hide the product price.
|
|
33
|
+
*/
|
|
34
|
+
hidePrice?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The translated custom CTA title.
|
|
37
|
+
*/
|
|
38
|
+
customCTATitleTranslation?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to hide the primary CTA button.
|
|
41
|
+
*/
|
|
42
|
+
hidePrimaryCTA?: boolean | null;
|
|
43
|
+
/**
|
|
44
|
+
* The custom CTA target identifier.
|
|
45
|
+
*/
|
|
46
|
+
customCTATarget?: string | null;
|
|
47
|
+
/**
|
|
48
|
+
* The custom CTA URL.
|
|
49
|
+
*/
|
|
50
|
+
customCTAUrl?: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* The custom CTA title.
|
|
53
|
+
*/
|
|
54
|
+
customCTATitle?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the product is hidden.
|
|
57
|
+
*/
|
|
58
|
+
hidden?: boolean | null;
|
|
19
59
|
/**
|
|
20
60
|
* The unit array of the product
|
|
21
61
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Product.d.ts","sourceRoot":"","sources":["../../../../../src/models/Product.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAE7C,MAAM,CAAC,OAAO,WAAW,OAAO;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;CAC9B"}
|
|
1
|
+
{"version":3,"file":"Product.d.ts","sourceRoot":"","sources":["../../../../../src/models/Product.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAE7C,MAAM,CAAC,OAAO,WAAW,OAAO;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,yBAAyB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAChC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;CAC9B"}
|
|
@@ -27,6 +27,10 @@ export default interface ProductUnit {
|
|
|
27
27
|
* The price of the product unit.
|
|
28
28
|
*/
|
|
29
29
|
price?: ProductPrice;
|
|
30
|
+
/**
|
|
31
|
+
* The original price of the product unit (before discount).
|
|
32
|
+
*/
|
|
33
|
+
originalPrice?: ProductPrice;
|
|
30
34
|
/**
|
|
31
35
|
* The availability of the product unit.
|
|
32
36
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductUnit.d.ts","sourceRoot":"","sources":["../../../../../src/models/ProductUnit.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,WAAW;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC/B"}
|
|
1
|
+
{"version":3,"file":"ProductUnit.d.ts","sourceRoot":"","sources":["../../../../../src/models/ProductUnit.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,WAAW;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC/B"}
|
package/package.json
CHANGED
package/src/models/Product.ts
CHANGED
|
@@ -9,6 +9,14 @@ export default interface Product {
|
|
|
9
9
|
* The name of the product.
|
|
10
10
|
*/
|
|
11
11
|
name?: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* The subtitle of the product.
|
|
14
|
+
*/
|
|
15
|
+
subtitle?: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* The product-level currency string (e.g. "USD", "EUR").
|
|
18
|
+
*/
|
|
19
|
+
currency?: string;
|
|
12
20
|
/**
|
|
13
21
|
* The description of the product.
|
|
14
22
|
*/
|
|
@@ -17,6 +25,38 @@ export default interface Product {
|
|
|
17
25
|
* The availability of the product.
|
|
18
26
|
*/
|
|
19
27
|
isAvailable?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The URL of the main product image.
|
|
30
|
+
*/
|
|
31
|
+
mainProductImage?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Whether to hide the product price.
|
|
34
|
+
*/
|
|
35
|
+
hidePrice?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The translated custom CTA title.
|
|
38
|
+
*/
|
|
39
|
+
customCTATitleTranslation?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Whether to hide the primary CTA button.
|
|
42
|
+
*/
|
|
43
|
+
hidePrimaryCTA?: boolean | null;
|
|
44
|
+
/**
|
|
45
|
+
* The custom CTA target identifier.
|
|
46
|
+
*/
|
|
47
|
+
customCTATarget?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* The custom CTA URL.
|
|
50
|
+
*/
|
|
51
|
+
customCTAUrl?: string | null;
|
|
52
|
+
/**
|
|
53
|
+
* The custom CTA title.
|
|
54
|
+
*/
|
|
55
|
+
customCTATitle?: string | null;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the product is hidden.
|
|
58
|
+
*/
|
|
59
|
+
hidden?: boolean | null;
|
|
20
60
|
/**
|
|
21
61
|
* The unit array of the product
|
|
22
62
|
*/
|
|
@@ -29,6 +29,10 @@ export default interface ProductUnit {
|
|
|
29
29
|
* The price of the product unit.
|
|
30
30
|
*/
|
|
31
31
|
price?: ProductPrice;
|
|
32
|
+
/**
|
|
33
|
+
* The original price of the product unit (before discount).
|
|
34
|
+
*/
|
|
35
|
+
originalPrice?: ProductPrice;
|
|
32
36
|
/**
|
|
33
37
|
* The availability of the product unit.
|
|
34
38
|
*/
|