extend type Mutation {
    addToQuote(input: QuoteInput! @spread): QuoteStatus!
    @field(resolver: "App\\GraphQL\\Mutations\\Quote")

    applyLoyaltyDiscount(input: QuoteInput! @spread): QuoteStatus!
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@apply_loyalty_discount")

    updateClassQuoteItem(input: QuoteInput! @spread): QuoteStatus!
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@update_class_quote_item")

    deleteClassQuoteItem(input: QuoteInput! @spread): QuoteStatus!
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@delete_class_quote_item")

    updateBookingType(input: QuoteInput! @spread): QuoteStatus!
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@update_booking_type")

    updateQuoteDetails(input: QuoteInput! @spread): QuoteStatus!
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@update_quote_details")

    applyVoucherCode(input: QuoteInput! @spread): QuoteStatus!
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@apply_voucher_code")

    removeVoucherCode(input: QuoteInput! @spread): QuoteStatus!
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@remove_voucher_code")

    applyRemoveCustomerCredit(input: QuoteInput! @spread): QuoteStatus!
    @guard
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@apply_remove_customer_credit")

    updateShopItemQty(input: QuoteInput! @spread): QuoteStatus!
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@update_shop_item_qty")

    deleteShopItem(input: QuoteInput! @spread): QuoteStatus!
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@delete_shop_item")

    checkShopItem(input: QuoteInput! @spread): QuoteStatus!
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@check_shop_item")

    updateShopItem(input: QuoteInput! @spread): QuoteStatus!
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@update_shop_item")

    setGuestQuote(input: QuoteInput! @spread): QuoteStatus!
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@set_guest_quote")

    setDeliveryMethod(input: QuoteInput! @spread): QuoteStatus!
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@set_delivery_method")

    trialToFullTermConvert(input: QuoteInput! @spread): TrialStatus!
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@trial_to_full_term_convert")

    assignStudentToCart(input: QuoteInput! @spread): QuoteStatus!
    @guard
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@assignStudentToCart")

    otherClassVerify(input: QuoteInput! @spread): QuoteStatus!
    @field(resolver: "App\\GraphQL\\Mutations\\Quote@other_class_verify")

}

extend type Query {

    quote(
        reference_token: String
        page: String
    ): Quote @complexity(resolver: "App\\GraphQl\\Queries\\Quote")

    quoteItemRelatedProduct(reference_token: String): [Products] @complexity(resolver: "App\\GraphQl\\Queries\\QuoteItemRelatedProduct")

}

input QuoteInput {
    id: Int
    product_id: Int
    qty: Int
    child_product_id: Int
    hashkey: String
    personalised_product: String
    product_type: String
    class_id: Int
    reference_token: String
    type: String
    items_count: Int
    title: String
    first_name: String
    surname: String
    email_address: String
    phone_number: String
    payment_type: String
    confirm_order: String
    voucher_code: String
    booking_type: String
    page: String
    is_newsletter: String
    is_photo_permission: String
    credit_balance: String
    waiting_clearence_customers_id: Int
    waiting_invitation_id: Int
    pre_allocations_id: Int
    student_id: Int
    pre_allocations_ids: String
    classes_ids: String
    attributeValueIdOne: Int
    attributeValueIdMain: Int
    shop_quote_item_id: Int
    billing_address_line_1: String
    billing_address_line_2: String
    billing_address_line_3: String
    billing_town_city: String
    billing_postcode: String
    billing_country: String
    billing_county: String
    delivery_address_line_1: String
    delivery_address_line_2: String
    delivery_address_line_3: String
    delivery_town_city: String
    delivery_postcode: String
    delivery_country: String
    delivery_county: String
    is_billing_delivery_same: String
}

type TrialStatus {
    status: Boolean
    message: String
    data: TrialData
}

type TrialData {
    customer_token: String
    user: UserData
}

type QuoteStatus {
    status: Boolean
    message: String
    data: Quote
}

type Quote {
    id: ID
    reference_token: String
    type: String
    is_active: String
    items_count: Int
    sub_total_amount: Float
    total_amount: Float
    grant_total_amount: Float
    title: String
    first_name: String
    surname: String
    email_address: String
    phone_number: String
    payment_type: String
    confirm_order: String
    voucher_id: String
    voucher_code: String
    voucher_type: String
    voucher_value: String
    voucher_amount: Float
    discount_amount: Float
    credit_amount: Float
    sub_total_amount_inc_vat: Float
    total_amount_inc_vat: Float
    grant_total_amount_inc_vat: Float
    sub_total_amount_ex_vat: Float
    total_amount_ex_vat: Float
    grant_total_amount_ex_vat: Float
    vat_amount: Float
    vat_percantage: Float
    loyalty_percentage: Float
    loyalty_amount: Float
    booked_class_discount: Float
    is_cost_summary: Boolean
    is_trial_booking: Boolean
    is_checkout: Boolean
    is_student_added: Boolean
    class_quote_items: [ClassQuoteItems]
    quote_installment: [QuoteInstallment]
    voucher_codes: VoucherCodes
    is_first_instalments_pay: Boolean
    client_secret: String
    primary_key: String
    error_message: String
    is_newsletter: String
    is_photo_permission: String
    customer_credit: Float
    shop_quote_items: [ShopQuoteItems]
    qty: Int
    attribute_id_one: Int
    attribute_id_main: Int
    personalised_product: String
    is_guest: String
    setting_shop_deliverys: [SettingShopDeliverys]
    delivery_id: Int
    delivery_name: String
    delivery_amount: Float
    billing_address_line_1: String
    billing_address_line_2: String
    billing_address_line_3: String
    billing_town_city: String
    billing_postcode: String
    billing_country: String
    billing_county: String
    delivery_address_line_1: String
    delivery_address_line_2: String
    delivery_address_line_3: String
    delivery_town_city: String
    delivery_postcode: String
    delivery_country: String
    delivery_county: String
    is_billing_delivery_same: String
    total_item_qty: Int
}

type VoucherCodes {
    id: Int
    name: String
    description: String
    valid_from: String
    valid_to: String
    voucher_type: String
    discount_type: String
    discount_amount: String
    maximum_discount: String
    number_of_users: String
    available_number_of_users: String
}

type SettingShopDeliverys {
    id: ID
    shipping_name: String
    weight_from: Float
    weight_to: Float
    customer_price_net: Float
    customer_vat: Int
    customer_gross_price: Float
    franchise_price_net: Float
    franchise_vat: Int
    franchise_gross_price: Float
}

type QuoteInstallment {
    id: ID!
    quote_id: Int
    installment_date: String
    installment_amount: String
}

type ShopQuoteItems {
    id: ID!
    quote_id: Int
    product_id: Int
    child_product_id: Int
    amount: Float
    total_amount: Float
    qty: Int
    weight: Float
    vat_amount: Float
    vat_percantage: Float
    personalised_product: String
    personalised_product_price: Float
    product: Products
    child_product: Products
    quote_configurable_option: QuoteConfigurableOption

}

type QuoteConfigurableOption {
    id: ID,
    quote_id: Int,
    shop_quote_item_id: Int,
    attribute_option: String
}

type ClassQuoteItems {
    id: ID!
    student_id: Int
    quote_id: Int
    franchise_id: Int
    class_id: Int
    class_price_id: Int
    position: Int
    amount: Float
    discount_amount: Float
    booking_type: String
    next_day: String
    class_quote_count: Int
    classes: Classes
    franchise: Franchises
    student: Student
    next_class_day: String
    next_class_start_time: String
    next_class_end_time: String
    is_class_open_for_booking: Boolean
    message: String
}
