({
created_at,
last_seen_at,
first_name,
last_name,
...profile
}: IClickhouseProfile)
| 307 | } |
| 308 | |
| 309 | export function transformProfile({ |
| 310 | created_at, |
| 311 | last_seen_at, |
| 312 | first_name, |
| 313 | last_name, |
| 314 | ...profile |
| 315 | }: IClickhouseProfile): IServiceProfile { |
| 316 | const createdAtJs = convertClickhouseDateToJs(created_at); |
| 317 | return { |
| 318 | firstName: first_name, |
| 319 | lastName: last_name, |
| 320 | isExternal: profile.is_external, |
| 321 | properties: toObject(profile.properties), |
| 322 | createdAt: createdAtJs, |
| 323 | lastSeenAt: last_seen_at |
| 324 | ? convertClickhouseDateToJs(last_seen_at) |
| 325 | : createdAtJs, |
| 326 | projectId: profile.project_id, |
| 327 | id: profile.id, |
| 328 | email: profile.email, |
| 329 | avatar: profile.avatar, |
| 330 | groups: profile.groups ?? [], |
| 331 | }; |
| 332 | } |
| 333 | |
| 334 | export function upsertProfile( |
| 335 | { |
no test coverage detected