@paypay/mini-app-js-sdk 2.16.0 → 2.19.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.
Files changed (40) hide show
  1. package/dist/client/index.d.ts +1 -5
  2. package/dist/client/supportedFunctionsList.d.ts +1 -1
  3. package/dist/core/coreFunctions/claimCoupon.d.ts +1 -0
  4. package/dist/core/coreFunctions/fetchCoupons.d.ts +3 -2
  5. package/dist/core/coreFunctions/getPaymentSettings.d.ts +1 -1
  6. package/dist/core/coreFunctions/logEvent.d.ts +2 -1
  7. package/dist/core/coreUtils.d.ts +1 -1
  8. package/dist/core/coupon/couponFunctions/renderCoupons.d.ts +2 -2
  9. package/dist/core/sentry.d.ts +5 -0
  10. package/dist/mini-app-api.d.ts +22 -28
  11. package/dist/mini-app-js-sdk.browser.js +1 -1
  12. package/dist/mini-app-js-sdk.es.js +1661 -5823
  13. package/dist/model/bridge/getAuthStatus.d.ts +2 -1
  14. package/dist/model/bridge/getExternalLinkageInformation.d.ts +3 -0
  15. package/dist/model/bridge/getLoginUrl.d.ts +3 -3
  16. package/dist/model/bridge/getPayPayCardInfo.d.ts +3 -0
  17. package/dist/model/bridge/init.d.ts +2 -1
  18. package/dist/model/bridge/render.d.ts +2 -3
  19. package/dist/model/bridge/renderLoginButton.d.ts +2 -2
  20. package/dist/model/bridge/renderPayButton.d.ts +2 -2
  21. package/dist/package/lottie/index.d.ts +1 -72
  22. package/dist/types/GetExternalLinkageInformationResult.d.ts +14 -0
  23. package/dist/types/getAuthStatus.d.ts +0 -4
  24. package/dist/types/getDeviceInformation.d.ts +7 -0
  25. package/dist/types/getPermissionStatus.d.ts +1 -0
  26. package/dist/types/getTransactionInfo.d.ts +7 -3
  27. package/dist/types/init.d.ts +0 -1
  28. package/dist/types.d.ts +4 -5
  29. package/dist/utils/analytics.d.ts +9 -2
  30. package/dist/views/coupon/index.d.ts +8 -0
  31. package/package.json +4 -3
  32. package/dist/composition-api/useRenderSmartButton.d.ts +0 -3
  33. package/dist/model/bridge/copyToClipboard.d.ts +0 -2
  34. package/dist/model/bridge/getSessionData.d.ts +0 -2
  35. package/dist/model/bridge/getStorageData.d.ts +0 -2
  36. package/dist/model/bridge/index.d.ts +0 -47
  37. package/dist/model/bridge/removeStorageData.d.ts +0 -2
  38. package/dist/model/bridge/setSessionData.d.ts +0 -2
  39. package/dist/model/bridge/setStorageData.d.ts +0 -2
  40. package/dist/model/bridge/setTitle.d.ts +0 -2
@@ -1,2 +1,3 @@
1
1
  import { GetAuthStatusParams } from '../../types/getAuthStatus';
2
- export declare function getAuthStatus(params: GetAuthStatusParams): Promise<void>;
2
+ import { MiniAppFunctionContext } from '../../types';
3
+ export declare function getAuthStatus(params: GetAuthStatusParams, context: MiniAppFunctionContext): Promise<void>;
@@ -0,0 +1,3 @@
1
+ import { NativeParams } from '../../jsbridge-core/jsbridge';
2
+ import { GetExternalLinkageInformationResult } from '../../types/GetExternalLinkageInformationResult';
3
+ export declare function getExternalLinkageInformation(params: NativeParams<GetExternalLinkageInformationResult>): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { PostLogInRedirectParams } from '../../types';
1
+ import { MiniAppFunctionContext, PostLogInRedirectParams } from '../../types';
2
2
  import { PKCEChallengeType } from '../../types/getAuthStatus';
