169 lines
3.4 KiB
TypeScript
169 lines
3.4 KiB
TypeScript
interface LocalProduct {
|
|
id: string
|
|
bigCommerceSKU: string
|
|
bigCommerceId: number
|
|
previewImage: FileField
|
|
printfulProductId?: string
|
|
sizingChart: TSizeChart
|
|
forcedWarning: string
|
|
ratings?: ProductRating[]
|
|
}
|
|
type TSizeChart = SizeChart
|
|
interface SizeChart {
|
|
id: string
|
|
imageURL: string
|
|
imageDescription: string
|
|
generalDescription: string
|
|
availableSizes: string[]
|
|
columns: {
|
|
germanLabelTranslation?: string
|
|
label: string
|
|
sizes: string[]
|
|
}[]
|
|
}
|
|
|
|
interface CompleteYourLook {
|
|
id: string
|
|
products: {
|
|
productImage: string
|
|
productReference: string
|
|
imageWidth: number
|
|
imageHeight: number
|
|
imageTop: number
|
|
imageLeft: number
|
|
}
|
|
}
|
|
|
|
interface ProductRatingObject {
|
|
quality: number
|
|
priceQualityRatio: number
|
|
comfort: number
|
|
overall: number
|
|
}
|
|
interface ProductRating {
|
|
id?: string
|
|
bigcommerceOrderId: number
|
|
bigCommerceProductId: number
|
|
rating: ProductRatingObject
|
|
comment: string
|
|
title: string
|
|
review_date: Date
|
|
status: "pending" | "approved" | "rejected"
|
|
bigcommerceReviewId?: string
|
|
}
|
|
|
|
interface Login {
|
|
created: Date
|
|
tokenString: string
|
|
tokenData: JWTLoginClaims
|
|
customer: Customer
|
|
}
|
|
|
|
interface ServerLogin {
|
|
status: 403 | 500 | 200
|
|
customer: Customer
|
|
created: Date
|
|
token: string
|
|
log: boolean
|
|
}
|
|
|
|
interface SocialMediaLinks {
|
|
instagramLink: string
|
|
facebookLink: string
|
|
twitterLink: string
|
|
youtubeLink: string
|
|
tiktokLink: string
|
|
}
|
|
|
|
interface PersonalRecord {
|
|
title: string
|
|
description: string
|
|
priority: number
|
|
ageAtRecording: number
|
|
recording: string | FileField
|
|
thumbnail: string | FileField
|
|
}
|
|
|
|
interface Customer {
|
|
username: string
|
|
id: string
|
|
bigCommerceId: number
|
|
email: string
|
|
locked: boolean
|
|
currentToken: string
|
|
socialMediaAccounts: SocialMediaLinks
|
|
personalRecords: PersonalRecord[]
|
|
}
|
|
|
|
interface JWTLoginClaims {
|
|
exp?: number
|
|
bigCommerceId: number
|
|
tibiId: string
|
|
email: string
|
|
}
|
|
interface JWTPwResetClaims {
|
|
exp?: number
|
|
bigCommerceId: number
|
|
tibiId: string
|
|
check: string
|
|
}
|
|
|
|
interface JWTRefreshClaims {
|
|
bigCommerceId: number
|
|
tibiId: string
|
|
r: 1
|
|
}
|
|
type PrintfulStates = "draft" | "pending" | "failed" | "canceled" | "inprocess" | "onhold" | "partial" | "fulfilled"
|
|
|
|
interface PrintfulShipment {
|
|
trackingUrl: string
|
|
trackingNumber: string
|
|
carrier: string
|
|
sentAt: Date
|
|
}
|
|
interface Order {
|
|
status: PrintfulStates
|
|
statusSetAt: Date
|
|
id: string
|
|
cost?: string
|
|
bigCommerceId: number
|
|
customerBigCommerceId: number
|
|
customerTibiId: string
|
|
products: {
|
|
bigCommerceId: number
|
|
tibiId: string
|
|
}[]
|
|
shipments: PrintfulShipment[]
|
|
}
|
|
|
|
interface OrderReturnRequest {
|
|
updateTime: Date
|
|
insertTime: Date
|
|
bigCommerceId: number
|
|
id?: string
|
|
status: "pending" | "approved" | "rejected" | "refunded" | "failed"
|
|
returnShppingLabels: {
|
|
cost: number
|
|
label: FileField
|
|
}[]
|
|
products: OrderReturnRequestProduct[]
|
|
}
|
|
|
|
interface OrderReturnRequestProduct {
|
|
productId: numberOrderReturnRequestProduct
|
|
baseProductId: number
|
|
quantity: number
|
|
attachedImages: string[]
|
|
returnReason: string
|
|
}
|
|
|
|
interface OrderRevokeRequest {
|
|
status: "pending" | "refunded"
|
|
bigCommerceId: number
|
|
printfulId?: string
|
|
}
|
|
|
|
interface QRCode {
|
|
customer: string
|
|
}
|