Init with working version

Basic demo for Tally X AutoIxpert integration to showcase setup in
Go due to impossibility of open-sourcing n8n setup.
This commit is contained in:
rkmpa
2026-03-14 22:45:37 +01:00
commit 20acd6d77a
10 changed files with 791 additions and 0 deletions

75
pkg/models/ixpert.go Normal file
View File

@@ -0,0 +1,75 @@
package models
import "time"
type ClaimRequest struct {
Type string `json:"type"`
Labels []string `json:"labels"`
Accident Accident `json:"accident"`
Car Car `json:"car"`
Claimant Claimant `json:"claimant"`
}
type Accident struct {
Location string `json:"location"`
Circumstances string `json:"circumstances"`
Time time.Time `json:"time"`
}
type Car struct {
LicensePlate string `json:"license_plate"`
}
type Claimant struct {
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
City string `json:"city"`
Zip string `json:"zip"`
StreetAndHousenumberOrLockbox string `json:"street_and_housenumber_or_lockbox"`
Phone string `json:"phone"`
Email string `json:"email"`
}
type ClaimResponse struct {
Document Document `json:"report"`
}
type Document struct {
ID string `json:"id"`
}
type ImageMetaRequestWrapper struct {
Photos []ImageMetaRequest `json:"photos"`
}
type ImageMetaRequest struct {
Title string `json:"title"`
Description string `json:"description"`
OriginalName string `json:"original_name"`
Mimetype string `json:"mimetype"`
Size int64 `json:"size"`
Width int `json:"width"`
Height int `json:"height"`
IncludedInReport bool `json:"included_in_report"`
}
type ImageMetaResponse struct {
Photos []PhotoID `json:"photos"`
Errors []any `json:"errors"` // empty array in example, keep flexible
}
type PhotoID struct {
ID string `json:"id"`
Title string `json:"title"`
}
type UploadURLResponse struct {
UploadURLs []UploadURL `json:"upload_urls"`
Errors []any `json:"errors"`
}
type UploadURL struct {
PhotoID string `json:"photo_id"`
UploadURL string `json:"upload_url"`
ExpiresIn int `json:"expires_in"`
}