@yuno-payments/dashboard-api-mfe 0.36.27 → 0.36.30-beta.2

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.
@@ -474,6 +474,19 @@ export declare class Api extends HttpClient {
474
474
  executeChartGPTChart<T>(chartgpt_id: string): Promise<AxiosResponse<T, any>>;
475
475
  getChartsByUser<T>(): Promise<AxiosResponse<T, any>>;
476
476
  getLanguages<T>(): Promise<AxiosResponse<T, any>>;
477
- getTranslations<T>(): Promise<AxiosResponse<T, any>>;
477
+ getTranslations<T>(lang: string): Promise<AxiosResponse<T, any>>;
478
+ getCommunications<T>(payload: {
479
+ start_date: string;
480
+ end_date: string;
481
+ account_codes: string[];
482
+ country: string[];
483
+ status: string[];
484
+ focus: string[];
485
+ skip: number;
486
+ limit: number;
487
+ search_value: string;
488
+ }): Promise<AxiosResponse<T, any>>;
489
+ getCommunicationsFilters<T>(): Promise<AxiosResponse<T, any>>;
490
+ getCommunicationDetails<T>(communicationId: string, accountCode: string): Promise<AxiosResponse<T, any>>;
478
491
  }
479
492
  export {};
@@ -4,34 +4,33 @@ import type { Organization, Payment, Payouts, RefundPdfResponse, SendPaymentNoti
4
4
  import { PaymentFiltersSection } from '../../types/payment/payment';
5
5
  import { CustomAxiosResponse } from '../../utils/handler-error';
6
6
  import { AxiosError } from 'axios';
7
- export declare function usePostPaymentsLazy(params: GetPaymentsParams): UseQueryResult<Payment.PaymentList | AxiosError>;
8
- export declare function usePostPaymentsEvaluated(params: GetPaymentsEvaluatedParams): UseQueryResult<Payment.PaymentList, unknown>;
7
+ import { BFFErrorResponse } from '../../mutations';
8
+ export declare function usePostPaymentsLazy(params: GetPaymentsParams): UseQueryResult<Payment.PaymentList, AxiosError<BFFErrorResponse>>;
9
+ export declare function usePostPaymentsEvaluated(params: GetPaymentsEvaluatedParams): UseQueryResult<Payment.PaymentList, AxiosError<BFFErrorResponse>>;
9
10
  export declare function useGetPaymentV2({ paymentCode, enabled, }: {
10
11
  paymentCode: string;
11
12
  enabled?: boolean;
12
- }): UseQueryResult<Payment.PaymentV2, unknown>;
13
- export declare function useGetTransactionDetailsV2({ payment_code, enabled, }: GetTransactionDetailsV2Params): UseQueryResult<Payment.TransactionDetailsResult, unknown>;
14
- export declare function useGetTransactionRawResponse({ transaction_code, enabled, }: GetTransactionDetailsV2Params): UseQueryResult<Payment.TransactionDetailsResult, unknown>;
13
+ }): UseQueryResult<Payment.PaymentV2, AxiosError<BFFErrorResponse>>;
14
+ export declare function useGetTransactionDetailsV2({ payment_code, enabled, }: GetTransactionDetailsV2Params): UseQueryResult<Payment.TransactionDetailsResult, AxiosError<BFFErrorResponse>>;
15
+ export declare function useGetTransactionRawResponse({ transaction_code, enabled, }: GetTransactionDetailsV2Params): UseQueryResult<Payment.TransactionDetailsResult, AxiosError<BFFErrorResponse>>;
15
16
  export declare function useGetPaymentsMethodsByCountry(params: Organization.PaymentMethods): UseQueryResult<Organization.PaymentMethods[], CustomAxiosResponse<null>>;
16
- export declare function useGetPaymentMethodsAndProviders(): UseQueryResult<Payment.PaymentMethodsAndProviders, unknown>;
17
+ export declare function useGetPaymentMethodsAndProviders(): UseQueryResult<Payment.PaymentMethodsAndProviders, AxiosError<BFFErrorResponse>>;
17
18
  export declare function useGetCardBrands(): UseQueryResult<Payment.CardBrand[], unknown>;
18
19
  export declare function useGetPaymentFilters(enabled?: boolean, section?: PaymentFiltersSection): UseQueryResult<Payment.Filters, CustomAxiosResponse>;
