@yuno-payments/dashboard-api-mfe 1.20.0 → 1.22.1

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 (30) hide show
  1. package/build/cjs/index.js +4 -4
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/types/api/api.d.ts +15 -7
  4. package/build/cjs/types/msw/mocks/reconciliation-insights/index.d.ts +1 -0
  5. package/build/cjs/types/mutations/audit/audit-subscriptions.mutation.d.ts +41 -0
  6. package/build/cjs/types/mutations/audit/index.d.ts +1 -0
  7. package/build/cjs/types/mutations/fraud-screening/fraud-screening.mutation.d.ts +2 -0
  8. package/build/cjs/types/queries/audit/audit-subscriptions.query.d.ts +11 -0
  9. package/build/cjs/types/queries/audit/index.d.ts +1 -0
  10. package/build/cjs/types/queries/recipients/recipients.query.d.ts +1 -0
  11. package/build/cjs/types/queries/reconciliations/reconciliation-insights.query.d.ts +1 -0
  12. package/build/cjs/types/types/audit/audit.d.ts +25 -0
  13. package/build/cjs/types/types/recipients/recipients.d.ts +18 -0
  14. package/build/cjs/types/types/reconciliation/reconciliation-insights.d.ts +50 -0
  15. package/build/esm/index.js +6 -6
  16. package/build/esm/index.js.map +1 -1
  17. package/build/esm/types/api/api.d.ts +15 -7
  18. package/build/esm/types/msw/mocks/reconciliation-insights/index.d.ts +1 -0
  19. package/build/esm/types/mutations/audit/audit-subscriptions.mutation.d.ts +41 -0
  20. package/build/esm/types/mutations/audit/index.d.ts +1 -0
  21. package/build/esm/types/mutations/fraud-screening/fraud-screening.mutation.d.ts +2 -0
  22. package/build/esm/types/queries/audit/audit-subscriptions.query.d.ts +11 -0
  23. package/build/esm/types/queries/audit/index.d.ts +1 -0
  24. package/build/esm/types/queries/recipients/recipients.query.d.ts +1 -0
  25. package/build/esm/types/queries/reconciliations/reconciliation-insights.query.d.ts +1 -0
  26. package/build/esm/types/types/audit/audit.d.ts +25 -0
  27. package/build/esm/types/types/recipients/recipients.d.ts +18 -0
  28. package/build/esm/types/types/reconciliation/reconciliation-insights.d.ts +50 -0
  29. package/build/index.d.ts +160 -9
  30. package/package.json +1 -1
@@ -7,6 +7,7 @@ import { RoutingMonitors } from '../types/routing-monitors';
7
7
  import { ChangePaymentsWebhook } from '../mutations';
8
8
  import { S3Client } from '../types/s3-client';
9
9
  import { CreateRecipientPayload, UpdateRecipientPayload, CreateOnboardingPayload, UpdateOnboardingPayload } from '../types/recipients/recipients-mutations';
10
+ import { GetRecipientsParams } from '../types/recipients';
10
11
  import { AllowedList } from '../types/allowed-list';
11
12
  import { Cost } from '../types/connection/costs';
12
13
  import { IntegrationRequest } from '../types/integration-requests';
