@yuno-payments/dashboard-api-mfe 1.8.0 → 1.8.6
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/build/cjs/index.js +4 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/types/api/api.d.ts +11 -2
- package/build/cjs/types/api/api.singleton.d.ts +1 -0
- package/build/cjs/types/api/api.types.d.ts +1 -0
- package/build/cjs/types/mutations/concierge/concierge.mutation.d.ts +8 -0
- package/build/cjs/types/mutations/concierge/index.d.ts +1 -0
- package/build/cjs/types/mutations/index.d.ts +1 -0
- package/build/cjs/types/queries/audit/audit.query.d.ts +5 -1
- package/build/cjs/types/queries/concierge/concierge.query.d.ts +6 -0
- package/build/cjs/types/queries/concierge/index.d.ts +1 -0
- package/build/cjs/types/queries/index.d.ts +1 -0
- package/build/cjs/types/types/audit/audit.d.ts +53 -0
- package/build/cjs/types/types/concierge/concierge-alerts.d.ts +42 -0
- package/build/cjs/types/types/concierge/index.d.ts +1 -0
- package/build/cjs/types/types/index.d.ts +1 -0
- package/build/esm/index.js +5 -5
- package/build/esm/index.js.map +1 -1
- package/build/esm/types/api/api.d.ts +11 -2
- package/build/esm/types/api/api.singleton.d.ts +1 -0
- package/build/esm/types/api/api.types.d.ts +1 -0
- package/build/esm/types/mutations/concierge/concierge.mutation.d.ts +8 -0
- package/build/esm/types/mutations/concierge/index.d.ts +1 -0
- package/build/esm/types/mutations/index.d.ts +1 -0
- package/build/esm/types/queries/audit/audit.query.d.ts +5 -1
- package/build/esm/types/queries/concierge/concierge.query.d.ts +6 -0
- package/build/esm/types/queries/concierge/index.d.ts +1 -0
- package/build/esm/types/queries/index.d.ts +1 -0
- package/build/esm/types/types/audit/audit.d.ts +53 -0
- package/build/esm/types/types/concierge/concierge-alerts.d.ts +42 -0
- package/build/esm/types/types/concierge/index.d.ts +1 -0
- package/build/esm/types/types/index.d.ts +1 -0
- package/build/index.d.ts +126 -3
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
2
|
import { HttpClient } from '../lib/http-client';
|
|
3
3
|
import { GetPaymentsParams, GetReconciliationMetricParams, FirebaseUserSubscribe, PathNotification, TimeZoneCatalog, GetTransactionDetailsV2Params, MfaUserSubscribe, UserInviteMultiaccountPayload, GetTransactionsParams, PaymentsSettings, GetPayoutDetail, GetPayoutTransactionDetail, PinnedSections, ThemeSettings, ListSubscriptionsParams } from './api.types';
|
|
4
|
-
import { Audit, OperationTransaction, Organization, OrganizationConfig, SmartRouting, User, Webhook, Reports, ReportType, TemplateType, OrganizationSettings, IListScheduledReportsResponse, DataReport, Reconciliation, Checkout, ReconciliationReportType, SendPaymentNotification, ReconciliationAlerts, ReconciliationAgenda, ReconciliationSales, ReconciliationAdvancements, ReconciliationFees, ReconciliationInsights, Payment, AddToRiskListRequest, InsightsFraudParams, InsightsFraudBody, AI, PaymentFiltersSection, Installments, Connection, TemplateReporting, GetUserFullResponse, Team } from '../types';
|
|
4
|
+
import { Audit, OperationTransaction, Organization, OrganizationConfig, SmartRouting, User, Webhook, Reports, ReportType, TemplateType, OrganizationSettings, IListScheduledReportsResponse, DataReport, Reconciliation, Checkout, ReconciliationReportType, SendPaymentNotification, ReconciliationAlerts, ReconciliationAgenda, ReconciliationSales, ReconciliationAdvancements, ReconciliationFees, ReconciliationInsights, Payment, AddToRiskListRequest, InsightsFraudParams, InsightsFraudBody, AI, PaymentFiltersSection, Installments, Connection, TemplateReporting, GetUserFullResponse, Team, ConciergeAlerts } from '../types';
|
|
5
5
|
import { ConversionRateParams, ConversionRateBody, ConversionRateOverview, ConversionRateOverviewFraud3ds } from '../types/data-report/conversion-rate.types';
|
|
6
6
|
import { RoutingMonitors } from '../types/routing-monitors';
|
|
7
7
|
import { ChangePaymentsWebhook } from '../mutations';
|
|
@@ -174,8 +174,12 @@ export declare class Api extends HttpClient {
|
|
|
174
174
|
postApiLogs<T>({ payload: { account_code, ...rest }, }: {
|
|
175
175
|
payload: Audit.AuditApiLogsParams;
|
|
176
176
|
}): Promise<AxiosResponse<T>>;
|
|
177
|
-
getApiLogsDetailByPaymentCode<T>(paymentCode: string): Promise<AxiosResponse<T>>;
|
|
177
|
+
getApiLogsDetailByPaymentCode<T>(paymentCode: string, createdAtFrom?: string): Promise<AxiosResponse<T>>;
|
|
178
178
|
getApiLogsByTransactionCode<T>(transactionCode: string, accountCode: string): Promise<AxiosResponse<T>>;
|
|
179
|
+
postApiLogsStatsRequests<T>(payload: Audit.ApiLogsStatsParams): Promise<AxiosResponse<T>>;
|
|
180
|
+
postApiLogsStatsErrors<T>(payload: Audit.ApiLogsStatsParams): Promise<AxiosResponse<T>>;
|
|
181
|
+
postApiLogsStatsErrorsByEndpoint<T>(payload: Audit.ApiLogsStatsParams): Promise<AxiosResponse<T>>;
|
|
182
|
+
postApiLogsList<T>(payload: Audit.ApiLogsListParams): Promise<AxiosResponse<T>>;
|
|
179
183
|
useGetPaymentStatusesStyles<T>(): Promise<AxiosResponse<T, any>>;
|
|
180
184
|
useGetTransactionStatusesStyles<T>(): Promise<AxiosResponse<T, any>>;
|
|
181
185
|
useGetReconciliationTransactionStatusesStyles<T>(): Promise<AxiosResponse<T, any>>;
|
|
@@ -671,5 +675,10 @@ export declare class Api extends HttpClient {
|
|
|
671
675
|
updateOnboarding<T>(organizationCode: string, recipientId: string, onboardingId: string, payload: UpdateOnboardingPayload): Promise<AxiosResponse<T, any>>;
|
|
672
676
|
blockOnboarding<T>(organizationCode: string, recipientId: string, onboardingId: string): Promise<AxiosResponse<T, any>>;
|
|
673
677
|
unblockOnboarding<T>(organizationCode: string, recipientId: string, onboardingId: string): Promise<AxiosResponse<T, any>>;
|
|
678
|
+
getConciergeAlerts<T>(): Promise<AxiosResponse<T>>;
|
|
679
|
+
getConciergeAlertById<T>(alertId: string): Promise<AxiosResponse<T>>;
|
|
680
|
+
createConciergeAlert<T>(payload: ConciergeAlerts.CreateAlertPayload): Promise<AxiosResponse<T>>;
|
|
681
|
+
deleteConciergeAlert<T>(alertId: string): Promise<AxiosResponse<T>>;
|
|
682
|
+
enableConciergeAlert<T>(alertId: string, payload: ConciergeAlerts.EnableAlertPayload): Promise<AxiosResponse<T>>;
|
|
674
683
|
}
|
|
675
684
|
export {};
|
|
@@ -3,6 +3,7 @@ import { Api } from './api';
|
|
|
3
3
|
export declare class ApiSingleton extends Api {
|
|
4
4
|
private static classInstance;
|
|
5
5
|
private constructor();
|
|
6
|
+
private static registerCanaryInterceptor;
|
|
6
7
|
static refreshInstance(config?: AxiosRequestConfig): ApiSingleton;
|
|
7
8
|
static getInstance(config?: AxiosRequestConfig): ApiSingleton;
|
|
8
9
|
static setMode(mode: any): Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UseMutationResult } from '@tanstack/react-query';
|
|
2
|
+
import { ConciergeAlerts } from '../../types';
|
|
3
|
+
export declare function useCreateConciergeAlert(): UseMutationResult<ConciergeAlerts.CreateAlertResponse, ConciergeAlerts.Error, ConciergeAlerts.CreateAlertPayload>;
|
|
4
|
+
export declare function useDeleteConciergeAlert(): UseMutationResult<ConciergeAlerts.DeleteAlertResponse, ConciergeAlerts.Error, string>;
|
|
5
|
+
export declare function useEnableConciergeAlert(): UseMutationResult<ConciergeAlerts.EnableAlertResponse, ConciergeAlerts.Error, {
|
|
6
|
+
alertId: string;
|
|
7
|
+
payload: ConciergeAlerts.EnableAlertPayload;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './concierge.mutation';
|
|
@@ -8,7 +8,7 @@ export declare function usePostApiLogs(params: Audit.AuditApiLogsParams): UseQue
|
|
|
8
8
|
export declare function usePostWebhookLogs({ params, }: {
|
|
9
9
|
params: Audit.AuditWebhooksParams;
|
|
10
10
|
}): UseQueryResult<Audit.AuditWebhooksResponse, BFFErrorResponse>;
|
|
11
|
-
export declare function useGetApiLogsDetailByPaymentCode(code: string | null | undefined): UseQueryResult<Audit.ApiLogsDetailByPaymentCode, BFFErrorResponse>;
|
|
11
|
+
export declare function useGetApiLogsDetailByPaymentCode(code: string | null | undefined, createdAtFrom?: string): UseQueryResult<Audit.ApiLogsDetailByPaymentCode, BFFErrorResponse>;
|
|
12
12
|
export declare function useGetApiLogsByTransactionCode(transactionCode: string | null | undefined, accountCode: string | null | undefined): UseQueryResult<Audit.ApiLogByTransactionCode, BFFErrorResponse>;
|
|
13
13
|
export declare function useGetAuditExportsList(reportType: Audit.AuditExportReportType, enabled?: boolean): UseQueryResult<Audit.AuditExportResponse[], BFFErrorResponse>;
|
|
14
14
|
export declare function useGetAuditExportDownload(reportId: string, enabled?: boolean, onSuccess?: (data: Audit.AuditExportDownloadResponse) => void): UseQueryResult<Audit.AuditExportDownloadResponse, BFFErrorResponse>;
|
|
@@ -26,3 +26,7 @@ export interface UnifiedExportsListQueryParams {
|
|
|
26
26
|
enabled?: boolean;
|
|
27
27
|
}
|
|
28
28
|
export declare function useGetUnifiedExportsList({ tab, page, size, enabled, }: UnifiedExportsListQueryParams): UseQueryResult<Audit.UnifiedExportListResponse, BFFErrorResponse>;
|
|
29
|
+
export declare function useGetApiLogsStatsRequests(params: Audit.ApiLogsStatsParams): UseQueryResult<Audit.ApiLogsStatsResponse, BFFErrorResponse>;
|
|
30
|
+
export declare function useGetApiLogsStatsErrors(params: Audit.ApiLogsStatsParams): UseQueryResult<Audit.ApiLogsStatsResponse, BFFErrorResponse>;
|
|
31
|
+
export declare function useGetApiLogsStatsErrorsByEndpoint(params: Audit.ApiLogsStatsParams): UseQueryResult<Audit.ApiLogsErrorsByEndpointResponse, BFFErrorResponse>;
|
|
32
|
+
export declare function useGetApiLogsList(params: Audit.ApiLogsListParams): UseQueryResult<Audit.ApiLogsListResponse, BFFErrorResponse>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { ConciergeAlerts } from '../../types';
|
|
3
|
+
export declare const CONCIERGE_ALERTS_QUERY_KEY = "GET/concierge/alerts";
|
|
4
|
+
export declare const CONCIERGE_ALERT_BY_ID_QUERY_KEY = "GET/concierge/alerts/by-id";
|
|
5
|
+
export declare function useGetConciergeAlerts(): UseQueryResult<ConciergeAlerts.Alert[], ConciergeAlerts.Error>;
|
|
6
|
+
export declare function useGetConciergeAlertById(alertId: string): UseQueryResult<ConciergeAlerts.Alert, ConciergeAlerts.Error>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './concierge.query';
|
|
@@ -384,4 +384,57 @@ export declare namespace Audit {
|
|
|
384
384
|
interface AuditExportDownloadResponse {
|
|
385
385
|
redirect_link: string;
|
|
386
386
|
}
|
|
387
|
+
interface ApiLogsStatsParams {
|
|
388
|
+
start_date?: string;
|
|
389
|
+
end_date?: string;
|
|
390
|
+
timezone?: string;
|
|
391
|
+
accounts?: string[];
|
|
392
|
+
granularity?: string;
|
|
393
|
+
}
|
|
394
|
+
interface ApiLogsStatsResponse {
|
|
395
|
+
total: number;
|
|
396
|
+
time_series: Array<{
|
|
397
|
+
timestamp: string;
|
|
398
|
+
count: number;
|
|
399
|
+
}>;
|
|
400
|
+
}
|
|
401
|
+
interface ApiLogsErrorsByEndpointResponse {
|
|
402
|
+
total: number;
|
|
403
|
+
endpoints: Array<{
|
|
404
|
+
url: string;
|
|
405
|
+
count: number;
|
|
406
|
+
time_series: Array<{
|
|
407
|
+
timestamp: string;
|
|
408
|
+
count: number;
|
|
409
|
+
}>;
|
|
410
|
+
}>;
|
|
411
|
+
}
|
|
412
|
+
interface ApiLogsListParams {
|
|
413
|
+
page?: number;
|
|
414
|
+
size?: number;
|
|
415
|
+
start_date?: string;
|
|
416
|
+
end_date?: string;
|
|
417
|
+
status_codes?: number[];
|
|
418
|
+
methods?: string[];
|
|
419
|
+
search?: string;
|
|
420
|
+
accounts?: string[];
|
|
421
|
+
}
|
|
422
|
+
interface ApiLogsListResponse {
|
|
423
|
+
page: number;
|
|
424
|
+
size: number;
|
|
425
|
+
total_rows: number;
|
|
426
|
+
total_pages: number;
|
|
427
|
+
data: ApiLogItem[];
|
|
428
|
+
}
|
|
429
|
+
interface ApiLogItem {
|
|
430
|
+
code: string;
|
|
431
|
+
url: string;
|
|
432
|
+
method: string;
|
|
433
|
+
status_code: number;
|
|
434
|
+
trace_id: string | null;
|
|
435
|
+
created_at: string;
|
|
436
|
+
account_code: string | null;
|
|
437
|
+
request: unknown;
|
|
438
|
+
response: unknown;
|
|
439
|
+
}
|
|
387
440
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare namespace ConciergeAlerts {
|
|
2
|
+
interface AntiNoiseControls {
|
|
3
|
+
cooldown: number;
|
|
4
|
+
minimum_transactions: number;
|
|
5
|
+
}
|
|
6
|
+
interface ThresholdConfiguration {
|
|
7
|
+
error_rate_threshold: number;
|
|
8
|
+
error_types: string[];
|
|
9
|
+
}
|
|
10
|
+
interface ScopeFilters {
|
|
11
|
+
countries: string[];
|
|
12
|
+
providers: string[];
|
|
13
|
+
payment_methods: string[];
|
|
14
|
+
card_brands: string[];
|
|
15
|
+
}
|
|
16
|
+
interface Alert {
|
|
17
|
+
id: string;
|
|
18
|
+
alert_type: string;
|
|
19
|
+
name: string;
|
|
20
|
+
language: string;
|
|
21
|
+
analysis_window: string;
|
|
22
|
+
comparison_baseline: string;
|
|
23
|
+
anti_noise_controls: AntiNoiseControls;
|
|
24
|
+
threshold_configuration: ThresholdConfiguration;
|
|
25
|
+
scope_filters: ScopeFilters;
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
}
|
|
28
|
+
type CreateAlertPayload = Omit<Alert, 'id' | 'enabled'>;
|
|
29
|
+
type CreateAlertResponse = Pick<Alert, 'id'>;
|
|
30
|
+
type DeleteAlertResponse = Pick<Alert, 'id'>;
|
|
31
|
+
interface EnableAlertPayload {
|
|
32
|
+
enable: boolean;
|
|
33
|
+
}
|
|
34
|
+
interface EnableAlertResponse {
|
|
35
|
+
id: string;
|
|
36
|
+
enable: boolean;
|
|
37
|
+
}
|
|
38
|
+
type Error = {
|
|
39
|
+
code?: string;
|
|
40
|
+
name?: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './concierge-alerts';
|