@tillhub/schemas 6.95.0 → 6.98.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 CHANGED
@@ -1,3 +1,32 @@
1
+ ## [6.98.1](https://github.com/tillhub/schemas/compare/v6.98.0...v6.98.1) (2021-10-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **configurations:** payback ([da10e00](https://github.com/tillhub/schemas/commit/da10e00))
7
+
8
+ # [6.98.0](https://github.com/tillhub/schemas/compare/v6.97.0...v6.98.0) (2021-10-06)
9
+
10
+
11
+ ### Features
12
+
13
+ * **configurations:** stock ([80ce87a](https://github.com/tillhub/schemas/commit/80ce87a))
14
+ * **configurations:** transactions ([1dd97fb](https://github.com/tillhub/schemas/commit/1dd97fb))
15
+
16
+ # [6.97.0](https://github.com/tillhub/schemas/compare/v6.96.0...v6.97.0) (2021-09-29)
17
+
18
+
19
+ ### Features
20
+
21
+ * **loyalty_abocard_systems:** properties ([5312463](https://github.com/tillhub/schemas/commit/5312463))
22
+
23
+ # [6.96.0](https://github.com/tillhub/schemas/compare/v6.95.0...v6.96.0) (2021-09-28)
24
+
25
+
26
+ ### Features
27
+
28
+ * **abocards:** remove reuired field abocard_system #API-1020 ([a78100a](https://github.com/tillhub/schemas/commit/a78100a)), closes [#API-1020](https://github.com/tillhub/schemas/issues/API-1020)
29
+
1
30
  # [6.95.0](https://github.com/tillhub/schemas/compare/v6.94.0...v6.95.0) (2021-09-28)
2
31
 
3
32
 
@@ -52,7 +52,5 @@ const response = {
52
52
  module.exports = {
53
53
  request,
54
54
  response,
55
- required: [
56
- 'abocard_system'
57
- ]
55
+ required: []
58
56
  }
@@ -219,6 +219,18 @@ const request = {
219
219
  type: 'string',
220
220
  format: 'uuid'
221
221
  }
222
+ }),
223
+ currency_iso_code: {
224
+ description: 'The three letter [ISO currency](https://en.wikipedia.org/wiki/ISO_4217) of this abocard system.',
225
+ example: 'EUR',
226
+ type: 'string',
227
+ minLength: 3,
228
+ maxLength: 3
229
+ },
230
+ requires_customer: oneOf({
231
+ description: 'Defines whether assigning a customer is required for creation actions within this system.',
232
+ type: 'boolean',
233
+ default: 'false'
222
234
  })
223
235
  }
224
236
 
@@ -49,6 +49,32 @@ module.exports = oneOf({
49
49
  })
50
50
  }
51
51
  }),
52
+ payback: oneOf({
53
+ description: 'Payback.de behavior configuration',
54
+ type: 'object',
55
+ additionalProperties: false,
56
+ properties: {
57
+ prompt: {
58
+ description: 'If true - show a prompt that asks the customer for a payback number',
59
+ type: 'boolean',
60
+ default: false
61
+ },
62
+ number_format: {
63
+ description: 'The format of the customer payback number that is being validated against the input',
64
+ type: 'string',
65
+ format: 'regex',
66
+ example: '^[_A-Za-z0-9-+]+(\\.[_A-Za-z0-9-+]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z‌​]{2,})$',
67
+ default: '^[0-9]{10}$'
68
+ },
69
+ number_length_max: {
70
+ description: 'The maxiumum length of a customer payback number (as a helper for the UI)',
71
+ type: 'integer',
72
+ minimum: 2,
73
+ maximum: 99,
74
+ default: 10
75
+ }
76
+ }
77
+ }),
52
78
  split_receipt: oneOf({
53
79
  description: 'Restaurant case: split bill between a group of guests',
54
80
  type: 'object',
@@ -741,68 +741,7 @@ module.exports = {
741
741
  'voucher_systems' // new system with a single product per system and all nested prefixes and actions
742
742
  ],
743
743
  default: 'configurations' // starting from legacy
744
- },
745
- apollo: oneOf({
746
- type: 'object',
747
- additionalProperties: false,
748
- properties: {
749
- payback: oneOf({
750
- description: 'Payback behavior configuration',
751
- type: 'object',
752
- additionalProperties: false,
753
- properties: {
754
- prompt: {
755
- description: 'If true - show a prompt that asks the customer for a payback number',
756
- type: 'boolean',
757
- default: false
758
- },
759
- number_format: {
760
- description: 'The format of the customer payback number that is being validated against the input',
761
- type: 'string',
762
- format: 'regex',
763
- example: '^[_A-Za-z0-9-+]+(\\.[_A-Za-z0-9-+]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z‌​]{2,})$',
764
- default: '^[0-9]{10}$'
765
- },
766
- number_length_max: {
767
- description: 'The maxiumum length of a customer payback number (as a helper for the UI)',
768
- type: 'integer',
769
- minimum: 2,
770
- maximum: 99,
771
- default: 10
772
- }
773
- }
774
- }),
775
- custom_order_receipt: {
776
- description: 'Temporary feature for the Apollo test phase',
777
- type: 'object',
778
- additionalProperties: false,
779
- properties: {
780
- enabled: {
781
- type: 'boolean',
782
- default: false
783
- },
784
- endpoint: {
785
- type: 'string',
786
- format: 'url',
787
- example: 'https://arboreal-groove-198520.appspot.com/orders'
788
- },
789
- parameters: {
790
- items: {
791
- type: 'string',
792
- example: 'branch',
793
- enum: [
794
- 'branch'
795
- ]
796
- }
797
- },
798
- token: {
799
- type: 'string',
800
- example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImluZm9AYXBvbGxvLmRlIiwiZXhwIjoxNjAwNTE4MzMwLCJpYXQiOjE1OTA1MTgzMzAsImlqdCI6IjY5Yzc1ZTBlLWM4MTMtNGFkMS1hMDU1LWJjZDYyODA4MTYyMSIsImlzcyI6ImV5SmhiR2NpT2lKSVV6STFOaUlzSW5SNWNDSTZJa3BYVkNKOSIsIm5iZiI6MTU5MDUxODMzMCwidWlkIjoiNjljNzVlMGUtYzgxMy00YWQxLWEwNTUtYmNkNjI4MDgxNjIxIiwidXVpZCI6IjY5Yzc1ZTBlLWM4MTMtNGFkMS1hMDU1LWJjZDYyODA4MTYyMSJ9.3_WlUPW8mFza-VDne425EP40QeWmtkmh8Q7sjBu2W_4'
801
- }
802
- }
803
- }
804
- }
805
- })
744
+ }
806
745
  }
