@yuno-payments/sdk-web-types 4.1.1 → 4.2.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.
- package/dist/global.d.ts +303 -0
- package/dist/index.d.ts +304 -1
- package/package.json +1 -1
package/dist/global.d.ts
CHANGED
|
@@ -87,6 +87,10 @@ declare enum StatusEnrollment {
|
|
|
87
87
|
ERROR = "ERROR",
|
|
88
88
|
UNENROLLED = "UNENROLLED"
|
|
89
89
|
}
|
|
90
|
+
type ExternalProviderId = {
|
|
91
|
+
provider_id: string;
|
|
92
|
+
session_id: string;
|
|
93
|
+
};
|
|
90
94
|
|
|
91
95
|
type ApiClientPaymentArgs = {
|
|
92
96
|
checkout_session?: string;
|
|
@@ -165,6 +169,304 @@ type ExecuteFraudCheckReturn<TStatus = 'success' | 'error'> = TStatus extends 's
|
|
|
165
169
|
};
|
|
166
170
|
type ExecuteFraudCheck = (args: ExecuteFraudCheckArgs) => Promise<ExecuteFraudCheckReturn>;
|
|
167
171
|
|
|
172
|
+
declare namespace C2PHeadless {
|
|
173
|
+
interface PaymentResponse {
|
|
174
|
+
id: string;
|
|
175
|
+
status: string;
|
|
176
|
+
sub_status: string;
|
|
177
|
+
merchant_order_id: string;
|
|
178
|
+
description: string;
|
|
179
|
+
created_at: string;
|
|
180
|
+
updated_at: string;
|
|
181
|
+
payment_method_icon?: string;
|
|
182
|
+
payment_method_name?: string;
|
|
183
|
+
transactions: {
|
|
184
|
+
id: string;
|
|
185
|
+
category: string;
|
|
186
|
+
status: string;
|
|
187
|
+
payment_method_type: string;
|
|
188
|
+
created_at: string;
|
|
189
|
+
updated_at: string;
|
|
190
|
+
provider: unknown;
|
|
191
|
+
amount: {
|
|
192
|
+
currency: string;
|
|
193
|
+
value: number;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
enrollment?: {
|
|
197
|
+
customer_session: string;
|
|
198
|
+
};
|
|
199
|
+
has_fraud_screening?: boolean;
|
|
200
|
+
}
|
|
201
|
+
type ClickToPayArgs = {
|
|
202
|
+
checkoutSession: string;
|
|
203
|
+
language: string;
|
|
204
|
+
countryCode: string;
|
|
205
|
+
deviceFingerprints?: ExternalProviderId[];
|
|
206
|
+
recognitionToken?: string;
|
|
207
|
+
isGoldenFlow?: boolean;
|
|
208
|
+
dpaLocale?: string;
|
|
209
|
+
};
|
|
210
|
+
type OnResultArgs = {
|
|
211
|
+
isRegistered: boolean;
|
|
212
|
+
};
|
|
213
|
+
type RenderEmailFormOptions = {
|
|
214
|
+
onResult: (args: OnResultArgs) => void;
|
|
215
|
+
onError: (error: unknown) => void;
|
|
216
|
+
onCancel: () => void;
|
|
217
|
+
onSkipC2p?: () => void;
|
|
218
|
+
};
|
|
219
|
+
type RenderReturn = {
|
|
220
|
+
destroy: () => void;
|
|
221
|
+
};
|
|
222
|
+
interface MaskedCard {
|
|
223
|
+
srcDigitalCardId: string;
|
|
224
|
+
panBin: string;
|
|
225
|
+
panLastFour: string;
|
|
226
|
+
tokenLastFour?: string;
|
|
227
|
+
digitalCardData: {
|
|
228
|
+
descriptorName: string;
|
|
229
|
+
artUri: string;
|
|
230
|
+
isCoBranded: boolean;
|
|
231
|
+
status: string;
|
|
232
|
+
};
|
|
233
|
+
digitalCardFeatures: unknown[];
|
|
234
|
+
panExpirationMonth: string;
|
|
235
|
+
panExpirationYear: string;
|
|
236
|
+
paymentCardDescriptor: string;
|
|
237
|
+
paymentCardType: string;
|
|
238
|
+
maskedBillingAddress: Record<string, string>;
|
|
239
|
+
cardholderFirstName: string;
|
|
240
|
+
cardholderLastName: string;
|
|
241
|
+
cardholderFullName: string;
|
|
242
|
+
}
|
|
243
|
+
interface MobileNumber {
|
|
244
|
+
countryCode: string;
|
|
245
|
+
phoneNumber: string;
|
|
246
|
+
}
|
|
247
|
+
type UserExistsOptions = {
|
|
248
|
+
email?: string;
|
|
249
|
+
mobileNumber?: MobileNumber;
|
|
250
|
+
lookupPriority?: 'EMAIL' | 'MOBILE_NUMBER';
|
|
251
|
+
};
|
|
252
|
+
type RenderOtpFormFnOptions = {
|
|
253
|
+
onResult: (args: OnResultArgs) => void;
|
|
254
|
+
onError: (args: OnErrorArgs) => void;
|
|
255
|
+
onCancel: () => void;
|
|
256
|
+
onNotMyEmail: () => void;
|
|
257
|
+
onLoading: (args: OnLoadingArgs) => void;
|
|
258
|
+
onSkipC2p?: () => void;
|
|
259
|
+
};
|
|
260
|
+
type OriginError = 'INIT_PROCESS' | 'RESEND_CODE' | 'VALIDATE_CODE' | 'RENDER_OTP_FORM' | 'TEMPORARY_USER_BLOCKED';
|
|
261
|
+
type OnLoadingArgs = {
|
|
262
|
+
isLoading: boolean;
|
|
263
|
+
};
|
|
264
|
+
type OnErrorArgs = {
|
|
265
|
+
error: unknown;
|
|
266
|
+
origin: OriginError;
|
|
267
|
+
};
|
|
268
|
+
interface CardFrontend {
|
|
269
|
+
number: string;
|
|
270
|
+
expirationMonth: number;
|
|
271
|
+
expirationYear: number;
|
|
272
|
+
securityCode: string;
|
|
273
|
+
holderName: string;
|
|
274
|
+
type?: string | null;
|
|
275
|
+
brand: string;
|
|
276
|
+
}
|
|
277
|
+
interface CustomerFrontend {
|
|
278
|
+
firstName?: string | null;
|
|
279
|
+
lastName?: string | null;
|
|
280
|
+
email?: string | null;
|
|
281
|
+
deviceFingerprint?: string | null;
|
|
282
|
+
document?: {
|
|
283
|
+
documentNumber?: string | null;
|
|
284
|
+
documentType?: string | null;
|
|
285
|
+
} | null;
|
|
286
|
+
phone?: {
|
|
287
|
+
countryCode?: string | null;
|
|
288
|
+
number?: string | null;
|
|
289
|
+
} | null;
|
|
290
|
+
billingAddress?: {
|
|
291
|
+
addressLine1?: string | null;
|
|
292
|
+
addressLine2?: string | null;
|
|
293
|
+
city?: string | null;
|
|
294
|
+
country?: string | null;
|
|
295
|
+
state?: string | null;
|
|
296
|
+
zipCode?: string | null;
|
|
297
|
+
neighborhood?: string | null;
|
|
298
|
+
} | null;
|
|
299
|
+
shippingAddress?: {
|
|
300
|
+
addressLine1?: string | null;
|
|
301
|
+
addressLine2?: string | null;
|
|
302
|
+
city?: string | null;
|
|
303
|
+
country?: string | null;
|
|
304
|
+
state?: string | null;
|
|
305
|
+
zipCode?: string | null;
|
|
306
|
+
} | null;
|
|
307
|
+
browserInfo?: Partial<{
|
|
308
|
+
acceptBrowser: string | null;
|
|
309
|
+
acceptContent: string | null;
|
|
310
|
+
acceptHeader: string | null;
|
|
311
|
+
colorDepth: string | null;
|
|
312
|
+
javascriptEnabled: boolean | null;
|
|
313
|
+
language: string | null;
|
|
314
|
+
screenHeight: string | null;
|
|
315
|
+
screenWidth: string | null;
|
|
316
|
+
userAgent: string | null;
|
|
317
|
+
javaEnabled: boolean | null;
|
|
318
|
+
browserTimeDifference: string | null;
|
|
319
|
+
}> | null;
|
|
320
|
+
merchantCustomerId?: string | null;
|
|
321
|
+
geolocation?: {
|
|
322
|
+
latitude: string;
|
|
323
|
+
longitude: string;
|
|
324
|
+
} | null;
|
|
325
|
+
}
|
|
326
|
+
interface InstallmentFrontend {
|
|
327
|
+
id: string;
|
|
328
|
+
value: number;
|
|
329
|
+
installmentSelectedId?: string | null;
|
|
330
|
+
amount?: {
|
|
331
|
+
currency: string;
|
|
332
|
+
value: string;
|
|
333
|
+
totalValue: string;
|
|
334
|
+
};
|
|
335
|
+
type?: string;
|
|
336
|
+
}
|
|
337
|
+
type OnPaymentResultArgs = {
|
|
338
|
+
payment: PaymentResponse;
|
|
339
|
+
isAdditionalStepRequired: boolean;
|
|
340
|
+
};
|
|
341
|
+
interface CheckoutReturn {
|
|
342
|
+
checkoutActionCode: string;
|
|
343
|
+
checkoutResponse: string;
|
|
344
|
+
headers: {
|
|
345
|
+
'merchant-transaction-id': string;
|
|
346
|
+
'x-src-cx-flow-id': string;
|
|
347
|
+
};
|
|
348
|
+
network: string;
|
|
349
|
+
idToken: string;
|
|
350
|
+
checkoutResponseData: {
|
|
351
|
+
srcCorrelationId: string;
|
|
352
|
+
srciTransactionId: string;
|
|
353
|
+
maskedCard: {
|
|
354
|
+
srcDigitalCardId: string;
|
|
355
|
+
panBin: string;
|
|
356
|
+
panLastFour: string;
|
|
357
|
+
digitalCardData: {
|
|
358
|
+
status: string;
|
|
359
|
+
artUri: string;
|
|
360
|
+
};
|
|
361
|
+
panExpirationMonth: string;
|
|
362
|
+
panExpirationYear: string;
|
|
363
|
+
paymentCardDescriptor: string;
|
|
364
|
+
paymentCardType: string;
|
|
365
|
+
serviceId: string;
|
|
366
|
+
dateOfCardCreated: string;
|
|
367
|
+
dateOfCardLastUsed: string;
|
|
368
|
+
};
|
|
369
|
+
maskedConsumer: {
|
|
370
|
+
srcConsumerId: string;
|
|
371
|
+
maskedConsumerIdentity: {
|
|
372
|
+
identityProvider: string;
|
|
373
|
+
identityType: string;
|
|
374
|
+
maskedIdentityValue: string;
|
|
375
|
+
};
|
|
376
|
+
maskedEmailAddress: string;
|
|
377
|
+
maskedMobileNumber: {
|
|
378
|
+
countryCode: string;
|
|
379
|
+
phoneNumber: string;
|
|
380
|
+
};
|
|
381
|
+
countryCode: string;
|
|
382
|
+
languageCode: string;
|
|
383
|
+
status: string;
|
|
384
|
+
maskedFullName: string;
|
|
385
|
+
dateConsumerAdded: string;
|
|
386
|
+
dateConsumerLastUsed: string;
|
|
387
|
+
};
|
|
388
|
+
customOutputData: {
|
|
389
|
+
authorizations: {
|
|
390
|
+
type: string;
|
|
391
|
+
authorization: string;
|
|
392
|
+
}[];
|
|
393
|
+
};
|
|
394
|
+
assuranceData: {
|
|
395
|
+
cardVerificationEntity: string;
|
|
396
|
+
cardVerificationMethod: string;
|
|
397
|
+
cardVerificationResults: string;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
recognitionToken?: string;
|
|
401
|
+
}
|
|
402
|
+
type CreatePaymentWithNewCardOptions = {
|
|
403
|
+
card: CardFrontend;
|
|
404
|
+
customer?: Partial<CustomerFrontend>;
|
|
405
|
+
saveCardInYuno?: boolean;
|
|
406
|
+
c2pOptions: {
|
|
407
|
+
skipC2p: boolean;
|
|
408
|
+
rememberMeInBrowser: boolean;
|
|
409
|
+
};
|
|
410
|
+
installment?: InstallmentFrontend;
|
|
411
|
+
onError: (args: OnErrorArgs) => void;
|
|
412
|
+
onPaymentResult: (args: OnPaymentResultArgs) => void;
|
|
413
|
+
onEnrollmentIncomplete: (result: CheckoutReturn) => void;
|
|
414
|
+
onLoading: ({ isLoading }: {
|
|
415
|
+
isLoading: boolean;
|
|
416
|
+
}) => void;
|
|
417
|
+
};
|
|
418
|
+
type CreatePaymentWithExistingCardOptions = {
|
|
419
|
+
maskedCard: MaskedCard;
|
|
420
|
+
customer?: Partial<CustomerFrontend>;
|
|
421
|
+
installment?: InstallmentFrontend;
|
|
422
|
+
card?: {
|
|
423
|
+
securityCode: string;
|
|
424
|
+
};
|
|
425
|
+
onError: (args: OnErrorArgs) => void;
|
|
426
|
+
onPaymentResult: (args: OnPaymentResultArgs) => void;
|
|
427
|
+
onVerificationIncomplete: (result: CheckoutReturn) => void;
|
|
428
|
+
onLoading: ({ isLoading }: {
|
|
429
|
+
isLoading: boolean;
|
|
430
|
+
}) => void;
|
|
431
|
+
};
|
|
432
|
+
type OnChangeRememberMeArgs = {
|
|
433
|
+
value: boolean;
|
|
434
|
+
};
|
|
435
|
+
type OnChangeSaveCardArgs = {
|
|
436
|
+
value: boolean;
|
|
437
|
+
};
|
|
438
|
+
type OnBrandNotAllowedArgs = {
|
|
439
|
+
attemptedBrand: string;
|
|
440
|
+
supportedBrands: string[];
|
|
441
|
+
};
|
|
442
|
+
type RenderConsentCheckboxOptions = {
|
|
443
|
+
elementSelector: string;
|
|
444
|
+
brand: string;
|
|
445
|
+
onChangeRememberMe: (args: OnChangeRememberMeArgs) => void;
|
|
446
|
+
onChangeSaveCard: (args: OnChangeSaveCardArgs) => void;
|
|
447
|
+
onBrandNotAllowed: (args: OnBrandNotAllowedArgs) => void;
|
|
448
|
+
onError: (error: unknown) => void;
|
|
449
|
+
};
|
|
450
|
+
type ReturnRenderConsentCheckbox = {
|
|
451
|
+
destroy: () => void;
|
|
452
|
+
changeBrand: (brand: string) => void;
|
|
453
|
+
};
|
|
454
|
+
interface YunoC2P {
|
|
455
|
+
renderEmailForm: (args: RenderEmailFormOptions) => Promise<RenderReturn>;
|
|
456
|
+
isUserAuthenticated: () => Promise<{
|
|
457
|
+
isUserAuthenticated: boolean;
|
|
458
|
+
cardList: MaskedCard[];
|
|
459
|
+
}>;
|
|
460
|
+
userExists: (args?: UserExistsOptions) => Promise<boolean>;
|
|
461
|
+
getC2PInstance: () => Promise<unknown>;
|
|
462
|
+
renderOtpForm: (args: RenderOtpFormFnOptions) => Promise<RenderReturn>;
|
|
463
|
+
createPaymentWithNewCard: (args: CreatePaymentWithNewCardOptions) => Promise<void>;
|
|
464
|
+
createPaymentWithExistingCard: (args: CreatePaymentWithExistingCardOptions) => Promise<void>;
|
|
465
|
+
renderConsentCheckbox: (args: RenderConsentCheckboxOptions) => Promise<ReturnRenderConsentCheckbox>;
|
|
466
|
+
}
|
|
467
|
+
type ClickToPayFn = (args: ClickToPayArgs) => Promise<YunoC2P>;
|
|
468
|
+
}
|
|
469
|
+
|
|
168
470
|
type CookieKey = 'deviceId';
|
|
169
471
|
type CookieConfig = {
|
|
170
472
|
name: string;
|
|
@@ -608,6 +910,7 @@ interface YunoInstance {
|
|
|
608
910
|
apiClientPayment: ApiClientPayment;
|
|
609
911
|
apiClientEnroll: ApiClientEnroll;
|
|
610
912
|
executeFraudCheck: ExecuteFraudCheck;
|
|
913
|
+
clickToPay: C2PHeadless.ClickToPayFn;
|
|
611
914
|
}
|
|
612
915
|
interface Yuno {
|
|
613
916
|
initialize(publicApiKey: string, applicationSession?: string, options?: InitializeOptions): Promise<YunoInstance>;
|
package/dist/index.d.ts
CHANGED
|
@@ -87,6 +87,10 @@ declare enum StatusEnrollment {
|
|
|
87
87
|
ERROR = "ERROR",
|
|
88
88
|
UNENROLLED = "UNENROLLED"
|
|
89
89
|
}
|
|
90
|
+
type ExternalProviderId = {
|
|
91
|
+
provider_id: string;
|
|
92
|
+
session_id: string;
|
|
93
|
+
};
|
|
90
94
|
|
|
91
95
|
type ApiClientPaymentArgs = {
|
|
92
96
|
checkout_session?: string;
|
|
@@ -165,6 +169,304 @@ type ExecuteFraudCheckReturn<TStatus = 'success' | 'error'> = TStatus extends 's
|
|
|
165
169
|
};
|
|
166
170
|
type ExecuteFraudCheck = (args: ExecuteFraudCheckArgs) => Promise<ExecuteFraudCheckReturn>;
|
|
167
171
|
|
|
172
|
+
declare namespace C2PHeadless {
|
|
173
|
+
interface PaymentResponse {
|
|
174
|
+
id: string;
|
|
175
|
+
status: string;
|
|
176
|
+
sub_status: string;
|
|
177
|
+
merchant_order_id: string;
|
|
178
|
+
description: string;
|
|
179
|
+
created_at: string;
|
|
180
|
+
updated_at: string;
|
|
181
|
+
payment_method_icon?: string;
|
|
182
|
+
payment_method_name?: string;
|
|
183
|
+
transactions: {
|
|
184
|
+
id: string;
|
|
185
|
+
category: string;
|
|
186
|
+
status: string;
|
|
187
|
+
payment_method_type: string;
|
|
188
|
+
created_at: string;
|
|
189
|
+
updated_at: string;
|
|
190
|
+
provider: unknown;
|
|
191
|
+
amount: {
|
|
192
|
+
currency: string;
|
|
193
|
+
value: number;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
enrollment?: {
|
|
197
|
+
customer_session: string;
|
|
198
|
+
};
|
|
199
|
+
has_fraud_screening?: boolean;
|
|
200
|
+
}
|
|
201
|
+
type ClickToPayArgs = {
|
|
202
|
+
checkoutSession: string;
|
|
203
|
+
language: string;
|
|
204
|
+
countryCode: string;
|
|
205
|
+
deviceFingerprints?: ExternalProviderId[];
|
|
206
|
+
recognitionToken?: string;
|
|
207
|
+
isGoldenFlow?: boolean;
|
|
208
|
+
dpaLocale?: string;
|
|
209
|
+
};
|
|
210
|
+
type OnResultArgs = {
|
|
211
|
+
isRegistered: boolean;
|
|
212
|
+
};
|
|
213
|
+
type RenderEmailFormOptions = {
|
|
214
|
+
onResult: (args: OnResultArgs) => void;
|
|
215
|
+
onError: (error: unknown) => void;
|
|
216
|
+
onCancel: () => void;
|
|
217
|
+
onSkipC2p?: () => void;
|
|
218
|
+
};
|
|
219
|
+
type RenderReturn = {
|
|
220
|
+
destroy: () => void;
|
|
221
|
+
};
|
|
222
|
+
interface MaskedCard {
|
|
223
|
+
srcDigitalCardId: string;
|
|
224
|
+
panBin: string;
|
|
225
|
+
panLastFour: string;
|
|
226
|
+
tokenLastFour?: string;
|
|
227
|
+
digitalCardData: {
|
|
228
|
+
descriptorName: string;
|
|
229
|
+
artUri: string;
|
|
230
|
+
isCoBranded: boolean;
|
|
231
|
+
status: string;
|
|
232
|
+
};
|
|
233
|
+
digitalCardFeatures: unknown[];
|
|
234
|
+
panExpirationMonth: string;
|
|
235
|
+
panExpirationYear: string;
|
|
236
|
+
paymentCardDescriptor: string;
|
|
237
|
+
paymentCardType: string;
|
|
238
|
+
maskedBillingAddress: Record<string, string>;
|
|
239
|
+
cardholderFirstName: string;
|
|
240
|
+
cardholderLastName: string;
|
|
241
|
+
cardholderFullName: string;
|
|
242
|
+
}
|
|
243
|
+
interface MobileNumber {
|
|
244
|
+
countryCode: string;
|
|
245
|
+
phoneNumber: string;
|
|
246
|
+
}
|
|
247
|
+
type UserExistsOptions = {
|
|
248
|
+
email?: string;
|
|
249
|
+
mobileNumber?: MobileNumber;
|
|
250
|
+
lookupPriority?: 'EMAIL' | 'MOBILE_NUMBER';
|
|
251
|
+
};
|
|
252
|
+
type RenderOtpFormFnOptions = {
|
|
253
|
+
onResult: (args: OnResultArgs) => void;
|
|
254
|
+
onError: (args: OnErrorArgs) => void;
|
|
255
|
+
onCancel: () => void;
|
|
256
|
+
onNotMyEmail: () => void;
|
|
257
|
+
onLoading: (args: OnLoadingArgs) => void;
|
|
258
|
+
onSkipC2p?: () => void;
|
|
259
|
+
};
|
|
260
|
+
type OriginError = 'INIT_PROCESS' | 'RESEND_CODE' | 'VALIDATE_CODE' | 'RENDER_OTP_FORM' | 'TEMPORARY_USER_BLOCKED';
|
|
261
|
+
type OnLoadingArgs = {
|
|
262
|
+
isLoading: boolean;
|
|
263
|
+
};
|
|
264
|
+
type OnErrorArgs = {
|
|
265
|
+
error: unknown;
|
|
266
|
+
origin: OriginError;
|
|
267
|
+
};
|
|
268
|
+
interface CardFrontend {
|
|
269
|
+
number: string;
|
|
270
|
+
expirationMonth: number;
|
|
271
|
+
expirationYear: number;
|
|
272
|
+
securityCode: string;
|
|
273
|
+
holderName: string;
|
|
274
|
+
type?: string | null;
|
|
275
|
+
brand: string;
|
|
276
|
+
}
|
|
277
|
+
interface CustomerFrontend {
|
|
278
|
+
firstName?: string | null;
|
|
279
|
+
lastName?: string | null;
|
|
280
|
+
email?: string | null;
|
|
281
|
+
deviceFingerprint?: string | null;
|
|
282
|
+
document?: {
|
|
283
|
+
documentNumber?: string | null;
|
|
284
|
+
documentType?: string | null;
|
|
285
|
+
} | null;
|
|
286
|
+
phone?: {
|
|
287
|
+
countryCode?: string | null;
|
|
288
|
+
number?: string | null;
|
|
289
|
+
} | null;
|
|
290
|
+
billingAddress?: {
|
|
291
|
+
addressLine1?: string | null;
|
|
292
|
+
addressLine2?: string | null;
|
|
293
|
+
city?: string | null;
|
|
294
|
+
country?: string | null;
|
|
295
|
+
state?: string | null;
|
|
296
|
+
zipCode?: string | null;
|
|
297
|
+
neighborhood?: string | null;
|
|
298
|
+
} | null;
|
|
299
|
+
shippingAddress?: {
|
|
300
|
+
addressLine1?: string | null;
|
|
301
|
+
addressLine2?: string | null;
|
|
302
|
+
city?: string | null;
|
|
303
|
+
country?: string | null;
|
|
304
|
+
state?: string | null;
|
|
305
|
+
zipCode?: string | null;
|
|
306
|
+
} | null;
|
|
307
|
+
browserInfo?: Partial<{
|
|
308
|
+
acceptBrowser: string | null;
|
|
309
|
+
acceptContent: string | null;
|
|
310
|
+
acceptHeader: string | null;
|
|
311
|
+
colorDepth: string | null;
|
|
312
|
+
javascriptEnabled: boolean | null;
|
|
313
|
+
language: string | null;
|
|
314
|
+
screenHeight: string | null;
|
|
315
|
+
screenWidth: string | null;
|
|
316
|
+
userAgent: string | null;
|
|
317
|
+
javaEnabled: boolean | null;
|
|
318
|
+
browserTimeDifference: string | null;
|
|
319
|
+
}> | null;
|
|
320
|
+
merchantCustomerId?: string | null;
|
|
321
|
+
geolocation?: {
|
|
322
|
+
latitude: string;
|
|
323
|
+
longitude: string;
|
|
324
|
+
} | null;
|
|
325
|
+
}
|
|
326
|
+
interface InstallmentFrontend {
|
|
327
|
+
id: string;
|
|
328
|
+
value: number;
|
|
329
|
+
installmentSelectedId?: string | null;
|
|
330
|
+
amount?: {
|
|
331
|
+
currency: string;
|
|
332
|
+
value: string;
|
|
333
|
+
totalValue: string;
|
|
334
|
+
};
|
|
335
|
+
type?: string;
|
|
336
|
+
}
|
|
337
|
+
type OnPaymentResultArgs = {
|
|
338
|
+
payment: PaymentResponse;
|
|
339
|
+
isAdditionalStepRequired: boolean;
|
|
340
|
+
};
|
|
341
|
+
interface CheckoutReturn {
|
|
342
|
+
checkoutActionCode: string;
|
|
343
|
+
checkoutResponse: string;
|
|
344
|
+
headers: {
|
|
345
|
+
'merchant-transaction-id': string;
|
|
346
|
+
'x-src-cx-flow-id': string;
|
|
347
|
+
};
|
|
348
|
+
network: string;
|
|
349
|
+
idToken: string;
|
|
350
|
+
checkoutResponseData: {
|
|
351
|
+
srcCorrelationId: string;
|
|
352
|
+
srciTransactionId: string;
|
|
353
|
+
maskedCard: {
|
|
354
|
+
srcDigitalCardId: string;
|
|
355
|
+
panBin: string;
|
|
356
|
+
panLastFour: string;
|
|
357
|
+
digitalCardData: {
|
|
358
|
+
status: string;
|
|
359
|
+
artUri: string;
|
|
360
|
+
};
|
|
361
|
+
panExpirationMonth: string;
|
|
362
|
+
panExpirationYear: string;
|
|
363
|
+
paymentCardDescriptor: string;
|
|
364
|
+
paymentCardType: string;
|
|
365
|
+
serviceId: string;
|
|
366
|
+
dateOfCardCreated: string;
|
|
367
|
+
dateOfCardLastUsed: string;
|
|
368
|
+
};
|
|
369
|
+
maskedConsumer: {
|
|
370
|
+
srcConsumerId: string;
|
|
371
|
+
maskedConsumerIdentity: {
|
|
372
|
+
identityProvider: string;
|
|
373
|
+
identityType: string;
|
|
374
|
+
maskedIdentityValue: string;
|
|
375
|
+
};
|
|
376
|
+
maskedEmailAddress: string;
|
|
377
|
+
maskedMobileNumber: {
|
|
378
|
+
countryCode: string;
|
|
379
|
+
phoneNumber: string;
|
|
380
|
+
};
|
|
381
|
+
countryCode: string;
|
|
382
|
+
languageCode: string;
|
|
383
|
+
status: string;
|
|
384
|
+
maskedFullName: string;
|
|
385
|
+
dateConsumerAdded: string;
|
|
386
|
+
dateConsumerLastUsed: string;
|
|
387
|
+
};
|
|
388
|
+
customOutputData: {
|
|
389
|
+
authorizations: {
|
|
390
|
+
type: string;
|
|
391
|
+
authorization: string;
|
|
392
|
+
}[];
|
|
393
|
+
};
|
|
394
|
+
assuranceData: {
|
|
395
|
+
cardVerificationEntity: string;
|
|
396
|
+
cardVerificationMethod: string;
|
|
397
|
+
cardVerificationResults: string;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
recognitionToken?: string;
|
|
401
|
+
}
|
|
402
|
+
type CreatePaymentWithNewCardOptions = {
|
|
403
|
+
card: CardFrontend;
|
|
404
|
+
customer?: Partial<CustomerFrontend>;
|
|
405
|
+
saveCardInYuno?: boolean;
|
|
406
|
+
c2pOptions: {
|
|
407
|
+
skipC2p: boolean;
|
|
408
|
+
rememberMeInBrowser: boolean;
|
|
409
|
+
};
|
|
410
|
+
installment?: InstallmentFrontend;
|
|
411
|
+
onError: (args: OnErrorArgs) => void;
|
|
412
|
+
onPaymentResult: (args: OnPaymentResultArgs) => void;
|
|
413
|
+
onEnrollmentIncomplete: (result: CheckoutReturn) => void;
|
|
414
|
+
onLoading: ({ isLoading }: {
|
|
415
|
+
isLoading: boolean;
|
|
416
|
+
}) => void;
|
|
417
|
+
};
|
|
418
|
+
type CreatePaymentWithExistingCardOptions = {
|
|
419
|
+
maskedCard: MaskedCard;
|
|
420
|
+
customer?: Partial<CustomerFrontend>;
|
|
421
|
+
installment?: InstallmentFrontend;
|
|
422
|
+
card?: {
|
|
423
|
+
securityCode: string;
|
|
424
|
+
};
|
|
425
|
+
onError: (args: OnErrorArgs) => void;
|
|
426
|
+
onPaymentResult: (args: OnPaymentResultArgs) => void;
|
|
427
|
+
onVerificationIncomplete: (result: CheckoutReturn) => void;
|
|
428
|
+
onLoading: ({ isLoading }: {
|
|
429
|
+
isLoading: boolean;
|
|
430
|
+
}) => void;
|
|
431
|
+
};
|
|
432
|
+
type OnChangeRememberMeArgs = {
|
|
433
|
+
value: boolean;
|
|
434
|
+
};
|
|
435
|
+
type OnChangeSaveCardArgs = {
|
|
436
|
+
value: boolean;
|
|
437
|
+
};
|
|
438
|
+
type OnBrandNotAllowedArgs = {
|
|
439
|
+
attemptedBrand: string;
|
|
440
|
+
supportedBrands: string[];
|
|
441
|
+
};
|
|
442
|
+
type RenderConsentCheckboxOptions = {
|
|
443
|
+
elementSelector: string;
|
|
444
|
+
brand: string;
|
|
445
|
+
onChangeRememberMe: (args: OnChangeRememberMeArgs) => void;
|
|
446
|
+
onChangeSaveCard: (args: OnChangeSaveCardArgs) => void;
|
|
447
|
+
onBrandNotAllowed: (args: OnBrandNotAllowedArgs) => void;
|
|
448
|
+
onError: (error: unknown) => void;
|
|
449
|
+
};
|
|
450
|
+
type ReturnRenderConsentCheckbox = {
|
|
451
|
+
destroy: () => void;
|
|
452
|
+
changeBrand: (brand: string) => void;
|
|
453
|
+
};
|
|
454
|
+
interface YunoC2P {
|
|
455
|
+
renderEmailForm: (args: RenderEmailFormOptions) => Promise<RenderReturn>;
|
|
456
|
+
isUserAuthenticated: () => Promise<{
|
|
457
|
+
isUserAuthenticated: boolean;
|
|
458
|
+
cardList: MaskedCard[];
|
|
459
|
+
}>;
|
|
460
|
+
userExists: (args?: UserExistsOptions) => Promise<boolean>;
|
|
461
|
+
getC2PInstance: () => Promise<unknown>;
|
|
462
|
+
renderOtpForm: (args: RenderOtpFormFnOptions) => Promise<RenderReturn>;
|
|
463
|
+
createPaymentWithNewCard: (args: CreatePaymentWithNewCardOptions) => Promise<void>;
|
|
464
|
+
createPaymentWithExistingCard: (args: CreatePaymentWithExistingCardOptions) => Promise<void>;
|
|
465
|
+
renderConsentCheckbox: (args: RenderConsentCheckboxOptions) => Promise<ReturnRenderConsentCheckbox>;
|
|
466
|
+
}
|
|
467
|
+
type ClickToPayFn = (args: ClickToPayArgs) => Promise<YunoC2P>;
|
|
468
|
+
}
|
|
469
|
+
|
|
168
470
|
type CookieKey = 'deviceId';
|
|
169
471
|
type CookieConfig = {
|
|
170
472
|
name: string;
|
|
@@ -608,9 +910,10 @@ interface YunoInstance {
|
|
|
608
910
|
apiClientPayment: ApiClientPayment;
|
|
609
911
|
apiClientEnroll: ApiClientEnroll;
|
|
610
912
|
executeFraudCheck: ExecuteFraudCheck;
|
|
913
|
+
clickToPay: C2PHeadless.ClickToPayFn;
|
|
611
914
|
}
|
|
612
915
|
interface Yuno {
|
|
613
916
|
initialize(publicApiKey: string, applicationSession?: string, options?: InitializeOptions): Promise<YunoInstance>;
|
|
614
917
|
}
|
|
615
918
|
|
|
616
|
-
export { type ButtonTextCard, type CardConfig, type ContinuePaymentArgs, type ContinuePaymentResponse, type CreateArgsSF, type ExternalPaymentButtons, ExternalPaymentButtonsTypes, type Font, type FormElementSelector, type Language, type LoadingType, type MountCheckoutLiteArgs, type MountEnrollmentLiteArgs, type MountSeamlessCheckoutLiteArgs, type MountStatusPaymentArgs, type OnChangeDataSF, type RenderMode, type SecureFieldInstance, type SecureFieldsArgs, type StartCheckoutArgs, type StartSeamlessCheckoutArgs, type TextsCustom, type Yuno, type YunoConfig, type YunoInstance, type mountFraudArgs };
|
|
919
|
+
export { type ButtonTextCard, C2PHeadless, type CardConfig, type ContinuePaymentArgs, type ContinuePaymentResponse, type CreateArgsSF, type ExternalPaymentButtons, ExternalPaymentButtonsTypes, type Font, type FormElementSelector, type Language, type LoadingType, type MountCheckoutLiteArgs, type MountEnrollmentLiteArgs, type MountSeamlessCheckoutLiteArgs, type MountStatusPaymentArgs, type OnChangeDataSF, type RenderMode, type SecureFieldInstance, type SecureFieldsArgs, type StartCheckoutArgs, type StartSeamlessCheckoutArgs, type TextsCustom, type Yuno, type YunoConfig, type YunoInstance, type mountFraudArgs };
|