@paypay/mini-app-js-sdk 2.19.0 → 2.20.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.
@@ -1,403 +1,2 @@
1
- export declare function getLanguage(): {
2
- smsAuth: {
3
- title: string;
4
- subTitle: string;
5
- subInfo: string;
6
- help: string;
7
- resend1: string;
8
- resendText: string;
9
- questionText: string;
10
- authenticateBtn: string;
11
- invalidOtpError: string;
12
- errorOverLimitTitle: string;
13
- errorOverLimitText: string;
14
- defaultBtnText: string;
15
- errorBtnText: string;
16
- errorResendTitle: string;
17
- errorResendText: string;
18
- defaultErrordesc: string;
19
- errorOverVerifyLimitTitle: string;
20
- errorOverVerifyLimitText: string;
21
- errorExpireTitle: string;
22
- errorExpireText: string;
23
- errorVerifyLimit: string;
24
- errorVerifyText: string;
25
- cancel: string;
26
- close: string;
27
- };
28
- initKycPassport: {
29
- UNACCEPTABLE_OP: {
30
- text: string;
31
- desc: string;
32
- btnText1: string;
33
- btnText2: string;
34
- };
35
- KYC_UPDATE_REQUIRED: {
36
- text: string;
37
- desc: string;
38
- btnText1: string;
39
- btnText2: string;
40
- };
41
- NOT_COMPLETED: {
42
- text: string;
43
- desc: string;
44
- btnText1: string;
45
- btnText2: string;
46
- };
47
- KYC_VALIDATION_IN_PROCESS: {
48
- text: string;
49
- desc: string;
50
- btnText1: string;
51
- btnText2: string;
52
- };
53
- DEFAULT: {
54
- text: string;
55
- desc: string;
56
- btnText1: string;
57
- btnText2: string;
58
- };
59
- updateWarning: {
60
- title: string;
61
- description: string;
62
- update: string;
63
- cancel: string;
64
- };
65
- };
66
- showUpdateWarning: {
67
- closeBtn: string;
68
- notNow: string;
69
- update: string;
70
- title: string;
71
- errorText: string;
72
- desc1: string;
73
- desc2: string;
74
- };
75
- openApp: {
76
- title: string;
77
- body: string;
78
- errorText: string;
79
- openApp: string;
80
- cancel: string;
81
- };
82
- openMap: {
83
- title: string;
84
- errorText: string;
85
- };
86
- payment: {
87
- title: string;
88
- payAmount: string;
89
- payAmountTaxExempt: string;
90
- method: string;
91
- address: string;
92
- insufficientAmount: string;
93
- paying: string;
94
- pay: string;
95
- charge: string;
96
- cancel: string;
97
- noAddress: string;
98
- change: string;
99
- close: string;
100
- noCashBack: string;
101
- };
102
- duplicate: {
103
- header: string;
104
- text1: string;
105
- text2: string;
106
- cancel: string;
107
- agreeButtonText: string;
108
- topHeader: string;
109
- topText1: string;
110
- topText2: string;
111
- topAgreeButtonText: string;
112
- };
113
- birthdayConfirm: {
114
- title: string;
115
- title2: string;
116
- desc: string;
117
- desc1: string;
118
- desc2: string;
119
- desc3: string;
120
- date: string;
121
- primaryBtn: string;
122
- cancelBtn: string;
123
- };
124
- birthdayConfirmError: {
125
- title: string;
126
- title2: string;
127
- desc: string;
128
- desc2: string;
129
- helpBtn: string;
130
- closeBtn: string;
131
- };
132
- cashbackDet: {
133
- button1: string;
134
- button2: string;
135
- button3: string;
136
- };
137
- topContent: {
138
- title: string;
139
- chargeTitle: string;
140
- chargeLabel: string;
141
- loading: string;
142
- unavailable1: string;
143
- unavailable2: string;
144
- amount: string;
145
- return: string;
146
- };
147
- choosePayment: {
148
- title: string;
149
- desc1: string;
150
- desc2: string;
151
- title2: string;
152
- addMethod: string;
153
- noMethod: string;
154
- };
155
- topupCompletion: {
156
- title: string;
157
- idInfo: string;
158
- copied: string;
159
- };
160
- userAddress: {
161
- title: string;
162
- header: string;
163
- tagForm: string;
164
- home: string;
165
- work: string;
166
- billing: string;
167
- footer: string;
168
- titlePre: string;
169
- titleApp: string;
170
- titlePlace: string;
171
- receiverPre: string;
172
- receiverPlace: string;
173
- inputPre: string;
174
- statePre: string;
175
- statePlace: string;
176
- cityPre: string;
177
- cityPlace: string;
178
- street1Pre: string;
179
- streetPlace: string;
180
- street2Pre: string;
181
- street2Place: string;
182
- footerBtn1: string;
183
- footerBtn2: string;
184
- displayTitle: string;
185
- deleteTitle: string;
186
- delete: string;
187
- close: string;
188
- addAddress: string;
189
- address: string;
190
- return: string;
191
- change: string;
192
- noAddress: string;
193
- registerAddress: string;
194
- confirmAddress: string;
195
- returnEdit: string;
196
- selectAddress: string;
197
- selectDeliveryAddress: string;
198
- };
199
- errorSheet: {
200
- title: string;
201
- title1: string;
202
- desc: string;
203
- topup: string;
204
- topupDesc: string;
205
- pay: string;
206
- payDesc: string;
207
- payPeriod: string;
208
- tryAgain: string;
209
- };
210
- paymentMethod: {
211
- expired: string;
212
- ordinary: string;
213
- current: string;
214
- checkGreen: string;
215
- authenticated: string;
216
- yjTitle: string;
217
- ppCardTitle: string;
218
- brand: string;
219
- };
220
- paymentMethodStatus: {
221
- ACTIVATED: string;
222
- OFF: string;
223
- APPLYING: string;
224
- MAINTENANCE: string;
225
- BUSY: string;
226
- SUSPENDED: string;
227
- };
228
- softbank: {
229
- desc: string;
230
- desc1: string;
231
- isDisable: string;
232
- };
233
- registerEmail: {
234
- title: string;
235
- warning: string;
236
- cancelTxt: string;
237
- errorTitleAlreadyRegistered: string;
238
- errorDescriptionAlreadyRegistered: string;
239
- errorTitle: string;
240
- errorDescription: string;
241
- };
242
- smartLogin: {
243
- title: string;
244
- signIn: string;
245
- continueAs: string;
246
- };
247
- smartPay: {
248
- pay: string;
249
- paypay: string;
250
- cashback: string;
251
- };
252
- cashbackList: {
253
- close: string;
254
- condition: string;
255
- };
256
- desktopTitle: {
257
- Payment: string;
258
- addNewAddress: string;
259
- editAddress: string;
260
- paymentCompletion: string;
261
- getUserAddress: string;
262
- };
263
- closeConfirmation: {
264
- title: string;
265
- confirm: string;
266
- cancel: string;
267
- };
268
- registerUserInfo: {
269
- kycDataTitle: string;
270
- uneditableDataTitle: string;
271
- unenteredInfoTitle: string;
272
- footer: {
273
- description: string;
274
- backButton: string;
275
- nextButton: string;
276
- finishButton: string;
277
- cancelButton: string;
278
- };
279
- cancelSheet: {
280
- title: string;
281
- text: string;
282
- confirmButton: string;
283
- };
284
- kycSheet: {
285
- title: string;
286
- text: string;
287
- confirmButton: string;
288
- };
289
- mailSheet: {
290
- title: string;
291
- text: string;
292
- confirmButton: string;
293
- };
294
- defaultErrorSheet: {
295
- title: string;
296
- text: string;
297
- };
298
- validation: {
299
- numberError: string;
300
- alphabetError: string;
301
- alphabetLength32Error: string;
302
- katakanaError: string;
303
- katakanaLength16Error: string;
304
- lengthError: string;
305
- };
306
- emailInput: string;
307
- emailNotVerified: string;
308
- emailNotVerifiedDescription: string;
309
- change: string;
310
- cancel: string;
311
- };
312
- getBankInfo: {
313
- title: string;
314
- close: string;
315
- };
316
- '3dSecureSheet': {
317
- title: string;
318
- descriptionForYJCardOrPPCard: string;
319
- description: string;
320
- setting3DSecure: string;
321
- about3DSecure: string;
322
- close: string;
323
- };
324
- registerPaymentFeatures: {
325
- autoTopupRoot: {
326
- title: string;
327
- titleNeedUpdate: string;
328
- description: string;
329
- minAmount: string;
330
- unit: string;
331
- addTopupMethod: string;
332
- noActivatedTopupMethod: string;
333
- topupNotice: string;
334
- updateWarning: {
335
- message: string;
336
- update: string;
337
- cancel: string;
338
- };
339
- viewdetails: string;
340
- eMoneyOnly: string;
341
- topupNoticeEmoneyOnlyTitle: string;
342
- topupNoticeEmoneyOnlyDesc: string;
343
- };
344
- autoTopupRootFooter: {
345
- enable: string;
346
- notice: string;
347
- notNow: string;
348
- };
349
- amountChange: {
350
- title: string;
351
- description: string;
352
- register: string;
353
- cancel: string;
354
- };
355
- amountError: {
356
- changeLimit: string;
357
- close: string;
358
- };
359
- defaultError: {
360
- title: string;
361
- description: string;
362
- };
363
- autoTopupConfirmation: {
364
- title: string;
365
- description: string;
366
- change: string;
367
- cancel: string;
368
- };
369
- autoTopupSettingComplete: {
370
- title: string;
371
- description: string;
372
- finish: string;
373
- };
374
- setupTopupMethod: {
375
- title: string;
376
- description: string;
377
- finish: string;
378
- cancel: string;
379
- };
380
- selectTopupAmount: {
381
- title: string;
382
- recommend: string;
383
- close: string;
384
- unit: string;
385
- };
386
- fallbackMethod: {
387
- updateWarning: {
388
- description: string;
389
- update: string;
390
- close: string;
391
- };
392
- };
393
- };
394
- getKycPassport: {
395
- fallbackSmsSheet: {
396
- title: string;
397
- text: string;
398
- button: string;
399
- buttonClose: string;
400
- };
401
- };
402
- };
403
- export declare function getPayPayLanguage(): string;
1
+ import { Locale } from '../types';
2
+ export declare function getPayPayLanguage(): Locale;
@@ -41,8 +41,6 @@ export declare enum MiniAppRuntime {
41
41
  export declare function getRuntime(): MiniAppRuntime;
42
42
  export declare function isPayPayMiniApp(): boolean;
43
43
  export declare function getAppVersion(): string | null;
44
- export declare function getEventLabel(merchant?: string | null): string;
45
- export declare function getEventCategory(): string;
46
44
  export declare function semVerCompare(a: string, b: string): boolean;
47
45
  export declare function checkVersion(minVersion: string): boolean;
48
46
  export declare function getPlatformFontSize(): FontSize;
@@ -53,7 +51,7 @@ export declare const createErrorCode: (errorCode: MiniAppErrorType, jws?: string
53
51
  };
54
52
  export declare function updateLocalisedString(data: string, target: string, value: string): string;
55
53
  export declare function handleHeightResize(el: HTMLElement, windowHeight: number, isScrollable: boolean, offsetHeight: number): boolean;
56
- export declare function getPaymentMethodStatus(isExpired: boolean, paymentMethodInfo?: BankInfo | CreditCardInfo | SbidBankInfo | PayLaterCCInfo): unknown;
54
+ export declare function getPaymentMethodStatus(isExpired: boolean, paymentMethodInfo?: BankInfo | CreditCardInfo | SbidBankInfo | PayLaterCCInfo): string;
57
55
  export declare function filterErrorButtonList(buttonList: UIComponentsErrorButton[] | null): UIComponentsErrorButton[] | undefined;
58
56
  export declare function getFailErrorCode(ppFetchResult: string): MiniAppErrorType.timeOut | MiniAppErrorType.serverError | MiniAppErrorType.tokenExpired | MiniAppErrorType.notAuthorized;
59
57
  export declare function getStoreUrl(): "https://play.google.com/store/apps/details?id=jp.ne.paypay.android.app" | "https://itunes.apple.com/app/id1435783608";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paypay/mini-app-js-sdk",
3
- "version": "2.19.0",
3
+ "version": "2.20.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "build": "yarn build:client && yarn build:core && yarn build:init",
@@ -21,6 +21,9 @@
21
21
  "upgrade": "yarn upgrade-interactive",
22
22
  "test": "jest --silent --coverage",
23
23
  "test:watch": "jest --watch",
24
+ "e2e:record": "playwright test",
25
+ "e2e:replay": "REPLAY=true yarn playwright test",
26
+ "e2e:update": "yarn e2e:replay --update-snapshots",
24
27
  "preview": "yarn dev:client & vite preview --config vite.config.core.ts --port 3100"
25
28
  },
