@paypay/mini-app-js-sdk 2.8.0 → 2.11.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 (49) hide show
  1. package/dist/client/clientUtils.d.ts +9 -4
  2. package/dist/client/coreIframe.d.ts +2 -1
  3. package/dist/client/index.d.ts +10 -1
  4. package/dist/client/supportedFunctionsList.d.ts +2 -2
  5. package/dist/core/coreFunctions/claimCoupon.d.ts +6 -0
  6. package/dist/core/coreFunctions/fetchCoupons.d.ts +8 -0
  7. package/dist/core/coreFunctions/index.d.ts +4 -0
  8. package/dist/core/coreFunctions/logEvent.d.ts +12 -0
  9. package/dist/core/coreFunctions/logout.d.ts +1 -0
  10. package/dist/core/coreUtils.d.ts +10 -3
  11. package/dist/core/coupon/couponFunctions/index.d.ts +1 -0
  12. package/dist/core/coupon/couponFunctions/renderCoupons.d.ts +9 -0
  13. package/dist/core/coupon/index.d.ts +3 -0
  14. package/dist/core/index.d.ts +5 -0
  15. package/dist/environment-variables.d.ts +4 -0
  16. package/dist/index.d.ts +3 -0
  17. package/dist/jsbridge-core/lib/browser.d.ts +3 -0
  18. package/dist/jsbridge-core/paypay-jsbridge.d.ts +16 -0
  19. package/dist/mini-app-js-sdk.browser.js +1 -1
  20. package/dist/mini-app-js-sdk.d.ts +10 -0
  21. package/dist/mini-app-js-sdk.es.js +937 -176
  22. package/dist/model/bridge/getConfigure.d.ts +2 -2
  23. package/dist/model/bridge/getLoginUrl.d.ts +9 -0
  24. package/dist/model/bridge/index.d.ts +47 -0
  25. package/dist/model/bridge/render.d.ts +0 -12
  26. package/dist/model/bridge/renderLoginButton.d.ts +2 -2
  27. package/dist/model/makePayment.d.ts +7 -0
  28. package/dist/package/button/index.d.ts +1 -1
  29. package/dist/package/lottie/index.d.ts +73 -0
  30. package/dist/package/lottie/lottie.d.ts +77 -0
  31. package/dist/resources/en.d.ts +1 -0
  32. package/dist/resources/images.d.ts +2 -0
  33. package/dist/resources/ja.d.ts +1 -0
  34. package/dist/types.d.ts +34 -8
  35. package/dist/utils/analytics.d.ts +3 -1
  36. package/dist/utils/api.d.ts +32 -25
  37. package/dist/utils/browsers.d.ts +3 -0
  38. package/dist/utils/fetch.d.ts +2 -1
  39. package/dist/utils/getLanguage.d.ts +1 -0
  40. package/dist/utils/helper.d.ts +3 -3
  41. package/dist/utils/storage.d.ts +8 -0
  42. package/dist/utils/windowBridge.d.ts +24 -0
  43. package/dist/views/coupon/components/Arrow/index.d.ts +17 -0
  44. package/dist/views/coupon/components/CouponAction/index.d.ts +39 -0
  45. package/dist/views/coupon/components/CouponContainer/index.d.ts +14 -0
  46. package/dist/views/coupon/index.d.ts +38 -0
  47. package/dist/views/coupon/types.d.ts +34 -0
  48. package/dist/views/registerPaymentFeatures/types.d.ts +9 -0
  49. package/package.json +15 -11
