deb0b79
#282 Thanks @p-zielinski! - Support for new endpoints: List Member Activity
a9ba013
#280 Thanks @p-zielinski! - TS fixes (VouchersListTransactionsRequestQuery, LoyaltiesListCardTransactionsRequestQuery, ProductCollectionsCreateRequestBody) - backwards compatible
2ddd6ec
#277 Thanks @p-zielinski! - Added support forv1/customers/{customerId}/activity
(methodlistActivity
) and fix typeValidationValidateStackableResponse
d532cc4
#270 Thanks @p-zielinski! - Type support for partial redemptions. General update to responses of /validations and /redemptions endpoints.
25c3f13
#260 Thanks @jkaliszuk! - Addederror
object inVoucherifyError
. Addedvalidation_rules
in VouchersCreateParameters.
8df2fed
#254 Thanks @p-zielinski! - Add support for few endpoints of Loyalties API.- Added support for new endpoints:
POST /v1/qualifications
,POST /client/v1/qualifications
(examples of usage available in readme.md) - New exported types/interfaces:
InapplicableTo
,Referrer
,ReferrerWithSummaryLoyaltyReferrals
,Customer
,CustomerWithSummaryLoyaltyReferrals
,CustomerSummary
,CustomerSummaryRedemptions
,CustomerSummaryOrders
,CustomerLoyalty
,CustomerReferrals
,Discount
,DiscountAmount_
,DiscountUnit_
,DiscountUnitBase_
,DiscountUnitMultiple_
,DiscountPercent_
,DiscountFixed_
,Order
,OrderItem
,OrderCalculated
,OrderRedemptions
,OrderItemCalculated
,QualificationsCheckEligibilityRequestBody
,QualificationsCheckEligibilityResponseBody
,QualificationsFiltersFields
,QualificationsFiltersCondition
,QualificationsFieldConditions
,QualificationsRedeemablesResponse
,QualificationsStackingRulesResponse
,QualificationsRedeemable
,QualificationsRedeemableBase
,RedeemableSingleResultResponse
,ValidationRulesAssignmentsList
, - Added optional properties to
ApplicableTo
:product_id
,product_source_id
,quantity_limit
,aggregated_quantity_limit
,amount_limit
,aggregated_amount_limit
,order_item_indices
- Added required property:
data_ref: 'data'
toApplicableToResultList
// NOTE: as this type is only used in responses, this is not a breaking change. - Added optional properties to
CustomerRequest
:birthday
andbirthdate
- Added support for new endpoints:
-
8a3bead
#252 Thanks @p-zielinski! - 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
asLoyaltiesExportCardTransactionsRequestBody
(these types are identical, both related to the export of loyalty card transactions) - Use
VouchersExportTransactionsResponseBody
asLoyaltiesExportCardTransactionsResponseBody
(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) - New exported types/interfaces:
PromotionsStacksListInCampaignResponseBody
,PromotionsStacksListResponseBody
,PromotionsStacksListRequestQuery
,PromotionsStacksGetResponseBody
,PromotionsStacksUpdateRequestBody
,PromotionsStacksUpdateResponseBody
,PromotionsStacksCreateInCampaignRequestBody
,PromotionsStacksCreateInCampaignResponseBody
,PromotionStackBase
,PromotionStack
c33499d
#246 Thanks @p-zielinski! - Add support for few endpoints of Loyalties API.- Added support for new endpoints:
GET /loyalties/{campaignId}/reward-assignments/{assignmentId}
,GET /loyalties/{campaignId}/reward-assignments/{assignmentId}/reward
,GET /loyalties/{campaignId}/tiers
,GET /loyalties/{campaignId}/tiers/{tierId}
,POST /loyalties/{campaignId}/tiers
,GET /loyalties/{campaignId}/tiers/{tierId}/earning-rules
,GET /loyalties/members/{memberId}/tiers
(examples of usage available in readme.md) - New exported types/interfaces:
LoyaltiesGetRewardAssignmentResponseBody
,LoyaltiesGetRewardDetailsResponseBody
,LoyaltiesListTiersRequestQuery
,LoyaltiesListLoyaltyTierEarningRulesRequestQuery
,LoyaltiesGetTierResponseBody
,LoyaltiesCreateTiersRequestBody
,LoyaltiesCreateTiersResponseBody
,LoyaltiesListTiersResponseBody
,LoyaltiesListMemberLoyaltyTiersResponseBody
,LoyaltiesListLoyaltyTierEarningRulesResponseBody
,EarningRule
,LoyaltyTier
,CreateLoyaltyTier
, MappingMultiply,
MappingFixed`
- Added support for new endpoints:
2d5b050
#238 Thanks @p-zielinski! - Add support for few endpoints of Loyalties API.- Added support for new endpoints:
GET /loyalties/members/{memberId}
,GET /loyalties/members/{memberId}/activities
,GET /loyalties/members/{memberId}/rewards
,POST /loyalties/{campaignId}/members/{memberId}/transfers
,GET /loyalties/{campaignId}/members/{memberId}/points-expiration
,GET /loyalties/members/{memberId}/transactions
,GET /loyalties/{campaignId}/members/{memberId}/transactions
,POST /loyalties/members/{memberId}/transactions/export
andPOST /loyalties/{campaignId}/members/{memberId}/transactions/export
(examples of usage available in readme.md) - New exported types/interfaces:
LoyaltiesTransferPointsResponseBody
,LoyaltiesTransferPointsRequestBody
,LoyaltiesListMemberRewardsRequestQuery
,LoyaltiesListMemberRewardsResponseBody
,LoyaltiesGetPointsExpirationRequestQuery
,LoyaltiesGetPointsExpirationResponseBody
,LoyaltiesListCardTransactionsRequestQuery
,LoyaltiesListCardTransactionsResponseBody
,LoyaltiesExportCardTransactionsRequestBody
,LoyaltiesExportCardTransactionsResponseBody
,LoyaltiesAddOrRemoveCardBalanceRequestBody
,LoyaltiesAddOrRemoveCardBalanceResponseBody
,LoyaltyCardTransaction
,SimpleLoyaltyVoucher
,LoyaltiesTransferPoints
,LoyaltyCardTransactionsFields
,LoyaltyCardTransactionsType
,Reward
,RewardTypeCampaign
,RewardTypeCoin
,RewardTypeMaterial
,RewardType
,RewardAssignment
- Added support for new endpoints:
e135b17
#242 Thanks @weronika-kurczyna! - Added missing methods covering Product Collections API.- Added support for new endpoints:
GET POST /product-collections
,GET DELETE /product-collections/{productCollectionId}
,GET /product-collections/${productCollectionId}/products
(examples of usage available in readme.md)- New exported types/interfaces in
ProductCollections.ts
:- Domain types:
- ProductIdentity
- SkuIdentity
- ProductBase
- SkuBase
- ProductSaved
- SkuSaved
- ProductOrSkuIdentity
- ProductCollectionIdentity
- ProductCollectionSaved
- ProductCollectionBase
- StaticProductCollectionBase
- DynamicProductCollectionBase
- Filter
- Junction
- AllowedFiltersKeys
- FiltersCondition
- 0-level types:
- ProductCollectionsCreateRequestBody
- ProductCollectionsCreateResponseBody
- ProductCollectionsListRequestQuery
- ProductCollectionsListResponseBody
- ProductCollectionsGetResponseBody
- ProductCollectionsListProductsRequestQuery
- ProductCollectionsListProductsResponseBody
- Domain types:
841b6d5
#244 Thanks @p-zielinski! - Add support for endpointGET /exports
.- New exported types/interfaces:
ExportsListRequestQuery
,ExportsListResponseBody
,ExportBase
,ExportResourceResponse
,FieldConditions
,ExportVoucher
,ExportVoucherFilters
,ExportRedemption
,ExportRedemptionFilters
,ExportCustomer
,ExportCustomerFilters
,ExportPublication
,ExportPublicationFilters
,ExportOrder
,ExportOrderFilters
,ExportPointsExpiration
,ExportPointsExpirationFilters
,ExportVoucherTransactionsExpiration
,ExportVoucherTransactionsFilters
,Junction
,FiltersCondition
,ExportCustomerFields
,ExportCustomerOrder
,ExportPublicationFields
,ExportPublicationOrder
,ExportRedemptionFields
,ExportRedemptionOrder
,ExportVoucherFields
,ExportVoucherOrder
,ExportOrderFields
,ExportOrderOrder
,ExportPointsExpirationFields
,ExportPointsExpirationOrder
,ExportVoucherTransactionsFields
,ExportVoucherTransactionsOrder
- New exported types/interfaces:
b11ce2c
#241 Thanks @p-zielinski! - 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
andPOST /loyalties/{campaignId}/earning-rules/{earningRuleId}/disable
(examples available in readme.md) - New exported types/interfaces:
LoyaltiesGetEarningRuleResponseBody
,LoyaltiesEnableEarningRulesResponseBody
,LoyaltiesDisableEarningRulesResponseBody
,EarningRuleEvent
,EarningRuleBase
,EarningRuleFixed
,EarningRuleProportionalOrder
,EarningRuleProportionalOrderAmount
,EarningRuleProportionalOrderTotalAmount
,EarningRuleProportionalOrderMetadata
,EarningRuleProportionalOrderItems
,EarningRuleProportionalOrderItemsQuantity
,EarningRuleProportionalOrderItemsAmount
,EarningRuleProportionalOrderItemsSubtotalAmount
,EarningRuleProportionalCustomerMetadata
,EarningRuleProportionalCustomEvent
,EarningRuleProportional
- Added optional parameter
calculation_type
toLoyaltyProportional
- Added support for new endpoints:
5bb69da
#229 Thanks @marcin-slezak! - Add missing methods covering Customers API.- Added support for new endpoints:
POST /customers/{customerId}/permanent-deletion
,POST /customers/bulk/async
,POST /customers/metadata/async
(examples of usage available in readme.md)
- New domain types:
CustomerBase
CustomerAddress
- New exported types/interfaces:
CustomersUpdateInBulkRequestBody
,CustomersUpdateMetadataInBulkRequestBody
,CustomersDeletePermanentlyResponseBody
- Added support for new endpoints:
644aa84
#227 Thanks @marcin-slezak! - Added support for missing CSV import endpoints ((examples of usage available in readme.md)):POST /skus/importCSV
POST /products/importCSV
POST /vouchers/importCSV
POST /customers/importCSV
POST /campaigns/campaignId/importCSV
- Added form-data
4.0.0
to SDK package
7720e31
#228 Thanks @marcin-slezak! - Add missing methods covering Categories and Campaigns API.- Added support for new endpoints (examples of usage available in readme.md):
POST /campaigns/campaignId/enable
,POST /campaigns/campaignId/disable
,GET, POST DELETE /categories
,GET PUT /categories/id
.
- New exported types/interfaces in
Categories.ts
:ListCategories
,CategoryObject
,CreateCategory
,ResponseCreateCategory
,ResponseUpdateCategory
,UpdateCategoryRequest
.
- Added support for new endpoints (examples of usage available in readme.md):
52e7f5e
#221 Thanks @p-zielinski! - Implementing the following changes:- Update axios from
0.21.4
to0.27.2
in SDK package - Added dotenv
16.3.1
to SDK package dev dependencies. - Added frame for integration tests (more info available in README.md, section "🧪 SDK Tests")
- Update axios from
a266c2a
#223 Thanks @darekg11! - Add optional timeoutMs option to VoucherifyServerSide and VoucherifyClientSide classes defiing timeout in miliseconds after which Axios is going to abort the request. By default this is equal to 0 meaining that there is no timeout beside default Voucherify's Load balancer timeout which is set to 3 minutes
d5751ea
#216 Thanks @Davies-Owen! - add amount_off_formula, percent_off_formula, unit_off_formula, and fixed_amount_formula fields to Voucher types: DiscountAmount, DiscountPercent, DiscountUnit, DiscountFixed, VoucherDiscount, and StackableRedeemableResultDiscount
2899ae6
#214 Thanks @darekg11! - Added 'metadata' property to 'order' object in 'ValidationsValidateVoucherResponse' inteface. Added 'session' property to 'ValidationsValidateVoucherResponse' interface
312d4a8
#205 Thanks @p-zielinski! - Added support for get promotion tier endpoint
e7fab63
#207 Thanks @marcin-slezak! - Added missing DiscountFixed type addressing issue #206. Affected types:- type
ClientSideValidateResponse
related to:- response for GET
/validate
- response for GET
- type
SimplePromotionTier
related to:- response GET
/promotions/validation
- response GET
- type
PromotionsCreate
related to:- params for POST
/campaigns
- params for POST
- type
PromotionsValidateResponse
related to:- response for POST
/promotions/validation
- response for POST
- type
VouchersResponse
related to:- response for POST
/redeem
- response for POST
/vouchers/qualification
- params for POST and PUT
/vouchers/${encode(voucher.code)}
- response for GET
/vouchers/${encode(code)}
- response POST
loyalties/{campaignId}/members/{memberId}/redemption
- response POST
/vouchers/${encode(code)}/enable
- response POST
/vouchers/${encode(code)}/disable
- response for POST
- type
VouchersImport
related to:- params for POST
/vouchers/import
- params for POST
- type
PromotionTier
related to:- response for GET
/promotions/tiers
- response for GET
/promotions/${encode(promotionId)}/tiers
- response for POST
/promotions/tiers/${encode(promotionsTierId)}/redemption
- response for POST
/vouchers/${encode(code)}/redemption
- response for GET
- type
PromotionTiersCreateParams
related to:- params for POST
/promotions/${encode(promotionId)}/tiers
- params for POST
- type
ValidationsValidateVoucherResponse
related to:- response for POST
/vouchers/${encode(code)}/validate
- response for POST
- type
SimpleVoucher
related to:- response GET/PUT/POST
/campaigns/${encode(name)}
- response GET
/campaigns
- params POST
/campaigns
- response POST
/campaigns/qualification
- response GET/PUT/POST
- type
4451288
#203 Thanks @darekg11! - Add 'CampaignsListResponse' type to return value of campaigns.list method
d06989b
#198 Thanks @darekg11! - Add missing 'filters' property to 'VouchersListParams' interface to allow for advanced filters for fetching resources
8e7bf47
#195 Thanks @darekg11! - Add 'active' field to 'PromotionTier' interface. Add 'PromotionTierRedeemDetailsSimple' and 'PromotionTierRedeemDetails' types and reuse them in 'RedemptionsRedeemResponse' so that 'RedemptionsRedeemStackableRedemptionResult' can return promotion_tier property
92ab4fb
#188 Thanks @darekg11! - Add explicit properties to VoucherifyError class to make it easier for TypeScript folks. Added examples of proper error handling for both classical Node.JS and for TypeScript. Examples includes different handling for networking and API errors
48a46b9
#190 Thanks @darekg11! - Add missing 'related_object_ids', 'related_object_type' and 'related_object_total' properties to 'VoucherifyError' class. Those properties are returned fmor API in case of 'resource_in_ise' error
f87ccb7
#181 Thanks @emreler! - Add 'assets' from VouchersResponse to CampaignsAddVoucherResponse type
03fc326
#179 Thanks @darekg11! - Add new 'ValidationError' type describing error that can be returned upon unsuccessful validation of single voucher or in case of stacked validations. Add this new interface to 'StackableRedeemableResultResponse' and 'ValidationsValidateVoucherResponse' types
4c4ccf3
#173 Thanks @darekg11! - Bump qs dependency to 6.9.7 version to fix CVE-2022-24999 / GHSA-hrpp-h998-j3pp
3e5f2ee
#165 Thanks @darekg11! - Bumping libraries to mitigiate some of HIGH and CRITICAL vulnerabilities
59d7f8a
#161 Thanks @Davies-Owen! - Add missing gift.balance property to VouchersResponse interface
eb0f4b1
#160 Thanks @Irene350! - VoucherType input correct enum value DISCOUNT_VOUCHER and GIFT_VOUCHER
8bb9bb5
#156 Thanks @Davies-Owen! - add missing created_at property to VouchersResponse, LoyaltiesRedeemRewardResponse, CampaignsAddVoucherResponse, and ClientSideVoucherListing interfaces
0960598
#154 Thanks @Davies-Owen! - Add missing property to OrdersCreateResponse interface
98629ca
#149 Thanks @darekg11! - Drop not required customer id property when running promotion validation. Add missing proeprties to promotion validation response
ff07c8a
#144 Thanks @darekg11! - Add missing 'name', 'start_date' and 'expiration_date' properties to PromotionsValidateResponse interface
df19c77
#141 Thanks @darekg11! - Override SimpleCustomer type to make 'id' property not required in 'RedemptionsRedeemBody' interface since passing ID of customer when redeeming is not required by design
a8557d1
#134 Thanks @salzhrani! - add metadata property to ProductsCreateResponse
e52b787
#131 Thanks @tomek-lochmanczyk-rspective! - Add function which return "Retry-After" header from response. The purpose is to get information how long it's needed to wait until new requests can be made, when api limits are reached. This ddition is backward compatible so no changes are needed to be made in older code
e965f61
#129 Thanks @Irene350! - Adding missing discount amounts on order for validate voucher type response
f8241b7
#125 Thanks @darekg11! - Added support for metadata-schemas API. Allowing to list all metadata schemas in project or retrieve single one via get method by providing schema name
a7811e7
#121 Thanks @jkaliszuk! - Added logic that allow to storage lastResponseHeaders data and get apiLimit through ApiLimitsHandler
f411c1a
#119 Thanks @darekg11! - Added support for stackable API methods - validation, redemptions, rollback for both Server Side and Client Side SDKs. Added some missing fields in already existing types definitions and cleaned up other definitions by reusing interfaces
da9e103
#117 Thanks @darekg11! - Added support for listing customer activities by customerId. Additionally user can pass query params allowing for better filtering. API Reference: https://docs.voucherify.io/reference/get-customer-activities
b5f04fa
#112 Thanks @darekg11! - Query params passed tothis.client.post
method are now correctly stringified. Added possibility to pass query params tovoucherify.promotions.validate
method in order to allow developers using SDK to pass advanced filters to restrict possible range of promotion campaigns against which validation should be performed.
-
c5c8b97
#93 Thanks @awilczek! - Support new async API methodsChanges:
- Campaign vouchers import
- added CampaignsVouchersImportResponse
- Vouchers import
- added VouchersImportResponse
- Vouchers bulkUpdate
- using new API method
- BREAKING change of VouchersBulkUpdateResponse
- BREAKING obligatory 'metadata' field in VouchersBulkUpdateObject
- Vouchers bulkUpdateMetadata
- using new API method
- BREAKING change of VouchersBulkUpdateMetadataResponse
- BREAKING obligatory 'metadata' field in VouchersBulkUpdateMetadata
- Products bulkUpdate
- using new API method
- BREAKING change of ProductsBulkUpdateResponse
- Products bulkUpdateMetadata
- using new API method
- BREAKING change of method name
- BREAKING change of ProductsBulkUpdateMetadataResponse
- Products getSku
- using new API method
- BREAKING change of method params
- changed in CR fixes
- Campaign vouchers import
8ff9b8d
#95 Thanks @pannga! - Version 1.3.0 enabled encoding in RequestController - it was used to fix encoding for both server side and client side SDKs. This introduced issue, as we did not notice that ClientSide get methods were explicitly encoding query params (toQueryParams function). That meant the query params were encoded twice and that lead to issues with characters such as %.
0425e2b
#88 Thanks @darekg11! - Allow to pass additional headers to requests made to Voucherify API. Custom headers can be passed via 'customHeaders' option available in VoucherifyServerSideOptions and VoucherifyClientSideOptions. Such option might prove to be useful when debugging
16019cf
#79 Thanks @mandraszyk! - Async Actions API support added
2a00746
#69 Thanks @pannga! - The first major version combines previously maintained Voucherify Node.js SDK and Voucherify.js. See Migration Guide to see what is changed.
-
7c491eb
#19 Thanks @pannga! - Distributions types- Used FixMe convention for unknown types
- Added Distributions types
- Removed deprecated method
- Updated Distribution types
dec48a0
#20 Thanks @pannga! - added missing method for publishing a ceratin voucher to selected campaign
-
e3285c5
#10 Thanks @eddyw! - Export missing types- export missing type
CustomerRequest
- export missing type
CustomersCommonListRequest
- export missing type
ca8e470
#6 Thanks @eddyw! - - Add JSDoc comments to all namespaces with links to https://docs.voucherify.io/- setup typedoc to generate automatic documentation