@pixels-online/pixels-client-js-sdk 1.18.0 → 1.20.0
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/core/OfferStore.d.ts +20 -14
- package/dist/core/OfferwallClient.d.ts +6 -4
- package/dist/index.esm.js +257 -66
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +259 -65
- package/dist/index.js.map +1 -1
- package/dist/offerwall-sdk.umd.js +259 -65
- package/dist/offerwall-sdk.umd.js.map +1 -1
- package/dist/types/player.d.ts +98 -13
- package/dist/types/user.d.ts +62 -0
- package/dist/utils/blockchain_utils.d.ts +5 -0
- package/dist/utils/conditions.d.ts +25 -7
- package/dist/utils/dynamic.d.ts +2 -0
- package/dist/utils/template.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ISurfacingCondition, IPlayerSnapshot, ICompletionCondition, IBaseCondition, ICompletionTrackers } from '../types/player';
|
|
1
|
+
import { ISurfacingCondition, IPlayerSnapshot, ICompletionCondition, IBaseCondition, ICompletionTrackers, IConditionEvaluationData } from '../types/player';
|
|
2
2
|
import { IDynamicGroup, IDynamicCondition } from '../types/player';
|
|
3
3
|
import { IClientOffer, IOffer, IPlayerOffer, IPlayerOfferTrackers, IStrippedSnapshot } from '../types/offer';
|
|
4
|
-
export declare const meetsBaseConditions: ({ conditions, playerSnap, addDetails, playerOffer, }: {
|
|
4
|
+
export declare const meetsBaseConditions: ({ conditions, playerSnap, addDetails, playerOffer, additionalData, }: {
|
|
5
5
|
conditions: IBaseCondition;
|
|
6
6
|
playerSnap: IPlayerSnapshot | IStrippedSnapshot;
|
|
7
7
|
addDetails?: boolean;
|
|
@@ -10,6 +10,7 @@ export declare const meetsBaseConditions: ({ conditions, playerSnap, addDetails,
|
|
|
10
10
|
claimedCount?: number;
|
|
11
11
|
trackers?: Record<string, any>;
|
|
12
12
|
};
|
|
13
|
+
additionalData?: IConditionEvaluationData;
|
|
13
14
|
}) => {
|
|
14
15
|
isValid: boolean;
|
|
15
16
|
conditionData?: undefined;
|
|
@@ -22,11 +23,12 @@ export declare const meetsBaseConditions: ({ conditions, playerSnap, addDetails,
|
|
|
22
23
|
text: string;
|
|
23
24
|
}[] | undefined;
|
|
24
25
|
};
|
|
25
|
-
export declare const meetsSurfacingConditions: ({ surfacingConditions, playerSnap, context, playerOffers, }: {
|
|
26
|
+
export declare const meetsSurfacingConditions: ({ surfacingConditions, playerSnap, context, playerOffers, additionalData, }: {
|
|
26
27
|
surfacingConditions: ISurfacingCondition;
|
|
27
28
|
playerSnap: IPlayerSnapshot;
|
|
28
29
|
context?: string;
|
|
29
30
|
playerOffers?: Map<string, IPlayerOffer>;
|
|
31
|
+
additionalData?: IConditionEvaluationData;
|
|
30
32
|
}) => {
|
|
31
33
|
isValid: boolean;
|
|
32
34
|
conditionData?: undefined;
|
|
@@ -40,7 +42,22 @@ export declare const meetsSurfacingConditions: ({ surfacingConditions, playerSna
|
|
|
40
42
|
}[] | undefined;
|
|
41
43
|
};
|
|
42
44
|
export declare const hasConditions: (conditions: ICompletionCondition | ISurfacingCondition) => boolean;
|
|
43
|
-
export declare const
|
|
45
|
+
export declare const meetsLinkedEntityOffersCondition: ({ linkedEntityOffers, matchingLinks, linkedPOfferMap, }: {
|
|
46
|
+
linkedEntityOffers: {
|
|
47
|
+
kind?: string;
|
|
48
|
+
offer_id?: string;
|
|
49
|
+
link?: boolean;
|
|
50
|
+
};
|
|
51
|
+
matchingLinks: Array<{
|
|
52
|
+
playerId: string;
|
|
53
|
+
kind?: string;
|
|
54
|
+
}>;
|
|
55
|
+
linkedPOfferMap: Map<string, IPlayerOffer>;
|
|
56
|
+
}) => {
|
|
57
|
+
isValid: boolean;
|
|
58
|
+
linkedPlayerOffer_ids?: string[];
|
|
59
|
+
};
|
|
60
|
+
export declare const offerMeetsCompletionConditions: (offer: IClientOffer, snapshot: IPlayerSnapshot, additionalData?: IConditionEvaluationData) => {
|
|
44
61
|
isValid: boolean;
|
|
45
62
|
availableClaimsNow: number;
|
|
46
63
|
conditionData?: undefined;
|
|
@@ -54,17 +71,17 @@ export declare const offerMeetsCompletionConditions: (offer: IClientOffer, snaps
|
|
|
54
71
|
}[];
|
|
55
72
|
availableClaimsNow: number;
|
|
56
73
|
};
|
|
57
|
-
export declare const meetsCompletionConditions: ({ completionConditions, completionTrackers, playerSnap, playerOffer, addDetails, maxClaimCount, }: {
|
|
74
|
+
export declare const meetsCompletionConditions: ({ completionConditions, completionTrackers, playerSnap, playerOffer, addDetails, maxClaimCount, additionalData, }: {
|
|
58
75
|
completionConditions: ICompletionCondition;
|
|
59
76
|
completionTrackers?: ICompletionTrackers;
|
|
60
77
|
playerSnap: IPlayerSnapshot | IStrippedSnapshot;
|
|
61
78
|
playerOffer: {
|
|
62
79
|
createdAt?: Date | number;
|
|
63
|
-
|
|
64
|
-
trackers?: Record<string, any>;
|
|
80
|
+
trackers?: IPlayerOfferTrackers;
|
|
65
81
|
};
|
|
66
82
|
addDetails?: boolean;
|
|
67
83
|
maxClaimCount?: number;
|
|
84
|
+
additionalData?: IConditionEvaluationData;
|
|
68
85
|
}) => {
|
|
69
86
|
isValid: boolean;
|
|
70
87
|
availableClaimsNow: number;
|
|
@@ -128,3 +145,4 @@ export declare function meetsClaimableConditions({ claimableConditions, playerOf
|
|
|
128
145
|
}): {
|
|
129
146
|
isValid: boolean;
|
|
130
147
|
};
|
|
148
|
+
export declare function aggregateTokenBalances(data?: IConditionEvaluationData): Record<string, number>;
|
package/dist/utils/template.d.ts
CHANGED