@@ -0,0 +1,39 @@
1
+ import { PropType } from 'vue';
2
+ import { Translation } from '../../../../types';
3
+ import { FormattedCoupon } from '../../types';
4
+ declare const CouponAction: import("vue").DefineComponent<{
5
+ coupon: {
6
+ type: PropType<FormattedCoupon>;
7
+ required: true;
8
+ };
9
+ merchantId: {
10
+ type: StringConstructor;
11
+ required: true;
12
+ };
13
+ core: {
14
+ type: PropType<import("../../../../utils/windowBridge").WindowBridgeFunctions<typeof import("../../../../core/coreFunctions")>>;
15
+ required: true;
16
+ };
17
+ translation: {
18
+ type: PropType<Translation>;
19
+ required: true;
20
+ };
21
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
+ coupon: {
23
+ type: PropType<FormattedCoupon>;
24
+ required: true;
25
+ };
26
+ merchantId: {
27
+ type: StringConstructor;
28
+ required: true;
29
+ };
30
+ core: {
31
+ type: PropType<import("../../../../utils/windowBridge").WindowBridgeFunctions<typeof import("../../../../core/coreFunctions")>>;
32
+ required: true;
33
+ };
34
+ translation: {
35
+ type: PropType<Translation>;
36
+ required: true;
37
+ };
38
+ }>>, {}>;
39
+ export default CouponAction;
@@ -0,0 +1,14 @@
1
+ import { PropType } from 'vue';
2
+ import { Translation } from '../../../../types';
3
+ declare const CouponContainer: import("vue").DefineComponent<{
4
+ translation: {
5
+ type: PropType<Translation>;
6
+ required: true;
7
+ };
8
+ }, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
9
+ translation: {
10
+ type: PropType<Translation>;
11
+ required: true;
12
+ };
13
+ }>>, {}>;
14
+ export default CouponContainer;
@@ -0,0 +1,38 @@
1
+ import { PropType } from 'vue';
2
+ import { Translation } from '../../types';
3
+ import { FormattedCoupon } from './types';
4
+ export declare const CouponView: import("vue").DefineComponent<{
5
+ coupon: {
6
+ type: PropType<FormattedCoupon>;
7
+ required: true;
8
+ };
9
+ merchantId: {
10
+ type: StringConstructor;
11
+ required: true;
12
+ };
13
+ core: {
14
+ type: PropType<import("../../utils/windowBridge").WindowBridgeFunctions<typeof import("../../core/coreFunctions")>>;
15
+ required: true;
16
+ };
17
+ translation: {
18
+ type: PropType<Translation>;
19
+ required: true;
20
+ };
21
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
+ coupon: {
23
+ type: PropType<FormattedCoupon>;
24
+ required: true;
25
+ };
26
+ merchantId: {
27
+ type: StringConstructor;
28
+ required: true;
29
+ };
30
+ core: {
31
+ type: PropType<import("../../utils/windowBridge").WindowBridgeFunctions<typeof import("../../core/coreFunctions")>>;
32
+ required: true;
33
+ };
34
+ translation: {
35
+ type: PropType<Translation>;
36
+ required: true;
37
+ };
38
+ }>>, {}>;
@@ -0,0 +1,34 @@
1
+ export declare type ClaimStatus = 'CLAIMED_DELETABLE' | 'CLAIMED_NOT_DELETABLE' | 'NOT_CLAIMED_ELIGIBLE' | 'NOT_CLAIMED_NOT_ELIGIBLE' | 'FULLY_USED' | 'NOT_LOGGED_IN' | 'CLAIMING' | 'CLAIM_FAILED' | 'LOG_IN_FAILED';
2
+ export interface Coupon {
3
+ merchantLogoUrl?: string;
4
+ merchantName?: string;
5
+ couponId: string;
6
+ status: string;
7
+ value: number;
8
+ unit: 'PERCENT' | 'YEN';
9
+ claimStatus: ClaimStatus;
10
+ usageType: 'FIXED' | 'UNLIMITED';
11
+ couponDetailsUrl: string;
12
+ loginUrl?: string;
13
+ redemptionCountLimit: number;
14
+ minTransactionAmount: number;
15
+ maxCashbackAmount?: number;
16
+ maxRedemptionAmount?: number;
17
+ liveEndDate: string;
18
+ liveStartDate: string;
19
+ redemptionEndDate: string;
20
+ redemptionStartDate: string;
21
+ }
22
+ declare type CouponDetailItem = [string, string];
23
+ export interface FormattedCoupon {
24
+ logo: string;
25
+ title: string;
26
+ validityDuration: string;
27
+ detailItems: Array<CouponDetailItem>;
28
+ cashBackValue: string;
29
+ claimStatus: ClaimStatus;
30
+ couponId: string;
31
+ loginUrl?: string;
32
+ couponDetailsUrl: string;
33
+ }
34
+ export {};
@@ -21,6 +21,7 @@ export declare type TopupConfigurationData = {
21
21
  paymentMethodList?: PaymentMethodInfo[];
22
22
  appealDescription: DescriptionInfo;
23
23
  preTransactionAutoTopupPaymentMethod?: PaymentMethodInfo;
24
+ notificationDescription?: DescriptionInfo;
24
25
  };
25
26
  export declare type UpdatePreTransactionAutoTopupConfigurationParams = {
26
27
  isEnabled: boolean;
@@ -38,6 +39,14 @@ export declare type PostPreTransactionAutoTopupResponse = {
38
39
  data: object;
39
40
  };
40
41
  };
