Skip to content
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

Pz/types 007 - EarningRules #241

Merged
merged 11 commits into from
Oct 9, 2023

Conversation

p-zielinski
Copy link
Contributor

@p-zielinski p-zielinski commented Oct 4, 2023


'@voucherify/sdk': minor

Add support for 3 missing endpoints in loyalties api. Corrected a typo in one of loyalties api method.

  • Added support for new endpoints: GET /loyalties/{campaignId}/earning-rules/{earningRuleId}, POST /loyalties/{campaignId}/earning-rules/{earningRuleId}/enable and POST /loyalties/{campaignId}/earning-rules/{earningRuleId}/disable (examples available in readme.md)
  • New exported types/interfaces: LoyaltiesGetEarningRuleResponseBody, LoyaltiesEnableEarningRulesResponseBody, LoyaltiesDisableEarningRulesResponseBody, EarningRuleEvent, EarningRuleBase, EarningRuleLoyaltyFixed, EarningRuleLoyaltyProportionalOrder, EarningRuleLoyaltyProportionalOrderAmount, EarningRuleLoyaltyProportionalOrderTotalAmount, EarningRuleLoyaltyProportionalOrderMetadata, EarningRuleLoyaltyProportionalOrderItems, EarningRuleLoyaltyProportionalOrderItemsQuantity, EarningRuleLoyaltyProportionalOrderItemsAmount, EarningRuleLoyaltyProportionalOrderItemsSubtotalAmount, EarningRuleLoyaltyProportionalCustomer, EarningRuleLoyaltyProportionalCustomEvent, EarningRuleLoyaltyProportional

@p-zielinski p-zielinski marked this pull request as ready for review October 4, 2023 19:33
packages/sdk/src/Loyalties.ts Outdated Show resolved Hide resolved
packages/sdk/src/types/Loyalties.ts Show resolved Hide resolved
| 'customer.loyalty.tier.joined'
| 'customer.loyalty.tier.left'

export interface EarningRuleLoyaltyFixed {
Copy link
Contributor

Choose a reason for hiding this comment

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

I just wonder about the naming - do we need the word Loyalty in EarningRuleLoyaltyFixed interface name? The same with all names below...

@p-zielinski
Copy link
Contributor Author

@marcin-slezak marcin-slezak merged commit b11ce2c into voucherifyio:main Oct 9, 2023
1 check passed
@github-actions github-actions bot mentioned this pull request Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants