@arkadiuminc/sdk 2.73.0 → 2.74.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.
|
@@ -6,6 +6,9 @@ import { IHost } from '../host';
|
|
|
6
6
|
|
|
7
7
|
export declare type Item = {
|
|
8
8
|
sku: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
image: string;
|
|
9
12
|
amount: number;
|
|
10
13
|
};
|
|
11
14
|
export declare type Items = {
|
|
@@ -14,20 +17,33 @@ export declare type Items = {
|
|
|
14
17
|
export declare type Bundle = {
|
|
15
18
|
sku: string;
|
|
16
19
|
price: number;
|
|
20
|
+
priceSku: string;
|
|
17
21
|
salesPrice: number;
|
|
18
22
|
salesEndDate: string;
|
|
19
23
|
isSalesActive: boolean;
|
|
20
24
|
contents: Item[];
|
|
25
|
+
defaultPrice: BundlePrice;
|
|
26
|
+
allPrices: BundlePrice[];
|
|
27
|
+
};
|
|
28
|
+
export declare type BundlePrice = {
|
|
29
|
+
amount: number;
|
|
30
|
+
salesAmount: number;
|
|
31
|
+
salesEndDate: string;
|
|
32
|
+
item: Item;
|
|
21
33
|
};
|
|
22
34
|
export declare type Bundles = {
|
|
23
35
|
[sku: string]: Bundle;
|
|
24
36
|
};
|
|
37
|
+
export declare type PurchaseBundleOptions = {
|
|
38
|
+
amount?: number;
|
|
39
|
+
priceSku?: string;
|
|
40
|
+
};
|
|
25
41
|
export interface Wallet {
|
|
26
42
|
init?(env: ApiEnv): Promise<void>;
|
|
27
43
|
getGems(): Promise<number>;
|
|
28
44
|
consumeGems(amount: number): Promise<boolean>;
|
|
29
45
|
getBundles(): Promise<Bundles>;
|
|
30
|
-
purchaseBundle(bundleSku: string,
|
|
46
|
+
purchaseBundle(bundleSku: string, amountOrOptions?: number | PurchaseBundleOptions): Promise<boolean>;
|
|
31
47
|
getCatalog(): Promise<Items>;
|
|
32
48
|
grantCatalogItem(itemSku: string, amount: number): Promise<boolean>;
|
|
33
49
|
getInventory(): Promise<Items>;
|
|
@@ -63,7 +79,8 @@ export declare class WalletArena implements Wallet, VirtualItemsApiProvider {
|
|
|
63
79
|
*/
|
|
64
80
|
consumeGems(amount: number): Promise<boolean>;
|
|
65
81
|
getBundles(): Promise<Bundles>;
|
|
66
|
-
purchaseBundle(bundleSku: string,
|
|
82
|
+
purchaseBundle(bundleSku: string, amountOrOptions?: number | PurchaseBundleOptions): Promise<boolean>;
|
|
83
|
+
private submitBundlePurchase;
|
|
67
84
|
getCatalog(): Promise<Items>;
|
|
68
85
|
grantCatalogItem(itemSku: string, amount?: number): Promise<boolean>;
|
|
69
86
|
getInventory(): Promise<Items>;
|
|
@@ -85,7 +102,7 @@ export declare class WalletGame implements Wallet {
|
|
|
85
102
|
consumeGems(amount: number): Promise<boolean>;
|
|
86
103
|
isGemsSupported(): Promise<boolean>;
|
|
87
104
|
getBundles(): Promise<Bundles>;
|
|
88
|
-
purchaseBundle(bundleSku: string,
|
|
105
|
+
purchaseBundle(bundleSku: string, amountOrOptions?: number | PurchaseBundleOptions): Promise<boolean>;
|
|
89
106
|
getCatalog(): Promise<Items>;
|
|
90
107
|
grantCatalogItem(itemSku: string, amount?: number): Promise<boolean>;
|
|
91
108
|
getInventory(): Promise<Items>;
|