42
+ export declare type SoftBankNotificationType = {
43
+ text: string;
44
+ linkUrl?: string;
45
+ headerIcon?: string;
46
+ isBold: boolean;
47
+ color: string;
48
+ backgroundColor?: string;
49
+ };
41
50
  declare type Currency = 'JPY';
42
51
  declare type PostTransactionAutoTopupConfiguration = {
43
52
  isEnabled: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paypay/mini-app-js-sdk",
3
- "version": "2.8.0",
3
+ "version": "2.11.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "build": "yarn build:client && yarn build:core && yarn build:init && yarn build:client:nightly",
@@ -10,7 +10,7 @@
10
10
  "build:client:nightly": "NIGHTLY_BUILD=1 vite build",
11
11
  "build:core": "vite build --config vite.config.core.ts",
12
12
  "build:init": "vite build --config vite.config.init.ts",
13
- "dev": "yarn dev:client & yarn dev:core",
13
+ "dev": "run-p dev:client dev:core",
14
14
  "dev:client": "vite --host 0.0.0.0",
15
15
  "dev:core": "vite --config vite.config.core.ts",
16
16
  "lint": "yarn lint:script && yarn lint:style",
@@ -20,7 +20,7 @@
20
20
  "upgrade": "yarn upgrade-interactive",
21
21
  "test": "jest --silent --coverage",
22
22
  "test:watch": "jest --watch",
23
- "preview": "DEV_MODE=preview yarn dev:client & vite preview --config vite.config.core.ts --port 4173"
23
+ "preview": "yarn dev:client & vite preview --config vite.config.core.ts --port 3100"
24
24
  },
25
25
  "license": "MIT",
26
26
  "author": "paypay",
@@ -35,14 +35,10 @@
35
35
  "js-cookie": "^3.0.1"
36
36
  },
37
37
  "devDependencies": {
38
- "uuid": "^8.3.2",
39
- "vue": "^3.2.39",
40
- "ua-parser-js": "^1.0.2",
41
- "pinia": "^2.0.20",
42
- "lottie-web": "^5.9.6",
43
38
  "@babel/core": "^7.15.5",
44
39
  "@babel/plugin-transform-typescript": "^7.15.4",
45
40
  "@babel/preset-env": "^7.15.4",
41
+ "@braintree/browser-detection": "^1.16.0",
46
42
  "@braintree/sanitize-url": "^6.0.2",
47
43
  "@pinia/testing": "^0.0.12",
48
44
  "@rollup/plugin-replace": "^3.0.0",
@@ -51,11 +47,12 @@
51
47
  "@types/ip": "^1.1.0",
52
48
  "@types/jest": "^26.0.24",
53
49
  "@types/js-cookie": "^2.2.7",
50
+ "@types/lodash": "^4.14.195",
54
51
  "@types/ua-parser-js": "^0.7.36",
55
52
  "@types/uuid": "^8.3.1",
56
53
  "@typescript-eslint/eslint-plugin": "^5.58.0",
57
54
  "@typescript-eslint/parser": "^5.58.0",
58
- "@vitejs/plugin-vue": "^1.10.2",
55
+ "@vitejs/plugin-vue": "^4.2.3",
59
56
  "@vitejs/plugin-vue-jsx": "^1.3.10",
60
57
  "@vue/babel-plugin-jsx": "^1.0.7",
61
58
  "@vue/compiler-sfc": "^3.2.11",
@@ -76,15 +73,22 @@
76
73
  "jest-transform-stub": "^2.0.0",
77
74
  "less": "^4.1.1",
78
75
  "lint-staged": "^11.1.2",
76
+ "lottie-web": "^5.9.6",
77
+ "npm-run-all": "^4.1.5",
78
+ "pinia": "^2.0.20",
79
79
  "postcss-html": "^1.4.1",
80
80
  "postcss-less": "^6.0.0",
81
81
  "prettier": "^2.8.7",
82
82
  "stylelint": "^14.9.1",
83
+ "terser": "^5.18.1",
83
84
  "ts-jest": "^26.5.6",
84
- "typescript": "~4.4.2",
85
- "vite": "^2.9.15",
85
+ "typescript": "~4.5.5",
86
+ "ua-parser-js": "^1.0.2",
87
+ "uuid": "^8.3.2",
88
+ "vite": "^4.3.9",
86
89
  "vite-plugin-css-injected-by-js": "^2.1.0",
87
90
  "vite-plugin-dts": "^0.9.10",
91
+ "vue": "^3.2.39",
88
92
  "vue-eslint-parser": "^9.1.1",
89
93
  "vue-jest": "5.0.0-alpha.9",
90
94
  "vue-tsc": "^1.0.24"