refactor api and sdk

This commit is contained in:
Carl-Gerhard Lindesvärd
2023-10-12 12:16:33 +02:00
parent 5b9a01c665
commit 8a2417de5a
18 changed files with 298 additions and 292 deletions

View File

@@ -3,7 +3,7 @@ export type MixanJson = Record<string, any>
export type EventPayload = {
name: string
time: string
externalId: string | null
profileId: string | null
properties: MixanJson
}
@@ -12,8 +12,8 @@ export type ProfilePayload = {
last_name?: string
email?: string
avatar?: string
id: string
properties: MixanJson
id?: string
properties?: MixanJson
}
export type ProfileIncrementPayload = {
@@ -59,13 +59,11 @@ export type MixanIssue = {
value: any
}
export type MixanIssuesResponse = {
issues: Array<MixanIssue>,
}
export type MixanErrorResponse = {
code: string
status: 'error'
code: number
message: string
issues: Array<MixanIssue>
}
export type MixanResponse<T> = {