19
- export declare function useGetPaymentMetricsFilters(): UseQueryResult<Payment.PaymentMethodsAndProviders, unknown>;
20
+ export declare function useGetPaymentMetricsFilters(): UseQueryResult<Payment.PaymentMethodsAndProviders, AxiosError<BFFErrorResponse>>;
20
21
  export declare function useGetPaymentTransactionsDetails({ transaction_code, enabled, }: {
21
22
  transaction_code: string;
22
23
  enabled?: boolean;
23
- }): UseQueryResult<Payment.TransactionDetails | {
24
- error: boolean;
25
- }, unknown>;
24
+ }): UseQueryResult<Payment.TransactionDetails, AxiosError<BFFErrorResponse>>;
26
25
  export declare function useGetTransactionHistoryByPaymentCode({ payment_code, enabled, }: {
27
26
  payment_code: string;
28
27
  enabled?: boolean;
29
- }): UseQueryResult<Payment.TransactionHistoryByPayment, unknown>;
30
- export declare function usePostTransactions(params: GetTransactionsParams): UseQueryResult<Payment.TransactionDetailsResult | AxiosError>;
31
- export declare function usePostFraudTransactions(params: GetTransactionsParams): UseQueryResult<Payment.TransactionDetailsResult | AxiosError>;
32
- export declare function useGetPayoutDetail(params: GetPayoutDetail): UseQueryResult<Payouts.Details | AxiosError>;
33
- export declare function useGetPayoutTransactionDetail(params: GetPayoutTransactionDetail): UseQueryResult;
34
- export declare function useGetPayoutHistoryDetail(params: GetPayoutDetail): UseQueryResult;
35
- export declare function useGetProofOfCancel(transactionCode: string, accountCode: string): UseQueryResult<RefundPdfResponse, AxiosError>;
36
- export declare function useGetProofOfPayment(transactionCode: string, accountCode: string): UseQueryResult<RefundPdfResponse, AxiosError>;
37
- export declare function useSendPaymentNotification(params: SendPaymentNotification.Params, body: SendPaymentNotification.Body, options: SendPaymentNotification.Options): UseQueryResult<SendPaymentNotification.Response, AxiosError>;
28
+ }): UseQueryResult<Payment.TransactionHistoryByPayment, AxiosError<BFFErrorResponse>>;
29
+ export declare function usePostTransactions(params: GetTransactionsParams): UseQueryResult<Payment.TransactionDetailsResult, AxiosError<BFFErrorResponse>>;
30
+ export declare function usePostFraudTransactions(params: GetTransactionsParams): UseQueryResult<Payment.TransactionDetailsResult, AxiosError<BFFErrorResponse>>;
31
+ export declare function useGetPayoutDetail(params: GetPayoutDetail): UseQueryResult<Payouts.Details, AxiosError<BFFErrorResponse>>;
32
+ export declare function useGetPayoutTransactionDetail(params: GetPayoutTransactionDetail): UseQueryResult<Payouts.Details, AxiosError<BFFErrorResponse>>;
33
+ export declare function useGetPayoutHistoryDetail(params: GetPayoutDetail): UseQueryResult<Payouts.Details, AxiosError<BFFErrorResponse>>;
34
+ export declare function useGetProofOfCancel(transactionCode: string, accountCode: string): UseQueryResult<RefundPdfResponse, AxiosError<BFFErrorResponse>>;
35
+ export declare function useGetProofOfPayment(transactionCode: string, accountCode: string): UseQueryResult<RefundPdfResponse, AxiosError<BFFErrorResponse>>;
36
+ export declare function useSendPaymentNotification(params: SendPaymentNotification.Params, body: SendPaymentNotification.Body, options: SendPaymentNotification.Options): UseQueryResult<SendPaymentNotification.Response, AxiosError<BFFErrorResponse>>;
@@ -1,9 +1,22 @@
1
1
  import { UseQueryResult } from '@tanstack/react-query';
2
2
  import { AxiosError } from 'axios';
3
- import { Accounts, User } from '../../types';
3
+ import { Accounts, User, AI } from '../../types';
4
4
  export declare function useGetProfile(): UseQueryResult<User.UserResponsePayload, unknown>;
5
5
  export declare function useGetPermissions(organizationCode: any, accountCode: any): UseQueryResult<Accounts.PermissionsResponse[], unknown>;
6
6
  export declare function useEmailVerification(email: string): UseQueryResult<User.UserResponseEmailVerification | string, unknown>;
7
7
  export declare function useGetLoginMethods(): UseQueryResult<unknown, unknown>;
8
8
  export declare function useGetImpersonationUsers(): UseQueryResult<User.ImpersonationUser[], AxiosError>;
