@claspo/common 7.4.0 → 7.5.0-sp2
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/PrizePool.interface.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ export interface PrizePoolModelI {
|
|
|
5
5
|
options?: PrizePoolOptionI[];
|
|
6
6
|
}
|
|
7
7
|
export declare enum PrizeSourceType {
|
|
8
|
-
MANUAL = "MANUAL"
|
|
8
|
+
MANUAL = "MANUAL",
|
|
9
|
+
SHOPIFY = "SHOPIFY"
|
|
9
10
|
}
|
|
10
11
|
export declare enum PrizeDistributionType {
|
|
11
12
|
PERCENT_CHANCE = "PERCENT_CHANCE"
|
|
@@ -20,8 +21,36 @@ export interface PrizePoolOptionI {
|
|
|
20
21
|
}
|
|
21
22
|
export declare enum PrizeOptionValueType {
|
|
22
23
|
DISCOUNT_PERCENTAGE = "DISCOUNT_PERCENTAGE",
|
|
23
|
-
CUSTOM = "CUSTOM"
|
|
24
|
+
CUSTOM = "CUSTOM",
|
|
25
|
+
PROMOCODE = "PROMOCODE"
|
|
24
26
|
}
|
|
25
27
|
export interface PrizeOptionConfigI {
|
|
26
28
|
imageUrl?: string;
|
|
29
|
+
discountNodeId?: string;
|
|
30
|
+
shopify?: PrizeOptionShopifyConfigI;
|
|
31
|
+
}
|
|
32
|
+
export interface PrizeOptionShopifyConfigI {
|
|
33
|
+
mode?: ShopifyPromoCodeMode;
|
|
34
|
+
discountType: ShopifyDiscountType;
|
|
35
|
+
discountValue: string;
|
|
36
|
+
startsAt?: string | null;
|
|
37
|
+
endsAt?: string | null;
|
|
38
|
+
shopifyAdminUrl?: string;
|
|
39
|
+
available?: boolean;
|
|
40
|
+
unavailableReason?: ShopifyPromoUnavailableReason;
|
|
41
|
+
}
|
|
42
|
+
export declare enum ShopifyPromoCodeMode {
|
|
43
|
+
STATIC = "STATIC",
|
|
44
|
+
UNIQUE = "UNIQUE"
|
|
45
|
+
}
|
|
46
|
+
export declare enum ShopifyDiscountType {
|
|
47
|
+
PERCENTAGE = "PERCENTAGE",
|
|
48
|
+
FIXED_AMOUNT = "FIXED_AMOUNT"
|
|
49
|
+
}
|
|
50
|
+
export declare enum ShopifyPromoUnavailableReason {
|
|
51
|
+
SHOPIFY_UNAVAILABLE = "SHOPIFY_UNAVAILABLE",
|
|
52
|
+
DISCOUNT_NOT_FOUND = "DISCOUNT_NOT_FOUND",
|
|
53
|
+
EXPIRED = "EXPIRED",
|
|
54
|
+
NOT_STARTED = "NOT_STARTED",
|
|
55
|
+
UNSUPPORTED_DISCOUNT = "UNSUPPORTED_DISCOUNT"
|
|
27
56
|
}
|
package/PrizePool.interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export var PrizeSourceType;!function(
|
|
1
|
+
export var PrizeSourceType;!function(o){o.MANUAL="MANUAL",o.SHOPIFY="SHOPIFY"}(PrizeSourceType||(PrizeSourceType={}));export var PrizeDistributionType;!function(o){o.PERCENT_CHANCE="PERCENT_CHANCE"}(PrizeDistributionType||(PrizeDistributionType={}));export var PrizeOptionValueType;!function(o){o.DISCOUNT_PERCENTAGE="DISCOUNT_PERCENTAGE",o.CUSTOM="CUSTOM",o.PROMOCODE="PROMOCODE"}(PrizeOptionValueType||(PrizeOptionValueType={}));export var ShopifyPromoCodeMode;!function(o){o.STATIC="STATIC",o.UNIQUE="UNIQUE"}(ShopifyPromoCodeMode||(ShopifyPromoCodeMode={}));export var ShopifyDiscountType;!function(o){o.PERCENTAGE="PERCENTAGE",o.FIXED_AMOUNT="FIXED_AMOUNT"}(ShopifyDiscountType||(ShopifyDiscountType={}));export var ShopifyPromoUnavailableReason;!function(o){o.SHOPIFY_UNAVAILABLE="SHOPIFY_UNAVAILABLE",o.DISCOUNT_NOT_FOUND="DISCOUNT_NOT_FOUND",o.EXPIRED="EXPIRED",o.NOT_STARTED="NOT_STARTED",o.UNSUPPORTED_DISCOUNT="UNSUPPORTED_DISCOUNT"}(ShopifyPromoUnavailableReason||(ShopifyPromoUnavailableReason={}));
|
|
@@ -24,6 +24,7 @@ export interface WidgetInitConfigI {
|
|
|
24
24
|
actionFactoryClass?: any;
|
|
25
25
|
widgetId?: number;
|
|
26
26
|
prizePoolModels?: PrizePoolModelI[];
|
|
27
|
+
prizePoolIds?: string[];
|
|
27
28
|
bundledComponentClasses?: any[];
|
|
28
29
|
translations?: TranslationsI;
|
|
29
30
|
trackingService?: TrackingServiceI;
|
|
@@ -2,6 +2,7 @@ import { WidgetType } from '../WidgetType';
|
|
|
2
2
|
import { LayoutType } from '../LayoutType';
|
|
3
3
|
import { ClBaseComponentI, ClBaseComponentPropsI, ClComponentType } from '../document/Document.interface';
|
|
4
4
|
import { ComponentManifestI } from './ComponentManifest.interface';
|
|
5
|
+
import { PrizePoolModelI } from '../PrizePool.interface';
|
|
5
6
|
export type DisplayConditionCallbackI = (sdk: DisplayConditionSdkI) => boolean;
|
|
6
7
|
export interface DisplayConditionSdkI {
|
|
7
8
|
widgetType: WidgetType;
|
|
@@ -12,6 +13,7 @@ export interface DisplayConditionSdkI {
|
|
|
12
13
|
views: ClBaseComponentI[];
|
|
13
14
|
manifests: ComponentManifestI[];
|
|
14
15
|
documentUtils: DisplayConditionDocumentUtilsServiceI;
|
|
16
|
+
prizePool: PrizePoolModelI | null;
|
|
15
17
|
}
|
|
16
18
|
export interface DisplayConditionComponentFacadeI {
|
|
17
19
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claspo/common",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.5.0-sp2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"engines": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"sync:docs": "node ../../scripts/sync-docs.js --package=common"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"velocityjs": "2.
|
|
31
|
+
"velocityjs": "2.1.6"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/jest": "^27.5.1",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import Velocity from"velocityjs";import SysVelocityContext from"./SysVelocityContext";const sysCtx=(new SysVelocityContext).create();export default class SysVelocityRenderer{render(e,t){return Velocity.render(e,Object.assign(Object.assign({},sysCtx),t))}}
|
|
1
|
+
import*as Velocity from"velocityjs";import SysVelocityContext from"./SysVelocityContext";const sysCtx=(new SysVelocityContext).create();export default class SysVelocityRenderer{render(e,t){return Velocity.render(e,Object.assign(Object.assign({},sysCtx),t))}}
|