Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
resolved conflict with PR
  • Loading branch information
rakesh committed Nov 12, 2020
commit 5d60865eb02b1784d37fdb040bafdb4937981f65
114 changes: 105 additions & 9 deletions design-documents/graph-ql/coverage/customer/Wishlist.graphqls
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
type Mutation {
createWishlist(name: String!): ID # Multiple wishlists Commerce functionality
removeWishlist(uid: ID!): Boolean # Commerce fucntionality - in Opens Source we assume customer always has one wishlist
addProductsToWishlist(wishlistId: ID!, wishlistItems: [WishlistItemInput!]!): AddProductsToWishlistOutput
createWishlist(input: CreateWishlistInput!): CreateWishlistOutput # Multiple wishlists Commerce functionality
deleteWishlist(wishlistUid: ID!): DeleteWishlistOutput # Commerce fucntionality - in Opens Source we assume customer always has one wishlist
addProductsToWishlist(wishlistId: ID!, wishlistItems: [WishlistItemInput!]!): AddProductsToWishlistOutput
removeProductsFromWishlist(wishlistId: ID!, wishlistItemsIds: [ID!]!): RemoveProductsFromWishlistOutput
updateProductsInWishlist(wishlistId: ID!, wishlistItems: [WishlistItemUpdateInput!]!): UpdateProductsInWishlistOutput
copyProductsBetweenWishlists(sourceWishlistUid: ID!, destinationWishlistUid: ID!, wishlistItems: [WishlistItemCopyInput!]!): CopyProductsBetweenWishlistsOutput @doc(description: "Copy a product to the wish list")
moveProductsBetweenWishlists(sourceWishlistUid: ID!, destinationWishlistUid: ID!, wishlistItems: [WishlistItemMoveInput!]!): MoveProductsBetweenWishlistsOutput @doc(description: "Move products from one wish list to another")
updateWishlist( wishlistUid: ID!, input: UpdateWishlistInput!): UpdateWishlistOutput @doc(description: "Change the name and visibility of the specified wish list")
addWishlistItemsToCart(
wishlistUid: ID!, @doc(description: "unique Id of wishlist")
wishlistItemUids: [ID!] @doc(description: "Optional param. selected wish list items that are to be added")
): AddWishlistItemsToCartOutput @doc(description: "Add Requisition List Items To Customer Cart")
}

type Customer {
Expand All @@ -13,6 +20,7 @@ type Customer {
}

type Wishlist {
<<<<<<< customer-files-uid-update
uid: ID
items: [WishlistItem] @deprecated(reason: "Use field `items_v3` from type `Wishlist` instead")
items_v2: [WishlistItemInterface] @doc(description: "An array of items in the customer's wishlist") @deprecated(reason: "Use field `items_v3` from type `Wishlist` instead")
Expand All @@ -24,6 +32,23 @@ type Wishlist {
sharing_code: String
updated_at: String
name: String @doc(description: "Avaialble in Commerce edition only")
visibility: WishlistVisibilityEnum!
}

type WishlistItems {
items: [WishlistItemInterface]! @doc(description: "Wishlist items list")
page_info: SearchResultPageInfo
total_pages: Int! @doc(description: "total count of wishlist items")
}

input CreateWishlistInput {
name: String!
visibility: WishlistVisibilityEnum!
}

input UpdateWishlistInput {
name: String
visibility: WishlistVisibilityEnum
}

type WishlistItems {
Expand All @@ -33,8 +58,9 @@ type WishlistItems {
}

input WishlistItemUpdateInput {
wishlist_item_id: ID
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't remove any of the existing fields, but deprecate them and also add wishlist_item_uid

wishlist_item_id: ID!
quantity: Float
description: String
selected_options: [ID!]
entered_options: [EnteredOptionInput!]
}
Expand All @@ -44,16 +70,33 @@ type AddProductsToWishlistOutput {
}

type RemoveProductsFromWishlistOutput {
status: Boolean!
wishlist: Wishlist!
}

type UpdateProductsInWishlistOutput {
wishlist: Wishlist!
}

type AddWishlistItemsToCartOutput {
status: Boolean!
add_wishlist_items_to_cart_user_errors: [AddWishlistItemUserError]!
}

type AddWishlistItemUserError {
message: String!
type: AddWishlistItemUserErrorType!
}

enum AddWishlistItemUserErrorType {
OUT_OF_STOCK
MAX_QTY_FOR_USER
NOT_AVAILABLE
}

input WishlistItemInput {
sku: String
quantity: Float
sku: String!
quantity: Float!
parent_sku: String,
parent_quantity: Float,
selected_options: [ID!]
Expand Down Expand Up @@ -90,10 +133,63 @@ type BundleWishlistItem implements WishlistItemInterface {
}

type GiftCardWishlistItem implements WishlistItemInterface {
sender_name: String!
sender_email: String!
gift_card_options: GiftCardOptions!
}

type GiftCardOptions {
sender_name: String
sender_email: String
recipient_name: String
recipient_email: String
amount: SelectedGiftCardAmount
amount: Money
custom_giftcard_amount: Money
message: String
}

type GroupedProductWishlistItem implements WishlistItemInterface {
grouped_products: [GroupedProductItem!]!
}

enum WishlistVisibilityEnum @doc(description: "This enumeration defines the wish list visibility types") {
PUBLIC
PRIVATE
}

type CreateWishlistOutput {
wishlist: Wishlist!
}

type DeleteWishlistOutput {
status: Boolean!
wishlists: [Wishlist!]!
}

input WishlistItemCopyInput {
wishlist_item_id: ID! @doc(description: "The ID of the item to be copied")
quantity: Float @doc(description: "The quantity of this item to copy to the destination wish list. This value can't be greater than the quantity in the source wish list.")
}

input WishlistItemMoveInput {
wishlist_item_id: ID! @doc(description: "The ID of the item to be moved")
quantity: Float @doc(description: "The quantity of this item to move to the destination wish list. This value can't be greater than the quantity in the source wish list.")
}

type UpdateWishlistOutput {
wishlist: Wishlist
}

type CopyProductsBetweenWishlistsOutput {
source_wishlist: Wishlist!
destination_wishlist: Wishlist!
}

type MoveProductsBetweenWishlistsOutput {
source_wishlist: Wishlist!
destination_wishlist: Wishlist!
}

type StoreConfig {
maximum_number_of_wishlists: Int @doc(description: "If multiple wish lists are enabled, the maximum number of wish lists the customer can have")
enable_multiple_wishlists: Boolean @doc(description: "Indicates whether customers can have multiple wish lists.")
}