Skip to content

Commit

Permalink
Updated API from documentation release
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Dec 18, 2024
1 parent 4025ec4 commit 7abe530
Show file tree
Hide file tree
Showing 11 changed files with 82 additions and 0 deletions.
12 changes: 12 additions & 0 deletions api-specs/api/types/message/ShoppingListLineItemAddedMessage.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#%RAML 1.0 DataType
(package): Message
type: ShoppingListMessage
displayName: ShoppingListLineItemAddedMessage
discriminatorValue: ShoppingListLineItemAdded
description: |
Generated after a successful [Add ShoppingListLineItem](ctp:api:type:ShoppingListAddLineItemAction) update action.
properties:
lineItem:
type: ShoppingListLineItem
description: |
[Line Item](ctp:api:type:ShoppingListLineItem) that was added to the [ShoppingList](ctp:api:type:ShoppingList).
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#%RAML 1.0 DataType
(package): Message
type: ShoppingListMessage
displayName: ShoppingListLineItemRemovedMessage
discriminatorValue: ShoppingListLineItemRemoved
description: |
Generated after a successful [Remove ShoppingListLineItem](ctp:api:type:ShoppingListRemoveLineItemAction) update action.
properties:
lineItem:
type: ShoppingListLineItem
description: |
[Line Item](ctp:api:type:ShoppingListLineItem) that was removed from the [ShoppingList](ctp:api:type:ShoppingList).
5 changes: 5 additions & 0 deletions api-specs/api/types/message/ShoppingListMessage.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#%RAML 1.0 DataType
(package): Message
type: Message
(ignoreValidators): [PolymorphicSubtypesRule]
displayName: ShoppingListMessage
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#%RAML 1.0 DataType
(package): Message
type: ShoppingListMessagePayload
displayName: ShoppingListLineItemAddedMessagePayload
discriminatorValue: ShoppingListLineItemAdded
description: |
Generated after a successful [Add ShoppingListLineItem](ctp:api:type:ShoppingListAddLineItemAction) update action.
properties:
lineItem:
type: ShoppingListLineItem
description: |
[Line Item](ctp:api:type:ShoppingListLineItem) that was added to the [ShoppingList](ctp:api:type:ShoppingList).
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#%RAML 1.0 DataType
(package): Message
type: ShoppingListMessagePayload
displayName: ShoppingListLineItemRemovedMessagePayload
discriminatorValue: ShoppingListLineItemRemoved
description: |
Generated after a successful [Remove ShoppingListLineItem](ctp:api:type:ShoppingListRemoveLineItemAction) update action.
properties:
lineItem:
type: ShoppingListLineItem
description: |
[Line Item](ctp:api:type:ShoppingListLineItem) that was removed from the [ShoppingList](ctp:api:type:ShoppingList).
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#%RAML 1.0 DataType
(package): Message
type: MessagePayload
(ignoreValidators): [PolymorphicSubtypesRule]
displayName: ShoppingListMessagePayload
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ description: |
The [ProductVariant](ctp:api:type:ProductVariant) to be included in the ShoppingListLineItem must be specified using the `productID` and `variantID`, or by the `sku`.
If the ShoppingList already contains a ShoppingListLineItem for the same Product Variant with the same Custom Fields, then only the quantity of the existing ShoppingListLineItem is increased.
A ShoppingListLineItem with an empty `variantId` is not considered the same as a ShoppingListLineItem with a `variantId` currently referring to the Master Variant.
Produces the [Shopping List Line Item Added](ctp:api:type:ShoppingListLineItemAddedMessage) Message.
example: !include ../../../examples/ShoppingList/ShoppingListAddLineItemAction.json
properties:
key?:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ type: ShoppingListUpdateAction
displayName: ShoppingListRemoveLineItemAction
discriminatorValue: removeLineItem
example: !include ../../../examples/ShoppingList/ShoppingListRemoveLineItemAction.json
description: |
Produces the [Shopping List Line Item Removed](ctp:api:type:ShoppingListLineItemRemovedMessage) Message.
properties:
lineItemId?:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ enum:
- quote
- quote-request
- review
- shopping-list
- staged-quote
- standalone-price
- store
Expand Down Expand Up @@ -63,6 +64,8 @@ enum:
Messages related to [Quote Requests](ctp:api:type:QuoteRequest).
review: |
Messages related to [Reviews](ctp:api:type:Review).
shopping-list: |
Messages related to [Shopping Lists](ctp:api:type:ShoppingList).
staged-quote: |
Messages related to [Staged Quotes](ctp:api:type:StagedQuote).
standalone-price: |
Expand Down
6 changes: 6 additions & 0 deletions api-specs/api/types/types.raml
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,9 @@ ReturnInfoSetMessage: !include message/ReturnInfoSetMessage.raml
ReviewCreatedMessage: !include message/ReviewCreatedMessage.raml
ReviewRatingSetMessage: !include message/ReviewRatingSetMessage.raml
ReviewStateTransitionMessage: !include message/ReviewStateTransitionMessage.raml
ShoppingListLineItemAddedMessage: !include message/ShoppingListLineItemAddedMessage.raml
ShoppingListLineItemRemovedMessage: !include message/ShoppingListLineItemRemovedMessage.raml
ShoppingListMessage: !include message/ShoppingListMessage.raml
StagedQuoteCreatedMessage: !include message/StagedQuoteCreatedMessage.raml
StagedQuoteDeletedMessage: !include message/StagedQuoteDeletedMessage.raml
StagedQuoteSellerCommentSetMessage: !include message/StagedQuoteSellerCommentSetMessage.raml
Expand Down Expand Up @@ -1325,6 +1328,9 @@ ReturnInfoSetMessagePayload: !include message/payload/ReturnInfoSetMessagePayloa
ReviewCreatedMessagePayload: !include message/payload/ReviewCreatedMessagePayload.raml
ReviewRatingSetMessagePayload: !include message/payload/ReviewRatingSetMessagePayload.raml
ReviewStateTransitionMessagePayload: !include message/payload/ReviewStateTransitionMessagePayload.raml
ShoppingListLineItemAddedMessagePayload: !include message/payload/ShoppingListLineItemAddedMessagePayload.raml
ShoppingListLineItemRemovedMessagePayload: !include message/payload/ShoppingListLineItemRemovedMessagePayload.raml
ShoppingListMessagePayload: !include message/payload/ShoppingListMessagePayload.raml
ShoppingListStoreSetMessagePayload: !include message/payload/ShoppingListStoreSetMessagePayload.raml
StagedQuoteCreatedMessagePayload: !include message/payload/StagedQuoteCreatedMessagePayload.raml
StagedQuoteDeletedMessagePayload: !include message/payload/StagedQuoteDeletedMessagePayload.raml
Expand Down
10 changes: 10 additions & 0 deletions api-specs/graphql/schema.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -13504,6 +13504,11 @@ type ShoppingListLineItem {
variant: ProductVariant
}

type ShoppingListLineItemAdded implements MessagePayload {
lineItem: ShoppingListLineItem!
type: String!
}

input ShoppingListLineItemDraft {
productId: String
key: String
Expand All @@ -13514,6 +13519,11 @@ input ShoppingListLineItemDraft {
addedAt: DateTime
}

type ShoppingListLineItemRemoved implements MessagePayload {
lineItem: ShoppingListLineItem!
type: String!
}

"Fields to access shopping lists. Includes direct access to a single list and searching for shopping lists."
interface ShoppingListQueryInterface {
shoppingList(
Expand Down

0 comments on commit 7abe530

Please sign in to comment.