807
746
  }
808
747
  ]
@@ -32,25 +32,39 @@ module.exports = {
32
32
  type: 'object',
33
33
  description: 'Stock configurations for POS clients',
34
34
  properties: {
35
- sale: {
36
- ...oneOf({
37
- type: 'object',
38
- description: 'Sale stock restrictions',
39
- additionalProperties: true,
40
- properties: {
41
- negative_stock_behavior: oneOf({
42
- type: 'string',
43
- description: 'Defines behavior if products with negative stock can be sold.',
44
- enum: [
45
- 'ignore', // Don't block
46
- 'warning', // Warning (and let the user decide if he still wants to go through)
47
- 'block'
48
- ],
49
- default: 'ignore'
50
- })
51
- }
52
- })
53
- }
35
+ sale: oneOf({
36
+ type: 'object',
37
+ description: 'Sale stock restrictions',
38
+ additionalProperties: true,
39
+ properties: {
40
+ negative_stock_behavior: oneOf({
41
+ type: 'string',
42
+ description: 'Defines behavior if products with negative stock can be sold.',
43
+ enum: [
44
+ 'ignore', // Don't block
45
+ 'warning', // Warning (and let the user decide if he still wants to go through)
46
+ 'block'
47
+ ],
48
+ default: 'ignore'
49
+ })
50
+ }
51
+ }),
52
+ booking: oneOf({
53
+ type: 'object',
54
+ description: 'Restrictions on actively booking stock from th POS',
55
+ properties: {
56
+ increment_reason_required: oneOf({
57
+ type: 'boolean',
58
+ description: 'Defines if reasons are mandatory for increasing stock',
59
+ default: false
60
+ }),
61
+ decrement_reason_required: oneOf({
62
+ type: 'boolean',
63
+ description: 'Defines if reasons are mandatory for lowering stock',
64
+ default: false
65
+ })
66
+ }
67
+ })
54
68
  }
55
69
  })
56
70
  }
@@ -1,3 +1,5 @@
1
+ const { oneOf } = require('../../../helpers/payload-or-null')
2
+
1
3
  module.exports = {
2
4
  type: 'object',
3
5
  properties: {
@@ -11,6 +13,11 @@ module.exports = {
11
13
  type: 'boolean',
12
14
  default: false
13
15
  },
16
+ refund_reason_required: oneOf({
17
+ type: 'boolean',
18
+ description: 'Defines if reasons are mandatory for refunding items from a previous transaction',
19
+ default: true
20
+ }),
14
21
  signing: {
15
22
  type: 'object',
16
23
  description: 'Decides if and how transactions will be fiscally signed and where the specific configuration can be found',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.95.0",
3
+ "version": "6.98.1",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",