save sdk name and version
This commit is contained in:
committed by
Carl-Gerhard Lindesvärd
parent
41e46570b7
commit
ccfddc215f
@@ -6,6 +6,7 @@ import type { IChartEventFilter } from '@openpanel/validation';
|
||||
|
||||
import { profileBuffer } from '../buffers';
|
||||
import {
|
||||
ch,
|
||||
chQuery,
|
||||
formatClickhouseDate,
|
||||
TABLE_NAMES,
|
||||
@@ -170,6 +171,29 @@ export function transformProfile({
|
||||
};
|
||||
}
|
||||
|
||||
export async function createProfileAlias({
|
||||
projectId,
|
||||
alias,
|
||||
profileId,
|
||||
}: {
|
||||
projectId: string;
|
||||
alias: string;
|
||||
profileId: string;
|
||||
}) {
|
||||
await ch.insert({
|
||||
table: TABLE_NAMES.alias,
|
||||
format: 'JSONEachRow',
|
||||
values: [
|
||||
{
|
||||
projectId,
|
||||
profile_id: profileId,
|
||||
alias,
|
||||
created_at: new Date(),
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
export async function upsertProfile({
|
||||
id,
|
||||
firstName,
|
||||
|
||||
Reference in New Issue
Block a user