9
9
  export declare function useGetImpersonationEnabled(): UseQueryResult<User.ImpersonationEnabledResponse, AxiosError>;
10
+ export declare function useCommunications(payload: {
11
+ start_date: string;
12
+ end_date: string;
13
+ account_codes: string[];
14
+ country: string[];
15
+ status: string[];
16
+ focus: string[];
17
+ skip: number;
18
+ limit: number;
19
+ search_value: string;
20
+ }): UseQueryResult<AI.CommunicationsListResponse, AxiosError>;
21
+ export declare function useCommunicationsFilters(): UseQueryResult<AI.CommunicationsFiltersResponse, AxiosError>;
22
+ export declare function useCommunicationDetails(communicationId: string, accountCode: string): UseQueryResult<AI.CommunicationDetailsResponse, AxiosError>;
@@ -23,4 +23,54 @@ export declare namespace AI {
23
23
  REFUSED = "REFUSED",
24
24
  FRONT_FAILED = "FRONT_FAILED"
25
25
  }
26
+ type CommunicationItem = {
27
+ communication_id: string;
28
+ order_id: string;
29
+ payment_id: string;
30
+ status: string;
31
+ destination_phone: string | null;
32
+ duration: number;
33
+ country: string;
34
+ channel: string;
35
+ messages: number;
36
+ focus: string | null;
37
+ created_at: string;
38
+ };
39
+ type CommunicationsListResponse = {
40
+ total: number;
41
+ skip: number;
42
+ limit: number;
43
+ data: CommunicationItem[];
44
+ };
45
+ type CommunicationsFiltersResponse = {
46
+ countries: string[];
47
+ status: string[];
48
+ focus: string[];
49
+ };
50
+ type TranscriptionMessage = {
51
+ id: string;
52
+ role: string;
53
+ content: string | null;
54
+ created_at: string;
55
+ provider_status: string;
56
+ status: string;
57
+ content_type: string | null;
58
+ media_content_type: string | null;
59
+ media_url: string | null;
60
+ };
61
+ type CommunicationDetailsResponse = {
62
+ communication_id: string;
63
+ order_id: string;
64
+ payment_id: string;
65
+ status: string;
66
+ destination_phone: string | null;
67
+ duration: number;
68
+ country: string;
69
+ channel: string;
70
+ messages: number;
71
+ focus: string | null;
72
+ created_at: string;
73
+ summary: string;
74
+ transcription: TranscriptionMessage[];
75
+ };
26
76
  }
@@ -236,39 +236,153 @@ export declare namespace Payment {
236
236
  updated_at?: string;
237
237
  }
