@yuno-payments/dashboard-api-mfe 2.7.1 → 2.9.0
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 +6 -6
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/types/queries/feature-flags/index.test.d.ts +7 -8
- package/build/cjs/types/types/concierge/concierge-access.d.ts +3 -0
- package/build/cjs/types/types/data-report/conversion-rate.types.d.ts +19 -1
- package/build/cjs/types/types/data-report/data-report.d.ts +47 -8
- package/build/cjs/types/types/data-report/fraud.types.d.ts +17 -0
- package/build/cjs/types/utils/feature-flags-provider.d.ts +14 -14
- package/build/cjs/types/yuno-dashboard-api-mfe.d.ts +1 -0
- package/build/esm/index.js +6 -6
- package/build/esm/index.js.map +1 -1
- package/build/esm/types/queries/feature-flags/index.test.d.ts +7 -8
- package/build/esm/types/types/concierge/concierge-access.d.ts +3 -0
- package/build/esm/types/types/data-report/conversion-rate.types.d.ts +19 -1
- package/build/esm/types/types/data-report/data-report.d.ts +47 -8
- package/build/esm/types/types/data-report/fraud.types.d.ts +17 -0
- package/build/esm/types/utils/feature-flags-provider.d.ts +14 -14
- package/build/esm/types/yuno-dashboard-api-mfe.d.ts +1 -0
- package/build/index.d.ts +101 -23
- package/package.json +1 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tests for the
|
|
2
|
+
* Tests for the feature-flags/index.ts routing.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* a
|
|
10
|
-
* the isolated scope and break the test contract.
|
|
4
|
+
* As of v2.7.2 the switch is hardcoded to datadog (see
|
|
5
|
+
* `src/utils/feature-flags-provider.ts`). The legacy hooks file is kept
|
|
6
|
+
* around for a one-revert rollback path but is no longer reachable from
|
|
7
|
+
* the public hooks. These tests cover both: the public entry always
|
|
8
|
+
* exposes the datadog impls, and both modules still share the same
|
|
9
|
+
* function shape so a future env-var-driven rollback would Just Work.
|
|
11
10
|
*/
|
|
@@ -2,6 +2,8 @@ export declare namespace ConciergeAccess {
|
|
|
2
2
|
interface SlackChannels {
|
|
3
3
|
channel_ids: string[];
|
|
4
4
|
dm_user_ids: string[];
|
|
5
|
+
channel_names?: string[];
|
|
6
|
+
dm_user_emails?: string[];
|
|
5
7
|
}
|
|
6
8
|
interface WhatsappChannels {
|
|
7
9
|
group_ids: string[];
|
|
@@ -25,6 +27,7 @@ export declare namespace ConciergeAccess {
|
|
|
25
27
|
day_of_month: string;
|
|
26
28
|
delivery_time: string;
|
|
27
29
|
content: string;
|
|
30
|
+
preferred_language?: string;
|
|
28
31
|
}
|
|
29
32
|
interface HeartbeatConfig {
|
|
30
33
|
merchant_id: string;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use ConversionRateBody directly — all fields have been merged into the body.
|
|
3
|
+
*/
|
|
1
4
|
export interface ConversionRateParams {
|
|
2
5
|
start_date: string;
|
|
3
6
|
end_date: string;
|
|
@@ -11,9 +14,24 @@ export interface ConversionRateParams {
|
|
|
11
14
|
payment_statuses: string;
|
|
12
15
|
card_brand: string;
|
|
13
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Full body sent to datalake-ms /v3/insights/conversion-rate/* endpoints.
|
|
19
|
+
* All filters are in the request body; no query params are used.
|
|
20
|
+
*/
|
|
14
21
|
export interface ConversionRateBody {
|
|
15
22
|
account_codes: string[];
|
|
16
|
-
|
|
23
|
+
start_date?: string;
|
|
24
|
+
end_date?: string;
|
|
25
|
+
periodicity?: string;
|
|
26
|
+
timezone?: string;
|
|
27
|
+
currency_codes?: string[];
|
|
28
|
+
payment_method_types?: string[];
|
|
29
|
+
provider_ids?: string[];
|
|
30
|
+
payment_statuses?: string[];
|
|
31
|
+
connection_name?: string[];
|
|
32
|
+
card_brand?: string[];
|
|
33
|
+
source?: string;
|
|
34
|
+
new_version?: boolean;
|
|
17
35
|
}
|
|
18
36
|
export interface ConversionRatePeriodicityRecord {
|
|
19
37
|
[key: string]: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare namespace DataReport {
|
|
2
|
-
|
|
2
|
+
enum InsightsVolumeMetricsV2Path {
|
|
3
3
|
REFUNDS_AND_CHARGEBACKS = "refunds-and-chargebacks",
|
|
4
4
|
APPROVED_PAYMENTS = "approved-payments",
|
|
5
5
|
PAYMENT_METHODS = "payment-methods",
|
|
@@ -11,7 +11,7 @@ export declare namespace DataReport {
|
|
|
11
11
|
CARD_BRANDS = "card-brands",
|
|
12
12
|
ISSUERS = "issuers"
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
interface SmartRouting {
|
|
15
15
|
version: string;
|
|
16
16
|
code_integration: string;
|
|
17
17
|
Conditions: {
|
|
@@ -24,7 +24,7 @@ export declare namespace DataReport {
|
|
|
24
24
|
cost: number;
|
|
25
25
|
}[];
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
enum OverviewMetricType {
|
|
28
28
|
GENERAL = "volume-and-total-payments",
|
|
29
29
|
LATENCY = "provider-latency",
|
|
30
30
|
STATUS = "status",
|
|
@@ -41,30 +41,69 @@ export declare namespace DataReport {
|
|
|
41
41
|
conditional: string;
|
|
42
42
|
values: string | string[];
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
interface InsightMetricParams {
|
|
45
45
|
[a: string]: string | boolean | number | string[] | MetadataField[] | undefined;
|
|
46
46
|
account_code?: string;
|
|
47
47
|
connection_name?: string;
|
|
48
48
|
stored_credentials_usage?: string;
|
|
49
49
|
metadata?: MetadataField[];
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Full body shape expected by the BFF / datalake-ms for /insights/* endpoints.
|
|
53
|
+
* All filters are sent as JSON body (no query params).
|
|
54
|
+
*/
|
|
55
|
+
interface InsightMetricBody {
|
|
56
|
+
organization_code?: string;
|
|
52
57
|
account_codes?: string[];
|
|
58
|
+
/** @deprecated use account_codes */
|
|
53
59
|
account_code?: string[];
|
|
60
|
+
start_date?: string;
|
|
61
|
+
end_date?: string;
|
|
62
|
+
timezone?: string;
|
|
63
|
+
periodicity?: string;
|
|
64
|
+
currency_codes?: string[];
|
|
65
|
+
payment_method_types?: string[];
|
|
66
|
+
provider_ids?: string[];
|
|
67
|
+
payment_statuses?: string[];
|
|
68
|
+
card_types?: string[];
|
|
69
|
+
condition_set_ids?: string[];
|
|
70
|
+
card_country_code?: string[];
|
|
71
|
+
card_iins?: string[];
|
|
72
|
+
stored_credentials_usage?: string[];
|
|
73
|
+
card_brand?: string[];
|
|
54
74
|
connection_name?: string[];
|
|
75
|
+
country?: string[];
|
|
76
|
+
authentication_method?: string[];
|
|
77
|
+
nts?: string[];
|
|
78
|
+
attempts?: string[];
|
|
79
|
+
has_cvv?: string[];
|
|
80
|
+
bin?: string;
|
|
81
|
+
brand?: string;
|
|
82
|
+
card_type?: string;
|
|
83
|
+
issuer_name?: string;
|
|
84
|
+
decline_reason?: string;
|
|
85
|
+
chargebacks_filtered_date?: string;
|
|
86
|
+
size?: number;
|
|
87
|
+
page?: number;
|
|
88
|
+
export?: boolean;
|
|
89
|
+
sorted_params?: {
|
|
90
|
+
field: string;
|
|
91
|
+
order: string;
|
|
92
|
+
};
|
|
55
93
|
metadata_filters?: MetadataFieldFilter[];
|
|
56
94
|
metadata?: MetadataField[];
|
|
95
|
+
source?: string;
|
|
96
|
+
new_version?: boolean;
|
|
57
97
|
}
|
|
58
|
-
|
|
98
|
+
interface InsightExportParams {
|
|
59
99
|
type?: string;
|
|
60
100
|
code?: string;
|
|
61
101
|
}
|
|
62
|
-
|
|
102
|
+
interface InsightsHomeMetrics {
|
|
63
103
|
account_codes?: string[];
|
|
64
104
|
organization_code?: string;
|
|
65
105
|
currency_code?: string;
|
|
66
106
|
timezone?: string;
|
|
67
107
|
isLiveMode?: boolean;
|
|
68
108
|
}
|
|
69
|
-
export {};
|
|
70
109
|
}
|
|
@@ -11,9 +11,26 @@ export interface InsightsFraudParams {
|
|
|
11
11
|
payment_statuses: string;
|
|
12
12
|
card_brand: string;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Body shape sent to datalake-ms /insights/* endpoints.
|
|
16
|
+
* account_codes and connection_name are the legacy body fields; additional
|
|
17
|
+
* filter fields (plural array names) come from merging InsightsFraudParams
|
|
18
|
+
* inside each api method.
|
|
19
|
+
*/
|
|
14
20
|
export interface InsightsFraudBody {
|
|
15
21
|
account_codes: string[];
|
|
16
22
|
connection_name: string[];
|
|
23
|
+
start_date?: string;
|
|
24
|
+
end_date?: string;
|
|
25
|
+
periodicity?: string;
|
|
26
|
+
timezone?: string;
|
|
27
|
+
currency_codes?: string[];
|
|
28
|
+
payment_method_types?: string[];
|
|
29
|
+
provider_ids?: string[];
|
|
30
|
+
payment_statuses?: string[];
|
|
31
|
+
card_brand?: string[];
|
|
32
|
+
source?: string;
|
|
33
|
+
new_version?: boolean;
|
|
17
34
|
}
|
|
18
35
|
export interface PeriodicityRecord {
|
|
19
36
|
[key: string]: number;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Feature-flag provider switch (
|
|
2
|
+
* Feature-flag provider switch (DAS-15798 migration).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Hardcoded to 'datadog' as of v2.7.2. The env-var-based switch
|
|
5
|
+
* (`FEATURE_FLAGS_PROVIDER`) is gone: api-mfe queries always route to
|
|
6
|
+
* `./datadog-hooks`, and `dashboard-container-mfe`'s bootstrap effect
|
|
7
|
+
* (which checks this function) always proceeds to set up the
|
|
8
|
+
* OpenFeature Datadog provider.
|
|
8
9
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* The function and type are kept around (instead of inlining the
|
|
11
|
+
* constant) so:
|
|
12
|
+
* 1. Consumers like container-mfe don't need a code change.
|
|
13
|
+
* 2. Rollback to the legacy hooks (revert this file + republish) stays
|
|
14
|
+
* a single-file change.
|
|
14
15
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* Delete this file (and the legacy hooks branch) after Phase 4 soak.
|
|
16
|
+
* Once we're confident no rollback is needed, delete `./legacy-hooks`,
|
|
17
|
+
* delete this file, and inline the datadog branch in
|
|
18
|
+
* `queries/feature-flags/index.ts` (Phase 5 cleanup).
|
|
19
19
|
*/
|
|
20
20
|
export type FeatureFlagsProvider = 'datadog' | 'legacy';
|
|
21
21
|
export declare function getFeatureFlagsProvider(): FeatureFlagsProvider;
|
|
@@ -9,3 +9,4 @@ export * from './websockets';
|
|
|
9
9
|
export * from './utils';
|
|
10
10
|
export { getFeatureFlagsProvider, type FeatureFlagsProvider, } from './utils/feature-flags-provider';
|
|
11
11
|
export { emitExpired, resetExpiredGuard, SESSION_EXPIRED_MESSAGE_TYPE, } from './lib/session-expired';
|
|
12
|
+
export { OpenFeature } from '@openfeature/web-sdk';
|