strip v1
This commit is contained in:
620
types/bigCommerceRestAPITypes.d.ts
vendored
620
types/bigCommerceRestAPITypes.d.ts
vendored
@@ -1,620 +0,0 @@
|
||||
interface OAuthConfig {
|
||||
clientId: string
|
||||
clientSecret: string
|
||||
authCallback: string
|
||||
loginHost?: string
|
||||
}
|
||||
|
||||
interface RestClientConfig {
|
||||
storeHash: string
|
||||
accessToken: string
|
||||
apiHost?: string
|
||||
rateLimitConfig?: RateLimitConfig
|
||||
}
|
||||
|
||||
interface RateLimitStatus {
|
||||
msToReset: number
|
||||
nextWindowTime: Date
|
||||
windowSize: number
|
||||
requestsRemaining: number
|
||||
requestsQuota: number
|
||||
}
|
||||
|
||||
type CallbackParams = {
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
interface RateLimitConfig {
|
||||
minRequestsRemaining: number
|
||||
enableWait: boolean
|
||||
callbackParams?: CallbackParams
|
||||
callback?(params?: CallbackParams): void
|
||||
}
|
||||
|
||||
interface AuthCallbackQueryParams {
|
||||
code: string
|
||||
scope: string
|
||||
context: string
|
||||
}
|
||||
|
||||
interface AuthResponsePayload {
|
||||
access_token: string
|
||||
scope: string
|
||||
user: User
|
||||
context: string
|
||||
account_uuid: string
|
||||
}
|
||||
|
||||
interface User {
|
||||
id: number
|
||||
username: string
|
||||
email: string
|
||||
}
|
||||
|
||||
interface VerifiedJwt {
|
||||
aud: string
|
||||
iss: string
|
||||
iat: number
|
||||
nbf: number
|
||||
exp: number
|
||||
jti: string
|
||||
sub: string
|
||||
user: {
|
||||
id: number
|
||||
email: string
|
||||
}
|
||||
owner: {
|
||||
id: number
|
||||
email: string
|
||||
}
|
||||
url: string
|
||||
}
|
||||
|
||||
interface FormField {
|
||||
name: string
|
||||
value: string
|
||||
}
|
||||
|
||||
interface OrderProduct {
|
||||
name: string
|
||||
name_customer?: string
|
||||
name_merchant?: string
|
||||
quantity: number
|
||||
price_inc_tax: number
|
||||
price_ex_tax: number
|
||||
upc?: string
|
||||
sku?: string
|
||||
}
|
||||
|
||||
interface OrderProductOptions {
|
||||
id?: number
|
||||
value?: string
|
||||
display_name?: string
|
||||
display_name_customer?: string
|
||||
display_name_merchant?: string
|
||||
display_value?: string
|
||||
display_value_merchant?: string
|
||||
display_value_customer?: string
|
||||
}
|
||||
|
||||
interface OrderProductsProductOptions extends Required<OrderProductOptions> {
|
||||
option_id: number
|
||||
order_product_id: number
|
||||
product_option_id: number
|
||||
type: string
|
||||
name: string
|
||||
display_style: string
|
||||
}
|
||||
|
||||
interface OrderProductsAppliedDiscounts {
|
||||
id: string
|
||||
amount: string
|
||||
name: string
|
||||
code: string | null
|
||||
target: string
|
||||
}
|
||||
|
||||
type OrderProductsUpdate = Partial<Omit<OrderProduct, "sku">> & {
|
||||
id?: number
|
||||
product_id?: number
|
||||
product_options?: OrderProductOptions[]
|
||||
variant_id?: number
|
||||
wrapping_name?: string
|
||||
wrapping_message?: string
|
||||
wrapping_cost_ex_tax?: number
|
||||
wrapping_cost_inc_tax?: number
|
||||
}
|
||||
|
||||
interface OrderBillingAddress {
|
||||
first_name?: string
|
||||
last_name?: string
|
||||
company?: string
|
||||
street_1?: string
|
||||
street_2?: string
|
||||
city?: string
|
||||
state?: string
|
||||
zip: string
|
||||
country?: string
|
||||
country_iso2?: string
|
||||
phone?: string
|
||||
email?: string
|
||||
form_fields?: FormField[]
|
||||
}
|
||||
|
||||
interface OrderShipmentItem {
|
||||
order_product_id: number
|
||||
product_id: number
|
||||
quantity: number
|
||||
}
|
||||
|
||||
interface LinkedResource {
|
||||
url: string
|
||||
resource: string
|
||||
}
|
||||
|
||||
interface OrderStatus extends V2OrderCountResponseBase {
|
||||
id: number
|
||||
name: string
|
||||
system_label: string
|
||||
custom_label: string
|
||||
system_description: string
|
||||
sort_order: number
|
||||
}
|
||||
interface OrderShippingAddress {
|
||||
first_name?: string
|
||||
last_name?: string
|
||||
company?: string
|
||||
street_1?: string
|
||||
street_2?: string
|
||||
city?: string
|
||||
state?: string
|
||||
zip?: string
|
||||
country?: string
|
||||
country_iso2?: string
|
||||
phone?: string
|
||||
email?: string
|
||||
shipping_method?: string
|
||||
}
|
||||
interface V2OrderResponseBase {
|
||||
id: number
|
||||
statusSetAt: Date
|
||||
tibiId?: string
|
||||
status?: PrintfulStates
|
||||
date_modified: string
|
||||
date_shipped: string
|
||||
cart_id: string
|
||||
status: string
|
||||
subtotal_tax: string
|
||||
shipping_cost_tax: string
|
||||
shipping_cost_tax_class_id: number
|
||||
handling_cost_tax: string
|
||||
handling_cost_tax_class_id: number
|
||||
wrapping_cost_tax: string
|
||||
wrapping_cost_tax_class_id: number
|
||||
payment_status: string
|
||||
store_credit_amount: string
|
||||
gift_certificate_amount: string
|
||||
currency_id: number
|
||||
currency_code: string
|
||||
currency_exchange_rate: string
|
||||
default_currency_id: number
|
||||
default_currency_code: string
|
||||
store_default_currency_code: string
|
||||
store_default_to_transactional_exchange_rate: string
|
||||
coupon_discount: string
|
||||
shipping_address_count: number
|
||||
is_email_opt_in: boolean
|
||||
order_source: string
|
||||
products: LinkedResource
|
||||
productObjs?: V2OrderProductsResponseBase[]
|
||||
shipping_addresses: LinkedResource
|
||||
shipping_addressObjs?: V2OrderShippingAddressesResponseBase[]
|
||||
coupons: LinkedResource
|
||||
status_id: number
|
||||
base_handling_cost: string
|
||||
base_shipping_cost: string
|
||||
base_wrapping_cost: string
|
||||
billing_address: Required<OrderBillingAddress>
|
||||
channel_id: number
|
||||
customer_id: number
|
||||
customer_message: string
|
||||
date_created: string
|
||||
discount_amount: string
|
||||
ebay_order_id: string
|
||||
external_id: string
|
||||
external_merchant_id: string
|
||||
external_source: string
|
||||
geoip_country: string
|
||||
geoip_country_iso2: string
|
||||
handling_cost_ex_tax: string
|
||||
handling_cost_inc_tax: string
|
||||
ip_address: string
|
||||
ip_address_v6: string
|
||||
is_deleted: boolean
|
||||
items_shipped: number
|
||||
items_total: number
|
||||
order_is_digital: boolean
|
||||
payment_method: string
|
||||
payment_provider_id: string | number
|
||||
refunded_amount: string
|
||||
shipping_cost_ex_tax: string
|
||||
shipping_cost_inc_tax: string
|
||||
staff_notes: string
|
||||
subtotal_ex_tax: string
|
||||
subtotal_inc_tax: string
|
||||
tax_provider_id: string
|
||||
customer_locale: string
|
||||
total_ex_tax: string
|
||||
total_inc_tax: string
|
||||
wrapping_cost_ex_tax: string
|
||||
wrapping_cost_inc_tax: string
|
||||
shipments?: PrintfulShipment[]
|
||||
}
|
||||
|
||||
interface V2OrderRequestBase {
|
||||
products: OrderProduct[]
|
||||
shipping_addresses?: OrderShippingAddress[]
|
||||
base_handling_cost?: string
|
||||
base_shipping_cost?: string
|
||||
base_wrapping_cost?: string
|
||||
billing_address: OrderBillingAddress
|
||||
channel_id?: number
|
||||
customer_id?: number
|
||||
customer_message?: string
|
||||
date_created?: string
|
||||
default_currency_code?: string
|
||||
discount_amount?: string
|
||||
ebay_order_id?: string
|
||||
external_id?: string
|
||||
external_merchant_id?: string
|
||||
external_source?: string
|
||||
geoip_country?: string
|
||||
geoip_country_iso2?: string
|
||||
handling_cost_ex_tax?: string
|
||||
handling_cost_inc_tax?: string
|
||||
ip_address?: string
|
||||
ip_address_v6?: string
|
||||
is_deleted?: boolean
|
||||
items_shipped?: number
|
||||
items_total?: number
|
||||
order_is_digital?: boolean
|
||||
payment_method?: string
|
||||
payment_provider_id?: string
|
||||
refunded_amount?: string
|
||||
shipping_cost_ex_tax?: string
|
||||
shipping_cost_inc_tax?: string
|
||||
staff_notes?: string
|
||||
status_id?: number
|
||||
subtotal_ex_tax?: string
|
||||
subtotal_inc_tax?: string
|
||||
tax_provider_id?: string
|
||||
customer_locale?: string
|
||||
total_ex_tax?: string
|
||||
total_inc_tax?: string
|
||||
wrapping_cost_ex_tax?: string
|
||||
wrapping_cost_inc_tax?: string
|
||||
}
|
||||
|
||||
type V2OrderUpdateRequest = Partial<Omit<V2OrderRequestBase, "products" | "billing_address">> & {
|
||||
products?: Partial<OrderProductsUpdate[]>
|
||||
billing_address?: Partial<OrderBillingAddress>
|
||||
}
|
||||
|
||||
interface V2OrderFiltersBase {
|
||||
[key: string]: unknown
|
||||
limit?: number
|
||||
page?: number
|
||||
}
|
||||
|
||||
interface V2OrdersListFilters extends V2OrderFiltersBase {
|
||||
cart_id?: string
|
||||
channel_id?: number
|
||||
customer_id?: number
|
||||
email?: string
|
||||
is_deleted?: boolean
|
||||
max_date_created?: string
|
||||
max_date_modified?: string
|
||||
max_id?: number
|
||||
max_total?: number
|
||||
min_date_created?: string
|
||||
min_date_modified?: string
|
||||
min_id?: number
|
||||
min_total?: number
|
||||
payment_method?: string
|
||||
sort?: string
|
||||
status_id?: number
|
||||
}
|
||||
|
||||
interface V2OrderTaxesListFilters extends V2OrderFiltersBase {
|
||||
details?: string
|
||||
}
|
||||
|
||||
interface V2OrderMessagesListFilters extends V2OrderFiltersBase {
|
||||
customer_id?: number
|
||||
is_flagged?: boolean
|
||||
max_date_created?: string
|
||||
max_id?: number
|
||||
min_date_created?: string
|
||||
min_id?: number
|
||||
status?: string
|
||||
}
|
||||
|
||||
interface V2OrderCountResponseBase {
|
||||
count: number
|
||||
}
|
||||
|
||||
interface V2OrderCountResponse extends V2OrderCountResponseBase {
|
||||
statuses: OrderStatus[]
|
||||
}
|
||||
|
||||
interface V2OrderShipmentsResponseBase {
|
||||
id: number
|
||||
order_id: number
|
||||
customer_id: number
|
||||
order_address_id: number
|
||||
date_created: string
|
||||
tracking_number: string
|
||||
shipping_method: string
|
||||
shipping_provider: string
|
||||
tracking_carrier: string
|
||||
tracking_link: string
|
||||
comments: string
|
||||
billing_address: Required<OrderBillingAddress>
|
||||
shipping_address: Required<OrderShippingAddress>
|
||||
items: OrderShipmentItem[]
|
||||
}
|
||||
|
||||
interface V2OrderShippingAddressesResponseBase extends Required<OrderShippingAddress> {
|
||||
id: number
|
||||
order_id: number
|
||||
items_total: number
|
||||
items_shipped: number
|
||||
base_cost: string
|
||||
cost_ex_tax: string
|
||||
cost_inc_tax: string
|
||||
cost_tax: string
|
||||
cost_tax_class_id: number
|
||||
base_handling_cost: string
|
||||
handling_cost_ex_tax: string
|
||||
handling_cost_inc_tax: string
|
||||
handling_cost_tax: string
|
||||
handling_cost_tax_class_id: number
|
||||
shipping_zone_id: number
|
||||
shipping_zone_name: string
|
||||
form_fields: FormField[]
|
||||
shipping_quotes: LinkedResource
|
||||
}
|
||||
|
||||
interface V2OrderProductsResponseBase {
|
||||
id: number
|
||||
order_id: number
|
||||
product_id: number
|
||||
order_address_id: number
|
||||
name: string
|
||||
sku: string
|
||||
type: string
|
||||
base_price: string
|
||||
price_ex_tax: string
|
||||
price_inc_tax: string
|
||||
price_tax: string
|
||||
base_total: string
|
||||
total_ex_tax: string
|
||||
total_inc_tax: string
|
||||
total_tax: string
|
||||
quantity: number
|
||||
base_cost_price: string
|
||||
cost_price_inc_tax: string
|
||||
cost_price_ex_tax: string
|
||||
weight: number | string
|
||||
cost_price_tax: string
|
||||
is_refunded: boolean
|
||||
refunded_amount: string
|
||||
return_id: number
|
||||
wrapping_name: string
|
||||
base_wrapping_cost: string
|
||||
wrapping_cost_ex_tax: string
|
||||
wrapping_cost_inc_tax: string
|
||||
wrapping_cost_tax: string
|
||||
wrapping_message: string
|
||||
quantity_shipped: number
|
||||
event_name: string
|
||||
event_date: string
|
||||
fixed_shipping_cost: string
|
||||
ebay_item_id: string
|
||||
ebay_transaction_id: string
|
||||
option_set_id: number
|
||||
parent_order_product_id: number
|
||||
is_bundled_product: boolean
|
||||
bin_picking_number: string
|
||||
applied_discounts: OrderProductsAppliedDiscounts[]
|
||||
product_options: OrderProductsProductOptions[]
|
||||
external_id: string
|
||||
upc: string
|
||||
variant_id: number
|
||||
name_customer: string
|
||||
name_merchant: string
|
||||
}
|
||||
|
||||
interface V2OrderStatusResponseBase {
|
||||
id: number
|
||||
name: string
|
||||
system_label: string
|
||||
custom_label: string
|
||||
system_description: string
|
||||
}
|
||||
|
||||
interface V2OrderShipmentsRequestBodyBase {
|
||||
order_address_id: number
|
||||
tracking_number?: string
|
||||
shiping_method?: string
|
||||
shipping_provider?: string
|
||||
tracking_carrier?: string
|
||||
comments?: string
|
||||
items: Omit<OrderShipmentItem, "product_id">[]
|
||||
}
|
||||
|
||||
type V2OrderShipmentsUpdateRequest = Partial<Omit<V2OrderShipmentsRequestBodyBase, "items">>
|
||||
|
||||
interface V2OrderCouponsResponseBase {
|
||||
id: number
|
||||
coupon_id: number
|
||||
order_id: number
|
||||
code: string | null
|
||||
amount: string | number
|
||||
type: number
|
||||
discount: number
|
||||
}
|
||||
|
||||
interface V2OrderTaxesResponseBase {
|
||||
id: number
|
||||
order_id: number
|
||||
order_address_id: number
|
||||
tax_rate_id: number
|
||||
tax_class_id: number
|
||||
name: string
|
||||
class: string
|
||||
rate: string
|
||||
priority: number
|
||||
priority_amount: number
|
||||
line_amount: string
|
||||
order_product_id: string
|
||||
line_item_type: "item" | "shipping" | "handling" | "gift-wrapping"
|
||||
}
|
||||
|
||||
interface V2OrderMessagesResponseBase {
|
||||
id: number
|
||||
order_id: number
|
||||
staff_id: number
|
||||
customer_id: number
|
||||
type: string
|
||||
subject: string
|
||||
message: string
|
||||
status: string
|
||||
is_flagged: boolean
|
||||
date_created: string
|
||||
customer: unknown
|
||||
}
|
||||
interface V2OrderShippingQuotesResponseBase {
|
||||
id: string
|
||||
uuid: string
|
||||
timestamp: string
|
||||
shipping_provider_id: string
|
||||
shipping_provider_quote: [] | Record<string, unknown>[]
|
||||
provider_code: string
|
||||
carrier_code: string
|
||||
rate_code: string
|
||||
rate_id: string
|
||||
method_id: number
|
||||
}
|
||||
|
||||
interface ProductImage {
|
||||
id: number
|
||||
product_id: number
|
||||
is_thumbnail: boolean
|
||||
sort_order: number
|
||||
description: string
|
||||
image_file: string
|
||||
url_zoom: string
|
||||
url_standard: string
|
||||
url_thumbnail: string
|
||||
url_tiny: string
|
||||
date_modified: string
|
||||
}
|
||||
interface RestApiCart {
|
||||
id: string
|
||||
parent_id: string | null
|
||||
customer_id: number
|
||||
email: string
|
||||
currency: {
|
||||
code: string
|
||||
}
|
||||
tax_included: boolean
|
||||
base_amount: number
|
||||
discount_amount: number
|
||||
cart_amount: number
|
||||
coupons: RestApiCoupon[]
|
||||
discounts: RestApiDiscount[]
|
||||
line_items: RestApiLineItems
|
||||
created_time: string
|
||||
updated_time: string
|
||||
channel_id: number
|
||||
locale: string
|
||||
}
|
||||
|
||||
interface RestApiCoupon {
|
||||
code: string
|
||||
id: string
|
||||
coupon_type: "0" | "1" | "2" | "3" | "4" | "5"
|
||||
discounted_amount: number
|
||||
}
|
||||
|
||||
interface RestApiDiscount {
|
||||
id: string
|
||||
discounted_amount: number
|
||||
}
|
||||
|
||||
interface RestApiLineItems {
|
||||
physical_items: RestApiPhysicalItem[]
|
||||
digital_items: RestApiItem[]
|
||||
gift_certificates: RestApiGiftCertificate[]
|
||||
custom_items: RestApiCustomItem[]
|
||||
}
|
||||
|
||||
interface RestApiPhysicalItem extends RestApiItem {
|
||||
variant_id: number
|
||||
product_id: number
|
||||
weight: number
|
||||
dimensions: {
|
||||
height: number
|
||||
width: number
|
||||
depth: number
|
||||
}
|
||||
}
|
||||
|
||||
interface RestApiItem {
|
||||
id: string
|
||||
sku: string
|
||||
name: string
|
||||
quantity: number
|
||||
is_taxable: boolean
|
||||
image_url: string
|
||||
discounts: RestApiDiscount[]
|
||||
coupon_amount: number
|
||||
discount_amount: number
|
||||
original_price: number
|
||||
list_price: number
|
||||
sale_price: number
|
||||
extended_list_price: number
|
||||
extended_sale_price: number
|
||||
options: RestApiOption[]
|
||||
url: string
|
||||
}
|
||||
|
||||
interface RestApiGiftCertificate {
|
||||
// Add Gift Certificate specific fields here
|
||||
}
|
||||
|
||||
interface RestApiCustomItem {
|
||||
// Add Custom Item specific fields here
|
||||
}
|
||||
|
||||
interface RestApiOption {
|
||||
// Add Option specific fields here
|
||||
gift_wrapping?: {
|
||||
// Add Gift Wrapping details here
|
||||
}
|
||||
}
|
||||
|
||||
interface RestWishlistItem {
|
||||
id?: number
|
||||
product_id: number
|
||||
variant_id: number
|
||||
}
|
||||
|
||||
interface RestWishlist {
|
||||
id: number
|
||||
customer_id: number
|
||||
is_public: boolean
|
||||
name: string
|
||||
items: RestWishlistItem[]
|
||||
}
|
||||
786
types/bigCommerceTypes.d.ts
vendored
786
types/bigCommerceTypes.d.ts
vendored
@@ -1,786 +0,0 @@
|
||||
type Connection<T> = {
|
||||
edges: Array<Edge<T>>
|
||||
}
|
||||
|
||||
type Edge<T> = {
|
||||
node: T
|
||||
}
|
||||
|
||||
interface Address {
|
||||
firstName: string
|
||||
lastName: string
|
||||
address1: string
|
||||
address2?: string
|
||||
city: string
|
||||
countryCode: string
|
||||
stateOrProvince: string
|
||||
phone: string
|
||||
postalCode: string
|
||||
}
|
||||
interface BigCommerceAddress {
|
||||
address1: string
|
||||
address2: string
|
||||
address_type: string
|
||||
city: string
|
||||
company: string
|
||||
country: string
|
||||
country_code: string
|
||||
customer_id: number
|
||||
first_name: string
|
||||
id: number
|
||||
last_name: string
|
||||
phone: string
|
||||
postal_code: string
|
||||
state_or_province: string
|
||||
form_fields: []
|
||||
}
|
||||
|
||||
interface RegisterCustomerInput {
|
||||
firstName?: string
|
||||
lastName?: string
|
||||
email: string
|
||||
password: string
|
||||
phone?: string
|
||||
address?: Address
|
||||
}
|
||||
|
||||
interface BigCommerceRegisterCustomerOperation {
|
||||
customer: {
|
||||
registerCustomer: {
|
||||
input: RegisterCustomerInput
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceCartOperation {
|
||||
data: {
|
||||
site: {
|
||||
cart: BigCommerceCart
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
entityId: string
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceCreateCartOperation {
|
||||
data: {
|
||||
cart: {
|
||||
createCart: {
|
||||
cart: BigCommerceCart
|
||||
}
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
createCartInput: {
|
||||
lineItems: CartItem[]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceAddToCartOperation {
|
||||
data: {
|
||||
cart: {
|
||||
addCartLineItems: {
|
||||
cart: BigCommerceCart
|
||||
}
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
addCartLineItemsInput: {
|
||||
cartEntityId: string
|
||||
data: {
|
||||
lineItems: CartItem[]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceDeleteCartItemOperation {
|
||||
data: {
|
||||
cart: {
|
||||
deleteCartLineItem: {
|
||||
cart: BigCommerceCart
|
||||
}
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
deleteCartLineItemInput: {
|
||||
cartEntityId: string
|
||||
lineItemEntityId: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceUpdateCartItemOperation {
|
||||
data: {
|
||||
cart: {
|
||||
updateCartLineItem: {
|
||||
cart: BigCommerceCart
|
||||
}
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
updateCartLineItemInput: {
|
||||
cartEntityId: string
|
||||
lineItemEntityId: string
|
||||
data: {
|
||||
lineItem: CartItem
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceCheckoutOperation {
|
||||
data: {
|
||||
site: {
|
||||
checkout: BigCommerceCheckout
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
entityId: string
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceProductOperation {
|
||||
data: {
|
||||
site: {
|
||||
product: BigCommerceProduct
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
productId: number
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceProductByHandleOperation {
|
||||
data: {
|
||||
site: {
|
||||
route: {
|
||||
node: BigCommerceProduct
|
||||
}
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
path: string
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceProductsOperation {
|
||||
data: {
|
||||
site: {
|
||||
products: Connection<BigCommerceProduct>
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
entityIds: number[] | []
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceEntityIdOperation {
|
||||
data: {
|
||||
site: {
|
||||
route: {
|
||||
node: {
|
||||
__typename:
|
||||
| "Product"
|
||||
| "Category"
|
||||
| "Brand"
|
||||
| "NormalPage"
|
||||
| "ContactPage"
|
||||
| "RawHtmlPage"
|
||||
| "BlogIndexPage"
|
||||
entityId: number
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
path: string
|
||||
}
|
||||
}
|
||||
|
||||
interface WishlistProduct {
|
||||
addToWishlistUrl: string
|
||||
}
|
||||
|
||||
interface WishlistItem {
|
||||
product: WishlistProduct
|
||||
}
|
||||
|
||||
interface Wishlist {
|
||||
items: {
|
||||
edges: { node: WishlistItem }[]
|
||||
}
|
||||
}
|
||||
|
||||
interface Customer {
|
||||
addressCount: number
|
||||
phone: string
|
||||
email: string
|
||||
entityId: number
|
||||
firstName: string
|
||||
lastName: string
|
||||
wishlists: {
|
||||
edges: { node: Wishlist }[]
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceWishlistQueryOperation {
|
||||
data: { customer: { wishlists: { edges: { node: Wishlist }[] } } }
|
||||
variables: { customerEntityId: number }
|
||||
}
|
||||
|
||||
interface BigCommerceCustomerQueryOperation {
|
||||
data: { customer: Customer }
|
||||
variables: { customerEntityId: number }
|
||||
}
|
||||
|
||||
interface BigCommerceRecommendationsOperation {
|
||||
data: {
|
||||
site: {
|
||||
product: {
|
||||
relatedProducts: Connection<BigCommerceProduct>
|
||||
}
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
productId: number | string
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceSearchProductsOperation {
|
||||
data: {
|
||||
site: {
|
||||
search: {
|
||||
searchProducts: {
|
||||
products: Connection<BigCommerceProduct>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
filters: {
|
||||
searchTerm: string
|
||||
}
|
||||
sort: string | null
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceMenuOperation {
|
||||
data: {
|
||||
site: {
|
||||
categoryTree: BigCommerceCategoryTreeItem[]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceCategoryOperation {
|
||||
data: {
|
||||
site: {
|
||||
categoryTree: BigCommerceCategory[]
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
entityId: number
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceProductsCategoryOperation {
|
||||
data: {
|
||||
site: {
|
||||
category: {
|
||||
products: Connection<BigCommerceProduct>
|
||||
}
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
entityId: number
|
||||
hideOutOfStock: boolean
|
||||
sortBy: string
|
||||
first: number
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceNewestProductsOperation {
|
||||
data: {
|
||||
site: {
|
||||
newestProducts: Connection<BigCommerceProduct>
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
first: number
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceFeaturedProductsOperation {
|
||||
data: {
|
||||
site: {
|
||||
featuredProducts: Connection<BigCommerceProduct>
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
first?: number
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommercePopularProductsOperation {
|
||||
data: {
|
||||
site: {
|
||||
bestSellingProducts: Connection<BigCommerceProduct>
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
first: number
|
||||
}
|
||||
}
|
||||
|
||||
interface Category {
|
||||
name: string
|
||||
path: string
|
||||
entityId: number
|
||||
description: string
|
||||
children: Category[]
|
||||
}
|
||||
|
||||
interface BigCommerceCategoryOperation {
|
||||
data: {
|
||||
site: {
|
||||
categoryTree: Category[]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommercePageOperation {
|
||||
data: {
|
||||
site: {
|
||||
content: {
|
||||
page: BigCommercePage
|
||||
}
|
||||
}
|
||||
}
|
||||
variables: { entityId: number }
|
||||
}
|
||||
|
||||
interface BigCommercePagesOperation {
|
||||
data: {
|
||||
site: {
|
||||
content: {
|
||||
pages: Connection<BigCommercePage>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceCheckout {
|
||||
subtotal: BigCommerceMoney
|
||||
grandTotal: BigCommerceMoney
|
||||
taxTotal: BigCommerceMoney
|
||||
}
|
||||
|
||||
interface BigCommerceSEO {
|
||||
pageTitle: string
|
||||
metaDescription: string
|
||||
metaKeywords: string
|
||||
}
|
||||
|
||||
interface BigCommerceCategory {
|
||||
entityId: number
|
||||
name: string
|
||||
path: string
|
||||
description: string
|
||||
seo: BigCommerceSEO
|
||||
children: BigCommerceCategory[]
|
||||
}
|
||||
|
||||
interface BigCommerceCart {
|
||||
entityId: string
|
||||
currencyCode: string
|
||||
isTaxIncluded: boolean
|
||||
baseAmount: BigCommerceMoney
|
||||
discountedAmount: BigCommerceMoney
|
||||
amount: BigCommerceMoney
|
||||
discounts: CartDiscount[]
|
||||
lineItems: CartLineItems
|
||||
createdAt: { utc: Date }
|
||||
updatedAt: { utc: Date }
|
||||
locale: string
|
||||
}
|
||||
|
||||
interface CartLineItems {
|
||||
physicalItems: PhysicalItem[]
|
||||
digitalItems: PhysicalItem[]
|
||||
customItems: CartCustomItem[]
|
||||
giftCertificates: CartGiftCertificate[]
|
||||
totalQuantity: number
|
||||
}
|
||||
|
||||
interface CartItem {
|
||||
quantity: number
|
||||
productEntityId: number
|
||||
variantEntityId?: number
|
||||
}
|
||||
|
||||
interface BigCommerceCategoryTreeItem {
|
||||
name: string
|
||||
path: string
|
||||
hasChildren: boolean
|
||||
entityId: number
|
||||
children?: BigCommerceCategoryTreeItem[]
|
||||
}
|
||||
|
||||
interface BigCommercePage {
|
||||
__typename: "NormalPage" | "ContactPage" | "RawHtmlPage" | "BlogIndexPage"
|
||||
entityId: number
|
||||
name: string
|
||||
isVisibleInNavigation: boolean
|
||||
seo: BigCommerceSEO
|
||||
path: string
|
||||
plainTextSummary?: string
|
||||
htmlBody?: string
|
||||
}
|
||||
|
||||
interface BigCommerceMoney {
|
||||
value: number
|
||||
currencyCode: string
|
||||
}
|
||||
|
||||
interface CartDiscount {
|
||||
entityId: string
|
||||
discountedAmount: BigCommerceMoney
|
||||
}
|
||||
|
||||
interface CartGiftCertificatePersonDetails {
|
||||
name: string
|
||||
email: string
|
||||
}
|
||||
|
||||
interface PhysicalItem {
|
||||
entityId: number
|
||||
parentEntityId: number | null
|
||||
productEntityId: number
|
||||
variantEntityId: number | null
|
||||
sku: string
|
||||
name: string
|
||||
url: string
|
||||
imageUrl: string | null
|
||||
brand: string | null
|
||||
quantity: number
|
||||
isTaxable: boolean
|
||||
listPrice: BigCommerceMoney
|
||||
extendedListPrice: BigCommerceMoney
|
||||
selectedOptions: {
|
||||
entityId: number
|
||||
name: string
|
||||
value?: string
|
||||
date?: { utc: Date }
|
||||
text?: string
|
||||
number?: string
|
||||
fileName?: ScrollSetting
|
||||
}[]
|
||||
isShippingRequired: boolean
|
||||
}
|
||||
|
||||
interface CartCustomItem {
|
||||
entityId: string
|
||||
productEntityId: undefined
|
||||
sku: string
|
||||
name: string
|
||||
quantity: number
|
||||
listPrice: BigCommerceMoney
|
||||
extendedListPrice: BigCommerceMoney
|
||||
}
|
||||
|
||||
interface CartGiftCertificate {
|
||||
entityId: number
|
||||
productEntityId: undefined
|
||||
name: string
|
||||
amount: BigCommerceMoney
|
||||
isTaxable: boolean
|
||||
message: string
|
||||
sender: CartGiftCertificatePersonDetails
|
||||
recipient: CartGiftCertificatePersonDetails
|
||||
}
|
||||
|
||||
interface BigCommerceProductVariant {
|
||||
id: number
|
||||
entityId: number
|
||||
sku: string
|
||||
upc: string | null
|
||||
isPurchasable: boolean
|
||||
defaultImage: {
|
||||
url: string
|
||||
altText: string
|
||||
}
|
||||
prices: {
|
||||
price: BigCommerceMoney
|
||||
priceRange: {
|
||||
min: BigCommerceMoney
|
||||
max: BigCommerceMoney
|
||||
}
|
||||
}
|
||||
options: {
|
||||
edges: Array<{
|
||||
node: {
|
||||
entityId: number
|
||||
displayName: string
|
||||
values: {
|
||||
edges: Array<{
|
||||
node: {
|
||||
entityId: number
|
||||
label: string
|
||||
}
|
||||
}>
|
||||
}
|
||||
}
|
||||
}>
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceProductOption {
|
||||
__typename: string
|
||||
entityId: number
|
||||
displayName: string
|
||||
isRequired: boolean
|
||||
displayStyle: string
|
||||
values: {
|
||||
edges: Array<{
|
||||
node: {
|
||||
entityId: number
|
||||
label: string
|
||||
isDefault: boolean
|
||||
hexColors: string[]
|
||||
imageUrl: string | null
|
||||
isSelected: boolean
|
||||
}
|
||||
}>
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceProduct {
|
||||
id: number
|
||||
entityId: number
|
||||
sku: string
|
||||
categories: {
|
||||
edges: {
|
||||
node: {
|
||||
name: string
|
||||
description: string
|
||||
path: string
|
||||
entityId: number
|
||||
}
|
||||
}[]
|
||||
}
|
||||
upc: string | null
|
||||
|
||||
name: string
|
||||
brand: {
|
||||
name: string
|
||||
} | null
|
||||
plainTextDescription: string
|
||||
description: string
|
||||
availabilityV2: {
|
||||
status: "Available" | "Unavailable" | "Preorder"
|
||||
description: string
|
||||
}
|
||||
defaultImage: {
|
||||
url: string
|
||||
altText: string
|
||||
}
|
||||
images: {
|
||||
edges: Array<{
|
||||
node: {
|
||||
url: string
|
||||
altText: string
|
||||
}
|
||||
}>
|
||||
}
|
||||
reviews: {
|
||||
edges: Array<{
|
||||
node: {
|
||||
rating: number
|
||||
}
|
||||
}>
|
||||
}
|
||||
seo: BigCommerceSEO
|
||||
path: string
|
||||
prices: {
|
||||
price: BigCommerceMoney
|
||||
salePrice: BigCommerceMoney | null
|
||||
retailPrice: BigCommerceMoney | null
|
||||
priceRange: {
|
||||
min: BigCommerceMoney
|
||||
max: BigCommerceMoney
|
||||
}
|
||||
}
|
||||
createdAt: {
|
||||
utc: Date
|
||||
}
|
||||
variants: Connection<BigCommerceProductVariant>
|
||||
productOptions: Connection<BigCommerceProductOption>
|
||||
}
|
||||
interface BigCommerceCustomer {
|
||||
id: number
|
||||
company: string
|
||||
first_name: string
|
||||
last_name: string
|
||||
email: string
|
||||
phone: string
|
||||
store_credit: string
|
||||
registration_ip_address: string
|
||||
customer_group_id: number
|
||||
notes: string
|
||||
tax_exempt_category: string
|
||||
authentication?: {
|
||||
force_password_reset: boolean
|
||||
new_password: string
|
||||
}
|
||||
form_fields: (
|
||||
| {
|
||||
name: "birthday"
|
||||
value: Date | string
|
||||
customer_id?: number
|
||||
}
|
||||
| {
|
||||
name: "gender"
|
||||
value: "male" | "female"
|
||||
customer_id?: number
|
||||
}
|
||||
| {
|
||||
name: "username"
|
||||
value: string
|
||||
customer_id?: number
|
||||
}
|
||||
)[]
|
||||
addresses: {
|
||||
url: string
|
||||
resource: string
|
||||
}
|
||||
}
|
||||
|
||||
type BigCommerceError = {
|
||||
__typename: "EmailAlreadyInUseError"
|
||||
message: string
|
||||
}
|
||||
|
||||
interface BigCommerceRegisterCustomerOperation {
|
||||
data: {
|
||||
customer: {
|
||||
registerCustomer: {
|
||||
customer: BigCommerceCustomer
|
||||
errors?: BigCommerceError[]
|
||||
}
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
registerCustomerInput: RegisterCustomerInput
|
||||
}
|
||||
}
|
||||
|
||||
interface AddWishlistItemsInput {
|
||||
entityId: number
|
||||
items: {
|
||||
productEntityId: number
|
||||
}[]
|
||||
}
|
||||
|
||||
interface CreateWishlistInput {
|
||||
name: string
|
||||
isPublic: boolean
|
||||
}
|
||||
|
||||
interface DeleteWishlistItemsInput {
|
||||
entityId: number
|
||||
itemEntityIds: number[]
|
||||
}
|
||||
|
||||
interface DeleteWishlistsInput {
|
||||
entityIds: number[]
|
||||
}
|
||||
|
||||
interface UpdateWishlistInput {
|
||||
entityId: number
|
||||
data: {
|
||||
name: string
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceWishlist {
|
||||
entityId: number
|
||||
name: string
|
||||
items: {
|
||||
edges: {
|
||||
node: {
|
||||
product: BigCommerceProduct
|
||||
}
|
||||
}[]
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceAddWishlistItemsOperation {
|
||||
data: {
|
||||
wishlist: {
|
||||
addWishlistItems: {
|
||||
result: BigCommerceWishlist
|
||||
}
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
addWishlistItemsInput: AddWishlistItemsInput
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceCreateWishlistOperation {
|
||||
data: {
|
||||
wishlist: {
|
||||
createWishlist: {
|
||||
result: {
|
||||
entityId: number
|
||||
name: string
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
createWishlistInput: CreateWishlistInput
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceDeleteWishlistItemsOperation {
|
||||
data: {
|
||||
wishlist: {
|
||||
deleteWishlistItems: {
|
||||
result: BigCommerceWishlist
|
||||
}
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
deleteWishlistItemsInput: DeleteWishlistItemsInput
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceDeleteWishlistsOperation {
|
||||
data: {
|
||||
wishlist: {
|
||||
deleteWishlists: {
|
||||
result: boolean
|
||||
}
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
deleteWishlistsInput: DeleteWishlistsInput
|
||||
}
|
||||
}
|
||||
|
||||
interface BigCommerceUpdateWishlistOperation {
|
||||
data: {
|
||||
wishlist: {
|
||||
updateWishlist: {
|
||||
result: BigCommerceWishlist
|
||||
}
|
||||
}
|
||||
}
|
||||
variables: {
|
||||
updateWishlistInput: UpdateWishlistInput
|
||||
}
|
||||
}
|
||||
6
types/global.d.ts
vendored
6
types/global.d.ts
vendored
@@ -74,12 +74,6 @@ interface FileField {
|
||||
size: number
|
||||
}
|
||||
|
||||
interface TagEntry {
|
||||
id: string
|
||||
name: string
|
||||
color: string
|
||||
}
|
||||
|
||||
interface DummyCartEndpoint {
|
||||
operation: "add" | "update" | "delete"
|
||||
cartId: string
|
||||
|
||||
168
types/tibiCommerceRelated.d.ts
vendored
168
types/tibiCommerceRelated.d.ts
vendored
@@ -1,168 +0,0 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user