@jolibox/types 1.3.2 → 1.3.3

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.
@@ -11,6 +11,7 @@ import { LoginCommandParams } from './native/login';
11
11
  import { RouterCommandParams } from './native/navigate';
12
12
  import { RewardsCommandParams } from './rewards';
13
13
  import { PaymentCommandParams } from './native/payment';
14
+ import { JoliboxRewardsCommandParams } from './native/rewards';
14
15
  export * from './runtime';
15
16
  export * from './report';
16
17
  export * from './api';
@@ -25,5 +26,6 @@ export * from './native/login';
25
26
  export * from './native/navigate';
26
27
  export * from './rewards';
27
28
  export * from './native/payment';
28
- export type CommandParamsMap = RumtimeCommandParams & ReportCommandParams & APICommandParams & AdsCommandParams & LifeCycleCommandParams & HttpCommandParams & StorageCommandParams & KeyboardCommandParams & TaskTrackCommandParams & LoginCommandParams & RouterCommandParams & RewardsCommandParams & PaymentCommandParams;
29
+ export * from './native/rewards';
30
+ export type CommandParamsMap = RumtimeCommandParams & ReportCommandParams & APICommandParams & AdsCommandParams & LifeCycleCommandParams & HttpCommandParams & StorageCommandParams & KeyboardCommandParams & TaskTrackCommandParams & LoginCommandParams & RouterCommandParams & RewardsCommandParams & JoliboxRewardsCommandParams & PaymentCommandParams;
29
31
  export type CommandType = keyof CommandParamsMap;
@@ -0,0 +1,7 @@
1
+ import { StandardResponse } from '../response';
2
+ import { ICoinDetailsData } from '../../sdks/rewards';
3
+ export declare const REWARDS_GET_COIN_DETAILS = "RewardsSDK.getCoinDetails";
4
+ export interface JoliboxRewardsCommandParams {
5
+ [REWARDS_GET_COIN_DETAILS]: (onUpdate?: (data: ICoinDetailsData) => void | Promise<void>) => Promise<StandardResponse<ICoinDetailsData>>;
6
+ }
7
+ export type JoliboxRewardsCommandType = keyof JoliboxRewardsCommandParams;
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export * from './sdks/native/keyboard';
6
6
  export * from './sdks/router';
7
7
  export * from './sdks/ads';
8
8
  export * from './sdks/payment';
9
+ export * from './sdks/rewards';
9
10
  export * from './events';
10
11
  export * from './commands';
11
12
  export * from './common';
@@ -0,0 +1,22 @@
1
+ import { StandardResponse } from '../commands';
2
+ export interface ICoinBalance {
3
+ coinBalance?: number;
4
+ cashBalanceStr?: string;
5
+ gemBalance?: number;
6
+ }
7
+ export interface ISubUser {
8
+ tier: 'BASIC' | 'STANDARD';
9
+ status: 'ACTIVE' | 'CANCELED' | 'EXPIRED';
10
+ validUntil: number;
11
+ }
12
+ export interface ICoinDetailsData {
13
+ coinBalance?: number;
14
+ cashBalanceStr?: string;
15
+ gemBalance?: number;
16
+ subUser?: ISubUser;
17
+ }
18
+ export interface Rewards {
19
+ getCoinDetails: (params: {
20
+ onUpdate?: (data: ICoinDetailsData) => void | Promise<void>;
21
+ }) => Promise<StandardResponse<ICoinDetailsData>>;
22
+ }
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.3.2",
4
+ "version": "1.3.3",
5
5
  "typings": "dist/index.d.ts",
6
6
  "license": "MIT",
7
7
  "files": [
@@ -10,7 +10,7 @@
10
10
  ],
11
11
  "devDependencies": {
12
12
  "typescript": "5.7.3",
13
- "@jolibox/eslint-config": "1.0.0",
13
+ "@jolibox/eslint-config": "1.0.1-beta.16",
14
14
  "rimraf": "6.0.1"
15
15
  },
16
16
  "typedocOptions": {