26
29
  "license": "MIT",
@@ -41,6 +44,7 @@
41
44
  "@babel/preset-env": "^7.15.4",
42
45
  "@braintree/browser-detection": "^1.16.0",
43
46
  "@pinia/testing": "^0.0.12",
47
+ "@playwright/test": "^1.40.1",
44
48
  "@rollup/plugin-html": "^1.0.2",
45
49
  "@rollup/plugin-replace": "^3.0.0",
46
50
  "@rollup/plugin-terser": "^0.4.3",
@@ -52,6 +56,7 @@
52
56
  "@types/jest": "^26.0.24",
53
57
  "@types/js-cookie": "^2.2.7",
54
58
  "@types/lodash": "^4.14.195",
59
+ "@types/node": "^20.10.3",
55
60
  "@types/ua-parser-js": "^0.7.36",
56
61
  "@types/uuid": "^8.3.1",
57
62
  "@typescript-eslint/eslint-plugin": "^5.58.0",
@@ -78,6 +83,7 @@
78
83
  "jest-transform-stub": "^2.0.0",
79
84
  "less": "^4.1.1",
80
85
  "lint-staged": "^11.1.2",
86
+ "lodash": "^4.17.21",
81
87
  "lottie-web": "^5.9.6",
82
88
  "npm-run-all": "^4.1.5",
83
89
  "pinia": "^2.0.20",
@@ -1,11 +0,0 @@
1
- import { MiniAppFunctionContext, PostLogInRedirectParams } from '../../types';
2
- import { PKCEChallengeType } from '../../types/getAuthStatus';
3
- interface GetLoginUrlParams extends PostLogInRedirectParams {
4
- pkceCodeChallenge: PKCEChallengeType;
5
- scopes?: Array<string>;
6
- }
7
- export declare const getLoginUrlEndpoint = "public/auth/v1/loginUrl";
8
- export declare function getLoginUrl({ pkceCodeChallenge, postLoginRedirectUrl, postLoginRedirectType, scopes, }: GetLoginUrlParams): Promise<string>;
9
- export declare function getLoginUrlWithPkce(params: Omit<GetLoginUrlParams, 'pkceCodeChallenge'>, clientOrigin: string): Promise<string>;
10
- export declare function getLoginUrlIfUserNotSignedIn(params: Omit<GetLoginUrlParams, 'pkceCodeChallenge'>, context: MiniAppFunctionContext): Promise<string | undefined>;
11
- export {};