238
238
  interface TransactionDetails {
239
- id?: string;
240
- type?: string;
241
- transaction_data_type?: string;
242
- status?: string;
239
+ id?: number;
240
+ code?: string;
241
+ parent_id?: string;
242
+ payment_method_type?: string;
243
+ payment_id?: number;
243
244
  category?: string;
244
- amount?: {
245
- currency?: string;
246
- value: number;
247
- } | string;
248
- payment_method?: PaymentMethod;
245
+ status?: string;
246
+ customer_payment_method_code?: string;
247
+ amount?: number;
248
+ provider_id?: string;
249
+ created_at?: string;
250
+ updated_at?: string;
249
251
  response_code?: string;
252
+ one_time_token?: string;
253
+ type?: string;
250
254
  response_message?: string;
255
+ provider_raw_response?: string;
256
+ provider_transaction_id?: string;
257
+ provider_status?: string;
258
+ provider_status_detail?: string;
259
+ merchant_reference?: string;
251
260
  reason?: string;
252
261
  description?: string;
253
- merchant_reference?: string;
254
- provider_data?: ProviderData;
255
- created_at?: string;
256
- updated_at?: string;
257
- code?: string;
258
- customer_payment_method_code?: string;
259
- one_time_token?: string;
260
- parent_id?: string;
261
- payment_id?: number;
262
+ vault_on_success?: boolean;
262
263
  require_action_type?: string;
263
- vault_on_success?: string;
264
264
  parent_provider?: string;
265
+ provider_raw_notification?: string;
265
266
  account_integration_code?: string;
267
+ provider_action_data?: string;
266
268
  technical_reverse_provider_transaction_id?: string;
267
269
  technical_reverse_transaction_type?: string;
268
270
  technical_reverse_status?: string;
269
- fraud_screening?: FraudScreening;
270
- stand_alone?: string;
271
- purpose?: string;
271
+ provider_response_message?: string;
272
+ trace_id?: string;
273
+ checkout_url?: string;
274
+ payment?: PaymentTransactionDetail[];
275
+ bank_transfer?: string[];
276
+ bnpl?: string[];
277
+ card?: Card[];
278
+ card_transaction?: Card[];
279
+ payment_link?: string[];
280
+ ticket?: string[];
281
+ wallet?: string[];
282
+ customer_payer?: CustomerPayerTransactionDetail[];
283
+ error?: boolean;
284
+ provider_account_id?: string;
285
+ parent_payment_method_type?: string;
286
+ provider_third_party_account_id?: string;
287
+ provider_response_code?: string;
288
+ }
289
+ interface PaymentTransactionDetail {
290
+ id?: number;
291
+ code?: string;
292
+ account_code?: string;
293
+ currency_code?: string;
294
+ organization_code?: string;
295
+ }
296
+ interface Card {
297
+ id?: number;
298
+ type?: string;
299
+ brand?: string;
300
+ verify?: string;
301
+ capture?: boolean;
302
+ card_iin?: string;
303
+ card_lfd?: string;
304
+ category?: string;
305
+ created_at?: string;
306
+ updated_at?: string;
307
+ issuer_code?: string;
308
+ issuer_name?: string;
309
+ country_code?: string;
310
+ country_name?: string;
311
+ installments?: number;
312
+ three_ds_code?: string;
313
+ three_ds_ds_id?: string;
314
+ three_ds_token?: string;
315
+ transaction_id?: number;
316
+ sequence_number?: string;
317
+ soft_descriptor?: string;
318
+ three_ds_acs_id?: string;
319
+ card_holder_name?: string;
320
+ installment_info?: string;
321
+ three_ds_version?: string;
322
+ installments_type?: string;
323
+ three_ds_setup_id?: string;
324
+ authorization_code?: string;
325
+ card_number_length?: number;
326
+ installments_amount?: string;
327
+ internal_card_token?: string;
328
+ three_ds_cryptogram?: string;
329
+ card_expiration_year?: number;
330
+ three_ds_collect_url?: string;
331
+ three_ds_solution_id?: string;
332
+ card_expiration_month?: number;
333
+ three_ds_developer_id?: string;
334
+ three_ds_pares_status?: string;
335
+ three_ds_has_challenge?: string;
336
+ provider_transaction_id?: string;
337
+ three_ds_transaction_id?: string;
338
+ card_security_code_length?: number;
339
+ first_installment_deferral?: string;
340
+ retrieval_reference_number?: string;
341
+ third_party_transaction_id?: string;
342
+ three_ds_setup_reference_id?: string;
343
+ internal_security_code_token?: string;
344
+ fingerprint_code?: string;
345
+ three_ds_electronic_commerce_indicator?: string;
346
+ network_token_response_code?: string;
347
+ network_token_response_message?: string;
348
+ network_token_lfd?: string;
349
+ network_token_iin?: string;
350
+ network_token_expiration_month?: number;
351
+ network_token_expiration_year?: number;
352
+ network_token_par?: string;
353
+ network_token_status?: string;
354
+ }
355
+ interface CustomerPayerTransactionDetail {
356
+ id?: number;
357
+ email?: string;
358
+ gender?: string;
359
+ last_name?: string;
360
+ created_at?: string;
361
+ first_name?: string;
362
+ ip_address?: string;
363
+ payment_id?: number;
364
+ updated_at?: string;
365
+ nationality?: string;
366
+ phone_number?: string;
367
+ customer_code?: string;
368
+ date_of_birth?: string;
369
+ document_type?: string;
370
+ document_number?: string;
371
+ device_fingerprint?: string;
372
+ phone_country_code?: string;
373
+ browser_info_language?: string;
374
+ third_party_session_id?: string;
375
+ browser_info_user_agent?: string;
376
+ browser_info_color_depth?: string;
377
+ browser_info_java_enabled?: string;
378
+ browser_info_screen_width?: string;
379
+ browser_info_accept_header?: string;
380
+ browser_info_screen_height?: string;
381
+ browser_info_accept_browser?: string;
382
+ browser_info_accept_content?: string;
383
+ browser_info_javascript_enabled?: string;
384
+ organization_customer_external_id?: string;
385
+ browser_info_browser_time_difference?: string;
272
386
  }
273
387
  interface TransactionDetailsResult {
274
388
  content: TransactionDetails[];