@paypay/mini-app-js-sdk 2.40.0 → 2.46.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 +0 -5
- package/dist/client/clientUtils.d.ts +1 -0
- package/dist/client/index.d.ts +11 -6
- package/dist/core/coreFunctions/fetchCoupons.d.ts +4 -0
- package/dist/core/coreFunctions/getLoginUrl.d.ts +4 -0
- package/dist/core/coreFunctions/index.d.ts +17 -7
- package/dist/core/coreFunctions/logEvent.d.ts +4 -0
- package/dist/core/coreFunctions/markAsReady.d.ts +4 -0
- package/dist/core/coreFunctions/middlewares/initRequired.d.ts +2 -0
- package/dist/core/coreFunctions/middlewares/loginRequired.d.ts +2 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/environment-variables.d.ts +0 -1
- package/dist/jsbridge-core/jsbridge.d.ts +4 -5
- package/dist/mini-app-api.d.ts +4 -4
- package/dist/mini-app-js-sdk.browser.js +2 -2
- package/dist/mini-app-js-sdk.es.js +555 -1069
- package/dist/model/bridge/getPlatformInformation.d.ts +1 -1
- package/dist/model/bridge/renderPayButton.d.ts +0 -6
- package/dist/model/miniAppError.d.ts +2 -5
- package/dist/resources/locales/topup/index.d.ts +2 -0
- package/dist/resources/locales/topup/ja.d.ts +1 -0
- package/dist/types/checkPaymentMethod.d.ts +1 -1
- package/dist/types/getKycInformation.d.ts +3 -3
- package/dist/types/getKycPassportInfo.d.ts +2 -2
- package/dist/types/getPlatformInformation.d.ts +0 -1
- package/dist/types/init.d.ts +2 -1
- package/dist/types/makePayment.d.ts +419 -0
- package/dist/types/topup.d.ts +1 -1
- package/dist/types.d.ts +8 -2
- package/dist/utils/analytics.d.ts +1 -0
- package/dist/utils/api.d.ts +0 -1
- package/dist/utils/helper.d.ts +2 -2
- package/dist/utils/minimumAppVersion.d.ts +0 -5
- package/dist/utils/minimumJSSDKVersion.d.ts +1 -0
- package/dist/utils/windowBridge.d.ts +24 -3
- package/dist/views/coupon/components/CouponAction/index.d.ts +25 -5
- package/dist/views/coupon/index.d.ts +25 -5
- package/dist/views/registerPaymentFeatures/types.d.ts +1 -1
- package/package.json +54 -66
- package/dist/composition-api/useShowUpdateWarningKycPassport.d.ts +0 -4
- package/dist/model/makePayment.d.ts +0 -428
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { NativeParams } from '../../jsbridge-core/jsbridge';
|
|
2
2
|
import { GetPlatformInformationResult } from '../../types/getPlatformInformation';
|
|
3
|
-
export declare function getPlatformInformation(params: NativeParams<GetPlatformInformationResult>):
|
|
3
|
+
export declare function getPlatformInformation(params: NativeParams<GetPlatformInformationResult>): void;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { RenderSmartButtonParams, SmartButtonParam } from '../../types';
|
|
2
2
|
export declare function getRenderPayInfo(params: RenderSmartButtonParams): Promise<{
|
|
3
|
-
renderParams: RenderSmartButtonParams;
|
|
4
|
-
data: SmartButtonParam;
|
|
5
|
-
preferredLanguage: string;
|
|
6
|
-
isLoggedIn?: undefined;
|
|
7
|
-
isJustLoggedIn?: undefined;
|
|
8
|
-
} | {
|
|
9
3
|
renderParams: RenderSmartButtonParams;
|
|
10
4
|
data: SmartButtonParam;
|
|
11
5
|
isLoggedIn: boolean;
|
|
@@ -67,9 +67,6 @@ export declare enum MiniAppErrorType {
|
|
|
67
67
|
unexpectedOperation = "UNEXPECTED_OP",
|
|
68
68
|
merchantTimeout = "MERCHANT_TIMEOUT",
|
|
69
69
|
rateLimitExceeded = "RATE_LIMIT_EXCEEDED",
|
|
70
|
-
sdkUpgradeRequired = "SDK_UPGRADE_REQUIRED"
|
|
71
|
-
|
|
72
|
-
export declare class MiniAppError extends Error {
|
|
73
|
-
constructor(type: MiniAppErrorType);
|
|
74
|
-
toString(): string;
|
|
70
|
+
sdkUpgradeRequired = "SDK_UPGRADE_REQUIRED",
|
|
71
|
+
authorizationNeeded = "AUTHORIZATION_NEEDED"
|
|
75
72
|
}
|
|
@@ -5,6 +5,7 @@ declare const _default: {
|
|
|
5
5
|
charge: string;
|
|
6
6
|
minAmount: string;
|
|
7
7
|
maxAmount: string;
|
|
8
|
+
maxErrorWithAmount: string;
|
|
8
9
|
moneyLabel: string;
|
|
9
10
|
noMethod: string;
|
|
10
11
|
loading: string;
|
|
@@ -57,6 +58,7 @@ declare const _default: {
|
|
|
57
58
|
charge: string;
|
|
58
59
|
minAmount: string;
|
|
59
60
|
maxAmount: string;
|
|
61
|
+
maxErrorWithAmount: string;
|
|
60
62
|
moneyLabel: string;
|
|
61
63
|
noMethod: string;
|
|
62
64
|
loading: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NativeParams } from '../jsbridge-core/jsbridge';
|
|
2
|
-
import { PaymentMethodNameType } from '../
|
|
2
|
+
import { PaymentMethodNameType } from '../types/makePayment';
|
|
3
3
|
export declare const AvailableCheckPaymentMethod: {
|
|
4
4
|
readonly acquiring: "ACQUIRING";
|
|
5
5
|
readonly topup: "TOPUP";
|
|
@@ -40,11 +40,11 @@ export interface KycData {
|
|
|
40
40
|
job?: string;
|
|
41
41
|
}
|
|
42
42
|
export declare type GetKycInformationResult = {
|
|
43
|
-
status: KycStatusType
|
|
43
|
+
status: KycStatusType;
|
|
44
44
|
kycAt?: string;
|
|
45
45
|
kycInfo?: KycData;
|
|
46
|
-
type?: KycMethodType
|
|
47
|
-
eKycDocuments?: EKycDocumentType
|
|
46
|
+
type?: KycMethodType;
|
|
47
|
+
eKycDocuments?: EKycDocumentType;
|
|
48
48
|
ngReason?: string;
|
|
49
49
|
jws: string;
|
|
50
50
|
};
|
|
@@ -13,8 +13,8 @@ export declare type GetKycPassportInfoResult = {
|
|
|
13
13
|
status: 'COMPLETED';
|
|
14
14
|
kycAt: string;
|
|
15
15
|
kycInfo: KycData;
|
|
16
|
-
type: KycMethodType
|
|
17
|
-
eKycDocuments: EKycDocumentType
|
|
16
|
+
type: KycMethodType;
|
|
17
|
+
eKycDocuments: EKycDocumentType;
|
|
18
18
|
jws: string;
|
|
19
19
|
possessionAuthResult: 'SUCCESS';
|
|
20
20
|
nonce: string;
|
package/dist/types/init.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare const PPEnv: {
|
|
|
31
31
|
};
|
|
32
32
|
export declare type PPEnvType = (typeof PPEnv)[keyof typeof PPEnv];
|
|
33
33
|
export declare type InitResult = {
|
|
34
|
-
statusCode: InitStatusCodeType
|
|
34
|
+
statusCode: InitStatusCodeType;
|
|
35
35
|
};
|
|
36
36
|
export declare const InitStatusCode: {
|
|
37
37
|
readonly initialized: "INITIALIZED";
|
|
@@ -39,5 +39,6 @@ export declare const InitStatusCode: {
|
|
|
39
39
|
readonly tokenExpired: "TOKEN_EXPIRED";
|
|
40
40
|
readonly sdkNotInitialized: "SDK_NOT_INITIALIZED";
|
|
41
41
|
readonly tokenNotFound: "TOKEN_NOT_FOUND";
|
|
42
|
+
readonly authorizationNeeded: "AUTHORIZATION_NEEDED";
|
|
42
43
|
};
|
|
43
44
|
export declare type InitStatusCodeType = (typeof InitStatusCode)[keyof typeof InitStatusCode];
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { NativeParams } from '../jsbridge-core/jsbridge';
|
|
2
2
|
import { Address } from '../types/getUserAddress';
|
|
3
|
+
import { UIComponentsError } from '../model/uiComponents';
|
|
4
|
+
import { MiniAppErrorType } from '../model/miniAppError';
|
|
3
5
|
export declare const Order: {
|
|
4
6
|
readonly ACQUIRING: "ACQUIRING";
|
|
5
7
|
readonly REMITTANCE: "REMITTANCE";
|
|
@@ -53,3 +55,420 @@ export declare const PaymentConsultResultCode: {
|
|
|
53
55
|
EKYC_REQUIRED: string;
|
|
54
56
|
INSUFFICIENT_BALANCE_AND_NO_AVAILABLE_TOPUP_METHOD: string;
|
|
55
57
|
};
|
|
58
|
+
export declare type PaymentQuery = {
|
|
59
|
+
merchant?: string;
|
|
60
|
+
agreeSimilarTransaction: boolean;
|
|
61
|
+
};
|
|
62
|
+
export interface PaymentBody {
|
|
63
|
+
merchantPaymentId: string;
|
|
64
|
+
amount: Amount;
|
|
65
|
+
orderReceiptNumber?: string;
|
|
66
|
+
orderDescription?: string;
|
|
67
|
+
orderItems?: Array<OrderItem>;
|
|
68
|
+
metaData?: unknown;
|
|
69
|
+
storeId?: string;
|
|
70
|
+
paymentMethodId: string;
|
|
71
|
+
terminalId?: number | string;
|
|
72
|
+
merchantAlias?: string;
|
|
73
|
+
requestedAt?: number;
|
|
74
|
+
productType?: string;
|
|
75
|
+
storeInfo?: string;
|
|
76
|
+
metadata?: unknown;
|
|
77
|
+
expiresAt?: number;
|
|
78
|
+
merchant?: string;
|
|
79
|
+
}
|
|
80
|
+
export declare type Balance = {
|
|
81
|
+
balance: number;
|
|
82
|
+
currency: 'JPY';
|
|
83
|
+
usable: boolean;
|
|
84
|
+
};
|
|
85
|
+
export declare const PaymentMethodName: {
|
|
86
|
+
readonly WALLET: "WALLET";
|
|
87
|
+
readonly CREDIT_CARD: "CREDIT_CARD";
|
|
88
|
+
readonly BANK: "BANK";
|
|
89
|
+
readonly YMONEY_BANK: "YMONEY_BANK";
|
|
90
|
+
readonly SBID_CARRIER_BILLING: "SBID_CARRIER_BILLING";
|
|
91
|
+
readonly PAY_LATER: "PAY_LATER";
|
|
92
|
+
readonly PAY_LATER_CC: "PAY_LATER_CC";
|
|
93
|
+
};
|
|
94
|
+
export declare type PaymentMethodNameType = (typeof PaymentMethodName)[keyof typeof PaymentMethodName];
|
|
95
|
+
declare type GlobalLimitInfo = {
|
|
96
|
+
topup?: {
|
|
97
|
+
min: number;
|
|
98
|
+
max: number;
|
|
99
|
+
formattedMax: string;
|
|
100
|
+
formattedMin: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
declare type MethodBase = {
|
|
104
|
+
paymentMethodId: string;
|
|
105
|
+
paymentMethodType: PaymentMethodNameType;
|
|
106
|
+
descriptionBannerInfo?: BannerInfo;
|
|
107
|
+
walletInfo?: unknown;
|
|
108
|
+
creditCardInfo?: unknown;
|
|
109
|
+
bankInfo?: unknown;
|
|
110
|
+
sbidCarrierBillingInfo?: unknown;
|
|
111
|
+
payLaterCcInfo?: unknown;
|
|
112
|
+
paymentMethodDescriptionInfo?: {
|
|
113
|
+
statusDescription: DescriptionInfo | null;
|
|
114
|
+
additionalDescription: DescriptionInfo | null;
|
|
115
|
+
detailDescription: DescriptionInfo | null;
|
|
116
|
+
label?: DescriptionInfo | null;
|
|
117
|
+
amountInfo?: {
|
|
118
|
+
label: string;
|
|
119
|
+
amount: number;
|
|
120
|
+
currency: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
feeInfo?: TopupFeeInfo;
|
|
124
|
+
globalLimitInfo?: GlobalLimitInfo;
|
|
125
|
+
};
|
|
126
|
+
export declare type DescriptionInfo = {
|
|
127
|
+
text: string;
|
|
128
|
+
linkUrl?: string;
|
|
129
|
+
headerIcon?: string;
|
|
130
|
+
isBold: boolean;
|
|
131
|
+
color: string;
|
|
132
|
+
backgroundColor?: string;
|
|
133
|
+
};
|
|
134
|
+
export declare type BannerInfo = {
|
|
135
|
+
label?: string;
|
|
136
|
+
title?: string;
|
|
137
|
+
iconImageUrl?: string;
|
|
138
|
+
displayResponse?: UIComponentsError;
|
|
139
|
+
};
|
|
140
|
+
export declare type WalletMethod = MethodBase & {
|
|
141
|
+
paymentMethodType: 'WALLET';
|
|
142
|
+
walletInfo?: {
|
|
143
|
+
cashBackBalanceInfo?: Balance;
|
|
144
|
+
cashBackExpirableBalanceInfo?: Balance;
|
|
145
|
+
emoneyBalanceInfo?: Balance;
|
|
146
|
+
prepaidBalanceInfo?: Balance;
|
|
147
|
+
isPreTransactionAutoChargeEnabled?: boolean;
|
|
148
|
+
walletSummary?: {
|
|
149
|
+
totalBalanceInfo: Balance;
|
|
150
|
+
payoutableBalanceInfo: Balance;
|
|
151
|
+
transferableBalanceInfo: Balance;
|
|
152
|
+
};
|
|
153
|
+
walletDetail?: {
|
|
154
|
+
emoneyBalanceInfo?: Balance;
|
|
155
|
+
totalEmoneyBalanceInfo?: Balance;
|
|
156
|
+
prepaidBalanceInfo?: Balance;
|
|
157
|
+
cashBackBalanceInfo?: Balance;
|
|
158
|
+
cashBackExpirableBalanceInfo?: Balance;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
export declare enum CreditTypes {
|
|
163
|
+
VISA = "VISA",
|
|
164
|
+
MASTER = "MASTER",
|
|
165
|
+
JCB = "JCB",
|
|
166
|
+
DINERS = "D",
|
|
167
|
+
AMEX = "A",
|
|
168
|
+
OTHER = "O"
|
|
169
|
+
}
|
|
170
|
+
export declare enum PaymentMethodStatus {
|
|
171
|
+
ACTIVATED = "ACTIVATED",
|
|
172
|
+
OFF = "OFF",
|
|
173
|
+
APPLYING = "APPLYING",
|
|
174
|
+
MAINTENANCE = "MAINTENANCE",
|
|
175
|
+
BUSY = "BUSY",
|
|
176
|
+
SUSPENDED = "SUSPENDED"
|
|
177
|
+
}
|
|
178
|
+
export declare enum PayPayCardType {
|
|
179
|
+
GOLD = "GOLD",
|
|
180
|
+
REGULAR = "REGULAR"
|
|
181
|
+
}
|
|
182
|
+
export declare type CreditCardInfo = {
|
|
183
|
+
brand?: CreditTypes;
|
|
184
|
+
isAuthenticated?: boolean;
|
|
185
|
+
isExpired?: boolean;
|
|
186
|
+
isYjCard?: boolean;
|
|
187
|
+
last4digits?: string;
|
|
188
|
+
ccType?: string;
|
|
189
|
+
paymentMethodStatus?: PaymentMethodStatus;
|
|
190
|
+
preTransactionAutoChargeSupported?: boolean;
|
|
191
|
+
paymentMethodStatusLabel?: string;
|
|
192
|
+
};
|
|
193
|
+
export declare type CreditMethod = MethodBase & {
|
|
194
|
+
paymentMethodType: 'CREDIT_CARD';
|
|
195
|
+
creditCardInfo?: CreditCardInfo;
|
|
196
|
+
};
|
|
197
|
+
export declare enum bankCode {
|
|
198
|
+
MIZUHO_BANK_CODE = "0001",
|
|
199
|
+
MUFJ_BANK_CODE = "0005",
|
|
200
|
+
SMBC_BANK_CODE = "0009",
|
|
201
|
+
RESONA_BANK_CODE = "0010",
|
|
202
|
+
S_RESONA_BANK_CODE = "0017",
|
|
203
|
+
JNB_BANK_CODE = "0033",
|
|
204
|
+
YUCHO_BANK_CODE = "9900",
|
|
205
|
+
AEON_BANK_CODE = "0040",
|
|
206
|
+
JIBUN_BANK_CODE = "0039",
|
|
207
|
+
SBI_BANK_CODE = "0038"
|
|
208
|
+
}
|
|
209
|
+
export declare const status: Readonly<{
|
|
210
|
+
ACTIVATED: string;
|
|
211
|
+
OFF: string;
|
|
212
|
+
APPLYING: string;
|
|
213
|
+
MAINTENANCE: string;
|
|
214
|
+
BUSY: string;
|
|
215
|
+
SUSPENDED: string;
|
|
216
|
+
}>;
|
|
217
|
+
export declare type BankInfo = {
|
|
218
|
+
paymentMethodStatusLabel?: string;
|
|
219
|
+
paymentMethodStatus?: PaymentMethodStatus;
|
|
220
|
+
bankName?: string;
|
|
221
|
+
bankLogoUrl?: string;
|
|
222
|
+
bankCode?: string;
|
|
223
|
+
bankCardImage?: {
|
|
224
|
+
cardUrl: string;
|
|
225
|
+
textColor: string;
|
|
226
|
+
uiColor: string;
|
|
227
|
+
};
|
|
228
|
+
bankBranchName?: string;
|
|
229
|
+
bankBranchCode?: string;
|
|
230
|
+
bankAccountType?: string;
|
|
231
|
+
bankAccountNumberLast2digits?: string;
|
|
232
|
+
preTransactionAutoChargeSupported?: boolean;
|
|
233
|
+
showAmount?: boolean;
|
|
234
|
+
};
|
|
235
|
+
export declare type BankMethod = MethodBase & {
|
|
236
|
+
paymentMethodType: 'BANK' | 'YMONEY_BANK';
|
|
237
|
+
bankInfo?: BankInfo;
|
|
238
|
+
};
|
|
239
|
+
export declare type SbidBankMethod = MethodBase & {
|
|
240
|
+
paymentMethodType: 'SBID_CARRIER_BILLING';
|
|
241
|
+
sbidCarrierBillingInfo?: SbidBankInfo;
|
|
242
|
+
};
|
|
243
|
+
export declare type SbidBankInfo = {
|
|
244
|
+
paymentMethodStatus?: PaymentMethodStatus;
|
|
245
|
+
paymentMethodStatusLabel?: string;
|
|
246
|
+
};
|
|
247
|
+
declare type PayLaterCCMethodAdditionalInfo = {
|
|
248
|
+
showCardDetails?: boolean;
|
|
249
|
+
};
|
|
250
|
+
export declare type PayLaterCCMethod = MethodBase & PayLaterCCMethodAdditionalInfo & {
|
|
251
|
+
paymentMethodType: 'PAY_LATER_CC';
|
|
252
|
+
payLaterCcInfo?: PayLaterCCInfo;
|
|
253
|
+
};
|
|
254
|
+
export declare type PayLaterCCInfo = {
|
|
255
|
+
cardName?: string;
|
|
256
|
+
last4digits?: string;
|
|
257
|
+
linkedCardBrand?: Exclude<CreditTypes, CreditTypes.AMEX | CreditTypes.DINERS | CreditTypes.OTHER>;
|
|
258
|
+
linkedCardType?: PayPayCardType;
|
|
259
|
+
availableAmount?: number;
|
|
260
|
+
paymentMethodStatus?: PaymentMethodStatus;
|
|
261
|
+
paymentMethodStatusLabel?: string;
|
|
262
|
+
};
|
|
263
|
+
declare type PayLaterMethod = MethodBase & {
|
|
264
|
+
paymentMethodType: 'PAY_LATER';
|
|
265
|
+
};
|
|
266
|
+
export declare type ResponseBase = {
|
|
267
|
+
status: number;
|
|
268
|
+
signed: {
|
|
269
|
+
jws?: string;
|
|
270
|
+
};
|
|
271
|
+
uiComponents?: {
|
|
272
|
+
displayErrorResponse: UIComponentsError;
|
|
273
|
+
};
|
|
274
|
+
unsigned: {
|
|
275
|
+
resultInfo: {
|
|
276
|
+
code: MiniAppErrorType;
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
export declare type PaymentMethod = WalletMethod | CreditMethod | BankMethod | SbidBankMethod | PayLaterCCMethod | PayLaterMethod;
|
|
281
|
+
export declare type TopupFeeInfo = {
|
|
282
|
+
feePercentage?: number;
|
|
283
|
+
label: string;
|
|
284
|
+
zeroFeeText?: string;
|
|
285
|
+
};
|
|
286
|
+
declare type PaymentMethodPreference = {
|
|
287
|
+
preTransactionAutoChargeEnabled: boolean;
|
|
288
|
+
prioritizedPaymentMethodsEnabled: boolean;
|
|
289
|
+
};
|
|
290
|
+
declare type OverdraftBalanceInfo = {
|
|
291
|
+
balance: number;
|
|
292
|
+
currency: string;
|
|
293
|
+
};
|
|
294
|
+
export declare type InfoBanner = {
|
|
295
|
+
text: string;
|
|
296
|
+
additionalText: string;
|
|
297
|
+
link: string;
|
|
298
|
+
linkText: string;
|
|
299
|
+
type: string;
|
|
300
|
+
};
|
|
301
|
+
export declare type GetPaymentMethodsResponse = ResponseBase & {
|
|
302
|
+
unsigned: {
|
|
303
|
+
data: {
|
|
304
|
+
payload: {
|
|
305
|
+
paymentMethodList: PaymentMethod[];
|
|
306
|
+
appealDescription: AppealDescription | null;
|
|
307
|
+
paymentMethodPreference: PaymentMethodPreference | null;
|
|
308
|
+
overdraftBalanceInfo?: OverdraftBalanceInfo;
|
|
309
|
+
infoBannerList?: InfoBanner[];
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
export declare type PaymentResult = {
|
|
315
|
+
requestedAt: number;
|
|
316
|
+
storeId: string;
|
|
317
|
+
amount: Amount;
|
|
318
|
+
statusLabelString: string;
|
|
319
|
+
statusLabelColor: string;
|
|
320
|
+
userAuthorizationId: string;
|
|
321
|
+
acceptedAt: number;
|
|
322
|
+
merchantName: string;
|
|
323
|
+
orderDescription: string;
|
|
324
|
+
status: 'COMPLETED' | 'AUTHORIZED';
|
|
325
|
+
paymentId: string;
|
|
326
|
+
expiresAt: number;
|
|
327
|
+
};
|
|
328
|
+
export declare type MakePaymentResponse = ResponseBase & {
|
|
329
|
+
signed: {
|
|
330
|
+
jws: string;
|
|
331
|
+
};
|
|
332
|
+
unsigned: {
|
|
333
|
+
data: PaymentResult;
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
export declare type AppealDescription = {
|
|
337
|
+
backgroundColor?: string;
|
|
338
|
+
color: string;
|
|
339
|
+
headerIcon?: string | null;
|
|
340
|
+
isBold: boolean;
|
|
341
|
+
linkUrl?: string;
|
|
342
|
+
text: string;
|
|
343
|
+
};
|
|
344
|
+
export declare type InsufficientBalanceInfo = {
|
|
345
|
+
appealDescription: AppealDescription;
|
|
346
|
+
insufficientAmount: number;
|
|
347
|
+
paymentMethodList: PaymentMethod[];
|
|
348
|
+
prepaidOnly: boolean | null;
|
|
349
|
+
recommendedTopupAmount: number;
|
|
350
|
+
totalBalanceInfo: {
|
|
351
|
+
balance: number;
|
|
352
|
+
currency: 'JPY';
|
|
353
|
+
};
|
|
354
|
+
overdraftBalanceInfo?: OverdraftBalanceInfo;
|
|
355
|
+
infoBannerList?: InfoBanner[];
|
|
356
|
+
};
|
|
357
|
+
export declare type ConsultError = {
|
|
358
|
+
backendResultCode: string;
|
|
359
|
+
displayErrorResponse?: UIComponentsError;
|
|
360
|
+
insufficientAmount: number;
|
|
361
|
+
insufficientBalanceInfo: InsufficientBalanceInfo;
|
|
362
|
+
paymentMethodList: PaymentMethod[];
|
|
363
|
+
recommendedTopupAmount: number;
|
|
364
|
+
};
|
|
365
|
+
export declare type ConsultResponse = ResponseBase & {
|
|
366
|
+
unsigned: {
|
|
367
|
+
resultInfo: unknown;
|
|
368
|
+
data: {
|
|
369
|
+
error?: ConsultError;
|
|
370
|
+
header: {
|
|
371
|
+
resultCode: string;
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
export declare type PaymentObject = {
|
|
377
|
+
methodId: string;
|
|
378
|
+
methodType: string;
|
|
379
|
+
amount: number;
|
|
380
|
+
currency: string;
|
|
381
|
+
};
|
|
382
|
+
interface CashBackDetailHelpLink {
|
|
383
|
+
label: string;
|
|
384
|
+
url: string;
|
|
385
|
+
googleAnalyticsInfo: unknown;
|
|
386
|
+
}
|
|
387
|
+
interface CashBackDetailItem {
|
|
388
|
+
campaignId: string;
|
|
389
|
+
bannerId: string | null;
|
|
390
|
+
campaignName: string;
|
|
391
|
+
campaignNameColor: string;
|
|
392
|
+
optionalText: string | null;
|
|
393
|
+
optionalTextColor: string | null;
|
|
394
|
+
amountText: string;
|
|
395
|
+
amountTextColor: string;
|
|
396
|
+
couponIdText: string | null;
|
|
397
|
+
couponIdTextColor: string | null;
|
|
398
|
+
status: string;
|
|
399
|
+
isMeti: boolean;
|
|
400
|
+
deeplinkUrl: string | null;
|
|
401
|
+
googleAnalyticsInfo: unknown;
|
|
402
|
+
}
|
|
403
|
+
interface CouponCashbackDetail {
|
|
404
|
+
title: string;
|
|
405
|
+
iconImageUrl: string;
|
|
406
|
+
cashBackDetailLinkLabel: string;
|
|
407
|
+
cashBackDetailLinkTarget: string;
|
|
408
|
+
googleAnalyticsInfo: unknown;
|
|
409
|
+
}
|
|
410
|
+
interface CashBackDetail {
|
|
411
|
+
cashBackDetailListDescription: string | null;
|
|
412
|
+
cashBackDetailHelpLink: CashBackDetailHelpLink | null;
|
|
413
|
+
cashBackDetailList: Array<CashBackDetailItem>;
|
|
414
|
+
googleAnalyticsInfo: unknown;
|
|
415
|
+
}
|
|
416
|
+
export interface CashBackComponent {
|
|
417
|
+
cashBackAmount: number;
|
|
418
|
+
currencyText: string;
|
|
419
|
+
cashBackAmountText: string | null;
|
|
420
|
+
cashBackDescription: string;
|
|
421
|
+
animationUrl: string;
|
|
422
|
+
optionalText: string | null;
|
|
423
|
+
cashBackDetailLinkLabel: string;
|
|
424
|
+
couponCashbackDetail: CouponCashbackDetail;
|
|
425
|
+
cashBackDetail: CashBackDetail;
|
|
426
|
+
}
|
|
427
|
+
export interface AnimationCard {
|
|
428
|
+
cardId: string;
|
|
429
|
+
campaignId: string | null;
|
|
430
|
+
cardType: string;
|
|
431
|
+
animationUrl: string;
|
|
432
|
+
amount: number | null;
|
|
433
|
+
soundUrl: string | null;
|
|
434
|
+
duration: number | null;
|
|
435
|
+
title: string | null;
|
|
436
|
+
description: string | null;
|
|
437
|
+
showAgeConfirmFlag?: boolean | null;
|
|
438
|
+
backgroundColor: string | null;
|
|
439
|
+
}
|
|
440
|
+
export interface StackAnimationCardInfo {
|
|
441
|
+
totalAnimationCards: number;
|
|
442
|
+
animationCardList: Array<AnimationCard>;
|
|
443
|
+
}
|
|
444
|
+
export interface CashBackDetailResponsePayload {
|
|
445
|
+
cashBackComponent: CashBackComponent;
|
|
446
|
+
stackAnimationCardInfo: StackAnimationCardInfo | null;
|
|
447
|
+
cashBackDescriptionForShareLink: string;
|
|
448
|
+
}
|
|
449
|
+
export declare type CashBackDetailResponse = ResponseBase & {
|
|
450
|
+
unsigned: {
|
|
451
|
+
data: {
|
|
452
|
+
payload: CashBackDetailResponsePayload;
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
export declare type SendAgePayload = {
|
|
457
|
+
month: number;
|
|
458
|
+
orderId: string;
|
|
459
|
+
year: number;
|
|
460
|
+
orderType: 'ACQUIRING';
|
|
461
|
+
amount: number;
|
|
462
|
+
date: number;
|
|
463
|
+
campaignId: string;
|
|
464
|
+
};
|
|
465
|
+
export declare type SendAgeResponse = ResponseBase & {
|
|
466
|
+
unsigned: {
|
|
467
|
+
data: {
|
|
468
|
+
payload: {
|
|
469
|
+
isEligibleForCashBack: boolean;
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
export {};
|
package/dist/types/topup.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NativeParams } from '../jsbridge-core/jsbridge';
|
|
2
2
|
import { MiniAppErrorResultType } from '../types';
|
|
3
|
-
import { PaymentMethodNameType } from '../
|
|
3
|
+
import { PaymentMethodNameType } from '../types/makePayment';
|
|
4
4
|
export interface TopupParams extends NativeParams<TopupResult, MiniAppErrorResultType & {
|
|
5
5
|
jws?: string;
|
|
6
6
|
}> {
|
package/dist/types.d.ts
CHANGED
|
@@ -286,7 +286,8 @@ export declare enum PpLocalStorageKey {
|
|
|
286
286
|
debugMode = "ppjssdk.debugMode",
|
|
287
287
|
claimCouponImmediately = "ppjssdk.claimCouponImmediately",
|
|
288
288
|
merchant = "ppjssdk.merchant",
|
|
289
|
-
consumedOTT = "ppjssdk.consumedOTT"
|
|
289
|
+
consumedOTT = "ppjssdk.consumedOTT",
|
|
290
|
+
initializedAt = "ppjssdk.initializedAt"
|
|
290
291
|
}
|
|
291
292
|
export declare enum RenderType {
|
|
292
293
|
COVER = "cover",
|
|
@@ -488,7 +489,12 @@ export interface PayPayCallStackParamsType {
|
|
|
488
489
|
complete?: () => void;
|
|
489
490
|
[index: string]: unknown;
|
|
490
491
|
}
|
|
491
|
-
|
|
492
|
+
declare type PromiseResolve<T> = (value?: T | PromiseLike<T>) => void;
|
|
493
|
+
export declare type PayPayCallStackType = Array<[
|
|
494
|
+
string,
|
|
495
|
+
PayPayCallStackParamsType,
|
|
496
|
+
PromiseResolve<unknown>
|
|
497
|
+
]>;
|
|
492
498
|
declare global {
|
|
493
499
|
interface Window {
|
|
494
500
|
_ppcs?: PayPayCallStackType;
|
package/dist/utils/api.d.ts
CHANGED
|
@@ -328,5 +328,4 @@ export declare function getUserLocationRequest(params: {
|
|
|
328
328
|
validTimeMinutes: number;
|
|
329
329
|
}): Promise<import("./fetch").PPFetchResult<UserLocationResponse, Record<string, unknown>>>;
|
|
330
330
|
export declare function getExpectedCashbackInfo(orderInfo: SmartPayParams): Promise<import("./fetch").PPFetchResult<CashbackResponse, Record<string, unknown>>>;
|
|
331
|
-
export declare function isValidUrl(urlChallenge: string): boolean;
|
|
332
331
|
export {};
|
package/dist/utils/helper.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { MiniAppErrorType } from '../model/miniAppError';
|
|
2
|
-
import { BankInfo, CreditCardInfo, SbidBankInfo, PayLaterCCInfo, PaymentMethod, InfoBanner } from '../model/makePayment';
|
|
3
2
|
import { UIComponentsErrorButton } from '../model/uiComponents';
|
|
4
3
|
import { ErrorSheetButton, PaymentLabelType, SmartPayParams } from '../types';
|
|
5
4
|
import { FontSize } from '../types/getPlatformInformation';
|
|
6
5
|
import { NativeParams } from '../jsbridge-core/jsbridge';
|
|
7
6
|
import { App } from 'vue';
|
|
8
|
-
import { OrderType, MakePaymentParams } from '../types/makePayment';
|
|
7
|
+
import { OrderType, MakePaymentParams, BankInfo, CreditCardInfo, InfoBanner, PayLaterCCInfo, PaymentMethod, SbidBankInfo } from '../types/makePayment';
|
|
9
8
|
export declare function isDef<T>(val: T): val is NonNullable<T>;
|
|
10
9
|
export declare function isFunction(val: unknown): val is () => void;
|
|
11
10
|
export declare function isNumeric(val: string | number): val is string;
|
|
@@ -91,4 +90,5 @@ export declare function checkIfSdkUpgradeNeededForRemittance(orderType?: OrderTy
|
|
|
91
90
|
export declare function isMobileSize(width: number): boolean;
|
|
92
91
|
export declare function isDesktopSize(width: number): boolean;
|
|
93
92
|
export declare function getOverDraftInfoBanner(banners?: Array<InfoBanner>): InfoBanner | undefined;
|
|
93
|
+
export declare function isValidUrl(urlChallenge: string): boolean;
|
|
94
94
|
export {};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
export declare const MinVersion: {
|
|
2
|
-
PRE_TRANSACTION_AUTO_CHARGE: string;
|
|
3
|
-
FALLBACK_PAYMENT_METHOD: string;
|
|
4
|
-
OS_HOME_SCREEN_ICON: string;
|
|
5
|
-
START_MULTIFACTOR_AUTH_ANDROID_FIX: string;
|
|
6
|
-
KYC_PASSPORT: string;
|
|
7
2
|
PERFORMANCE_MEASUREMENT: string;
|
|
8
3
|
START_MULTIFACTOR_AUTH_PIN_FALLBACK: string;
|
|
9
4
|
};
|
|
@@ -1,6 +1,26 @@
|
|
|
1
|
+
declare enum MessageType {
|
|
2
|
+
request = "request",
|
|
3
|
+
response = "response"
|
|
4
|
+
}
|
|
1
5
|
declare type GetTargetWindowFunctionType = () => Promise<Window | undefined | null> | Window | undefined | null;
|
|
2
|
-
|
|
3
|
-
|
|
6
|
+
interface MessageBaseType {
|
|
7
|
+
forWindowBridge: true;
|
|
8
|
+
key: string;
|
|
9
|
+
functionName: string;
|
|
10
|
+
}
|
|
11
|
+
interface PartialMessageRequestType {
|
|
12
|
+
type: MessageType.request;
|
|
13
|
+
params: Array<unknown>;
|
|
14
|
+
}
|
|
15
|
+
export declare type MessageRequestType = MessageBaseType & PartialMessageRequestType;
|
|
16
|
+
export declare type Params = Array<any>;
|
|
17
|
+
export interface FunctionType {
|
|
18
|
+
(...args: Params): unknown;
|
|
19
|
+
middlewares?: Array<Middleware>;
|
|
20
|
+
}
|
|
21
|
+
export declare type FunctionsCollection = Record<string, FunctionType>;
|
|
22
|
+
export declare type NextCallback = (args: Params) => Promise<unknown>;
|
|
23
|
+
export declare type Middleware = (message: MessageEvent<MessageRequestType>, params: Params, next: NextCallback) => unknown;
|
|
4
24
|
export declare type WindowBridgeFunctions<T extends FunctionsCollection> = {
|
|
5
25
|
[K in keyof T]: Parameters<T[K]>[0] extends undefined ? () => Promise<Awaited<ReturnType<T[K]>>> : (params: Parameters<T[K]>[0]) => Promise<Awaited<ReturnType<T[K]>>>;
|
|
6
26
|
};
|
|
@@ -9,6 +29,7 @@ export declare class WindowBridge {
|
|
|
9
29
|
private deferredCallbacks;
|
|
10
30
|
private functions;
|
|
11
31
|
private allowedOrigins?;
|
|
32
|
+
private middlewares;
|
|
12
33
|
private constructor();
|
|
13
34
|
private subscribeToMessageEvent;
|
|
14
35
|
private unsubscribeToMessageEvent;
|
|
@@ -18,7 +39,7 @@ export declare class WindowBridge {
|
|
|
18
39
|
private sendErrorResponse;
|
|
19
40
|
private sendSuccessResponse;
|
|
20
41
|
private sendResponse;
|
|
21
|
-
static init(functions: FunctionsCollection, allowedOrigins?: Array<string>): WindowBridge;
|
|
42
|
+
static init(functions: FunctionsCollection, allowedOrigins?: Array<string>, middlewares?: Array<Middleware>): WindowBridge;
|
|
22
43
|
static destroy(): void;
|
|
23
44
|
static getBridge(): WindowBridge;
|
|
24
45
|
static getTargetWindowFunctionProxy<T extends FunctionsCollection = FunctionsCollection>(getTargetWindow: GetTargetWindowFunctionType, targetWindowOrigin: string): T;
|