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