@yuno-payments/dashboard-api-mfe 1.22.1 → 2.0.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.
@@ -708,5 +708,25 @@ export declare class Api extends HttpClient {
708
708
  deleteConciergeAlert<T>(alertId: string): Promise<AxiosResponse<T>>;
709
709
  enableConciergeAlert<T>(alertId: string, payload: ConciergeAlerts.EnableAlertPayload): Promise<AxiosResponse<T>>;
710
710
  postPlaygroundExecuteFlow<T>(payload: Playground.ExecuteFlowPayload): Promise<AxiosResponse<T, unknown>>;
711
+ postApiLogsListV2<T>(payload: Audit.ApiLogsListParams): Promise<AxiosResponse<T>>;
712
+ getApiLogsByPaymentId<T>(paymentId: string, accountCode: string, createdAtFrom?: string): Promise<AxiosResponse<T>>;
713
+ postApiLogsStatsRequestsV2<T>(payload: Audit.ApiLogsStatsParams): Promise<AxiosResponse<T>>;
714
+ postApiLogsStatsErrorsV2<T>(payload: Audit.ApiLogsStatsParams): Promise<AxiosResponse<T>>;
715
+ postApiLogsStatsErrorsByEndpointV2<T>(payload: Audit.ApiLogsStatsParams): Promise<AxiosResponse<T>>;
716
+ postApiLogsExport<T>(payload: Audit.UnifiedExportRequest): Promise<AxiosResponse<T>>;
717
+ getApiLogsExportStatus<T>(exportId: string): Promise<AxiosResponse<T>>;
718
+ getApiLogsExportsList<T>(page?: number, size?: number): Promise<AxiosResponse<T>>;
719
+ postWebhookLogsV2<T>({ payload: { account_code, ...rest }, }: {
720
+ payload: Audit.AuditWebhooksParams;
721
+ }): Promise<AxiosResponse<T>>;
722
+ postWebhookLogsExport<T>(payload: Audit.UnifiedExportRequest): Promise<AxiosResponse<T>>;
723
+ getWebhookLogsExportStatus<T>(exportId: string): Promise<AxiosResponse<T>>;
724
+ getWebhookLogsExportsList<T>(page?: number, size?: number): Promise<AxiosResponse<T>>;
725
+ postMonitorLogsV2<T>({ payload: { account_codes, ...rest }, }: {
726
+ payload: Audit.AuditMonitorsParams;
727
+ }): Promise<AxiosResponse<T>>;
728
+ postMonitorLogsExport<T>(payload: Audit.UnifiedExportRequest): Promise<AxiosResponse<T>>;
729
+ getMonitorLogsExportStatus<T>(exportId: string): Promise<AxiosResponse<T>>;
730
+ getMonitorLogsExportsList<T>(page?: number, size?: number): Promise<AxiosResponse<T>>;
711
731
  }
712
732
  export {};
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Resolve the current Datadog environment tag from the browser host.
3
+ *
4
+ * Uses the SHORT-FORM env values (`prod` / `stg` / `sb` / `dev`) to match
5
+ * the convention already used by Yuno's existing Datadog dashboards and
6
+ * the backend services they monitor. Confirmed by sweeping the
7
+ * frontend/RUM/dashboard-named dashboards in Datadog — every one of them
8
+ * filters on the short form. Do NOT switch to long-form values
9
+ * (`production` / `staging` / etc.) without coordinating a sweep of every
10
+ * dashboard, monitor, and saved view that filters on the short form.
11
+ *
12
+ * Mapping:
13
+ * - dashboard.y.uno → prod
14
+ * - dashboard.y.uno + isTesting=ON → sb (production hardware, test data)
15
+ * - dashboard.staging.y.uno → stg
16
+ * - dashboard.dev.y.uno → dev
17
+ * - anything else → dev (local dev, PR previews, ad-hoc hosts)
18
+ *
19
+ * Consumed by `dashboard-container-mfe` when bootstrapping the OpenFeature
20
+ * Datadog provider so flag evaluations — and any RUM/log correlation with
21
+ * backend services — are scoped to the correct environment. Kept in
22
+ * api-mfe (rather than container) so other consumers of the SDK can read
23
+ * the same env without re-implementing the host mapping.
24
+ *
25
+ * SSR / non-DOM safe: returns 'dev' when `window` or `localStorage`
26
+ * aren't available (SSR pre-hydration, web workers, Node-side unit tests).
27
+ *
28
+ * The `isTesting` flag mirrors the `'ON' | 'OFF'` convention used by
29
+ * `useIsTesting` elsewhere in this SDK — do not switch to `'true'`/`'false'`
30
+ * without migrating every reader.
31
+ */
32
+ export type DatadogEnvironment = 'dev' | 'stg' | 'sb' | 'prod';
33
+ export declare function getDatadogEnvironment(): DatadogEnvironment;
@@ -1,3 +1,4 @@
1
1
  export { useIsTesting } from './use-is-testing';
2
2
  export { useLocalStorage, useOrganizationCode } from './use-localstorage';
3
3
  export { useAccountCode } from './use-account-code';
4
+ export { getDatadogEnvironment, type DatadogEnvironment, } from './datadog-environment';