Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/graphql / src / models / Cart.graphql.ts
Size: Mime:
import { gql } from 'apollo-server'

export default gql`
  type ContactUsNotReal {
    description: String
    # number: Int
    telephone: String
    workinghour: LabelValue
  }
  type Cart {
    contactus: ContactUsNotReal
    giftproducts: [CartProduct]
    saveforlater: [CartProduct]
    promocodes: [CartProduct]
    products: [CartProduct]
    status: String

    shippingmethodtype: String
    shippingmethods: [ShippingMethod]

    buyinfo: CartBuyInfo
    cartinfo: CartInfo
    iteminfo: CartItemInfo
    math: Math
    paymentcardinfo: CartPaymentCardInfo
    state: CartState
    properties: CartStateProperties
    # @todo remove
    userinfo: [CartUserInfo]
    type: String
    cookies: [String]
  }

  # type Cart {
  #   children: CartProducts
  #   properties: CartProperties
  #   type: String
  #   cookies: [String]
  # }

  type CartProducts {
    products: [CartProduct]
  }

  type CartBundleProduct {
    products: [CartProduct]
  }
  # Should Just Be Sku but it differs slightly
  type CartProduct {
    itemId: String
    identifier: String
    image: String
    name: String
    type: String
    properties: CartProductProperties
    productOptions: [TypeValue]
    productId: String
    skuId: String
    title: String
    children: CartBundleProduct
  }
  type CartProductState {
    errormessage: String
  }
  type CartSkuColor {
    name: String
  }
  type CartSkuSize {
    name: String
  }
  type CartSkuInfo {
    color: ImageName
    size1: Name
    style: Name
  }

  type CartProductSkuInfo {
    color: CartSkuColor
    size1: CartSkuSize
  }
  type CartProductProperties {
    buyinfo: CartBuyInfo
    cartinfo: CartInfo
    iteminfo: CartProductItemInfo
    skuinfo: SkuInfo
    creditcardinfo: [CreditCardInfo]
    paymentcardinfo: PaymentCardInfo
    state: CartProductState
    math: Math
    type: String
  }

  type CartProductItemInfo {
    additionalinfo: [LabelValue]
    category: String
    categoryids: [Value]
    description: [Value]
    shortdescription: [LabelValue]
    flags: [LabelValue]
    specifications: [LabelValue]
    isgiftcard: String
    itemid: String
    prices: [LabelValueType]
    sku: String
  }

  type Math {
    cost: String
    currency: String
    discountcost: String
    discount: String
    estTotalShippingDiscount: String
    estTotalShippingPrice: String
    estTotalShippingTax: String
    estTotalTax: String
    estunittax: String
    esttax: String
    estfulfilcost: String
    estfulfilsale: String
    estfulfiltax: String
    fulfiltax: String
    fulfilcost: String
    fulfilsale: String
    giftdiscount: String
    giftcost: String
    giftsale: String
    estUnitTax: String
    grandTotal: String
    grandTotalAfterPayment: String
    grandTotalTax: String
    maxBagCount: String
    quantity: String
    sale: String
    tax: String
    totalBagCount: String
    totalBagCountWithErrors: String
    totalCost: String
    totalDiscount: String
    totalGiftWrapCost: String
    totalGiftWrapDiscount: String
    totalGiftWrapPrice: String
    totalGiftWrapTax: String
    totalSale: String
    unittax: String
    unitCost: String
    unitSale: String
  }

  # YOU HAD ONE WAY TO NAME THINGS
  type CartStateProperties {
    state: CartState
  }
  type CartProperties {
    buyinfo: CartBuyInfo
    cartinfo: CartInfo
    iteminfo: CartItemInfo
    math: Math
    # paymentcardinfo: CartPaymentCardInfo
    state: CartState
    userinfo: CartUserInfo
  }

  type CartBuyInfo implements IBuyInfo {
    pricing: Pricing
    inventorystatus: String
    instock: String
    preorder: String
    preorderdate: String
    deliverydate: String
    availablequantity: String
    availability: [Availability]
    promomessages: [Label]
  }

  type CartOrderPricing {
    currencycode: String
    prices: [Price]
    buymoresavemore: [MinMaxQuantity]
  }

  type CartInfo {
    quantity: String
    discounttotal: String
    discountonlytotal: String
    giftitem: String
    iseligible: String
    pretaxtotal: String
    shippingcharge: String
    shippingtax: String
    subtotal: String
    total: String
    totaltax: String
    discount: [LabelValue]
    shippingmethods: [ShippingMethod]
    valueaddedtaxes: [LabelValue]
    valuesapplied: [CartInfoValues]
  }

  type ShippingMethod {
    estdate: String
    esttime: String
    notes: String
    name: String
    selected: String
    code: String
    date: String
    identifier: String
    notification: String
    prices: [LabelValue]
    time: String
    type: String
  }

  type ShippingMethods {
    shippingmethods: [ShippingMethod]
    type: String
  }

  type CartInfoValues {
    shiptotal: String
  }

  type CartItemInfo {
    giftoption: GiftOption
  }

  type CartPaymentCardInfo {
    adjustedamount: String
    amount: String
    type: String
  }

  type GiftOption {
    giftwraptax: String
    giftwrapcost: String
  }

  type CartState {
    additionalinfo: [LabelValue]
    status: String
    count: String
  }

  type CartUserInfo {
    guid: String
    userid: String
    addressinfo: [AddressInfo]
  }

  type AddressInfo {
    addresstype: String
    city: String
    country: String
    county: String
    state: String
    zipcode: String
    firstname: String
    lastname: String
    addressline1: String
    addressline2: String
    phonenumber: String
    email: String

    # added for Accounts
    id: String
    username: String
    addressLine3: String
  }

  type PromoProperties {
    state: CartState
  }

  type PromoResponse {
    type: String
    properties: PromoProperties
  }

  type ChildrenProducts {
    products: [CartProduct]
  }

  type AddToBagResponse {
    type: String
    properties: PromoProperties
    children: ChildrenProducts
  }

  type UpdateBagResponse {
    type: String
    properties: CartProperties
    children: ChildrenProducts
  }

  type DeleteFromBagProperties {
    state: CartState
  }

  type DeleteFromBagResponse {
    type: String
    properties: DeleteFromBagProperties
  }

  input CategoryIdParam {
    categoryId: String
  }

  input CustomParams {
    mainProduct: String
    mandatoryProduct: String
    optionalProduct: String
    quantity: Int
  }

  input subProducts {
    skuId: String!
    itemid: String!
    customParams: CustomParams
  }

  input AddToBagInput {
    skuId: String!
    itemid: String!
    title: String
    quantity: Int
    itemType: String
    customParams: CategoryIdParam
    subProducts: [subProducts]
  }

  input UpdateBagInput {
    quantity: Int
    id: String
  }

  input DeleteFromBagInput {
    id: String!
  }

  type EstimateShippingMath {
    estTotalShippingPrice: String
  }

  input EstimateInfoInput {
    postalCode: String
    state: String
    country: String
    city: String
  }
  type EstimateShippingProperties {
    math: EstimateShippingMath
  }

  type EstimateShippingResponse {
    type: String
    properties: EstimateShippingProperties
  }
`