@jolibox/types 1.1.38 → 1.1.39

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.
@@ -9,6 +9,7 @@ import { TaskTrackCommandParams } from './task-track';
9
9
  import { KeyboardCommandParams } from './native/keyboard';
10
10
  import { LoginCommandParams } from './native/login';
11
11
  import { RouterCommandParams } from './native/navigate';
12
+ import { RewardsCommandParams } from './rewards';
12
13
  export * from './runtime';
13
14
  export * from './report';
14
15
  export * from './api';
@@ -21,5 +22,6 @@ export * from './task-track';
21
22
  export * from './native/keyboard';
22
23
  export * from './native/login';
23
24
  export * from './native/navigate';
24
- export type CommandParamsMap = RumtimeCommandParams & ReportCommandParams & APICommandParams & AdsCommandParams & LifeCycleCommandParams & HttpCommandParams & StorageCommandParams & KeyboardCommandParams & TaskTrackCommandParams & LoginCommandParams & RouterCommandParams;
25
+ export * from './rewards';
26
+ export type CommandParamsMap = RumtimeCommandParams & ReportCommandParams & APICommandParams & AdsCommandParams & LifeCycleCommandParams & HttpCommandParams & StorageCommandParams & KeyboardCommandParams & TaskTrackCommandParams & LoginCommandParams & RouterCommandParams & RewardsCommandParams;
25
27
  export type CommandType = keyof CommandParamsMap;
@@ -0,0 +1,26 @@
1
+ export declare const REWARDS_USE_JOLICOIN = "Rewards.JOLI_COIN.useJolicoin";
2
+ export declare const REWARDS_USE_UNLOGIN_MODAL = "Rewards.JOLI_COIN.useUnloginModal";
3
+ export declare const REWARDS_USE_PAYMENT = "Rewards.JOLI_COIN.usePayment";
4
+ export declare const REWARDS_USE_JOLICOIN_ADS = "Rewards.ADS-JOLI_COIN.useJolicoin";
5
+ export declare const REWARDS_USE_UNLOGIN_MODAL_ADS = "Rewards.ADS-JOLI_COIN.useUnloginModal";
6
+ export declare const REWARDS_USE_PAYMENT_ADS = "Rewards.ADS-JOLI_COIN.usePayment";
7
+ type IRewardsResult<T> = Promise<{
8
+ result: 'SUCCESS' | 'FAILED' | 'CONTINUE';
9
+ data?: T;
10
+ }>;
11
+ export interface RewardsCommandParams {
12
+ [REWARDS_USE_JOLICOIN]: () => IRewardsResult<void>;
13
+ [REWARDS_USE_UNLOGIN_MODAL]: () => IRewardsResult<{
14
+ isFirstLogin: boolean;
15
+ claimedRewardValue: number;
16
+ }>;
17
+ [REWARDS_USE_PAYMENT]: () => IRewardsResult<void>;
18
+ [REWARDS_USE_JOLICOIN_ADS]: () => IRewardsResult<void>;
19
+ [REWARDS_USE_UNLOGIN_MODAL_ADS]: () => IRewardsResult<{
20
+ isFirstLogin: boolean;
21
+ claimedRewardValue: number;
22
+ }>;
23
+ [REWARDS_USE_PAYMENT_ADS]: () => IRewardsResult<void>;
24
+ }
25
+ export type RewardsCommandType = keyof RewardsCommandParams;
26
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jolibox/types",
3
3
  "description": "This project is common types used for JS-SDk interfere & implement",
4
- "version": "1.1.38",
4
+ "version": "1.1.39",
5
5
  "typings": "dist/index.d.ts",
6
6
  "license": "MIT",
7
7
  "files": [