@yuno-payments/dashboard-api-mfe 2.0.5 → 2.1.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.
@@ -6,7 +6,8 @@ import { BFFErrorResponse } from '../../mutations';
6
6
  *
7
7
  * Hits `POST /dashboard-bff/api/audit-logs/subscriptions/list` with an empty
8
8
  * JSON body and unwraps the `{ data: [...] }` envelope so consumers receive a
9
- * flat `Audit.AuditSubscriptionGroup[]`.
9
+ * flat `Audit.AuditSubscriptionGroup[]`. Each group's `sources` is a nested
10
+ * per-source map (`Record<string, SourceSpec>`).
10
11
  *
11
12
  * v2.0 breaking change: filter params (source/event/account_codes) were
12
13
  * removed — the BFF now returns all groups for the current user.
@@ -22,6 +22,10 @@ export declare function usePostWebhookLogs({ params, }: {
22
22
  params: Audit.AuditWebhooksParams;
23
23
  }): UseQueryResult<Audit.AuditWebhooksResponse, BFFErrorResponse>;
24
24
  export declare function useGetApiLogsDetailByPaymentCode(code: string | null | undefined, createdAtFrom?: string): UseQueryResult<Audit.ApiLogsDetailByPaymentCode, BFFErrorResponse>;
25
+ /**
26
+ * GET /api-logs/payment/:paymentId via the new audit-logs microservice.
27
+ */
28
+ export declare function useGetApiLogsByPaymentId(paymentId: string | null | undefined, accountCode: string | null | undefined, createdAtFrom?: string): UseQueryResult<Audit.ApiLogsV3ListResponse, BFFErrorResponse>;
25
29
  export declare function useGetApiLogsByTransactionCode(transactionCode: string | null | undefined, accountCode: string | null | undefined): UseQueryResult<Audit.ApiLogByTransactionCode, BFFErrorResponse>;
26
30
  export declare function useGetAuditExportsList(reportType: Audit.AuditExportReportType, enabled?: boolean): UseQueryResult<Audit.AuditExportResponse[], BFFErrorResponse>;
27
31
  export declare function useGetAuditExportDownload(reportId: string, enabled?: boolean, onSuccess?: (data: Audit.AuditExportDownloadResponse) => void): UseQueryResult<Audit.AuditExportDownloadResponse, BFFErrorResponse>;
@@ -459,13 +459,15 @@ export declare namespace Audit {
459
459
  total_pages: number;
460
460
  data: ApiLogV3Item[];
461
461
  }
462
+ interface SourceSpec {
463
+ events: string[];
464
+ }
462
465
  interface AuditSubscriptionGroup {
463
466
  code: string;
464
467
  user_code: string;
465
468
  user_email: string;
466
469
  organization_code: string;
467
- sources: string[];
468
- events: string[];
470
+ sources: Record<string, SourceSpec>;
469
471
  account_codes: string[];
470
472
  enabled: boolean;
471
473
  created_at: string;
@@ -473,8 +475,7 @@ export declare namespace Audit {
473
475
  last_fired_at?: string | null;
474
476
  }
475
477
  type CreateAuditSubscriptionPayload = {
476
- sources: string[];
477
- events: string[];
478
+ sources: Record<string, SourceSpec>;
478
479
  account_codes: string[];
479
480
  };
480
481
  interface ListAuditSubscriptionsResponse {