@@ -65,6 +66,7 @@ export declare class Api extends HttpClient {
65
66
  getReconciliationInsightsReconciliationRateByProvider<T>(body: ReconciliationInsights.BaseFiltersWithProvider): Promise<AxiosResponse<T>>;
66
67
  getReconciliationInsightsReconciliationRateByAccount<T>(body: ReconciliationInsights.BaseFiltersWithProvider): Promise<AxiosResponse<T>>;
67
68
  getReconciliationInsightsReconciliationRateByCurrency<T>(body: ReconciliationInsights.BaseFiltersWithProvider): Promise<AxiosResponse<T>>;
69
+ getReconciliationInsightsSettlementLookup<T>(body: ReconciliationInsights.SettlementLookupBody): Promise<AxiosResponse<T>>;
68
70
  postPaymentsLazy<T>(params: GetPaymentsParams): Promise<AxiosResponse<T, any>>;
69
71
  postPayouts<T>(params: GetPaymentsParams): Promise<AxiosResponse<T, any>>;
70
72
  getPayoutsFilters<T>(organizationCode: any): Promise<AxiosResponse<T>>;
@@ -184,6 +186,9 @@ export declare class Api extends HttpClient {
184
186
  postApiLogsStatsErrorsByEndpoint<T>(payload: Audit.ApiLogsStatsParams): Promise<AxiosResponse<T>>;
185
187
  postApiLogsList<T>(payload: Audit.ApiLogsListParams): Promise<AxiosResponse<T>>;
186
188
  getApiLogsV3ByPaymentCode<T>(paymentCode: string, createdAtFrom?: string): Promise<AxiosResponse<T>>;
189
+ createAuditSubscription<T>(payload: Audit.CreateAuditSubscriptionPayload): Promise<AxiosResponse<T>>;
190
+ listAuditSubscriptions<T>(params?: Audit.ListAuditSubscriptionsParams): Promise<AxiosResponse<T>>;
191
+ deleteAuditSubscription<T>(code: string): Promise<AxiosResponse<T>>;
187
192
  useGetCountriesConfig<T>(): Promise<AxiosResponse<T, any>>;
188
193
  useGetCountriesConfigV2<T>(acceptLanguage?: string): Promise<AxiosResponse<T, any>>;
189
194
  getSmartRoutingMethods<T>(accountCode: string, routingType?: SmartRouting.RoutingType): Promise<AxiosResponse<T, any>>;
@@ -520,14 +525,16 @@ export declare class Api extends HttpClient {
520
525
  putBlackListType<T>(payload: any): Promise<AxiosResponse<T, any>>;
521
526
  changeBlackListStatus<T>(payload: any): Promise<AxiosResponse<T, any>>;
522
527
  changeBlackListStatusItem<T>(payload: any): Promise<AxiosResponse<T, any>>;
523
- postBlackListItems<T>({ payload }: {
524
- payload: any;
528
+ postBlackListItems<T>({ payload, accountCode, }: {
529
+ payload: unknown;
530
+ accountCode?: string;
525
531
  }): Promise<AxiosResponse<T, any>>;
526
- postBlackListBatch<T>({ blacklist_code, expiration_days, file, handleSetProgress, }: {
527
- blacklist_code: any;
528
- expiration_days: any;
529
- file: any;
530
- handleSetProgress: any;
532
+ postBlackListBatch<T>({ blacklist_code, expiration_days, file, handleSetProgress, accountCode, }: {
533
+ blacklist_code: string;
534
+ expiration_days: number;
535
+ file: string;
536
+ handleSetProgress: (progress: number) => void;
537
+ accountCode?: string;
531
538
  }): Promise<AxiosResponse<T, any>>;
532
539
  deleteBlackListType<T>({ black_list_code, }: {
533
540
  black_list_code: any;
@@ -665,6 +672,7 @@ export declare class Api extends HttpClient {
665
672
  sort_by?: string;
666
673
  sort_order?: string;
667
674
  }): Promise<AxiosResponse<T, any>>;
675
+ getRecipientsV2<T>(organizationCode: string, params: GetRecipientsParams): Promise<AxiosResponse<T, any>>;
668
676
  getRecipientById<T>(organizationCode: string, recipientId: string): Promise<AxiosResponse<T, any>>;
669
677
  getOnboardingDetail<T>(organizationCode: string, recipientId: string, onboardingId: string): Promise<AxiosResponse<T, any>>;
670
678
  getOnboardingTimeline<T>(organizationCode: string, onboardingId: string): Promise<AxiosResponse<T, any>>;
@@ -20,3 +20,4 @@ export declare const NOT_CONFIRM_SUMMARY_MOCK: ReconciliationInsights.GenericCha
20
20
  export declare const NOT_CONFIRM_AGGREGATORS_MOCK: ReconciliationInsights.Aggregators;
21
21
  export declare const NOT_CONFIRM_LIST_MOCK: ReconciliationInsights.ProcessedTransactionList;
22
22
  export declare const AMOUNT_TO_BE_SETTLED_SUMMARY_MOCK: ReconciliationInsights.ChartWithGraph;
23
+ export declare const SETTLEMENT_LOOKUP_MOCK: ReconciliationInsights.SettlementDetail;
@@ -0,0 +1,41 @@
1
+ import { UseMutationResult } from '@tanstack/react-query';
2
+ import { AxiosError } from 'axios';
3
+ import type { Audit } from '../../types';
4
+ import { BFFErrorResponse } from '../smart-routing';
5
+ /**
6
+ * Result of {@link useCreateAuditSubscription}'s `mutateAsync`.
7
+ *
8
+ * A `409 subscription_already_exists` response is treated as success
9
+ * (idempotent create) and resolves with `{ alreadyExists: true }` rather
10
+ * than rejecting — the caller treats an already-existing subscription as a
11
+ * successful no-op.
12
+ */
13
+ export type CreateAuditSubscriptionResult = {
14
+ alreadyExists: false;
15
+ subscription: Audit.AuditSubscription;
16
+ } | {
17
+ alreadyExists: true;
18
+ };
19
+ /**
20
+ * Creates an audit-log subscription.
21
+ *
22
+ * Hits `POST /dashboard-bff/api/audit-logs/subscriptions`. A `409`
23
+ * `subscription_already_exists` response RESOLVES successfully as
24
+ * `{ alreadyExists: true }` (idempotent create); a `201` resolves as
25
+ * `{ alreadyExists: false, subscription }`. Any other error rejects.
26
+ *
27
+ * On success (including the idempotent 409), the `['audit-subscriptions']`
28
+ * query key is invalidated.
29
+ */
30
+ export declare function useCreateAuditSubscription(): UseMutationResult<CreateAuditSubscriptionResult, AxiosError<BFFErrorResponse>, Audit.CreateAuditSubscriptionPayload>;
31
+ /**
32
+ * Deletes an audit-log subscription by its code.
33
+ *
34
+ * Hits `DELETE /dashboard-bff/api/audit-logs/subscriptions/{code}`. A `404`
35
+ * `subscription_not_found` response RESOLVES successfully (idempotent delete —
36
+ * the subscription is already gone). Any other error rejects.
37
+ *
38
+ * On success (including the idempotent 404), the `['audit-subscriptions']`
39
+ * query key is invalidated.
40
+ */
41
+ export declare function useDeleteAuditSubscription(): UseMutationResult<void, AxiosError<BFFErrorResponse>, string>;
@@ -1,2 +1,3 @@
1
1
  export * from './audit.mutation';
2
2
  export * from './audit-api.mutation';
3
+ export * from './audit-subscriptions.mutation';
@@ -18,11 +18,13 @@ export type PostBlackList = {
18
18
  };
19
19
  type PostBlackListItems = {
20
20
  payload: FraudScreening.BlackListItemsPayload;
21
+ accountCode?: string;
21
22
  };
22
23
  type PostBlackListBatch = {
23
24
  blacklist_code: string;
24
25
  expiration_days: number;
25
26
  file: string;
27
+ accountCode?: string;
26
28
  };
27
29
  export type ChangePaymentsWebhook = {
28
30
  paymentCode: string;
@@ -0,0 +1,11 @@
1
+ import { UseQueryResult } from '@tanstack/react-query';
2
+ import type { Audit } from '../../types';
3
+ import { BFFErrorResponse } from '../../mutations';
4
+ /**
5
+ * Lists audit-log subscriptions for the current organization.
6
+ *
7
+ * Hits `POST /dashboard-bff/api/audit-logs/subscriptions/list` with a JSON
8
+ * body of filter params and unwraps the `{ data: [...] }` envelope so
9
+ * consumers receive a flat `Audit.AuditSubscription[]`.
10
+ */
11
+ export declare function useListAuditSubscriptions(params?: Audit.ListAuditSubscriptionsParams): UseQueryResult<Audit.AuditSubscription[], BFFErrorResponse>;
@@ -1,2 +1,3 @@
1
1
  export * from './audit.query';
2
2
  export * from './audit-v3.query';
3
+ export * from './audit-subscriptions.query';
@@ -3,6 +3,7 @@ import { UseQueryResult } from '@tanstack/react-query';
3
3
  import { Recipients, GetRecipientsParams, GetRecipientByIdParams, GetOnboardingDetailParams, GetOnboardingTimelineParams, RecipientsExport, GetRecipientExportsParams } from '../../types/recipients';
4
4
  import { BFFErrorResponse } from '../../mutations';
5
5
  export declare function useGetRecipients(organizationCode: string, params: GetRecipientsParams, enabled?: boolean): UseQueryResult<Recipients.RecipientListResponse, AxiosError<BFFErrorResponse>>;
6
+ export declare function useGetRecipientsV2(organizationCode: string, params: GetRecipientsParams, enabled?: boolean): UseQueryResult<Recipients.RecipientListResponseV2, AxiosError<BFFErrorResponse>>;
6
7
  export declare function useGetRecipientById(organizationCode: string, params: GetRecipientByIdParams, enabled?: boolean): UseQueryResult<Recipients.RecipientDetail, AxiosError<BFFErrorResponse>>;
7
8
  export declare function useGetOnboardingDetail(organizationCode: string, params: GetOnboardingDetailParams, enabled?: boolean): UseQueryResult<Recipients.OnboardingDetail, AxiosError<BFFErrorResponse>>;
8
9
  export declare function useGetOnboardingTimeline(organizationCode: string, params: GetOnboardingTimelineParams, enabled?: boolean): UseQueryResult<Recipients.OnboardingTimeline, AxiosError<BFFErrorResponse>>;
@@ -24,3 +24,4 @@ export declare function useGetReconciliationInsightsAmountToBeSettledSummary({ b
24
24
  export declare function useGetReconciliationInsightsReconciliationRateByProvider({ body, enabled, }: ReconciliationInsights.UseInsightsQueryProps<ReconciliationInsights.BaseFiltersWithProvider>): UseQueryResult<ReconciliationInsights.ReconciliationRateByProviderResponse, ReconciliationInsights.Error>;
25
25
  export declare function useGetReconciliationInsightsReconciliationRateByAccount({ body, enabled, }: ReconciliationInsights.UseInsightsQueryProps<ReconciliationInsights.BaseFiltersWithProvider>): UseQueryResult<ReconciliationInsights.ReconciliationRateItem[], ReconciliationInsights.Error>;
26
26
  export declare function useGetReconciliationInsightsReconciliationRateByCurrency({ body, enabled, }: ReconciliationInsights.UseInsightsQueryProps<ReconciliationInsights.BaseFiltersWithProvider>): UseQueryResult<ReconciliationInsights.ReconciliationRateItem[], ReconciliationInsights.Error>;
27
+ export declare function useGetReconciliationInsightsSettlementLookup({ body, enabled, }: ReconciliationInsights.UseInsightsQueryProps<ReconciliationInsights.SettlementLookupBody>): UseQueryResult<ReconciliationInsights.SettlementDetail, ReconciliationInsights.Error>;
@@ -459,4 +459,29 @@ export declare namespace Audit {
459
459
  total_pages: number;
460
460
  data: ApiLogV3Item[];
461
461
  }
462
+ interface AuditSubscription {
463
+ code: string;
464
+ user_code: string;
465
+ user_email: string;
466
+ organization_code: string;
467
+ account_code: string;
468
+ source: string;
469
+ event: string;
470
+ enabled: boolean;
471
+ created_at: string;
472
+ updated_at: string;
473
+ }
474
+ interface CreateAuditSubscriptionPayload {
475
+ account_code: string;
476
+ source: string;
477
+ event: string;
478
+ }
479
+ interface ListAuditSubscriptionsParams {
480
+ source?: string;
481
+ event?: string;
482
+ account_codes?: string[];
483
+ }
484
+ interface ListAuditSubscriptionsResponse {
485
+ data: AuditSubscription[];
486
+ }
462
487
  }
@@ -41,6 +41,7 @@ export declare namespace Recipients {
41
41
  provider_id: string;
42
42
  status: string;
43
43
  created_at: string;
44
+ updated_at?: string;
44
45
  }
45
46
  interface RecipientListItem {
46
47
  id: string;
@@ -72,6 +73,23 @@ export declare namespace Recipients {
72
73
  data: RecipientListItem[];
73
74
  pagination: Pagination;
74
75
  }
76
+ interface RecipientListItemV2 {
77
+ id: string;
78
+ merchant_recipient_id: string | null;
79
+ national_entity: string;
80
+ entity_type: string | null;
81
+ country: string;
82
+ first_name: string | null;
83
+ last_name: string | null;
84
+ legal_name: string | null;
85
+ account_id: string;
86
+ updated_at: string;
87
+ onboardings: OnboardingSummary[];
88
+ }
89
+ interface RecipientListResponseV2 {
90
+ data: RecipientListItemV2[];
91
+ pagination: Pagination;
92
+ }
75
93
  interface RecipientDetail {
76
94
  id: string;
77
95
  merchant_recipient_id: string | null;
@@ -184,5 +184,55 @@ export declare namespace ReconciliationInsights {
184
184
  code?: string;
185
185
  message?: string;
186
186
  }
187
+ export type SettlementLookupKey = 'payment_id' | 'transaction_id' | 'provider_transaction_id' | 'third_party_transaction_id_transaction';
188
+ export interface SettlementLookupBody {
189
+ accounts?: string[];
190
+ key: SettlementLookupKey;
191
+ value: string;
192
+ }
193
+ export interface SettlementDetail {
194
+ primary_key: string;
195
+ organization_code: string;
196
+ account_id: string;
197
+ provider_merchant_id: string;
198
+ provider_id: string;
199
+ acquirer: string;
200
+ country: string;
201
+ payment_method_category: string;
202
+ payment_method_type: string;
203
+ settlement_batch_id: string;
204
+ payment_id: string;
205
+ transaction_id: string;
206
+ provider_transaction_id: string;
207
+ third_party_transaction_id_transaction: string;
208
+ merchant_order_id: string;
209
+ merchant_reference: string;
210
+ transaction_date: string;
211
+ settlement_date: string;
212
+ type: string;
213
+ reconciliation_status: string;
214
+ reconciliation_sub_status: string;
215
+ reconciliation_id: string;
216
+ amount: number;
217
+ gross_currency: string;
218
+ gross_credit: number;
219
+ gross_debit: number;
220
+ settlement_currency: string;
221
+ fx_rate: number;
222
+ settlement_gross_amount: number;
223
+ fee_rate: number;
224
+ settlement_fees: number;
225
+ settlement_fee_taxes: number;
226
+ settlement_taxes: number;
227
+ settlement_net_credit: number;
228
+ settlement_net_debit: number;
229
+ card_brand: string;
230
+ card_type: string;
231
+ card_iin: string;
232
+ card_lfd: string;
233
+ authorization_code: string;
234
+ installments: number;
235
+ installment_number: number;
236
+ }
187
237
  export {};
188
238
  }