@paypay/mini-app-js-sdk 2.16.0 → 2.18.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,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>;
@@ -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;
@@ -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"
@@ -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>;
@@ -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.18.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,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';