Skip to content

Commit

Permalink
Merge pull request #6788 from reactioncommerce/feat/addtional-fields
Browse files Browse the repository at this point in the history
feat: add additional fields to promotions
  • Loading branch information
vannguyenn committed Feb 9, 2023
2 parents a91fb42 + 9649323 commit 4e2b811
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
18 changes: 18 additions & 0 deletions packages/api-plugin-promotions/src/schemas/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ type Promotion {

"When was this record last updated"
updatedAt: Date!

"Call to Action message a customer sees in the storefront PDP to encourage customers to use the promotion"
callToActionMessage: String

"URL to the Terms and Conditions so that customers can get more information about the promotion"
termsAndConditionsUrl: String
}

"A applied promotion on the cart"
Expand Down Expand Up @@ -240,6 +246,12 @@ input PromotionCreateInput {

"Definition of how this promotion can be combined (none, per-type, or all)"
stackability: StackabilityInput

"Call to Action message a customer sees in the storefront PDP to encourage customers to use the promotion"
callToActionMessage: String

"URL to the Terms and Conditions so that customers can get more information about the promotion"
termsAndConditionsUrl: String
}

input PromotionDuplicateArchiveInput {
Expand Down Expand Up @@ -293,6 +305,12 @@ input PromotionUpdateInput {

"What is the current state of the promotion"
state: PromotionState

"Call to Action message a customer sees in the storefront PDP to encourage customers to use the promotion"
callToActionMessage: String

"URL to the Terms and Conditions so that customers can get more information about the promotion"
termsAndConditionsUrl: String
}

type PromotionUpdatedPayload {
Expand Down
8 changes: 8 additions & 0 deletions packages/api-plugin-promotions/src/simpleSchemas.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ export const Promotion = new SimpleSchema({
},
"updatedAt": {
type: Date
},
"callToActionMessage": {
type: String,
optional: true
},
"termsAndConditionsUrl": {
type: String,
optional: true
}
});

Expand Down
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

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

0 comments on commit 4e2b811

Please sign in to comment.