@jolibox/types 1.4.3 → 1.4.7

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.
@@ -5,6 +5,7 @@ export declare const GET_SUBSCRIPTION_PLANS = "PaymentSDK.getSubscriptionPlans";
5
5
  export declare const SUBSCRIBE = "PaymentSDK.subscribe";
6
6
  export declare const SUBSCRIBE_SPIN = "PaymentSDK.subscribeSpin";
7
7
  export declare const FLUSH_SUB_INFO_CACHE = "PaymentSDK.flushSubInfoCache";
8
+ export declare const GET_SPIN_SUBSCRIPTION_PRICE = "PaymentSDK.getSpinSubscriptionPrice";
8
9
  export interface IGemProductInfo {
9
10
  productId: string;
10
11
  totalAmountStr: string;
@@ -54,6 +55,13 @@ export interface ISubscriptionTierData {
54
55
  purchaseUrl?: string;
55
56
  benefitText?: string[];
56
57
  }
58
+ export interface ISpinSubscriptionPriceData {
59
+ basePlanId: string;
60
+ productId: string;
61
+ formattedPrice: string;
62
+ originalPrice?: string;
63
+ trialDay: number;
64
+ }
57
65
  export interface PaymentCommandParams {
58
66
  [PURCHASE_GEM_IN_APP]: (params: {
59
67
  productId: string;
@@ -81,5 +89,10 @@ export interface PaymentCommandParams {
81
89
  errMsg: string;
82
90
  } | void, unknown>>;
83
91
  [FLUSH_SUB_INFO_CACHE]: () => Promise<StandardResponse<void, unknown>>;
92
+ [GET_SPIN_SUBSCRIPTION_PRICE]: (params: {
93
+ appStoreProductId: string;
94
+ }) => Promise<StandardResponse<{
95
+ plans: ISpinSubscriptionPriceData[];
96
+ } | void, unknown>>;
84
97
  }
85
98
  export type PaymentCommandType = keyof PaymentCommandParams;
@@ -1,4 +1,4 @@
1
- import { IGemProductInfo, ISubscriptionTierData, StandardResponse } from '../commands';
1
+ import { IGemProductInfo, ISpinSubscriptionPriceData, ISubscriptionTierData, StandardResponse } from '../commands';
2
2
  type GemProductInfo = Omit<IGemProductInfo, 'appStoreProductId'>;
3
3
  export interface Payment {
4
4
  purchaseGem: (params: {
@@ -18,5 +18,10 @@ export interface Payment {
18
18
  subPlanId: string;
19
19
  errMsg: string;
20
20
  } | void, unknown>>;
21
+ getSpinSubscriptionPrice?: (params: {
22
+ appStoreProductId: string;
23
+ }) => Promise<StandardResponse<{
24
+ plans: ISpinSubscriptionPriceData[];
25
+ } | void, unknown>>;
21
26
  }
22
27
  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.4.3",
4
+ "version": "1.4.7",
5
5
  "typings": "dist/index.d.ts",
6
6
  "license": "MIT",
7
7
  "files": [