Initial commit
This commit is contained in:
202
types/frontendCommerceTypes.d.ts
vendored
Normal file
202
types/frontendCommerceTypes.d.ts
vendored
Normal file
@@ -0,0 +1,202 @@
|
||||
type Maybe<T> = T | null
|
||||
|
||||
interface Connection<T> {
|
||||
edges: Array<Edge<T>>
|
||||
}
|
||||
|
||||
interface Edge<T> {
|
||||
node: T
|
||||
}
|
||||
|
||||
interface BKDFPage {
|
||||
id: string
|
||||
title: string
|
||||
handle: string
|
||||
body: string
|
||||
bodySummary: string
|
||||
seo?: BKDFSEO
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
interface BKDFMenu {
|
||||
title: string
|
||||
path: string
|
||||
}
|
||||
|
||||
interface BKDFCollection {
|
||||
handle: string
|
||||
title: string
|
||||
description: string
|
||||
seo: BKDFSEO
|
||||
updatedAt: string
|
||||
path: string
|
||||
}
|
||||
|
||||
interface BKDFMoney {
|
||||
amount: string
|
||||
currencyCode: string
|
||||
}
|
||||
|
||||
interface Image {
|
||||
url: string
|
||||
altText: string
|
||||
width: number
|
||||
height: number
|
||||
}
|
||||
|
||||
interface BKDFProduct {
|
||||
id: string
|
||||
sku: string
|
||||
handle: string
|
||||
availableForSale: boolean
|
||||
title: string
|
||||
description: string
|
||||
descriptionHtml: string
|
||||
options: BKDFProductOption[]
|
||||
priceRange: {
|
||||
maxVariantPrice: BKDFMoney
|
||||
minVariantPrice: BKDFMoney
|
||||
}
|
||||
salePrice: BKDFMoney
|
||||
retailPrice: BKDFMoney
|
||||
variants: BKDFProductVariant[]
|
||||
featuredImage: Image
|
||||
images: Image[]
|
||||
seo: BKDFSEO
|
||||
tags: string[]
|
||||
updatedAt: string
|
||||
reviews: {
|
||||
avgRating: number
|
||||
}
|
||||
categories: {
|
||||
name: string
|
||||
id: number
|
||||
description: string
|
||||
}[]
|
||||
}
|
||||
|
||||
type OptionNames = "Farbe" | "Größe"
|
||||
interface BKDFProductSelectedOption {
|
||||
name: OptionNames
|
||||
value: string
|
||||
}
|
||||
interface BKDFProductOption {
|
||||
id: string
|
||||
name: string
|
||||
values: string[]
|
||||
}
|
||||
|
||||
interface BKDFProductVariant {
|
||||
parentId?: string
|
||||
id: string
|
||||
title: string
|
||||
sku: string
|
||||
availableForSale: boolean
|
||||
selectedOptions: {
|
||||
name: OptionNames
|
||||
value: string
|
||||
}[]
|
||||
price: BKDFMoney
|
||||
defaultImage: Image
|
||||
}
|
||||
|
||||
interface BKDFSEO {
|
||||
title: string
|
||||
description: string
|
||||
}
|
||||
|
||||
interface BKDFCartItem {
|
||||
id: number
|
||||
quantity: number
|
||||
cost: {
|
||||
totalAmount: BKDFMoney
|
||||
}
|
||||
merchandise: {
|
||||
id: string
|
||||
title: string
|
||||
selectedOptions: {
|
||||
name: string
|
||||
value: string
|
||||
}[]
|
||||
product: BKDFProduct
|
||||
}
|
||||
}
|
||||
|
||||
interface BKDFCart {
|
||||
id: string
|
||||
checkoutUrl?: string
|
||||
cost: {
|
||||
baseAmount?: BKDFMoney
|
||||
discountedAmount: BKDFMoney
|
||||
couponDiscount?: BKDFMoney
|
||||
amount: BKDFMoney
|
||||
discounts?: {
|
||||
entityId: string
|
||||
discountedAmount: BKDFMoney
|
||||
}[]
|
||||
}
|
||||
lines: BKDFCartItem[]
|
||||
totalQuantity?: number
|
||||
}
|
||||
interface SortFilterItem {
|
||||
title: string
|
||||
slug: string | null
|
||||
sortKey: keyof typeof BKDFSortKeys
|
||||
reverse: boolean
|
||||
}
|
||||
|
||||
interface BKDFCustomer {
|
||||
id: string
|
||||
email: string
|
||||
telephone: string
|
||||
firstName: string
|
||||
lastName: string
|
||||
}
|
||||
|
||||
interface Address {
|
||||
firstName: string
|
||||
lastName: string
|
||||
address1: string
|
||||
address2?: string
|
||||
city: string
|
||||
stateOrProvince: string
|
||||
countryCode: string
|
||||
phone: string
|
||||
postalCode: string
|
||||
}
|
||||
|
||||
interface RegisterCustomerInput {
|
||||
firstName: string
|
||||
lastName: string
|
||||
email: string
|
||||
password: string
|
||||
phone: string
|
||||
address: Address
|
||||
}
|
||||
interface DeleteCustomerAddressInput {
|
||||
addressEntityId: number
|
||||
}
|
||||
|
||||
interface ChangePasswordInput {
|
||||
currentPassword: string
|
||||
newPassword: string
|
||||
}
|
||||
|
||||
interface RequestResetPasswordInput {
|
||||
email: string
|
||||
_s: string
|
||||
_sId: string
|
||||
}
|
||||
|
||||
interface ResetPasswordInput {
|
||||
password: string
|
||||
}
|
||||
interface UpdateCustomerAddressInput {
|
||||
addressEntityId: number
|
||||
data: Address
|
||||
}
|
||||
interface LoginInput {
|
||||
email: string
|
||||
password: string
|
||||
}
|
||||
Reference in New Issue
Block a user