@artisan-commerce/types 0.14.0-canary.14 → 0.14.0-canary.16
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
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.14.0-canary.16](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.15...@artisan-commerce/types@0.14.0-canary.16) (2021-10-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **global:** fix builder and types to adjust better to reality ([11cdb93](https://bitbucket.org/tradesystem/artisn_sdk/commit/11cdb93199d5a57d12f5aa6f7ece17f0c38c0521))
|
|
12
|
+
* **global:** fix unnecessary params on functions and add docs ([3830d7d](https://bitbucket.org/tradesystem/artisn_sdk/commit/3830d7d8b0044ca580bcbcc4acd0b0ea5a8b0266))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [0.14.0-canary.15](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.14...@artisan-commerce/types@0.14.0-canary.15) (2021-10-05)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **global:** fix ProductDetail builder and update its types ([cdc6cf9](https://bitbucket.org/tradesystem/artisn_sdk/commit/cdc6cf9ed2e7ff1a340bc691b0dc1156bc682d38))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.14.0-canary.14](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.13...@artisan-commerce/types@0.14.0-canary.14) (2021-10-01)
|
|
7
26
|
|
|
8
27
|
|
|
@@ -5,21 +5,17 @@
|
|
|
5
5
|
* @since 0.5.14
|
|
6
6
|
*/
|
|
7
7
|
export interface Country {
|
|
8
|
-
/** Country's
|
|
9
|
-
|
|
8
|
+
/** Country's identifier */
|
|
9
|
+
id: number;
|
|
10
10
|
/** Country's name */
|
|
11
11
|
name: string;
|
|
12
12
|
/** Country ISO code, see {@link CountryCode} */
|
|
13
13
|
code: CountryCode;
|
|
14
|
-
/** Whether or not the country is active */
|
|
15
|
-
active: boolean;
|
|
16
14
|
/**
|
|
17
15
|
* Object which contains information about country's currency,
|
|
18
16
|
* see {@link CountryCurrency}
|
|
19
17
|
*/
|
|
20
18
|
currency: CountryCurrency;
|
|
21
|
-
/** Array of taxes usually applied on the country, see {@link CountryTax} */
|
|
22
|
-
taxes: CountryTax[];
|
|
23
19
|
}
|
|
24
20
|
/**
|
|
25
21
|
* Representation of a country's currency.
|
|
@@ -28,26 +24,14 @@ export interface Country {
|
|
|
28
24
|
* @since 0.5.14
|
|
29
25
|
*/
|
|
30
26
|
export interface CountryCurrency {
|
|
31
|
-
/** Currency's
|
|
32
|
-
|
|
27
|
+
/** Currency's identifier */
|
|
28
|
+
id: number;
|
|
33
29
|
/** Currency's name */
|
|
34
30
|
name: string;
|
|
35
31
|
/** Currency's symbol */
|
|
36
32
|
sign: string;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
* Representation of a country's tax.
|
|
40
|
-
*
|
|
41
|
-
* @interface CountryTax
|
|
42
|
-
* @since 0.5.14
|
|
43
|
-
*/
|
|
44
|
-
export interface CountryTax {
|
|
45
|
-
/** Tax name */
|
|
46
|
-
tax: string;
|
|
47
|
-
/** Value added tax rate */
|
|
48
|
-
vatRate: string;
|
|
49
|
-
/** Tax percentage */
|
|
50
|
-
percentage: number;
|
|
33
|
+
/** Currency's external identifier */
|
|
34
|
+
external_id: string;
|
|
51
35
|
}
|
|
52
36
|
/**
|
|
53
37
|
* List of country codes currently supported.
|
|
@@ -16,17 +16,23 @@ export interface Wallet {
|
|
|
16
16
|
* Benefit information.
|
|
17
17
|
*
|
|
18
18
|
* @interface Benefit
|
|
19
|
-
* @since 0.
|
|
19
|
+
* @since 0.1.0
|
|
20
20
|
*/
|
|
21
21
|
export interface Benefit {
|
|
22
|
-
/** The
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
|
|
22
|
+
/** The account id of the benefit */
|
|
23
|
+
accountId: number;
|
|
24
|
+
/**
|
|
25
|
+
* An array of benefit awards if the benefit is of `PRODUCT` type, and an
|
|
26
|
+
* object if the benefit is of `ALTER_DELIVERY` or `DISCOUNT` type.
|
|
27
|
+
* see {@link Award}
|
|
28
|
+
* */
|
|
29
|
+
award: Award | Award[];
|
|
26
30
|
/** Benefit id */
|
|
27
31
|
benefitId: number;
|
|
28
32
|
/** Benefit wallet id */
|
|
29
33
|
benefitWalletId: number;
|
|
34
|
+
/** The channel id of the benefit */
|
|
35
|
+
channelId: number;
|
|
30
36
|
/** Benefit code in back-end */
|
|
31
37
|
code: null;
|
|
32
38
|
/** Combined */
|
|
@@ -41,6 +47,8 @@ export interface Benefit {
|
|
|
41
47
|
expirationDate: string;
|
|
42
48
|
/** External benefit id */
|
|
43
49
|
externalId: null;
|
|
50
|
+
/** The user wallet id */
|
|
51
|
+
hash: string;
|
|
44
52
|
/** Benefit images, see {@link CDNImage} */
|
|
45
53
|
image: CDNImage[];
|
|
46
54
|
/** The award limit */
|
|
@@ -59,12 +67,8 @@ export interface Benefit {
|
|
|
59
67
|
type: BenefitTypes;
|
|
60
68
|
/** Benefit update date */
|
|
61
69
|
updatedAt: string;
|
|
62
|
-
/** The channel id of the benefit */
|
|
63
|
-
channelId: number;
|
|
64
70
|
/** The vendor id of the benefit */
|
|
65
71
|
vendorId: number;
|
|
66
|
-
/** The account id of the benefit */
|
|
67
|
-
accountId: number;
|
|
68
72
|
}
|
|
69
73
|
/**
|
|
70
74
|
* Award information.
|
|
@@ -81,6 +85,14 @@ export interface Award {
|
|
|
81
85
|
discountPercentage: number;
|
|
82
86
|
/** Benefit discount value */
|
|
83
87
|
discountValue: null;
|
|
88
|
+
/** Quantity of allowed products */
|
|
89
|
+
amount: number;
|
|
90
|
+
/** Product description associated with the benefit award */
|
|
91
|
+
productDescription: string;
|
|
92
|
+
/** Product unique identifier associated with the benefit award */
|
|
93
|
+
productId: number;
|
|
94
|
+
/** The vendor id of the award */
|
|
95
|
+
vendorId: number;
|
|
84
96
|
}
|
|
85
97
|
/**
|
|
86
98
|
* Applied benefit array in shopping cart.
|
|
@@ -222,8 +222,8 @@ export interface ProductDetails extends BaseProduct {
|
|
|
222
222
|
/** Array of product questions, see {@link ProductQuestion} */
|
|
223
223
|
questions: ProductQuestion[];
|
|
224
224
|
/** The benefit id of the product */
|
|
225
|
-
benefitId
|
|
226
|
-
categories
|
|
225
|
+
benefitId: number | null;
|
|
226
|
+
categories: Category[] | null;
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
229
229
|
* Representation of a Commerce Product Answer.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artisan-commerce/types",
|
|
3
3
|
"description": "Artisn's types and interfaces library",
|
|
4
|
-
"version": "0.14.0-canary.
|
|
4
|
+
"version": "0.14.0-canary.16",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"prettier": "^2.1.2",
|
|
46
46
|
"webpack-bundle-analyzer": "^3.9.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "e77a0e2f39ae2d3f493e3fca1a921089952d3954"
|
|
49
49
|
}
|