@tap-payments/os-micro-frontend-shared 0.1.356 → 0.1.357
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/constants/apps.js +1 -0
- package/build/types/apps.d.ts +2 -1
- package/build/types/user.d.ts +62 -14
- package/build/utils/segment.d.ts +2 -2
- package/package.json +1 -1
package/build/constants/apps.js
CHANGED
package/build/types/apps.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColumnsView } from './column';
|
|
2
|
-
import { Segment, SegmentCountry, SegmentUser, SelectedBrand, SelectedCountry } from './user';
|
|
2
|
+
import { Segment, SegmentCountry, SegmentUser, SelectedBrand, SelectedCountry, User } from './user';
|
|
3
3
|
import { BusinessMerchant } from './merchant';
|
|
4
4
|
import type { i18n } from 'i18next';
|
|
5
5
|
import { Theme } from '@mui/material';
|
|
@@ -101,6 +101,7 @@ export type MFWidgetBaseProps = {
|
|
|
101
101
|
initialServiceCode?: string;
|
|
102
102
|
initialPayload?: Record<string, any> & AppPayload;
|
|
103
103
|
};
|
|
104
|
+
user: User;
|
|
104
105
|
segment: {
|
|
105
106
|
code: string;
|
|
106
107
|
type: string;
|
package/build/types/user.d.ts
CHANGED
|
@@ -99,18 +99,19 @@ export interface SegmentDetails {
|
|
|
99
99
|
interface SegmentEntity {
|
|
100
100
|
id: string;
|
|
101
101
|
}
|
|
102
|
+
export interface Contact {
|
|
103
|
+
email: string;
|
|
104
|
+
phone: {
|
|
105
|
+
country_code: string;
|
|
106
|
+
number: string;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
102
109
|
export interface SegmentUser {
|
|
103
110
|
id: string;
|
|
104
111
|
created: number;
|
|
105
112
|
individual_id: string;
|
|
106
113
|
name: Record<string, SegmentUserName>;
|
|
107
|
-
contact:
|
|
108
|
-
email: string;
|
|
109
|
-
phone: {
|
|
110
|
-
country_code: string;
|
|
111
|
-
number: string;
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
+
contact: Contact;
|
|
114
115
|
birth: {
|
|
115
116
|
date: number;
|
|
116
117
|
};
|
|
@@ -124,13 +125,7 @@ export interface SegmentUser {
|
|
|
124
125
|
export interface IndividualSegmentDetails {
|
|
125
126
|
individual: {
|
|
126
127
|
name: UserName[];
|
|
127
|
-
contact:
|
|
128
|
-
email: string;
|
|
129
|
-
phone: {
|
|
130
|
-
country_code: string;
|
|
131
|
-
number: string;
|
|
132
|
-
};
|
|
133
|
-
};
|
|
128
|
+
contact: Contact;
|
|
134
129
|
};
|
|
135
130
|
segment: Segment;
|
|
136
131
|
}
|
|
@@ -211,4 +206,57 @@ export interface UserFormI {
|
|
|
211
206
|
is_authorized?: boolean;
|
|
212
207
|
}
|
|
213
208
|
export type GeographyVariant = 'G' | 'L' | 'R';
|
|
209
|
+
export interface BrandReference {
|
|
210
|
+
id: string;
|
|
211
|
+
}
|
|
212
|
+
export interface CountryReference {
|
|
213
|
+
id: string;
|
|
214
|
+
entities: EntityReference[];
|
|
215
|
+
}
|
|
216
|
+
export interface EntityReference {
|
|
217
|
+
id: string;
|
|
218
|
+
}
|
|
219
|
+
export interface UserReference {
|
|
220
|
+
id: string;
|
|
221
|
+
}
|
|
222
|
+
export interface DeveloperReference {
|
|
223
|
+
id: string;
|
|
224
|
+
}
|
|
225
|
+
export interface CustomerReference {
|
|
226
|
+
id: string;
|
|
227
|
+
}
|
|
228
|
+
export interface SelectedSegment {
|
|
229
|
+
id: string;
|
|
230
|
+
brands: BrandReference[];
|
|
231
|
+
countries: CountryReference[];
|
|
232
|
+
users: UserReference[];
|
|
233
|
+
developers: DeveloperReference[];
|
|
234
|
+
customers: CustomerReference[];
|
|
235
|
+
}
|
|
236
|
+
export interface UserNameLocale {
|
|
237
|
+
lang: string;
|
|
238
|
+
first: string;
|
|
239
|
+
last: string;
|
|
240
|
+
}
|
|
241
|
+
export interface Individual {
|
|
242
|
+
id: string;
|
|
243
|
+
contact: Contact;
|
|
244
|
+
name: UserNameLocale[];
|
|
245
|
+
}
|
|
246
|
+
export interface User {
|
|
247
|
+
individual: Individual;
|
|
248
|
+
authentication_id: string;
|
|
249
|
+
individual_id: string;
|
|
250
|
+
is_active: boolean;
|
|
251
|
+
bi: string;
|
|
252
|
+
count: number;
|
|
253
|
+
has_more: boolean;
|
|
254
|
+
live_mode: boolean;
|
|
255
|
+
force_logout: boolean;
|
|
256
|
+
segments: Segment[];
|
|
257
|
+
active_segment_id: string;
|
|
258
|
+
active_segments: SelectedSegment[];
|
|
259
|
+
created_at: string;
|
|
260
|
+
updated_at: string;
|
|
261
|
+
}
|
|
214
262
|
export {};
|
package/build/utils/segment.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Segment, SegmentData } from '../types/index.js';
|
|
2
|
-
export declare const getSegmentData: (segments: Segment[], activeSegmentId: string, activeSegments:
|
|
1
|
+
import { SelectedSegment, Segment, SegmentData } from '../types/index.js';
|
|
2
|
+
export declare const getSegmentData: (segments: Segment[], activeSegmentId: string, activeSegments: SelectedSegment[]) => SegmentData;
|
|
3
3
|
export declare const getBusinessSegmentConfig: ({ merchantsIds, options }: {
|
|
4
4
|
merchantsIds: string[];
|
|
5
5
|
options?: Record<string, unknown> | undefined;
|
package/package.json
CHANGED