@jolibox/types 1.2.2 → 1.2.4
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/commands/index.d.ts +3 -1
- package/dist/commands/native/payment.d.ts +20 -0
- package/dist/commands/report.d.ts +1 -1
- package/dist/env.d.ts +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/sdks/payment.d.ts +13 -0
- package/package.json +1 -1
package/dist/commands/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { KeyboardCommandParams } from './native/keyboard';
|
|
|
10
10
|
import { LoginCommandParams } from './native/login';
|
|
11
11
|
import { RouterCommandParams } from './native/navigate';
|
|
12
12
|
import { RewardsCommandParams } from './rewards';
|
|
13
|
+
import { PaymentCommandParams } from './native/payment';
|
|
13
14
|
export * from './runtime';
|
|
14
15
|
export * from './report';
|
|
15
16
|
export * from './api';
|
|
@@ -23,5 +24,6 @@ export * from './native/keyboard';
|
|
|
23
24
|
export * from './native/login';
|
|
24
25
|
export * from './native/navigate';
|
|
25
26
|
export * from './rewards';
|
|
26
|
-
export
|
|
27
|
+
export * from './native/payment';
|
|
28
|
+
export type CommandParamsMap = RumtimeCommandParams & ReportCommandParams & APICommandParams & AdsCommandParams & LifeCycleCommandParams & HttpCommandParams & StorageCommandParams & KeyboardCommandParams & TaskTrackCommandParams & LoginCommandParams & RouterCommandParams & RewardsCommandParams & PaymentCommandParams;
|
|
27
29
|
export type CommandType = keyof CommandParamsMap;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StandardResponse } from '../response';
|
|
2
|
+
export declare const PURCHASE_GEM_IN_APP = "PaymentSDK.purchaseGem";
|
|
3
|
+
export declare const GET_GEM_PRODUCT_INFO = "PaymentSDK.getGemProducts";
|
|
4
|
+
export interface IGemProductInfo {
|
|
5
|
+
productId: string;
|
|
6
|
+
totalAmountStr: string;
|
|
7
|
+
quantity: number;
|
|
8
|
+
appStoreProductId?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface PaymentCommandParams {
|
|
11
|
+
[PURCHASE_GEM_IN_APP]: (params: {
|
|
12
|
+
productId: string;
|
|
13
|
+
}) => Promise<StandardResponse<{
|
|
14
|
+
totalAmount: string;
|
|
15
|
+
} | void, unknown>>;
|
|
16
|
+
[GET_GEM_PRODUCT_INFO]: () => Promise<StandardResponse<{
|
|
17
|
+
products: IGemProductInfo[];
|
|
18
|
+
} | void, unknown>>;
|
|
19
|
+
}
|
|
20
|
+
export type PaymentCommandType = keyof PaymentCommandParams;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type TrackEvent = 'jsSdkBegin' | 'onBeforeExit' | 'bootstrapModuleBeginToLoad' | 'bootstrapModuleLoaded' | 'implModuleBeginToLoad' | 'implModuleLoaded' | 'onDocumentReady' | 'joliboxServiceReady' | 'apiInvoked' | 'joliboxSpeedAnalysis' | 'joliboxNetRequestResult' | 'globalJsError' | 'RecommendedGuide' | 'GameItem' | 'loadFinished' | 'unlock_popup_show' | 'coinorder_show' | 'coinorder_click' | 'ad_unlock_click' | 'coin_unlock_click' | 'order_pay_ensure' | 'order_pay_result' | 'mmp_ad_impression' | 'LoginGuideModal' | 'gem_unlock_popup_show' | 'gem_unlock_click' | 'gem_ad_unlock_click' | 'gem_order_show' | 'gem_order_click' | 'gem_pay_ensure' | 'gem_pay_result' | 'gem_ad_unlock_click' | 'GemLoginGuideModal' | 'jolicoin_unlock_success' | 'gem_unlock_success' | 'CallRuntimeLoadFinished' | 'AdBreakJumpOut' | 'AdBreakHide' | 'CallAdsInit' | 'LoadAdsenseCompleted' | 'CallAdConfig' | 'PreventAdsCheating' | 'CallShowAdFn' | 'CallAdBreak' | 'CallAdUnit' | 'CallAdBreakDone' | 'CallBeforeAd' | 'CallAfterAd' | 'CallAdBreakTimeout' | 'CallAFVRequest' | 'CallAFVLoad' | 'CallAFVPlaying' | 'CallAFVCompleted' | 'CallAFVError' | 'AdSenseUnitStatusChanged' | 'OpenGame' | 'PlayGame' | 'CloseGame' | 'LevelFinished' | 'LevelUpgrade' | 'GamePlayEnded' | 'GameFCP' | 'GameLCP' | 'GameTTFB';
|
|
1
|
+
export type TrackEvent = 'jsSdkBegin' | 'onBeforeExit' | 'bootstrapModuleBeginToLoad' | 'bootstrapModuleLoaded' | 'implModuleBeginToLoad' | 'implModuleLoaded' | 'onDocumentReady' | 'joliboxServiceReady' | 'apiInvoked' | 'joliboxSpeedAnalysis' | 'joliboxNetRequestResult' | 'globalJsError' | 'RecommendedGuide' | 'GameItem' | 'loadFinished' | 'unlock_popup_show' | 'coinorder_show' | 'coinorder_click' | 'ad_unlock_click' | 'coin_unlock_click' | 'order_pay_ensure' | 'order_pay_result' | 'mmp_ad_impression' | 'LoginGuideModal' | 'gem_unlock_popup_show' | 'gem_unlock_click' | 'gem_ad_unlock_click' | 'gem_order_show' | 'gem_order_click' | 'gem_pay_ensure' | 'gem_pay_result' | 'gem_ad_unlock_click' | 'GemLoginGuideModal' | 'jolicoin_unlock_success' | 'gem_unlock_success' | 'CallRuntimeLoadFinished' | 'AdBreakJumpOut' | 'AdBreakHide' | 'CallAdsInit' | 'LoadAdsenseCompleted' | 'CallAdConfig' | 'PreventAdsCheating' | 'CallShowAdFn' | 'CallAdBreak' | 'CallAdUnit' | 'CallAdBreakDone' | 'CallBeforeAd' | 'CallAfterAd' | 'CallAdBreakTimeout' | 'CallAFVRequest' | 'CallAFVLoad' | 'CallAFVPlaying' | 'CallAFVCompleted' | 'CallAFVError' | 'AdSenseUnitStatusChanged' | 'OpenGame' | 'OpenGame_2Plus' | 'PlayGame' | 'CloseGame' | 'LevelFinished' | 'LevelUpgrade' | 'GamePlayEnded' | 'GameFCP' | 'GameLCP' | 'GameTTFB';
|
|
2
2
|
export type PerformanceType = 'bootstrapModuleLoaded' | 'implementModuleLoaded' | 'joliboxGameServiceReady';
|
|
3
3
|
export declare const REPORT_SYSTEM_TIMELINE = "ReportSDK.traceSystemTimeline";
|
|
4
4
|
export declare const REPORT_SYSTEM_LOG = "ReportSDK.traceSystem";
|
package/dist/env.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IGemProductInfo, StandardResponse } from '../commands';
|
|
2
|
+
type GemProductInfo = Omit<IGemProductInfo, 'appStoreProductId'>;
|
|
3
|
+
export interface Payment {
|
|
4
|
+
purchaseGem: (params: {
|
|
5
|
+
productId: string;
|
|
6
|
+
}) => Promise<StandardResponse<{
|
|
7
|
+
totalAmount: string;
|
|
8
|
+
} | void, unknown>>;
|
|
9
|
+
getGemProducts: () => Promise<StandardResponse<{
|
|
10
|
+
products: GemProductInfo[];
|
|
11
|
+
} | void, unknown>>;
|
|
12
|
+
}
|
|
13
|
+
export {};
|