@voucherify/sdk 2.9.0 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/types/Loyalties.d.ts +2 -0
- package/dist/types/Orders.d.ts +1 -1
- package/dist/types/Vouchers.d.ts +3 -0
- package/dist/voucherifysdk.esm.js +3 -2
- package/dist/voucherifysdk.esm.js.map +1 -1
- package/dist/voucherifysdk.umd.development.js +3 -2
- package/dist/voucherifysdk.umd.development.js.map +1 -1
- package/dist/voucherifysdk.umd.production.min.js +1 -1
- package/dist/voucherifysdk.umd.production.min.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @voucherify/sdk
|
|
2
2
|
|
|
3
|
+
## 2.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`2378764`](https://github.com/voucherifyio/voucherify-js-sdk/commit/23787647c22b31d5ca00908100d941ed27b1cea6) [#288](https://github.com/voucherifyio/voucherify-js-sdk/pull/288) Thanks [@awilczek](https://github.com/awilczek)! - Upgrade axios (CVE)
|
|
8
|
+
|
|
9
|
+
* [`8c843a8`](https://github.com/voucherifyio/voucherify-js-sdk/commit/8c843a82eb8720dc68f9c49baf02ebda1d24999f) [#286](https://github.com/voucherifyio/voucherify-js-sdk/pull/286) Thanks [@p-zielinski](https://github.com/p-zielinski)! - Added missing type properties in voucher.loyalty_card - for example for requesting voucher/loyalty member
|
|
10
|
+
|
|
3
11
|
## 2.9.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1745,7 +1745,7 @@ Check our [MIGRATION GUIDE](./MIGRATION.md) to learn more about switching to our
|
|
|
1745
1745
|
|
|
1746
1746
|
Voucherify JS SDK includes TypeScript declarations for our latest API. We recommend using TypeScript Version 4.2.
|
|
1747
1747
|
|
|
1748
|
-
|
|
1748
|
+
Explore also [Voucherify TS examples](../../examples/sdk/with-nodejs-typescript "TypeScript examples").
|
|
1749
1749
|
|
|
1750
1750
|
# <a name="error-handling"></a>😨 Error handling
|
|
1751
1751
|
|
package/dist/types/Orders.d.ts
CHANGED
|
@@ -143,7 +143,7 @@ export declare type OrderCalculated = {
|
|
|
143
143
|
items_applied_discount_amount?: number;
|
|
144
144
|
total_applied_discount_amount?: number;
|
|
145
145
|
items?: OrderItemCalculated[];
|
|
146
|
-
metadata
|
|
146
|
+
metadata?: Record<string, unknown>;
|
|
147
147
|
customer?: CustomerId | CustomerWithSummaryLoyaltyReferrals;
|
|
148
148
|
customer_id: string | null;
|
|
149
149
|
referrer?: ReferrerId | ReferrerWithSummaryLoyaltyReferrals;
|
package/dist/types/Vouchers.d.ts
CHANGED
|
@@ -81,6 +81,7 @@ class RequestController {
|
|
|
81
81
|
this.timeoutMs = timeoutMs;
|
|
82
82
|
this.request = axios.create({
|
|
83
83
|
baseURL: `${this.baseURL}/${this.basePath}/`,
|
|
84
|
+
allowAbsoluteUrls: false,
|
|
84
85
|
headers: this.headers,
|
|
85
86
|
responseType: 'json'
|
|
86
87
|
});
|
|
@@ -1968,7 +1969,7 @@ function VoucherifyServerSide(options) {
|
|
|
1968
1969
|
let headers = {
|
|
1969
1970
|
'X-App-Id': options.applicationId,
|
|
1970
1971
|
'X-App-Token': options.secretKey,
|
|
1971
|
-
'X-Voucherify-Channel': options.channel || `${environment()}-SDK-v${"2.9.
|
|
1972
|
+
'X-Voucherify-Channel': options.channel || `${environment()}-SDK-v${"2.9.1"}`,
|
|
1972
1973
|
'Content-Type': 'application/json'
|
|
1973
1974
|
};
|
|
1974
1975
|
|
|
@@ -2234,7 +2235,7 @@ function VoucherifyClientSide(options) {
|
|
|
2234
2235
|
let headers = {
|
|
2235
2236
|
'X-Client-Application-Id': options.clientApplicationId,
|
|
2236
2237
|
'X-Client-Token': options.clientSecretKey,
|
|
2237
|
-
'X-Voucherify-Channel': `${environment()}-ClientSide-SDK-v${"2.9.
|
|
2238
|
+
'X-Voucherify-Channel': `${environment()}-ClientSide-SDK-v${"2.9.1"}`
|
|
2238
2239
|
};
|
|
2239
2240
|
|
|
2240
2241
|
if (environment().startsWith('Node')) {
|