-
Notifications
You must be signed in to change notification settings - Fork 151
Wishlist Update schemas with UID changes #454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
RakeshJesadiya
wants to merge
4
commits into
magento:master
Choose a base branch
from
RakeshJesadiya:customer-files-uid-update
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
resolved conflict with PR
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 { | ||
|
|
@@ -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") | ||
|
|
@@ -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 { | ||
|
|
@@ -33,8 +58,9 @@ type WishlistItems { | |
| } | ||
|
|
||
| input WishlistItemUpdateInput { | ||
| wishlist_item_id: ID | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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!] | ||
| } | ||
|
|
@@ -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!] | ||
|
|
@@ -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.") | ||
| } | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.