3
3
  interface GetLoginUrlParams extends PostLogInRedirectParams {
4
4
  pkceCodeChallenge: PKCEChallengeType;
@@ -6,6 +6,6 @@ interface GetLoginUrlParams extends PostLogInRedirectParams {
6
6
  }
7
7
  export declare const getLoginUrlEndpoint = "public/auth/v1/loginUrl";
8
8
  export declare function getLoginUrl({ pkceCodeChallenge, postLoginRedirectUrl, postLoginRedirectType, scopes, }: GetLoginUrlParams): Promise<string>;
9
- export declare function getLoginUrlWithPkce(params: Omit<GetLoginUrlParams, 'pkceCodeChallenge'>): Promise<string>;
10
- export declare function getLoginUrlIfUserNotSignedIn(params: Omit<GetLoginUrlParams, 'pkceCodeChallenge'>): Promise<string | undefined>;
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
11
  export {};
@@ -0,0 +1,3 @@
1
+ import { MiniAppResult } from '../../types';
2
+ import { NativeParams } from '../../jsbridge-core/jsbridge';
3
+ export declare function getPayPayCardInfo(params: NativeParams<MiniAppResult>): Promise<void>;
@@ -1,2 +1,3 @@
1
1
  import { InitParams } from '../../types/init';
2
- export declare function init(params: InitParams): Promise<void>;
2
+ import { MiniAppFunctionContext } from '../../types';
3
+ export declare function init(params: InitParams, context: MiniAppFunctionContext): Promise<void>;
@@ -1,6 +1,5 @@
1
- import { RenderSmartButtonParams } from '../../types';
2
- export declare function getRenderButtonInfo(params: RenderSmartButtonParams): Promise<{
1
+ import { MiniAppFunctionContext, RenderSmartButtonParams } from '../../types';
2
+ export declare function getRenderButtonInfo(params: RenderSmartButtonParams, context: MiniAppFunctionContext): Promise<{
3
3
  data: import('../../types').SmartButtonParam;
4
4
  preferredLanguage: string;
5
5
  }>;
6
- export declare function render(params: RenderSmartButtonParams): void;
@@ -1,5 +1,5 @@
1
- import { RenderSmartButtonParams, SmartButtonParam } from '../../types';
2
- export declare function getRenderLoginInfo(params: RenderSmartButtonParams): Promise<{
1
+ import { MiniAppFunctionContext, RenderSmartButtonParams, SmartButtonParam } from '../../types';
2
+ export declare function getRenderLoginInfo(params: RenderSmartButtonParams, context: MiniAppFunctionContext): Promise<{
3
3
  data: SmartButtonParam;
4
4
  preferredLanguage: string;
5
5
  }>;
@@ -1,5 +1,5 @@
1
- import { RenderSmartButtonParams, SmartButtonParam } from '../../types';
2
- export declare function getRenderPayInfo(params: RenderSmartButtonParams): Promise<{
1
+ import { MiniAppFunctionContext, RenderSmartButtonParams, SmartButtonParam } from '../../types';
2
+ export declare function getRenderPayInfo(params: RenderSmartButtonParams, context: MiniAppFunctionContext): Promise<{
3
3
  renderParams: RenderSmartButtonParams;
4
4
  data: SmartButtonParam;
5
5
  preferredLanguage: string;
@@ -1,73 +1,2 @@
1
- declare const Lottie: import("vue").DefineComponent<{
2
- loop: {
3
- type: BooleanConstructor;
4
- default: boolean;
5
- };
6
- autoplay: {
7
- type: BooleanConstructor;
8
- default: boolean;
9
- };
10
- path: {
11
- type: StringConstructor;
12
- default: string;
13
- };
14
- styles: {
15
- type: ObjectConstructor;
16
- default: () => {
17
- width: string;
18
- height: string;
19
- };
20
- };
21
- className: {
22
- type: StringConstructor;
23
- default: string;
24
- required: false;
25
- };
26
- type: {
27
- type: import("vue").PropType<import("../../types").RenderType>;
28
- default: import("../../types").RenderType;
29
- required: false;
30
- };
31
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
- 'create-lottie': (_p: import("lottie-web").AnimationItem) => true;
33
- }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
34
- loop: {
35
- type: BooleanConstructor;
36
- default: boolean;
37
- };
38
- autoplay: {
39
- type: BooleanConstructor;
40
- default: boolean;
41
- };
42
- path: {
43
- type: StringConstructor;
44
- default: string;
45
- };
46
- styles: {
47
- type: ObjectConstructor;
48
- default: () => {
49
- width: string;
50
- height: string;
51
- };
52
- };
53
- className: {
54
- type: StringConstructor;
55
- default: string;
56
- required: false;
57
- };
58
- type: {
59
- type: import("vue").PropType<import("../../types").RenderType>;
60
- default: import("../../types").RenderType;
61
- required: false;
62
- };
63
- }>> & {
64
- "onCreate-lottie"?: ((_p: import("lottie-web").AnimationItem) => any) | undefined;
65
- }, {
66
- path: string;
67
- type: import("../../types").RenderType;
68
- loop: boolean;
69
- autoplay: boolean;
70
- styles: Record<string, any>;
71
- className: string;
72
- }>;
1
+ import Lottie from './lottie';
73
2
  export default Lottie;
@@ -0,0 +1,14 @@
1
+ export declare type GetExternalLinkageInformationResult = {
2
+ yidLinked: boolean;
3
+ sbGroupMobileCarrier?: unknown;
4
+ responseValidTill?: number;
5
+ };
6
+ export declare type GetExternalLinkageInformationResponse = {
7
+ unsigned: {
8
+ data: {
9
+ yidLinked: boolean;
10
+ sbGroupMobileCarrier?: 'LINEMO' | 'YMOBILE' | 'SOFTBANK';
11
+ responseValidTill?: number;
12
+ };
13
+ };
14
+ };
@@ -1,11 +1,7 @@
1
1
  import { NativeParams } from '../jsbridge-core/jsbridge';
2
2
  import { MiniAppErrorResultType } from '../types';
3
- export interface GetAuthStatusClientParams extends NativeParams<GetAuthStatusResult, AuthStatusFailResult> {
4
- isInternal?: boolean;
5
- }
6
3
  export interface GetAuthStatusParams extends NativeParams<GetAuthStatusResult, AuthStatusFailResult> {
7
4
  isInternal?: boolean;
8
- clientOrigin: string;
9
5
  }
10
6
  export declare enum ChallengeMethod {
11
7
  S256 = "S256"
@@ -1,3 +1,10 @@
1
1
  export declare type GetDeviceInformationResult = {
2
2
  os: string;
3
+ eSimSupported?: ESimSupportedType;
3
4
  };
5
+ export declare const ESimSupported: {
6
+ readonly SUPPORTED: "SUPPORTED";
7
+ readonly NOT_SUPPORTED: "NOT_SUPPORTED";
8
+ readonly UNKNOWN: "UNKNOWN";
9
+ };
10
+ export declare type ESimSupportedType = (typeof ESimSupported)[keyof typeof ESimSupported];
@@ -43,6 +43,7 @@ export declare const PermissionName: {
43
43
  readonly user_info_yahoo_premium_user: "user_info_yahoo_premium_user";
44
44
  readonly user_info_tpoint: "user_info_tpoint";
45
45
  readonly mini_app_transaction: "mini_app_transaction";
46
+ readonly mini_app_device_esim_info: "mini_app_device_esim_info";
46
47
  };
47
48
  export declare type PermissionNameType = (typeof PermissionName)[keyof typeof PermissionName];
48
49
  export declare type Permission = {
@@ -14,10 +14,14 @@ export declare type TransactionItem = {
14
14
  status: TransactionStatusType;
15
15
  errorCode: string;
16
16
  amount: Amount;
17
- storeId: string;
18
- storeName: string;
17
+ storeId?: string;
18
+ storeName?: string;
19
19
  merchantId: string;
20
- merchantName: string;
20
+ merchantName?: string;
21
+ description: string;
22
+ cashbacks?: {
23
+ name: string;
24
+ }[];
21
25
  };
22
26
  export declare const TransactionStatus: {
23
27
  readonly CREATED: "CREATED";
@@ -12,7 +12,6 @@ export interface InitParams extends NativeParams<InitResult> {
12
12
  mode?: string;
13
13
  token?: string;
14
14
  ott?: string;
15
- clientOrigin?: string;
16
15
  refreshToken?: string;
17
16
  codeVerifier?: string;
18
17
  clientVersion?: string;
package/dist/types.d.ts CHANGED
@@ -12,6 +12,9 @@ import { TopupParams } from './types/topup';
12
12
  declare global {
13
13
  type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
14
14
  }
15
+ export interface MiniAppFunctionContext {
16
+ clientOrigin: string;
17
+ }
15
18
  export declare type MiniAppResult = Record<string, unknown>;
16
19
  export interface MiniAppErrorResultType {
17
20
  errorCode: MiniAppErrorType;
@@ -163,7 +166,6 @@ export interface RenderSmartButtonParams extends NativeParams<MiniAppResult> {
163
166
  getDefault?: boolean;
164
167
  renderId?: string;
165
168
  redirectUrl?: string;
166
- clientOrigin?: string;
167
169
  }
168
170
  export declare type Locale = 'ja' | 'en';
169
171
  export declare type Translation = Record<string, string>;
@@ -385,7 +387,7 @@ export declare type CoreCallUtilMessageData = {
385
387
  forWindowBridge?: boolean;
386
388
  };
387
389
  export declare type ClientMessageData = {
388
- name: Exclude<PPFunctionNameType, 'renderCoupons'>;
390
+ name: PPFunctionNameType;
389
391
  params?: unknown;
390
392
  messageId: string;
391
393
  forWindowBridge?: boolean;
@@ -442,7 +444,6 @@ export declare const PPFunctionName: {
442
444
  readonly showErrorSheet: "showErrorSheet";
443
445
  readonly getPlatformInformation: "getPlatformInformation";
444
446
  readonly share: "share";
445
- readonly setTitle: "setTitle";
446
447
  readonly getTopBarHeight: "getTopBarHeight";
447
448
  readonly openWebview: "openWebview";
448
449
  readonly openMap: "openMap";
@@ -463,13 +464,11 @@ export declare const PPFunctionName: {
463
464
  readonly request: "request";
464
465
  readonly getDeviceInformation: "getDeviceInformation";
465
466
  readonly debug: "debug";
466
- readonly copyToClipboard: "copyToClipboard";
467
467
  readonly createOrder: "createOrder";
468
468
  readonly handleMessageFromNative: "handleMessageFromNative";
469
469
  readonly initKycPassport: "initKycPassport";
470
470
  readonly smsAuth: "smsAuth";
471
471
  readonly getKycPassportInfo: "getKycPassportInfo";
472
- readonly renderCoupons: "renderCoupons";
473
472
  };
474
473
  export declare type PPFunctionNameType = (typeof PPFunctionName)[keyof typeof PPFunctionName];
475
474
  export declare const PPUtilFunctionName: {
@@ -1,11 +1,18 @@
1
1
  import { PPFunctionNameType } from '../types';
2
2
  import { PPEnvType } from '../types/init';
3
- export declare function logSDKEvent(eventName: string, eventParams: {
3
+ interface EventParams {
4
+ env: PPEnvType;
4
5
  event_category: string;
5
6
  event_label?: string;
6
7
  screen_name: string;
7
8
  event_action?: string;
8
9
  error_value?: string;
9
10
  event_label2?: unknown;
10
- }, env?: PPEnvType): void;
11
+ }
12
+ interface Options {
13
+ env?: PPEnvType;
14
+ sendImmediately?: boolean;
15
+ }
16
+ export declare function logSDKEvent(eventName: string, eventParams: Omit<EventParams, 'env'>, { env, sendImmediately }?: Options): void;
11
17
  export declare function handleLogSDKEvent(name: PPFunctionNameType, eventActionSuffix: string, errorValue?: string, params?: unknown): void;
18
+ export {};
@@ -18,6 +18,10 @@ export declare const CouponView: import("vue").DefineComponent<{
18
18
  type: PropType<Translation>;
19
19
  required: true;
20
20
  };
21
+ clientOrigin: {
22
+ type: StringConstructor;
23
+ required: true;
24
+ };
21
25
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
26
  coupon: {
23
27
  type: PropType<FormattedCoupon>;
@@ -35,4 +39,8 @@ export declare const CouponView: import("vue").DefineComponent<{
35
39
  type: PropType<Translation>;
36
40
  required: true;
37
41
  };
42
+ clientOrigin: {
43
+ type: StringConstructor;
44
+ required: true;
45
+ };
38
46
  }>>, {}>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paypay/mini-app-js-sdk",
3
- "version": "2.16.0",
3
+ "version": "2.19.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "build": "yarn build:client && yarn build:core && yarn build:init",
@@ -40,12 +40,12 @@
40
40
  "@babel/plugin-transform-typescript": "^7.15.4",
41
41
  "@babel/preset-env": "^7.15.4",
42
42
  "@braintree/browser-detection": "^1.16.0",
43
- "@braintree/sanitize-url": "^6.0.2",
44
43
  "@pinia/testing": "^0.0.12",
45
44
  "@rollup/plugin-html": "^1.0.2",
46
45
  "@rollup/plugin-replace": "^3.0.0",
47
46
  "@rollup/plugin-terser": "^0.4.3",
48
- "@sentry/browser": "^7.74.1",
47
+ "@sentry/browser": "^7.80.1",
48
+ "@sentry/integrations": "^7.80.1",
49
49
  "@testing-library/jest-dom": "^5.16.2",
50
50
  "@testing-library/vue": "^6.4.2",
51
51
  "@types/ip": "^1.1.0",
@@ -86,6 +86,7 @@
86
86
  "prettier": "^2.8.7",
87
87
  "rollup": "3.28.0",
88
88
  "rollup-plugin-ts": "^3.4.4",
89
+ "rollup-plugin-visualizer": "^5.9.2",
89
90
  "stylelint": "^14.9.1",
90
91
  "terser": "^5.18.1",
91
92
  "ts-jest": "^26.5.6",
@@ -1,3 +0,0 @@
1
- import { RenderSmartButtonParams, SmartButtonParam } from '../types';
2
- declare const initSmartButton: (params: RenderSmartButtonParams, data: SmartButtonParam, preferredLanguage: string, isLoggedIn?: boolean | undefined) => void;
3
- export { initSmartButton };
@@ -1,2 +0,0 @@
1
- import { CopyToClipBoardParams } from '../../types';
2
- export declare function copyToClipboard(copyTextParams: CopyToClipBoardParams): void;
@@ -1,2 +0,0 @@
1
- import { GetDataParams } from '../../types';
2
- export declare function getSessionData(getDataParams: GetDataParams): void;
@@ -1,2 +0,0 @@
1
- import { GetDataParams } from '../../types';
2
- export declare function getStorageData(getDataParams: GetDataParams): void;
@@ -1,47 +0,0 @@
1
- export * from './init';
2
- export * from './copyToClipboard';
3
- export * from './getUAID';
4
- export * from './getBalance';
5
- export * from './getUserProfile';
6
- export * from './getKycInformation';
7
- export * from './getPermissionStatus';
8
- export * from './getTopBarHeight';
9
- export * from './getPlatformInformation';
10
- export * from './getDeviceInformation';
11
- export * from './makePayment';
12
- export * from './openWebview';
13
- export * from './showErrorSheet';
14
- export * from './showAlert';
15
- export * from './topup';
16
- export * from './showUpdateWarning';
17
- export * from './scanCode';
18
- export * from './closeApp';
19
- export * from './setTitle';
20
- export * from './getUserLocation';
21
- export * from './getUserAddress';
22
- export * from './inputAddress';
23
- export * from './openMap';
24
- export * from './openApp';
25
- export * from './openMiniApp';
26
- export * from './checkPaymentMethod';
27
- export * from './requestInternal';
28
- export * from './debug';
29
- export * from './checkAccessToken';
30
- export * from './registerEmail';
31
- export * from './registerKyc';
32
- export * from './startMultiFactorAuth';
33
- export * from './logout';
34
- export * from './verifyMultiFactorAuthResult';
35
- export * from './getAuthStatus';
36
- export * from './render';
37
- export * from './smsAuth';
38
- export * from './setSessionData';
39
- export * from './getSessionData';
40
- export * from './setStorageData';
41
- export * from './getStorageData';
42
- export * from './removeStorageData';
43
- export * from './request';
44
- export * from './share';
45
- export * from './registerUserInfo';
46
- export * from './getBankInfo';
47
- export * from './registerPaymentFeatures';
@@ -1,2 +0,0 @@
1
- import { RemoveDataParams } from '../../types';
2
- export declare function removeStorageData(params: RemoveDataParams): void;
@@ -1,2 +0,0 @@
1
- import { SetDataParams } from '../../types';
2
- export declare function setSessionData(setDataParams: SetDataParams): void;
@@ -1,2 +0,0 @@
1
- import { SetDataParams } from '../../types';
2
- export declare function setStorageData(setDataParams: SetDataParams): void;
@@ -1,2 +0,0 @@
1
- import { SetTitleParams } from '../../types';
2
- export declare function setTitle(setTitleParams: SetTitleParams): void;