@pixels-online/pixels-client-js-sdk 1.20.0 → 2.0.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/README.md +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/core/OfferStore.d.ts +10 -11
- package/dist/core/OfferwallClient.d.ts +5 -6
- package/dist/index.d.ts +0 -9
- package/dist/index.esm.js +24 -1500
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +50 -1544
- package/dist/index.js.map +1 -1
- package/dist/offerwall-sdk.umd.js +50 -1544
- package/dist/offerwall-sdk.umd.js.map +1 -1
- package/dist/types/events.d.ts +4 -5
- package/dist/types/hooks.d.ts +4 -5
- package/dist/types/index.d.ts +3 -6
- package/dist/utils/assets.d.ts +5 -4
- package/dist/utils/env.d.ts +1 -1
- package/package.json +5 -1
- package/dist/types/blockchain/user_wallet.d.ts +0 -19
- package/dist/types/offer.d.ts +0 -274
- package/dist/types/player.d.ts +0 -481
- package/dist/types/reward.d.ts +0 -39
- package/dist/types/user.d.ts +0 -62
- package/dist/types/user_wallet.d.ts +0 -36
- package/dist/utils/blockchain_utils.d.ts +0 -5
- package/dist/utils/conditions.d.ts +0 -148
- package/dist/utils/dynamic.d.ts +0 -2
- package/dist/utils/template.d.ts +0 -20
package/README.md
CHANGED
|
@@ -394,7 +394,7 @@ This project is licensed under the AGPLv3 License - see the [LICENSE.md](LICENSE
|
|
|
394
394
|
|
|
395
395
|
- [GitLab Repository](https://gitlab.com/pixels-online-oss/pixels-buildon-client-js-sdk)
|
|
396
396
|
- [Issue Tracker](https://gitlab.com/pixels-online-oss/pixels-buildon-client-js-sdk/issues)
|
|
397
|
-
- [Pixels BuildOn Documentation](https://docs.
|
|
397
|
+
- [Pixels BuildOn Documentation](https://docs.stackedplatform.io)
|
|
398
398
|
|
|
399
399
|
## 📞 Support
|
|
400
400
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const stackedDomain = "stackedplatform.io";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { OfferwallConfig } from '../types';
|
|
2
|
-
import {
|
|
3
|
-
import { IClientPlayer } from '../types/player';
|
|
2
|
+
import { StackedOffer, StackedUserResponse, UserOfferStatus } from '@stackedapp/types';
|
|
4
3
|
import { OfferwallClient } from './OfferwallClient';
|
|
5
4
|
export declare class OfferStore {
|
|
6
5
|
private client;
|
|
@@ -8,16 +7,16 @@ export declare class OfferStore {
|
|
|
8
7
|
private players;
|
|
9
8
|
private logger;
|
|
10
9
|
constructor(config: OfferwallConfig, client: OfferwallClient);
|
|
11
|
-
getPlayer(targetId?: string | null):
|
|
12
|
-
setPlayer(player:
|
|
10
|
+
getPlayer(targetId?: string | null): StackedUserResponse | null;
|
|
11
|
+
setPlayer(player: StackedUserResponse): void;
|
|
13
12
|
/**
|
|
14
13
|
* Set all offers (replaces existing)
|
|
15
14
|
*/
|
|
16
|
-
setOffers(offers:
|
|
15
|
+
setOffers(offers: StackedOffer[], target?: StackedUserResponse): void;
|
|
17
16
|
/**
|
|
18
17
|
* Add or update a single offer
|
|
19
18
|
*/
|
|
20
|
-
upsertOffer(offer:
|
|
19
|
+
upsertOffer(offer: StackedOffer): StackedOffer | undefined;
|
|
21
20
|
/**
|
|
22
21
|
* Remove an offer
|
|
23
22
|
*/
|
|
@@ -25,23 +24,23 @@ export declare class OfferStore {
|
|
|
25
24
|
/**
|
|
26
25
|
* Get a single offer
|
|
27
26
|
*/
|
|
28
|
-
getOffer(offerId: string, targetId?: string | null):
|
|
27
|
+
getOffer(offerId: string, targetId?: string | null): StackedOffer | undefined;
|
|
29
28
|
/**
|
|
30
29
|
* Get all offers
|
|
31
30
|
*/
|
|
32
|
-
getAllOffers(targetId?: string | null):
|
|
31
|
+
getAllOffers(targetId?: string | null): StackedOffer[];
|
|
33
32
|
/**
|
|
34
33
|
* Get offers filtered by status
|
|
35
34
|
*/
|
|
36
|
-
getOffersByStatus(status:
|
|
35
|
+
getOffersByStatus(status: UserOfferStatus, targetId?: string | null): StackedOffer[];
|
|
37
36
|
/**
|
|
38
37
|
* Get active offers (not expired, not claimed)
|
|
39
38
|
*/
|
|
40
|
-
getActiveOffers(targetId?: string | null):
|
|
39
|
+
getActiveOffers(targetId?: string | null): StackedOffer[];
|
|
41
40
|
/**
|
|
42
41
|
* Get claimable offers
|
|
43
42
|
*/
|
|
44
|
-
getClaimableOffers(targetId?: string | null):
|
|
43
|
+
getClaimableOffers(targetId?: string | null): StackedOffer[];
|
|
45
44
|
/**
|
|
46
45
|
* Check if an offer has expired
|
|
47
46
|
*/
|
|
@@ -2,11 +2,10 @@ import { EventEmitter } from '../events/EventEmitter';
|
|
|
2
2
|
import { OfferStore } from './OfferStore';
|
|
3
3
|
import { AssetHelper } from '../utils/assets';
|
|
4
4
|
import { OfferwallConfig } from '../types/index';
|
|
5
|
-
import {
|
|
5
|
+
import { StackedOffer, StackedUserResponse } from '@stackedapp/types';
|
|
6
6
|
import { ConnectionState } from '../types/connection';
|
|
7
|
-
import { IClientPlayer } from '../types/player';
|
|
8
7
|
import { StackedLinkResult } from '../types/linking';
|
|
9
|
-
export declare const mapEnvToOfferClientUrl: (env: "test" | "live" | (string & {})) => "https://
|
|
8
|
+
export declare const mapEnvToOfferClientUrl: (env: "test" | "live" | (string & {})) => "https://app.stackedplatform.io" | "https://app.sandbox.stackedplatform.io" | "https://app.staging.stackedplatform.io" | "https://app.dev.stackedplatform.io";
|
|
10
9
|
export declare class OfferwallClient {
|
|
11
10
|
private config;
|
|
12
11
|
private endpoint;
|
|
@@ -65,9 +64,9 @@ export declare class OfferwallClient {
|
|
|
65
64
|
*/
|
|
66
65
|
private postWithAuth;
|
|
67
66
|
private claimOfferAPI;
|
|
68
|
-
getPlayer(targetId?: string | null):
|
|
69
|
-
getOffers(targetId?: string | null):
|
|
70
|
-
refreshOffersAndPlayer(targetId?: string | null): Promise<
|
|
67
|
+
getPlayer(targetId?: string | null): StackedUserResponse | null;
|
|
68
|
+
getOffers(targetId?: string | null): StackedOffer[];
|
|
69
|
+
refreshOffersAndPlayer(targetId?: string | null): Promise<StackedOffer[]>;
|
|
71
70
|
private getOffersAndPlayer;
|
|
72
71
|
getAuthLinkToken(): Promise<string>;
|
|
73
72
|
getGameId(): string | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,12 +2,3 @@ export { OfferwallClient } from './core/OfferwallClient';
|
|
|
2
2
|
export { EventEmitter } from './events/EventEmitter';
|
|
3
3
|
export { SSEConnection } from './core/SSEConnection';
|
|
4
4
|
export { OfferStore } from './core/OfferStore';
|
|
5
|
-
export { AssetHelper } from './utils/assets';
|
|
6
|
-
export * from './utils/conditions';
|
|
7
|
-
export * from './types';
|
|
8
|
-
export * from './types/offer';
|
|
9
|
-
export * from './types/reward';
|
|
10
|
-
export * from './types/events';
|
|
11
|
-
export * from './types/hooks';
|
|
12
|
-
export * from './types/player';
|
|
13
|
-
export * from './types/linking';
|