@tillhub/schemas 6.265.0 → 6.267.0

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
@@ -1,3 +1,26 @@
1
+ # [6.267.0](https://github.com/tillhub/schemas/compare/v6.266.0...v6.267.0) (2023-10-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **configurations:** carts ([0906ffe](https://github.com/tillhub/schemas/commit/0906ffe))
7
+
8
+
9
+ ### Features
10
+
11
+ * **configurations:** carts ([5621298](https://github.com/tillhub/schemas/commit/5621298))
12
+
13
+ # [6.266.0](https://github.com/tillhub/schemas/compare/v6.265.0...v6.266.0) (2023-10-17)
14
+
15
+
16
+ ### Features
17
+
18
+ * **pricelist:** rebuild customer handling ([e915bcd](https://github.com/tillhub/schemas/commit/e915bcd))
19
+ * **prices:** add customer bound type to list entries ([7b3409f](https://github.com/tillhub/schemas/commit/7b3409f))
20
+ * **prices:** list ([07778e9](https://github.com/tillhub/schemas/commit/07778e9))
21
+ * **products:** prices ([36165fd](https://github.com/tillhub/schemas/commit/36165fd))
22
+ * **transactions:** customer ([cf6e687](https://github.com/tillhub/schemas/commit/cf6e687))
23
+
1
24
  # [6.265.0](https://github.com/tillhub/schemas/compare/v6.264.0...v6.265.0) (2023-10-16)
2
25
 
3
26
 
@@ -142,6 +142,12 @@ module.exports = {
142
142
  maxLength: 128
143
143
  })
144
144
  },
145
+ customer_price_book: oneOf({
146
+ type: 'string',
147
+ format: 'uuid',
148
+ description: 'The Tillhub pricebook resource asscociated with the customer at that moment',
149
+ example: '512448db-5e6c-4fcf-bd70-f8a5e56fa269'
150
+ }),
145
151
  name: {
146
152
  description: 'Cart name',
147
153
  example: 'For the chosen one',
@@ -167,10 +173,24 @@ module.exports = {
167
173
  })
168
174
  },
169
175
  items,
170
- metadata: {
176
+ metadata: oneOf({
177
+ type: 'object',
171
178
  description: 'Additional meta data',
172
- type: 'object'
173
- },
179
+ properties: {
180
+ customer: oneOf({
181
+ type: 'object',
182
+ description: 'Additional data for a customer',
183
+ properties: {
184
+ price_book: oneOf({
185
+ type: 'string',
186
+ format: 'uuid',
187
+ description: 'The Tillhub pricebook resource asscociated with the customer at that moment',
188
+ example: '512448db-5e6c-4fcf-bd70-f8a5e56fa269'
189
+ })
190
+ }
191
+ })
192
+ }
193
+ }),
174
194
  opened_at: {
175
195
  description: 'Date when this cart was opened. If date is not null, this cart must not be used.',
176
196
  example: '2022-02-19T00:00:00.001Z',
@@ -9,6 +9,11 @@ module.exports = oneOf({
9
9
  type: 'boolean',
10
10
  default: true
11
11
  }),
12
+ enforce_integer_quantities: oneOf({
13
+ description: 'Specifies if only integer quantities are allowed -1, 1,2 etc. vs. decimal quantities like 1.62).',
14
+ type: 'boolean',
15
+ default: false
16
+ }),
12
17
  item_merge_policy: oneOf({
13
18
  description: 'Specifies how newly added products get merged into existing cart items.',
14
19
  type: 'string',
@@ -1,3 +1,4 @@
1
+ const { oneOf } = require('../../helpers/payload-or-null')
1
2
  const items = require('./items').create
2
3
 
3
4
  module.exports = {
@@ -258,7 +259,22 @@ module.exports = {
258
259
  ]
259
260
  },
260
261
  items,
261
- metadata: {
262
- type: 'object'
263
- }
262
+ metadata: oneOf({
263
+ type: 'object',
264
+ description: 'Additional meta data',
265
+ properties: {
266
+ customer: oneOf({
267
+ type: 'object',
268
+ description: 'Additional data for a customer',
269
+ properties: {
270
+ price_book: oneOf({
271
+ type: 'string',
272
+ format: 'uuid',
273
+ description: 'The Tillhub pricebook resource asscociated with the customer at that moment',
274
+ example: '512448db-5e6c-4fcf-bd70-f8a5e56fa269'
275
+ })
276
+ }
277
+ })
278
+ }
279
+ })
264
280
  }
@@ -14,6 +14,7 @@ module.exports = {
14
14
  description: 'Type of the product prices',
15
15
  type: 'string',
16
16
  enum: [
17
+ 'customer', // defined by pricebook when of type 'customer'
17
18
  'scaled', // defined by product
18
19
  'branch', // defined by product
19
20
  'time-based', // defined by pricebook-entry
@@ -38,5 +38,15 @@ module.exports = {
38
38
  deleted: {
39
39
  type: 'boolean',
40
40
  default: false
41
- }
41
+ },
42
+ type: oneOf({
43
+ description: 'Defines type of price books, e.g. bound-to-customer',
44
+ type: 'string',
45
+ enum: [
46
+ 'general',
47
+ 'customer'
48
+ ],
49
+ example: 'customer',
50
+ default: 'general'
51
+ })
42
52
  }
@@ -552,6 +552,12 @@ module.exports = {
552
552
  display: oneOf({
553
553
  type: 'string',
554
554
  example: 'Alexander von Müller'
555
+ }),
556
+ price_book: oneOf({
557
+ type: 'string',
558
+ format: 'uuid',
559
+ description: 'The Tillhub pricebook resource asscociated with the customer at that moment',
560
+ example: '512448db-5e6c-4fcf-bd70-f8a5e56fa269'
555
561
  })
556
562
  }
557
563
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.265.0",
3
+ "version": "6.267.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",