@voucherify/sdk 2.0.9 → 2.0.10
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/dist/MetadataSchemas.d.ts +6 -0
- package/dist/types/Products.d.ts +1 -0
- package/dist/voucherifysdk.esm.js +10 -2
- package/dist/voucherifysdk.esm.js.map +1 -1
- package/dist/voucherifysdk.umd.development.js +10 -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 +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @voucherify/sdk
|
|
2
2
|
|
|
3
|
+
## 2.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e03db27`](https://github.com/voucherifyio/voucherify-js-sdk/commit/e03db276226a579e7d886a8acb5db58b703a6989) [#136](https://github.com/voucherifyio/voucherify-js-sdk/pull/136) Thanks [@darekg11](https://github.com/darekg11)! - Added documentation links to MetadataSchemas API methods
|
|
8
|
+
|
|
9
|
+
* [`a8557d1`](https://github.com/voucherifyio/voucherify-js-sdk/commit/a8557d1c70f0732c6996175d3b1e917c29986cee) [#134](https://github.com/voucherifyio/voucherify-js-sdk/pull/134) Thanks [@salzhrani](https://github.com/salzhrani)! - add metadata property to ProductsCreateResponse
|
|
10
|
+
|
|
3
11
|
## 2.0.9
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -3,6 +3,12 @@ import type { RequestController } from './RequestController';
|
|
|
3
3
|
export declare class MetadataSchemas {
|
|
4
4
|
private client;
|
|
5
5
|
constructor(client: RequestController);
|
|
6
|
+
/**
|
|
7
|
+
* @see https://docs.voucherify.io/reference/list-metadata-schemas
|
|
8
|
+
*/
|
|
6
9
|
list(): Promise<T.MetadataSchemasListResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* @see https://docs.voucherify.io/reference/get-metadata-schema
|
|
12
|
+
*/
|
|
7
13
|
get(schemaName: string): Promise<T.MetadataSchema>;
|
|
8
14
|
}
|
package/dist/types/Products.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export interface ProductsCreateResponse {
|
|
|
22
22
|
attributes?: string[];
|
|
23
23
|
created_at: string;
|
|
24
24
|
image_url?: string;
|
|
25
|
+
metadata?: Record<string, any>;
|
|
25
26
|
}
|
|
26
27
|
export declare type ProductsGetResponse = ProductsCreateResponse & ProductsGetResponseSkus;
|
|
27
28
|
export declare type ProductsUpdate = {
|
|
@@ -1370,10 +1370,18 @@ class MetadataSchemas {
|
|
|
1370
1370
|
this.client = void 0;
|
|
1371
1371
|
this.client = client;
|
|
1372
1372
|
}
|
|
1373
|
+
/**
|
|
1374
|
+
* @see https://docs.voucherify.io/reference/list-metadata-schemas
|
|
1375
|
+
*/
|
|
1376
|
+
|
|
1373
1377
|
|
|
1374
1378
|
list() {
|
|
1375
1379
|
return this.client.get('/metadata-schemas');
|
|
1376
1380
|
}
|
|
1381
|
+
/**
|
|
1382
|
+
* @see https://docs.voucherify.io/reference/get-metadata-schema
|
|
1383
|
+
*/
|
|
1384
|
+
|
|
1377
1385
|
|
|
1378
1386
|
get(schemaName) {
|
|
1379
1387
|
return this.client.get(`/metadata-schemas/${encode(schemaName)}`);
|
|
@@ -1411,7 +1419,7 @@ function VoucherifyServerSide(options) {
|
|
|
1411
1419
|
let headers = {
|
|
1412
1420
|
'X-App-Id': options.applicationId,
|
|
1413
1421
|
'X-App-Token': options.secretKey,
|
|
1414
|
-
'X-Voucherify-Channel': options.channel || `${environment()}-SDK-v${"2.0.
|
|
1422
|
+
'X-Voucherify-Channel': options.channel || `${environment()}-SDK-v${"2.0.10"}`,
|
|
1415
1423
|
'Content-Type': 'application/json'
|
|
1416
1424
|
};
|
|
1417
1425
|
|
|
@@ -1660,7 +1668,7 @@ function VoucherifyClientSide(options) {
|
|
|
1660
1668
|
let headers = {
|
|
1661
1669
|
'X-Client-Application-Id': options.clientApplicationId,
|
|
1662
1670
|
'X-Client-Token': options.clientSecretKey,
|
|
1663
|
-
'X-Voucherify-Channel': `${environment()}-ClientSide-SDK-v${"2.0.
|
|
1671
|
+
'X-Voucherify-Channel': `${environment()}-ClientSide-SDK-v${"2.0.10"}`
|
|
1664
1672
|
};
|
|
1665
1673
|
|
|
1666
1674
|
if (environment().startsWith('Node')) {
|