Skip to content

Commit

Permalink
feat: Add shouldSplitItem to the StoreOrder type
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfp13 committed Oct 25, 2024
1 parent 180d1b1 commit 00b6f32
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
4 changes: 3 additions & 1 deletion packages/api/src/__generated__/schema.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/api/src/typeDefs/cart.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Shopping cart information.
"""
type StoreCart {
"""
Order information, including `orderNumber` and `acceptedOffer`.
Order information, including `orderNumber`, `acceptedOffer` and `shouldSplitItem`.
"""
order: StoreOrder!
"""
Expand Down
4 changes: 4 additions & 0 deletions packages/api/src/typeDefs/order.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ type StoreOrder {
Array with information on each accepted offer.
"""
acceptedOffer: [StoreOffer!]!
"""
Indicates whether or not items with attachments should be split.
"""
shouldSplitItem: Boolean
}

"""
Expand Down
4 changes: 2 additions & 2 deletions packages/core/@generated/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const documents = {
types.ServerCollectionPageQueryDocument,
'\n query ServerProductQuery($locator: [IStoreSelectedFacet!]!) {\n ...ServerProduct\n product(locator: $locator) {\n id: productID\n\n seo {\n title\n description\n canonical\n }\n\n brand {\n name\n }\n\n sku\n gtin\n name\n description\n releaseDate\n\n breadcrumbList {\n itemListElement {\n item\n name\n position\n }\n }\n\n image {\n url\n alternateName\n }\n\n offers {\n lowPrice\n highPrice\n lowPriceWithTaxes\n priceCurrency\n offers {\n availability\n price\n priceValidUntil\n priceCurrency\n itemCondition\n seller {\n identifier\n }\n }\n }\n\n isVariantOf {\n productGroupID\n }\n\n ...ProductDetailsFragment_product\n }\n }\n':
types.ServerProductQueryDocument,
'\n mutation ValidateCartMutation($cart: IStoreCart!, $session: IStoreSession!) {\n validateCart(cart: $cart, session: $session) {\n order {\n orderNumber\n acceptedOffer {\n ...CartItem\n }\n }\n messages {\n ...CartMessage\n }\n }\n }\n\n fragment CartMessage on StoreCartMessage {\n text\n status\n }\n\n fragment CartItem on StoreOffer {\n seller {\n identifier\n }\n quantity\n price\n priceWithTaxes\n listPrice\n listPriceWithTaxes\n itemOffered {\n ...CartProductItem\n }\n }\n\n fragment CartProductItem on StoreProduct {\n sku\n name\n unitMultiplier\n image {\n url\n alternateName\n }\n brand {\n name\n }\n isVariantOf {\n productGroupID\n name\n skuVariants {\n activeVariations\n slugsMap\n availableVariations\n }\n }\n gtin\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n }\n':
'\n mutation ValidateCartMutation($cart: IStoreCart!, $session: IStoreSession!) {\n validateCart(cart: $cart, session: $session) {\n order {\n orderNumber\n acceptedOffer {\n ...CartItem\n }\n shouldSplitItem\n }\n messages {\n ...CartMessage\n }\n }\n }\n\n fragment CartMessage on StoreCartMessage {\n text\n status\n }\n\n fragment CartItem on StoreOffer {\n seller {\n identifier\n }\n quantity\n price\n priceWithTaxes\n listPrice\n listPriceWithTaxes\n itemOffered {\n ...CartProductItem\n }\n }\n\n fragment CartProductItem on StoreProduct {\n sku\n name\n unitMultiplier\n image {\n url\n alternateName\n }\n brand {\n name\n }\n isVariantOf {\n productGroupID\n name\n skuVariants {\n activeVariations\n slugsMap\n availableVariations\n }\n }\n gtin\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n }\n':
types.ValidateCartMutationDocument,
'\n mutation SubscribeToNewsletter($data: IPersonNewsletter!) {\n subscribeToNewsletter(data: $data) {\n id\n }\n }\n':
types.SubscribeToNewsletterDocument,
Expand Down Expand Up @@ -140,7 +140,7 @@ export function gql(
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function gql(
source: '\n mutation ValidateCartMutation($cart: IStoreCart!, $session: IStoreSession!) {\n validateCart(cart: $cart, session: $session) {\n order {\n orderNumber\n acceptedOffer {\n ...CartItem\n }\n }\n messages {\n ...CartMessage\n }\n }\n }\n\n fragment CartMessage on StoreCartMessage {\n text\n status\n }\n\n fragment CartItem on StoreOffer {\n seller {\n identifier\n }\n quantity\n price\n priceWithTaxes\n listPrice\n listPriceWithTaxes\n itemOffered {\n ...CartProductItem\n }\n }\n\n fragment CartProductItem on StoreProduct {\n sku\n name\n unitMultiplier\n image {\n url\n alternateName\n }\n brand {\n name\n }\n isVariantOf {\n productGroupID\n name\n skuVariants {\n activeVariations\n slugsMap\n availableVariations\n }\n }\n gtin\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n }\n'
source: '\n mutation ValidateCartMutation($cart: IStoreCart!, $session: IStoreSession!) {\n validateCart(cart: $cart, session: $session) {\n order {\n orderNumber\n acceptedOffer {\n ...CartItem\n }\n shouldSplitItem\n }\n messages {\n ...CartMessage\n }\n }\n }\n\n fragment CartMessage on StoreCartMessage {\n text\n status\n }\n\n fragment CartItem on StoreOffer {\n seller {\n identifier\n }\n quantity\n price\n priceWithTaxes\n listPrice\n listPriceWithTaxes\n itemOffered {\n ...CartProductItem\n }\n }\n\n fragment CartProductItem on StoreProduct {\n sku\n name\n unitMultiplier\n image {\n url\n alternateName\n }\n brand {\n name\n }\n isVariantOf {\n productGroupID\n name\n skuVariants {\n activeVariations\n slugsMap\n availableVariations\n }\n }\n gtin\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n }\n'
): typeof import('./graphql').ValidateCartMutationDocument
/**
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
Expand Down
7 changes: 5 additions & 2 deletions packages/core/@generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ export type StoreBreadcrumbList = {
export type StoreCart = {
/** List of shopping cart messages. */
messages: Array<StoreCartMessage>
/** Order information, including `orderNumber` and `acceptedOffer`. */
/** Order information, including `orderNumber`, `acceptedOffer` and `shouldSplitItem`. */
order: StoreOrder
}

Expand Down Expand Up @@ -887,6 +887,8 @@ export type StoreOrder = {
acceptedOffer: Array<StoreOffer>
/** ID of the order in [VTEX order management](https://help.vtex.com/en/tutorial/license-manager-resources-oms--60QcBsvWeum02cFi3GjBzg#). */
orderNumber: Scalars['String']['output']
/** Indicates whether or not items with attachments should be split. */
shouldSplitItem: Maybe<Scalars['Boolean']['output']>
}

/** Organization. */
Expand Down Expand Up @@ -1320,6 +1322,7 @@ export type ValidateCartMutationMutation = {
validateCart: {
order: {
orderNumber: string
shouldSplitItem: boolean | null
acceptedOffer: Array<{
quantity: number
price: number
Expand Down Expand Up @@ -2069,7 +2072,7 @@ export const ServerProductQueryDocument = {
export const ValidateCartMutationDocument = {
__meta__: {
operationName: 'ValidateCartMutation',
operationHash: '324471076994dca94a47adcaf1c6b8f7896e1b4f',
operationHash: 'c2b3f8bff73ebf6ac79d758c66cabbc21ba9fcc0',
},
} as unknown as TypedDocumentString<
ValidateCartMutationMutation,
Expand Down

0 comments on commit 00b6f32

Please sign in to comment.