@artisan-commerce/types 0.14.0-canary.6 → 0.14.0-canary.7

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,14 @@
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.7](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.6...@artisan-commerce/types@0.14.0-canary.7) (2021-08-24)
7
+
8
+ **Note:** Version bump only for package @artisan-commerce/types
9
+
10
+
11
+
12
+
13
+
6
14
  ## [0.14.0-canary.6](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.5...@artisan-commerce/types@0.14.0-canary.6) (2021-08-23)
7
15
 
8
16
 
@@ -1,8 +1,10 @@
1
- import { ShoppingCart } from "./shoppingCart.types";
1
+ import { BillTotalCategory, ShoppingCart } from "./shoppingCart.types";
2
2
  import { ShippingAddress } from "./shippingAddress.types";
3
3
  import { BillingData } from "./billingData.types";
4
4
  import { StepCategory, StepCode } from "./fulfillment.types";
5
5
  import { BaseUser } from "./user.types";
6
+ import { Store } from "./store.types";
7
+ import { CartProductQuestion } from "./product.types";
6
8
  /**
7
9
  * Representation of common properties of the order.
8
10
  *
@@ -78,7 +80,7 @@ export interface BaseOrder {
78
80
  * @since 0.1.0
79
81
  * @extends {{@link ShoppingCart}
80
82
  */
81
- export interface OrderShoppingCart extends ShoppingCart {
83
+ export interface OrderShoppingCart extends Omit<ShoppingCart, "stores"> {
82
84
  /** Order shopping cart comment */
83
85
  comment: string | null;
84
86
  /** Order instructions */
@@ -107,6 +109,8 @@ export interface OrderShoppingCart extends ShoppingCart {
107
109
  * see {@link OrderPaymentMethod}
108
110
  */
109
111
  rejectedPaymentMethods: OrderPaymentMethod[] | null;
112
+ /** An array of OrderStore, see {@link OrderStore} */
113
+ stores: OrderStore[];
110
114
  }
111
115
  /**
112
116
  * Order common fields.
@@ -124,6 +128,75 @@ export interface OrderCommonFields {
124
128
  /** Order update date **/
125
129
  updated_at: string;
126
130
  }
131
+ /**
132
+ * The stores associated with the order.
133
+ *
134
+ * @interface OrderStore
135
+ * @since 0.1.0
136
+ * @extends {{@link Store}
137
+ */
138
+ export interface OrderStore extends Store {
139
+ /** Order store id */
140
+ id: number;
141
+ /** Order unique identifier */
142
+ orderId: number;
143
+ /** Order digital command sent */
144
+ digitalCommandSent: string;
145
+ /** Order store status unique identifier */
146
+ statusId: number;
147
+ /** Order store status name */
148
+ statusName: string;
149
+ /** Order store status code, see {@link StepCode} */
150
+ statusCode: StepCode;
151
+ /** Order store bill total, see {@link OrderBillTotal} */
152
+ billStoreTotal: OrderBillTotal;
153
+ /** An array of OrderProducts, see {@link OrderProduct} */
154
+ products: OrderProduct[];
155
+ }
156
+ /**
157
+ * The product associated with the order.
158
+ *
159
+ * @interface OrderProduct
160
+ * @since 0.1.0
161
+ */
162
+ export interface OrderProduct {
163
+ /** Order product id */
164
+ id: number;
165
+ /** Order product unique identifier */
166
+ productId: number;
167
+ /** Order product name */
168
+ productName: string;
169
+ /** Order product comment */
170
+ comment: string;
171
+ /** Order bill product, see {@link OrderBillProduct} */
172
+ billProduct: OrderBillProduct;
173
+ /** Order bill product and answers, see {@link OrderBillTotal} */
174
+ billProductAndAnswers: OrderBillTotal;
175
+ /** Order product questions and answers, see {@link CartProductQuestion} */
176
+ questionsAndAnswers: CartProductQuestion[];
177
+ }
178
+ /**
179
+ * The total bill associated with a product of order.
180
+ *
181
+ * @interface OrderBillTotal
182
+ * @since 0.1.0
183
+ * @extends {{@link BillTotalCategory}
184
+ */
185
+ export interface OrderBillTotal extends BillTotalCategory {
186
+ /** Order bill discount total */
187
+ discountTotal: number;
188
+ }
189
+ /**
190
+ * The bill associated with a product of order.
191
+ *
192
+ * @interface OrderBillProduct
193
+ * @since 0.1.0
194
+ * @extends {{@link OrderBillTotal}
195
+ */
196
+ export interface OrderBillProduct extends OrderBillTotal {
197
+ /** Order bill product amount */
198
+ amount: number;
199
+ }
127
200
  /**
128
201
  * The retry of the order.
129
202
  *
@@ -78,7 +78,7 @@ export interface Store {
78
78
  location: StoreLocation;
79
79
  /** Array of catalogues, see {@link Catalogue} */
80
80
  catalogues: Catalogue[];
81
- /** Array of store images, see {@link CDNImage}*/
81
+ /** Array of store images, see {@link CDNImage} */
82
82
  images: CDNImage[];
83
83
  /** The distance between the user and the store, roughly in metres */
84
84
  distance: number;
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.6",
4
+ "version": "0.14.0-canary.7",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
7
7
  "files": [
@@ -42,5 +42,5 @@
42
42
  "prettier": "^2.1.2",
43
43
  "webpack-bundle-analyzer": "^3.9.0"
44
44
  },
45
- "gitHead": "b1b59c5298c8d01599287be797a956078821728d"
45
+ "gitHead": "75a9a60090216dd64b4b84cdba5122457e31857b"
46
46
  }