Skip to content

Commit

Permalink
Release candidate (#252)
Browse files Browse the repository at this point in the history
* changes to validateVoucher

* simple validations tests

* changelog

* Update tidy-comics-hear.md

* node 16.20

* node 16

* requested changes

* Update tidy-comics-hear.md

* add listGiftCardTransactions method

* Add tests for List Gift Card Transactions

* export gift card transactions

* add tests for List Gift Card Transactions Export

* add enum to source in DataObject

* Update Vouchers.ts

* Update new-endpoints-vouchers.md

* Update new-endpoints-vouchers.md

* add loyalty card to type enum

* Update Vouchers.ts

* Update Vouchers.ts

* Delete CHANGESET-TAMPLATE.md

* done

* naming

* fix naming

* create changeset

* add type for each transaction type

* Update Vouchers.ts

* update loyalties and rewards types

* Add WithRequiredProperty and Required

* fix methods regarding reward assignments

* Update Rewards.ts

* update changeset

* starting point

* done?

* types

* test fix

* Update PromotionsStacks.ts

* add get assignment method to rewards

* restore old interfaces

* Update tidy-comics-ironman.md

* Update Loyalties.ts

* Update Rewards.ts

* list transactions - fix order and naming of types

* export voucher transactions

* change structure to domain and 0-level types

* Update bright-mirrors-clean.md

* add list rules assignments

* change to required

* update changeset

* tests for rewards

* add validation_rules to coin reward creation

* update changeset

* update responses

* update response for get rewardassignments in loyalty

* get rid of old reward assignment

* change RewardAssignmentResponseData to RewardAssignmentCreated

* revert changes from b4ef41b

* Revert "node 16.20"

This reverts commit f869c79.

* revert changes from 6b57f8b

* revert changes from 4ded331

* revert changes from fdbfeb4

* tests fix

* change response data to created

* avoid renaming methods

* reformat prettier

* prettier

* Update tidy-comics-ironman.md

* fix doc url

* update url

* fix urls

* fix

* Update po-pis-po.md

* Revert "Update po-pis-po.md"

This reverts commit d83954d.

* Revert "fix"

This reverts commit 5e3acbc.

* remove utility types

* do not use some of the domain types

* Update Rewards.ts

* Update Loyalties.ts

* update changeset

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update Vouchers.ts

* fix validation rules assignments

* Update bright-mirrors-clean.md

* update spacing

* do not use RewardItem

* dome

* updated contributing changelog

---------

Co-authored-by: weronika-kurczyna <[email protected]>
  • Loading branch information
p-zielinski and weronika-kurczyna authored Nov 2, 2023
1 parent 515c8d7 commit 8a3bead
Show file tree
Hide file tree
Showing 25 changed files with 10,157 additions and 9,084 deletions.
85 changes: 85 additions & 0 deletions .changeset/bright-comics-ironman.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
'@voucherify/sdk': minor
---

Added support for new endpoints and adding missing types in Rewards API.

Added support for new endpoints:
- `/loyalties/{campaignId}/rewards/{assignmentId}`,
- `/loyalties/{campaignId}/tiers/{tierId}/rewards`,
- `/rewards/{rewardId}/assignments/{assignmentId}` (example available in readme.md)

New exported types/interfaces in `Loyalties.ts`:
Domain types:
- LoyaltyTierRewardItemParameters,
- LoyaltyTierRewardItemCampaignParameters,
- LoyaltyTierRewardItemCoinParameters,
- LoyaltyTierRewardItemMaterialParameters,
- LoyaltyTierRewardItemCampaignDiscountCoupons,
- LoyaltyTierRewardItemCampaignGiftVouchersAndLoyaltyProgram

0-level types:
- LoyaltiesGetRewardAssignmentResponseBody,
- LoyaltiesListLoyaltyTierRewardsResponseBody

New exported types/interfaces in `Rewards.ts`:
Domain types:
- RewardAssignment (old `RewardsAssignmentObject`),
- RewardsAssignmentCampaignOrMaterialReward,
- RewardsAssignmentCoinReward
-
0-level types:
- RewardsListAssignmentsRequestQuery (old `RewardsListAssignmentsParams`),
- RewardsListAssignmentsResponseBody (old `RewardsListAssignmentsResponse`),
- RewardsCreateAssignmentRequestBody (old `RewardsCreateAssignment`),
- RewardsCreateAssignmentCoinRewardRequestBody,
- RewardsCreateAssignmentCampaignOrMaterialRewardRequestBody,
- RewardsCreateAssignmentResponseBody (old `RewardsCreateAssignmentResponse`),
- RewardsUpdateAssignmentRequestBody (old `RewardsUpdateAssignment`),
- RewardsUpdateAssignmentResponseBody (old `RewardsUpdateAssignmentResponse`)
- RewardsGetAssignmentResponseBody (brand new)

--------------------------------------------------------

Added support for following endpoints:
- GET /vouchers/{code}/transactions (client.vouchers.listTransactions(code, query))
- POST /vouchers/{code}/transactions/export (client.vouchers.exportTransactions(code, body))
- GET /validation-rules-assignments (client.client.validationRules.listRulesAssignments(validationRuleId))

**New exported types/interfaces**
Domain types:
- GiftCardTransaction
- GiftCardTransactionBase
GiftCardTransactionDetails
- GiftCardTransactionRedemptionDetails
- GiftCardTransactionRefundDetails
- GiftCardTransactionAdditionDetails
- GiftCardTransactionRemovalDetails
- VoucherTransaction
- VoucherTransactionsExportFields
- ValidationRulesAssignment

0-level types:
- VouchersListTransactionsRequestQuery
- VouchersListTransactionsResponseBody
- VouchersExportTransactionsRequestBody
- VouchersExportTransactionsResponseBody
- ValidationRulesListRulesAssignmentsRequestQuery
- ValidationRulesListRulesAssignmentsResponseBody

**Other changes**
- Use `VouchersExportTransactionsRequestBody` as `LoyaltiesExportCardTransactionsRequestBody` (these types are identical, both related to the export of loyalty card transactions)
- Use `VouchersExportTransactionsResponseBody` as `LoyaltiesExportCardTransactionsResponseBody` (these types are identical, both related to the export of loyalty card transactions)

----------------------------------------------------------------

New exported types/interfaces in `Categories.ts`:
- CategoriesListRequestQuery

Added support for query parameters(CategoriesListRequestQuery) in `/categories` (categories.list method)

----------------------------------------------------------------

Add support for few endpoints of Loyalties API:
- Added support for new endpoints: `GET /promotions/{campaignId}/stacks`, `GET /promotions/{campaignId}/stacks`, `GET PUT DELETE /promotions/{campaignId}/stacks/{stackId}`, `GET /promotions/stacks` [(examples of usage available in readme.md)](..%2F..%2Fpackages%2Fsdk%2FREADME.md)
- New exported types/interfaces: `PromotionsStacksListInCampaignResponseBody`, `PromotionsStacksListResponseBody`, `PromotionsStacksListRequestQuery`, `PromotionsStacksGetResponseBody`, `PromotionsStacksUpdateRequestBody`, `PromotionsStacksUpdateResponseBody`, `PromotionsStacksCreateInCampaignRequestBody`, `PromotionsStacksCreateInCampaignResponseBody`, `PromotionStackBase`, `PromotionStack`
9 changes: 0 additions & 9 deletions CHANGESET-TAMPLATE.md

This file was deleted.

Loading

0 comments on commit 8a3bead

Please sign in to comment.