@paypay/mini-app-js-sdk 1.18.0 → 1.22.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 (203) hide show
  1. package/dist/composition-api/dom/index.d.ts +5 -4
  2. package/dist/composition-api/dom/useCountDown.d.ts +20 -0
  3. package/dist/composition-api/dom/useEventListener.d.ts +8 -8
  4. package/dist/composition-api/dom/useHorizontalScrollDirective.d.ts +4 -4
  5. package/dist/composition-api/dom/useOnMountedOrActivated.d.ts +1 -1
  6. package/dist/composition-api/dom/useVerticalScrollDirective.d.ts +4 -4
  7. package/dist/composition-api/useErrorSheet.d.ts +3 -3
  8. package/dist/composition-api/useGetUserAddress.d.ts +2 -2
  9. package/dist/composition-api/useHeightProperties.d.ts +19 -19
  10. package/dist/composition-api/useInpuAddress.d.ts +2 -2
  11. package/dist/composition-api/useMakePayment.d.ts +3 -3
  12. package/dist/composition-api/useOpenApp.d.ts +3 -3
  13. package/dist/composition-api/useOpenMap.d.ts +3 -3
  14. package/dist/composition-api/useRegisterEmail.d.ts +2 -2
  15. package/dist/composition-api/useRenderSmartButton.d.ts +3 -3
  16. package/dist/composition-api/useShowAlert.d.ts +3 -3
  17. package/dist/composition-api/useShowUpdateWarning.d.ts +3 -3
  18. package/dist/composition-api/useTakePhoto.d.ts +3 -3
  19. package/dist/composition-api/useTopup.d.ts +3 -3
  20. package/dist/index.d.ts +3 -3
  21. package/dist/jsbridge-core/index.d.ts +4 -4
  22. package/dist/jsbridge-core/jsbridge.d.ts +62 -62
  23. package/dist/jsbridge-core/lib/browser.d.ts +3 -3
  24. package/dist/jsbridge-core/lib/logger.d.ts +9 -9
  25. package/dist/jsbridge-core/lib/reconstructParams.d.ts +2 -2
  26. package/dist/jsbridge-core/module.d.ts +15 -14
  27. package/dist/jsbridge-core/namespace.d.ts +2 -2
  28. package/dist/jsbridge-core/paypay-jsbridge.d.ts +17 -16
  29. package/dist/mini-app-api.d.ts +51 -51
  30. package/dist/mini-app-js-sdk.browser.js +1 -1
  31. package/dist/mini-app-js-sdk.d.ts +9 -9
  32. package/dist/mini-app-js-sdk.es.js +33675 -1
  33. package/dist/mini-app-js-sdk.min.css +1 -1
  34. package/dist/model/bridge/checkAccessToken.d.ts +3 -3
  35. package/dist/model/bridge/checkPaymentMethod.d.ts +2 -2
  36. package/dist/model/bridge/closeApp.d.ts +2 -2
  37. package/dist/model/bridge/copyToClipboard.d.ts +2 -2
  38. package/dist/model/bridge/debug.d.ts +3 -3
  39. package/dist/model/bridge/getAppDetail.d.ts +3 -17
  40. package/dist/model/bridge/getAuthStatus.d.ts +3 -3
  41. package/dist/model/bridge/getBalance.d.ts +2 -2
  42. package/dist/model/bridge/getConfigure.d.ts +39 -39
  43. package/dist/model/bridge/getDeviceInformation.d.ts +3 -3
  44. package/dist/model/bridge/getKycInformation.d.ts +2 -2
  45. package/dist/model/bridge/getPermissionStatus.d.ts +2 -2
  46. package/dist/model/bridge/getPlatformInformation.d.ts +3 -3
  47. package/dist/model/bridge/getSessionData.d.ts +2 -2
  48. package/dist/model/bridge/getStorageData.d.ts +2 -2
  49. package/dist/model/bridge/getTopBarHeight.d.ts +3 -3
  50. package/dist/model/bridge/getUAID.d.ts +3 -3
  51. package/dist/model/bridge/getUserAddress.d.ts +2 -2
  52. package/dist/model/bridge/getUserLocation.d.ts +2 -2
  53. package/dist/model/bridge/getUserProfile.d.ts +3 -3
  54. package/dist/model/bridge/index.d.ts +43 -43
  55. package/dist/model/bridge/init.d.ts +2 -2
  56. package/dist/model/bridge/inputAddress.d.ts +2 -2
  57. package/dist/model/bridge/logout.d.ts +3 -3
  58. package/dist/model/bridge/makePayment.d.ts +2 -2
  59. package/dist/model/bridge/openApp.d.ts +2 -2
  60. package/dist/model/bridge/openMap.d.ts +2 -2
  61. package/dist/model/bridge/openWebview.d.ts +3 -3
  62. package/dist/model/bridge/registerEmail.d.ts +2 -2
  63. package/dist/model/bridge/registerKyc.d.ts +2 -2
  64. package/dist/model/bridge/removeStorageData.d.ts +2 -2
  65. package/dist/model/bridge/render.d.ts +2 -2
  66. package/dist/model/bridge/renderLoginButton.d.ts +6 -2
  67. package/dist/model/bridge/renderPayButton.d.ts +6 -2
  68. package/dist/model/bridge/request.d.ts +2 -2
  69. package/dist/model/bridge/requestInternal.d.ts +2 -2
  70. package/dist/model/bridge/scanCode.d.ts +3 -3
  71. package/dist/model/bridge/setSessionData.d.ts +2 -2
  72. package/dist/model/bridge/setStorageData.d.ts +2 -2
  73. package/dist/model/bridge/setTitle.d.ts +2 -2
  74. package/dist/model/bridge/share.d.ts +2 -2
  75. package/dist/model/bridge/showAlert.d.ts +2 -2
  76. package/dist/model/bridge/showErrorSheet.d.ts +2 -2
  77. package/dist/model/bridge/showUpdateWarning.d.ts +2 -2
  78. package/dist/model/bridge/startMultiFactorAuth.d.ts +2 -2
  79. package/dist/model/bridge/takePhoto.d.ts +2 -2
  80. package/dist/model/bridge/topup.d.ts +2 -2
  81. package/dist/model/bridge/verifyMultiFactorAuthResult.d.ts +3 -3
  82. package/dist/model/makePayment.d.ts +334 -324
  83. package/dist/model/miniAppError.d.ts +57 -57
  84. package/dist/model/miniAppStatus.d.ts +9 -9
  85. package/dist/model/permission.d.ts +21 -21
  86. package/dist/model/uiComponents.d.ts +24 -23
  87. package/dist/package/action-sheet/index.d.ts +97 -91
  88. package/dist/package/banner-header/index.vue.d.ts +56 -56
  89. package/dist/package/button/index.d.ts +77 -69
  90. package/dist/package/charge-amount-list/index.vue.d.ts +48 -54
  91. package/dist/package/charge-amount-more-list/index.vue.d.ts +23 -19
  92. package/dist/package/date-button/index.vue.d.ts +19 -21
  93. package/dist/package/desktop-header/index.d.ts +21 -0
  94. package/dist/package/divider/index.d.ts +21 -22
  95. package/dist/package/header/index.d.ts +65 -65
  96. package/dist/package/index.d.ts +17 -16
  97. package/dist/package/input/index.d.ts +209 -170
  98. package/dist/package/input/utils.d.ts +10 -10
  99. package/dist/package/lottie/index.d.ts +58 -62
  100. package/dist/package/overlay/index.d.ts +44 -45
  101. package/dist/package/payment-method/Bank.vue.d.ts +35 -35
  102. package/dist/package/payment-method/CreditCard.vue.d.ts +42 -42
  103. package/dist/package/payment-method/SbidBank.vue.d.ts +279 -21
  104. package/dist/package/payment-method/Wallet.vue.d.ts +289 -31
  105. package/dist/package/payment-method/index.d.ts +15 -15
  106. package/dist/package/payment-method-list/index.vue.d.ts +39 -27
  107. package/dist/package/payment-type/Bank.vue.d.ts +31 -31
  108. package/dist/package/payment-type/CreditCard.vue.d.ts +32 -32
  109. package/dist/package/payment-type/Sbid.vue.d.ts +275 -17
  110. package/dist/package/payment-type/Wallet.vue.d.ts +276 -17
  111. package/dist/package/payment-type/index.d.ts +13 -15
  112. package/dist/package/select-list/Components.d.ts +77 -65
  113. package/dist/package/select-list/index.d.ts +82 -73
  114. package/dist/package/switch/index.d.ts +22 -23
  115. package/dist/package/wallet-breakdown/WalletBreakdown.vue.d.ts +286 -0
  116. package/dist/types.d.ts +376 -344
  117. package/dist/utils/api.d.ts +168 -147
  118. package/dist/utils/common.d.ts +2 -2
  119. package/dist/utils/create/bem.d.ts +6 -6
  120. package/dist/utils/create/index.d.ts +5 -5
  121. package/dist/utils/fetch.d.ts +16 -16
  122. package/dist/utils/getImages.d.ts +36 -5
  123. package/dist/utils/getLanguage.d.ts +225 -3
  124. package/dist/utils/helper.d.ts +44 -47
  125. package/dist/utils/ip.d.ts +2 -2
  126. package/dist/utils/miniAppRequest.d.ts +9 -9
  127. package/dist/utils/popstateHandler.d.ts +4 -4
  128. package/dist/utils/secondary-list.d.ts +1 -1
  129. package/dist/utils/storage.d.ts +28 -26
  130. package/dist/utils/uiConstants.d.ts +1 -0
  131. package/dist/utils/useBreakpoints.d.ts +5 -0
  132. package/dist/utils/utils.d.ts +2 -0
  133. package/dist/views/email-registration/App.vue.d.ts +302 -79
  134. package/dist/views/email-registration/components/EmailButton.vue.d.ts +45 -45
  135. package/dist/views/email-registration/components/icons.d.ts +2 -2
  136. package/dist/views/email-registration/hooks/callback.d.ts +7 -7
  137. package/dist/views/email-registration/hooks/ui.d.ts +29 -29
  138. package/dist/views/email-registration/parts/RegisterEmail/RegisterEmail.vue.d.ts +52 -52
  139. package/dist/views/email-registration/parts/RegisterEmail/ResendEmailSheet.vue.d.ts +24 -24
  140. package/dist/views/error-sheet/Index.vue.d.ts +310 -52
  141. package/dist/views/get-user-address/App.vue.d.ts +52 -52
  142. package/dist/views/get-user-address/Sheet/AddSheet/Contents.vue.d.ts +307 -73
  143. package/dist/views/get-user-address/Sheet/AddSheet/DeleteHalfSheet.vue.d.ts +281 -23
  144. package/dist/views/get-user-address/Sheet/AddSheet/Footer.vue.d.ts +276 -33
  145. package/dist/views/get-user-address/Sheet/AddSheet/TagForm.vue.d.ts +258 -35
  146. package/dist/views/get-user-address/Sheet/AddSheet/constants.d.ts +4 -4
  147. package/dist/views/get-user-address/Sheet/AddSheet/index.vue.d.ts +311 -83
  148. package/dist/views/get-user-address/Sheet/App.vue.d.ts +79 -70
  149. package/dist/views/get-user-address/Sheet/DisplaySheet/Address.vue.d.ts +264 -32
  150. package/dist/views/get-user-address/Sheet/DisplaySheet/Footer.vue.d.ts +249 -25
  151. package/dist/views/get-user-address/Sheet/DisplaySheet/index.vue.d.ts +332 -49
  152. package/dist/views/get-user-address/Sheet/SelectedAddress/NoRegisteredAddressMessage.vue.d.ts +240 -0
  153. package/dist/views/get-user-address/Sheet/SelectedAddress/SelectedAddress.vue.d.ts +259 -0
  154. package/dist/views/get-user-address/Sheet/SelectedAddress/components/AddressInfo.vue.d.ts +254 -0
  155. package/dist/views/get-user-address/Sheet/SelectedAddress/components/Footer.vue.d.ts +246 -0
  156. package/dist/views/get-user-address/hooks/ui-hooks.d.ts +57 -14
  157. package/dist/views/get-user-address/store/error-handle.d.ts +13 -12
  158. package/dist/views/get-user-address/store/root.d.ts +18 -14
  159. package/dist/views/input-address/App.vue.d.ts +35 -36
  160. package/dist/views/input-address/hook/app.d.ts +13 -13
  161. package/dist/views/input-address/hook/error-handle.d.ts +10 -10
  162. package/dist/views/input-address/hook/root.d.ts +10 -10
  163. package/dist/views/make-payment/App.vue.d.ts +52 -60
  164. package/dist/views/make-payment/Main.vue.d.ts +197 -638
  165. package/dist/views/make-payment/Sheets/AddressInfo.vue.d.ts +247 -25
  166. package/dist/views/make-payment/Sheets/CashBackDetailList.vue.d.ts +244 -20
  167. package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirm.vue.d.ts +277 -19
  168. package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirmError.vue.d.ts +274 -16
  169. package/dist/views/make-payment/Sheets/CashBackDetails/FloatingButton.vue.d.ts +24 -24
  170. package/dist/views/make-payment/Sheets/CashBackDetails/hooks.d.ts +26 -26
  171. package/dist/views/make-payment/Sheets/CashBackDetails/index.vue.d.ts +311 -53
  172. package/dist/views/make-payment/Sheets/Charge/ChoosePaymentMethod.vue.d.ts +269 -32
  173. package/dist/views/make-payment/Sheets/Charge/TopContent.vue.d.ts +422 -80
  174. package/dist/views/make-payment/Sheets/Charge/TopInfo.vue.d.ts +308 -49
  175. package/dist/views/make-payment/Sheets/Charge/index.vue.d.ts +833 -522
  176. package/dist/views/make-payment/Sheets/ChoosePayment.vue.d.ts +264 -38
  177. package/dist/views/make-payment/Sheets/CloseConfirmation.vue.d.ts +265 -0
  178. package/dist/views/make-payment/Sheets/Consult.vue.d.ts +23 -23
  179. package/dist/views/make-payment/Sheets/DuplicatePayment.vue.d.ts +250 -27
  180. package/dist/views/make-payment/Sheets/PayMethod.vue.d.ts +328 -0
  181. package/dist/views/make-payment/Sheets/Payment.vue.d.ts +428 -108
  182. package/dist/views/make-payment/Sheets/PaymentCompletion/CashBackDetailRow.vue.d.ts +70 -36
  183. package/dist/views/make-payment/Sheets/PaymentCompletion/index.vue.d.ts +354 -69
  184. package/dist/views/make-payment/hooks/app-hooks.d.ts +381 -568
  185. package/dist/views/make-payment/hooks/ui-hooks.d.ts +87 -72
  186. package/dist/views/make-payment/store/age-confirm.d.ts +9 -9
  187. package/dist/views/make-payment/store/handle-error.d.ts +36 -36
  188. package/dist/views/make-payment/store/root.d.ts +22 -22
  189. package/dist/views/make-payment/store/util-for-handle-error.d.ts +16 -16
  190. package/dist/views/make-payment/utils/paymentMethod.d.ts +5 -3
  191. package/dist/views/open-app/App.vue.d.ts +286 -28
  192. package/dist/views/open-map/App.vue.d.ts +251 -28
  193. package/dist/views/show-alert/App.vue.d.ts +36 -36
  194. package/dist/views/show-update-warning/App.vue.d.ts +286 -28
  195. package/dist/views/smart-button/App.vue.d.ts +87 -87
  196. package/dist/views/take-photo/App.vue.d.ts +248 -25
  197. package/dist/views/take-photo/helper.d.ts +2 -2
  198. package/dist/views/topup/App.vue.d.ts +378 -100
  199. package/dist/views/topup/BannerInfo.vue.d.ts +27 -23
  200. package/dist/views/topup/CashbackInfo.vue.d.ts +267 -44
  201. package/dist/views/topup/TopupCompletion.vue.d.ts +286 -26
  202. package/package.json +12 -18
  203. package/dist/utils/mock-data/mockData.d.ts +0 -64
@@ -1,324 +1,334 @@
1
- import { ErrorResponse } from '../utils/fetch';
2
- import { MiniAppErrorType } from './miniAppError';
3
- import { Amount } from '../types';
4
- import { UIComponentsError } from './uiComponents';
5
- export interface PaymentIdQuery {
6
- merchant?: string;
7
- sourceInfoApp?: string;
8
- type?: string;
9
- }
10
- export interface PaymentQuery {
11
- merchant?: string;
12
- agreeSimilarTransaction: boolean;
13
- }
14
- interface PaymentBody {
15
- merchantPaymentId: string;
16
- amount: Amount;
17
- orderReceiptNumber?: string;
18
- orderDescription?: string;
19
- orderItems?: Array<any>;
20
- metaData?: any;
21
- storeId?: string;
22
- paymentMethodId: string;
23
- terminalId: number | string;
24
- merchantAlias?: string;
25
- requestedAt?: number;
26
- productType?: string;
27
- sourceInfoApp?: string;
28
- storeInfo?: string;
29
- metadata?: string;
30
- }
31
- export declare type Balance = {
32
- balance: number;
33
- currency: 'JPY';
34
- usable: boolean;
35
- };
36
- export declare enum PaymentMethodType {
37
- WALLET = "WALLET",
38
- CREDIT_CARD = "CREDIT_CARD",
39
- BANK = "BANK",
40
- YMONEY_BANK = "YMONEY_BANK",
41
- SBID_CARRIER_BILLING = "SBID_CARRIER_BILLING",
42
- PAY_LATER = "PAY_LATER",
43
- PAY_LATER_CC = "PAY_LATER_CC"
44
- }
45
- declare type MethodBase = {
46
- paymentMethodId: string;
47
- bankInfo: null;
48
- paymentMethodType: PaymentMethodType;
49
- walletInfo: null;
50
- descriptionBannerInfo?: BannerInfo;
51
- };
52
- export declare type BannerInfo = {
53
- label?: string;
54
- title?: string;
55
- iconImageUrl?: string;
56
- displayResponse?: UIComponentsError;
57
- };
58
- export declare type WalletMethod = Omit<MethodBase, 'walletInfo'> & {
59
- paymentMethodType: PaymentMethodType.WALLET;
60
- walletInfo: {
61
- cashBackBalanceInfo: Balance;
62
- cashBackExpirableBalanceInfo: Balance;
63
- emoneyBalanceInfo: Balance;
64
- prepaidBalanceInfo: Balance;
65
- walletSummary: {
66
- totalBalanceInfo: Balance;
67
- payoutableBalanceInfo: Balance;
68
- transferableBalanceInfo: Balance;
69
- };
70
- walletDetail: {
71
- emoneyBalanceInfo?: Balance;
72
- prepaidBalanceInfo?: Balance;
73
- cashBackBalanceInfo?: Balance;
74
- cashBackExpirableBalanceInfo?: Balance;
75
- };
76
- };
77
- };
78
- export declare enum CreditTypes {
79
- VISA = "VISA",
80
- MASTER = "MASTER",
81
- JCB = "JCB",
82
- DINERS = "D",
83
- AMEX = "A",
84
- OTHER = "O"
85
- }
86
- export declare enum PaymentMethodStatus {
87
- ACTIVATED = "ACTIVATED",
88
- OFF = "OFF",
89
- APPLYING = "APPLYING",
90
- MAINTENANCE = "MAINTENANCE",
91
- BUSY = "BUSY"
92
- }
93
- export declare type CreditMethod = Omit<MethodBase, 'creditCardInfo'> & {
94
- paymentMethodId: Number;
95
- paymentMethodType: PaymentMethodType.CREDIT_CARD;
96
- paymentMethodDescriptionInfo: any;
97
- creditCardInfo: {
98
- brand: CreditTypes;
99
- isAuthenticated: boolean;
100
- isExpired: boolean;
101
- isYjCard: boolean;
102
- last4digits: string;
103
- ccType: string;
104
- paymentMethodStatus: PaymentMethodStatus;
105
- };
106
- };
107
- export declare enum bankCode {
108
- MIZUHO_BANK_CODE = "0001",
109
- MUFJ_BANK_CODE = "0005",
110
- SMBC_BANK_CODE = "0009",
111
- RESONA_BANK_CODE = "0010",
112
- S_RESONA_BANK_CODE = "0017",
113
- JNB_BANK_CODE = "0033",
114
- YUCHO_BANK_CODE = "9900",
115
- AEON_BANK_CODE = "0040",
116
- JIBUN_BANK_CODE = "0039",
117
- SBI_BANK_CODE = "0038"
118
- }
119
- export declare enum status {
120
- 'ACTIVATED' = "",
121
- 'OFF' = "\u7121\u52B9",
122
- 'APPLYING' = "\u5229\u7528\u4E0D\u53EF",
123
- 'MAINTENANCE' = "\u30E1\u30F3\u30C6\u30CA\u30F3\u30B9\u4E2D",
124
- 'BUSY' = "\u5229\u7528\u4E0D\u53EF"
125
- }
126
- export declare type BankInfo = {
127
- paymentMethodStatusLabel: string;
128
- paymentMethodStatus: PaymentMethodStatus;
129
- bankName: string;
130
- bankLogoUrl: string;
131
- bankCode: string;
132
- bankCardImage: {
133
- cardUrl: string;
134
- textColor: string;
135
- uiColor: string;
136
- };
137
- bankBranchName: string;
138
- bankBranchCode: string;
139
- bankAccountType: string;
140
- bankAccountNumberLast2digits: string;
141
- };
142
- export declare type BankMethod = Omit<MethodBase, 'bankInfo'> & {
143
- paymentMethodId: Number;
144
- paymentMethodType: PaymentMethodType.BANK | PaymentMethodType.YMONEY_BANK;
145
- paymentMethodDescriptionInfo: any;
146
- bankInfo: BankInfo;
147
- };
148
- export declare type SbidBankMethod = Omit<MethodBase, 'sbidCarrierBillingInfo'> & {
149
- paymentMethodId: Number;
150
- paymentMethodType: PaymentMethodType.SBID_CARRIER_BILLING;
151
- paymentMethodDescriptionInfo: any;
152
- sbidCarrierBillingInfo: {
153
- paymentMethodStatus: PaymentMethodStatus;
154
- };
155
- };
156
- export declare type PayLaterMethod = Omit<MethodBase, ''> & {
157
- paymentMethodId: Number;
158
- paymentMethodType: PaymentMethodType.PAY_LATER | PaymentMethodType.PAY_LATER_CC;
159
- paymentMethodDescriptionInfo: any;
160
- };
161
- export declare type ResponseBase = {
162
- status: number;
163
- signed: any;
164
- uiComponents?: {
165
- displayErrorResponse: UIComponentsError;
166
- };
167
- unsigned: {
168
- resultInfo: {
169
- code: MiniAppErrorType;
170
- };
171
- };
172
- };
173
- export declare type PaymentMethod = WalletMethod | CreditMethod | BankMethod | SbidBankMethod | PayLaterMethod;
174
- export declare type getPaymentMethodsResponse = ResponseBase & {
175
- unsigned: {
176
- data: {
177
- payload: {
178
- paymentMethodList: PaymentMethod[];
179
- };
180
- };
181
- };
182
- };
183
- export declare const getPaymentMethods: (params: any) => Promise<getPaymentMethodsResponse | ErrorResponse>;
184
- export declare type PaymentResult = {
185
- requestedAt: number;
186
- storeId: string;
187
- amount: Amount;
188
- statusLabelString: string;
189
- statusLabelColor: string;
190
- userAuthorizationId: string;
191
- acceptedAt: number;
192
- merchantName: string;
193
- orderDescription: string;
194
- status: 'COMPLETED' | 'AUTHORIZED';
195
- paymentId: string;
196
- expiresAt: number;
197
- };
198
- export declare type MakePaymentResponse = ResponseBase & {
199
- signed: {
200
- jws: string;
201
- };
202
- unsigned: {
203
- data: PaymentResult;
204
- };
205
- };
206
- export declare const makePayment: (queryParams: PaymentQuery, body: PaymentBody, isAuthorization: Boolean) => Promise<{
207
- isSuccess: boolean;
208
- } & (MakePaymentResponse | ErrorResponse)>;
209
- export declare type AppealDescription = {
210
- backgroundColor: string;
211
- color: string;
212
- headerIcon: string | null;
213
- isBold: true;
214
- linkUrl: string;
215
- text: string;
216
- };
217
- export declare type InsufficientBalanceInfo = {
218
- appealDescription: AppealDescription;
219
- insufficientAmount: number;
220
- paymentMethodList: PaymentMethod[];
221
- prepaidOnly: boolean | null;
222
- recommendedTopupAmount: number;
223
- totalBalanceInfo: {
224
- balance: number;
225
- currency: 'JPY';
226
- };
227
- };
228
- export declare type ConsultError = {
229
- backendResultCode: string;
230
- displayErrorResponse?: UIComponentsError;
231
- insufficientAmount: number;
232
- insufficientBalanceInfo: InsufficientBalanceInfo;
233
- paymentMethodList: PaymentMethod[];
234
- recommendedTopupAmount: number;
235
- };
236
- export declare type ConsultResponse = ResponseBase & {
237
- unsigned: {
238
- resultInfo: any;
239
- data: {
240
- error?: ConsultError;
241
- header: {
242
- resultCode: string;
243
- };
244
- };
245
- };
246
- };
247
- export declare const getConsult: ({ merchant, amount, productType, }: {
248
- merchant: string;
249
- amount: number;
250
- productType: string;
251
- }) => Promise<ErrorResponse | ConsultResponse>;
252
- export declare enum CashBackAnimationType {
253
- TIER_CAMPAIGN_BOTTOM = "TIER_CAMPAIGN_BOTTOM",
254
- LOTTERY = "LOTTERY",
255
- TIER_CAMPAIGN_FULL = "TIER_CAMPAIGN_FULL"
256
- }
257
- export declare type CashBackDetailAnimation = {
258
- soundUrl: string;
259
- campaignUrl: string;
260
- campaignHomeUrl?: string;
261
- amount: number;
262
- showAgeConfirmFlag: boolean;
263
- shareDetail?: {
264
- text: string;
265
- imageUrl: string;
266
- };
267
- animationType: CashBackAnimationType;
268
- optionalText: string;
269
- campaignId: string;
270
- url: string;
271
- };
272
- declare type CashBackDetailInfo = {
273
- amountText: string;
274
- deeplinkUrl: string;
275
- campaignName: string;
276
- campaignId: string;
277
- status: string;
278
- isMeti: boolean;
279
- bannerId?: string;
280
- optionalText?: string;
281
- googleAnalyticsInfo?: any;
282
- };
283
- export declare type CashBackDetail = {
284
- cashBackAmount: number;
285
- cashBackAmountText?: string;
286
- cashBackDetailLinkLabel: string;
287
- cashBackDetailList: CashBackDetailInfo[];
288
- animationInfoList: CashBackDetailAnimation[];
289
- optionalText: string;
290
- animationUrl: string;
291
- couponCashbackDetail: string;
292
- googleAnalyticsInfo: any;
293
- cashBackDescription: string;
294
- cashBackDetailListDescription: string;
295
- lotteryAnimationUrl?: string;
296
- };
297
- export declare type CashBackDetailResponse = ResponseBase & {
298
- unsigned: {
299
- data: {
300
- payload: CashBackDetail;
301
- };
302
- };
303
- };
304
- export declare const getCashBackDetails: (paymentId: string) => Promise<ErrorResponse | CashBackDetailResponse>;
305
- export declare type SendAgePayload = {
306
- month: number;
307
- orderId: string;
308
- year: number;
309
- orderType: 'ACQUIRING';
310
- amount: number;
311
- date: number;
312
- campaignId: string;
313
- };
314
- export declare type SendAgeResponse = ResponseBase & {
315
- unsigned: {
316
- data: {
317
- payload: {
318
- isEligibleForCashBack: boolean;
319
- };
320
- };
321
- };
322
- };
323
- export declare const sendAge: (payload: SendAgePayload) => Promise<ErrorResponse | SendAgeResponse>;
324
- export {};
1
+ import { ErrorResponse } from '../utils/fetch';
2
+ import { MiniAppErrorType } from './miniAppError';
3
+ import { Amount, OrderItem } from '../types';
4
+ import { UIComponentsError } from './uiComponents';
5
+ export interface PaymentIdQuery {
6
+ merchant?: string;
7
+ sourceInfoApp?: string;
8
+ type?: string;
9
+ }
10
+ export interface PaymentQuery {
11
+ merchant?: string;
12
+ agreeSimilarTransaction: boolean;
13
+ }
14
+ interface PaymentBody {
15
+ merchantPaymentId: string;
16
+ amount: Amount;
17
+ orderReceiptNumber?: string;
18
+ orderDescription?: string;
19
+ orderItems?: Array<OrderItem>;
20
+ metaData?: unknown;
21
+ storeId?: string;
22
+ paymentMethodId: string;
23
+ terminalId?: number | string;
24
+ merchantAlias?: string;
25
+ requestedAt?: number;
26
+ productType?: string;
27
+ sourceInfoApp?: string;
28
+ storeInfo?: string;
29
+ metadata?: unknown;
30
+ expiresAt?: number;
31
+ merchant?: string;
32
+ }
33
+ export declare type Balance = {
34
+ balance: number;
35
+ currency: 'JPY';
36
+ usable: boolean;
37
+ };
38
+ export declare enum PaymentMethodType {
39
+ WALLET = "WALLET",
40
+ CREDIT_CARD = "CREDIT_CARD",
41
+ BANK = "BANK",
42
+ YMONEY_BANK = "YMONEY_BANK",
43
+ SBID_CARRIER_BILLING = "SBID_CARRIER_BILLING",
44
+ PAY_LATER = "PAY_LATER",
45
+ PAY_LATER_CC = "PAY_LATER_CC"
46
+ }
47
+ export declare enum PaymentOpType {
48
+ PAY = "PAY",
49
+ TOPUP = "TOPUP"
50
+ }
51
+ export interface PaymentState {
52
+ paymentMethods: PaymentMethod[];
53
+ selectPaymentIndex: number;
54
+ bannerInfo: BannerInfo;
55
+ showPaymentMethodList: boolean;
56
+ }
57
+ declare type MethodBase = {
58
+ paymentMethodId: string;
59
+ paymentMethodType: PaymentMethodType;
60
+ descriptionBannerInfo?: BannerInfo;
61
+ walletInfo?: unknown;
62
+ creditCardInfo?: unknown;
63
+ bankInfo?: unknown;
64
+ sbidCarrierBillingInfo?: unknown;
65
+ paymentMethodDescriptionInfo?: {
66
+ statusDescription: Record<string, unknown>;
67
+ };
68
+ };
69
+ export declare type BannerInfo = {
70
+ label?: string;
71
+ title?: string;
72
+ iconImageUrl?: string;
73
+ displayResponse?: UIComponentsError;
74
+ };
75
+ export declare type WalletMethod = Omit<MethodBase, 'walletInfo'> & {
76
+ walletInfo?: {
77
+ cashBackBalanceInfo?: Balance;
78
+ cashBackExpirableBalanceInfo?: Balance;
79
+ emoneyBalanceInfo?: Balance;
80
+ prepaidBalanceInfo?: Balance;
81
+ walletSummary?: {
82
+ totalBalanceInfo: Balance;
83
+ payoutableBalanceInfo: Balance;
84
+ transferableBalanceInfo: Balance;
85
+ };
86
+ walletDetail?: {
87
+ emoneyBalanceInfo?: Balance;
88
+ prepaidBalanceInfo?: Balance;
89
+ cashBackBalanceInfo?: Balance;
90
+ cashBackExpirableBalanceInfo?: Balance;
91
+ };
92
+ };
93
+ };
94
+ export declare enum CreditTypes {
95
+ VISA = "VISA",
96
+ MASTER = "MASTER",
97
+ JCB = "JCB",
98
+ DINERS = "D",
99
+ AMEX = "A",
100
+ OTHER = "O"
101
+ }
102
+ export declare enum PaymentMethodStatus {
103
+ ACTIVATED = "ACTIVATED",
104
+ OFF = "OFF",
105
+ APPLYING = "APPLYING",
106
+ MAINTENANCE = "MAINTENANCE",
107
+ BUSY = "BUSY"
108
+ }
109
+ export declare type CreditMethod = Omit<MethodBase, 'creditCardInfo'> & {
110
+ creditCardInfo?: {
111
+ brand?: CreditTypes;
112
+ isAuthenticated?: boolean;
113
+ isExpired?: boolean;
114
+ isYjCard?: boolean;
115
+ last4digits?: string;
116
+ ccType?: string;
117
+ paymentMethodStatus?: PaymentMethodStatus;
118
+ };
119
+ };
120
+ export declare enum bankCode {
121
+ MIZUHO_BANK_CODE = "0001",
122
+ MUFJ_BANK_CODE = "0005",
123
+ SMBC_BANK_CODE = "0009",
124
+ RESONA_BANK_CODE = "0010",
125
+ S_RESONA_BANK_CODE = "0017",
126
+ JNB_BANK_CODE = "0033",
127
+ YUCHO_BANK_CODE = "9900",
128
+ AEON_BANK_CODE = "0040",
129
+ JIBUN_BANK_CODE = "0039",
130
+ SBI_BANK_CODE = "0038"
131
+ }
132
+ export declare enum status {
133
+ 'ACTIVATED' = "",
134
+ 'OFF' = "\u7121\u52B9",
135
+ 'APPLYING' = "\u5229\u7528\u4E0D\u53EF",
136
+ 'MAINTENANCE' = "\u30E1\u30F3\u30C6\u30CA\u30F3\u30B9\u4E2D",
137
+ 'BUSY' = "\u5229\u7528\u4E0D\u53EF"
138
+ }
139
+ export declare type BankInfo = {
140
+ paymentMethodStatusLabel?: string;
141
+ paymentMethodStatus?: PaymentMethodStatus;
142
+ bankName?: string;
143
+ bankLogoUrl?: string;
144
+ bankCode?: string;
145
+ bankCardImage?: {
146
+ cardUrl: string;
147
+ textColor: string;
148
+ uiColor: string;
149
+ };
150
+ bankBranchName?: string;
151
+ bankBranchCode?: string;
152
+ bankAccountType?: string;
153
+ bankAccountNumberLast2digits?: string;
154
+ };
155
+ export declare type BankMethod = Omit<MethodBase, 'bankInfo'> & {
156
+ bankInfo?: BankInfo;
157
+ };
158
+ export declare type SbidBankMethod = Omit<MethodBase, 'sbidCarrierBillingInfo'> & {
159
+ sbidCarrierBillingInfo?: {
160
+ paymentMethodStatus?: PaymentMethodStatus;
161
+ };
162
+ };
163
+ export declare type PayLaterMethod = Omit<MethodBase, ''>;
164
+ export declare type ResponseBase = {
165
+ status: number;
166
+ signed: {
167
+ jws?: string;
168
+ };
169
+ uiComponents?: {
170
+ displayErrorResponse: UIComponentsError;
171
+ };
172
+ unsigned: {
173
+ resultInfo: {
174
+ code: MiniAppErrorType;
175
+ };
176
+ };
177
+ };
178
+ export declare type PaymentMethod = WalletMethod | CreditMethod | BankMethod | SbidBankMethod | PayLaterMethod;
179
+ export declare type getPaymentMethodsResponse = ResponseBase & {
180
+ unsigned: {
181
+ data: {
182
+ payload: {
183
+ paymentMethodList: PaymentMethod[];
184
+ };
185
+ };
186
+ };
187
+ };
188
+ export declare const getPaymentMethods: (params: {
189
+ merchant?: string;
190
+ type: string;
191
+ productType?: string;
192
+ sourceInfoApp?: string;
193
+ }) => Promise<ErrorResponse | getPaymentMethodsResponse>;
194
+ export declare type PaymentResult = {
195
+ requestedAt: number;
196
+ storeId: string;
197
+ amount: Amount;
198
+ statusLabelString: string;
199
+ statusLabelColor: string;
200
+ userAuthorizationId: string;
201
+ acceptedAt: number;
202
+ merchantName: string;
203
+ orderDescription: string;
204
+ status: 'COMPLETED' | 'AUTHORIZED';
205
+ paymentId: string;
206
+ expiresAt: number;
207
+ };
208
+ export declare type MakePaymentResponse = ResponseBase & {
209
+ signed: {
210
+ jws: string;
211
+ };
212
+ unsigned: {
213
+ data: PaymentResult;
214
+ };
215
+ };
216
+ export declare const makePayment: (queryParams: PaymentQuery, body: PaymentBody, isAuthorization: boolean) => Promise<{
217
+ isSuccess: boolean;
218
+ } & (ErrorResponse | MakePaymentResponse)>;
219
+ export declare type AppealDescription = {
220
+ backgroundColor: string;
221
+ color: string;
222
+ headerIcon: string | null;
223
+ isBold: true;
224
+ linkUrl: string;
225
+ text: string;
226
+ };
227
+ export declare type InsufficientBalanceInfo = {
228
+ appealDescription: AppealDescription;
229
+ insufficientAmount: number;
230
+ paymentMethodList: PaymentMethod[];
231
+ prepaidOnly: boolean | null;
232
+ recommendedTopupAmount: number;
233
+ totalBalanceInfo: {
234
+ balance: number;
235
+ currency: 'JPY';
236
+ };
237
+ };
238
+ export declare type ConsultError = {
239
+ backendResultCode: string;
240
+ displayErrorResponse?: UIComponentsError;
241
+ insufficientAmount: number;
242
+ insufficientBalanceInfo: InsufficientBalanceInfo;
243
+ paymentMethodList: PaymentMethod[];
244
+ recommendedTopupAmount: number;
245
+ };
246
+ export declare type ConsultResponse = ResponseBase & {
247
+ unsigned: {
248
+ resultInfo: unknown;
249
+ data: {
250
+ error?: ConsultError;
251
+ header: {
252
+ resultCode: string;
253
+ };
254
+ };
255
+ };
256
+ };
257
+ export declare const getConsult: ({ merchant, amount, productType, }: {
258
+ merchant: string;
259
+ amount: number;
260
+ productType: string;
261
+ }) => Promise<ErrorResponse | ConsultResponse>;
262
+ export declare enum CashBackAnimationType {
263
+ TIER_CAMPAIGN_BOTTOM = "TIER_CAMPAIGN_BOTTOM",
264
+ LOTTERY = "LOTTERY",
265
+ TIER_CAMPAIGN_FULL = "TIER_CAMPAIGN_FULL"
266
+ }
267
+ export declare type CashBackDetailAnimation = {
268
+ soundUrl: string;
269
+ campaignUrl: string;
270
+ campaignHomeUrl?: string;
271
+ amount: number;
272
+ showAgeConfirmFlag: boolean;
273
+ shareDetail?: {
274
+ text: string;
275
+ imageUrl: string;
276
+ };
277
+ animationType: CashBackAnimationType;
278
+ optionalText: string;
279
+ campaignId: string;
280
+ url: string;
281
+ };
282
+ declare type CashBackDetailInfo = {
283
+ amountText: string;
284
+ deeplinkUrl: string;
285
+ campaignName: string;
286
+ campaignId: string;
287
+ status: string;
288
+ isMeti: boolean;
289
+ bannerId?: string;
290
+ optionalText?: string;
291
+ googleAnalyticsInfo?: unknown;
292
+ };
293
+ export declare type CashBackDetail = {
294
+ cashBackAmount: number;
295
+ cashBackAmountText?: string;
296
+ cashBackDetailLinkLabel: string;
297
+ cashBackDetailList: CashBackDetailInfo[];
298
+ animationInfoList: CashBackDetailAnimation[];
299
+ optionalText: string;
300
+ animationUrl: string;
301
+ couponCashbackDetail: string;
302
+ googleAnalyticsInfo: unknown;
303
+ cashBackDescription: string;
304
+ cashBackDetailListDescription: string;
305
+ lotteryAnimationUrl?: string;
306
+ };
307
+ export declare type CashBackDetailResponse = ResponseBase & {
308
+ unsigned: {
309
+ data: {
310
+ payload: CashBackDetail;
311
+ };
312
+ };
313
+ };
314
+ export declare const getCashBackDetails: (paymentId: string) => Promise<ErrorResponse | CashBackDetailResponse>;
315
+ export declare type SendAgePayload = {
316
+ month: number;
317
+ orderId: string;
318
+ year: number;
319
+ orderType: 'ACQUIRING';
320
+ amount: number;
321
+ date: number;
322
+ campaignId: string;
323
+ };
324
+ export declare type SendAgeResponse = ResponseBase & {
325
+ unsigned: {
326
+ data: {
327
+ payload: {
328
+ isEligibleForCashBack: boolean;
329
+ };
330
+ };
331
+ };
332
+ };
333
+ export declare const sendAge: (payload: SendAgePayload) => Promise<ErrorResponse | SendAgeResponse>;
334
+ export {};