@tillhub/schemas 6.157.0 → 6.158.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/lib/v0/accounts/base.js +4 -2
  3. package/lib/v0/clients/base.js +4 -2
  4. package/lib/v0/configurations/users/create.request.js +2 -2
  5. package/lib/v0/customers/base.js +4 -2
  6. package/lib/v0/discounts/base.js +4 -2
  7. package/lib/v0/expense_accounts/base.js +4 -2
  8. package/lib/v0/functions/base.js +4 -2
  9. package/lib/v0/invoices/base.js +4 -2
  10. package/lib/v0/loyalty_abocard_cards/base.js +4 -2
  11. package/lib/v0/loyalty_accounts/base.js +2 -1
  12. package/lib/v0/loyalty_cards/base.js +2 -1
  13. package/lib/v0/loyalty_systems/base.js +4 -2
  14. package/lib/v0/messages/base.js +2 -1
  15. package/lib/v0/orders/create.request.js +2 -8
  16. package/lib/v0/orders/items/base.js +2 -8
  17. package/lib/v0/payment_options/base.js +2 -1
  18. package/lib/v0/product_addons/base.js +4 -2
  19. package/lib/v0/product_groups/base.js +4 -3
  20. package/lib/v0/product_service_question_groups/base.js +4 -2
  21. package/lib/v0/product_service_questions/base.js +4 -2
  22. package/lib/v0/promotions/base.js +4 -2
  23. package/lib/v0/reasons/base.js +4 -2
  24. package/lib/v0/safes/base.js +4 -6
  25. package/lib/v0/staff/base.js +4 -2
  26. package/lib/v0/staff_permission_templates/base.js +4 -2
  27. package/lib/v0/stock/base.js +4 -1
  28. package/lib/v0/taxes/base.js +4 -2
  29. package/lib/v0/voucher_systems/base.js +4 -2
  30. package/lib/v0/vouchers/base.js +2 -1
  31. package/lib/v0/warehouses/base.js +4 -2
  32. package/lib/v1/products/base.js +4 -2
  33. package/lib/v1/products/customizations/base.js +4 -2
  34. package/lib/v1/products/prices/book/base.js +4 -2
  35. package/lib/v1/products/prices/book/constraints/index.js +1 -7
  36. package/lib/v1/products/prices/book/entry/base.js +4 -2
  37. package/lib/v1/registers/base.js +4 -2
  38. package/lib/v1/templates/base.js +4 -2
  39. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ # [6.158.0](https://github.com/tillhub/schemas/compare/v6.157.2...v6.158.0) (2022-09-05)
2
+
3
+
4
+ ### Features
5
+
6
+ * **chore:** Get rid of 3-state booleans in 'active' and 'deleted' fields ([5efeead](https://github.com/tillhub/schemas/commit/5efeead))
7
+ * **chore:** lint fix ([0734f1b](https://github.com/tillhub/schemas/commit/0734f1b))
8
+
9
+ ## [6.157.2](https://github.com/tillhub/schemas/compare/v6.157.1...v6.157.2) (2022-09-02)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **price_book:** time_constraints ([#726](https://github.com/tillhub/schemas/issues/726)) ([290a475](https://github.com/tillhub/schemas/commit/290a475))
15
+
16
+ ## [6.157.1](https://github.com/tillhub/schemas/compare/v6.157.0...v6.157.1) (2022-09-02)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **configurations:** Create schema for /api/v0/configurations/:account/:configurationID/users APIs ([#725](https://github.com/tillhub/schemas/issues/725)) ([f214976](https://github.com/tillhub/schemas/commit/f214976))
22
+
1
23
  # [6.157.0](https://github.com/tillhub/schemas/compare/v6.156.0...v6.157.0) (2022-09-02)
2
24
 
3
25
 
@@ -42,10 +42,12 @@ module.exports = {
42
42
  ]
43
43
  },
44
44
  active: {
45
- type: 'boolean'
45
+ type: 'boolean',
46
+ default: true
46
47
  },
47
48
  deleted: {
48
- type: 'boolean'
49
+ type: 'boolean',
50
+ default: false
49
51
  },
50
52
  metadata: {
51
53
  type: 'object'
@@ -89,10 +89,12 @@ module.exports = {
89
89
  ]
90
90
  },
91
91
  active: {
92
- type: 'boolean'
92
+ type: 'boolean',
93
+ default: true
93
94
  },
94
95
  deleted: {
95
- type: 'boolean'
96
+ type: 'boolean',
97
+ default: false
96
98
  },
97
99
  metadata: {
98
100
  type: 'object'
@@ -15,7 +15,7 @@ module.exports = {
15
15
  properties: { role: { const: 'franchisee' } }
16
16
  },
17
17
  then: {
18
- properties: franchiseScopes,
18
+ properties: franchiseeScopes,
19
19
  required: [ 'user', 'role' ]
20
20
  }
21
21
  },
@@ -24,7 +24,7 @@ module.exports = {
24
24
  properties: { role: { const: 'franchise' } }
25
25
  },
26
26
  then: {
27
- properties: franchiseeScopes,
27
+ properties: franchiseScopes,
28
28
  required: [ 'user', 'role' ]
29
29
  }
30
30
  }
@@ -7,11 +7,13 @@ module.exports = {
7
7
  active: {
8
8
  description: 'Customer active',
9
9
  example: 'true',
10
- type: 'boolean'
10
+ type: 'boolean',
11
+ default: true
11
12
  },
12
13
  deleted: {
13
14
  description: 'Customer deleted',
14
- type: 'boolean'
15
+ type: 'boolean',
16
+ default: false
15
17
  },
16
18
  firstname: {
17
19
  description: 'First name',
@@ -143,10 +143,12 @@ module.exports = {
143
143
  ]
144
144
  },
145
145
  active: {
146
- type: 'boolean'
146
+ type: 'boolean',
147
+ default: true
147
148
  },
148
149
  deleted: {
149
- type: 'boolean'
150
+ type: 'boolean',
151
+ default: false
150
152
  },
151
153
  constraints: {
152
154
  oneOf: [
@@ -2,10 +2,12 @@ const locationsAccounts = require('../locations/accounts')
2
2
 
3
3
  module.exports = {
4
4
  active: {
5
- type: 'boolean'
5
+ type: 'boolean',
6
+ default: true
6
7
  },
7
8
  deleted: {
8
- type: 'boolean'
9
+ type: 'boolean',
10
+ default: false
9
11
  },
10
12
  name: {
11
13
  anyOf: [
@@ -361,10 +361,12 @@ module.exports = {
361
361
  maxLength: 128
362
362
  },
363
363
  active: {
364
- type: 'boolean'
364
+ type: 'boolean',
365
+ default: true
365
366
  },
366
367
  deleted: {
367
- type: 'boolean'
368
+ type: 'boolean',
369
+ default: false
368
370
  },
369
371
  configuration: {
370
372
  description: 'Function configuration that e.g. drives specific local client behaviour',
@@ -195,10 +195,12 @@ module.exports = {
195
195
  ]
196
196
  },
197
197
  deleted: {
198
- type: 'boolean'
198
+ type: 'boolean',
199
+ default: false
199
200
  },
200
201
  active: {
201
- type: 'boolean'
202
+ type: 'boolean',
203
+ default: true
202
204
  },
203
205
  assignee: {
204
206
  oneOf: [
@@ -23,12 +23,14 @@ const response = {
23
23
  active: {
24
24
  description: 'The abocard is active',
25
25
  example: true,
26
- type: 'boolean'
26
+ type: 'boolean',
27
+ default: false
27
28
  },
28
29
  deleted: {
29
30
  description: 'The abocard is deleted',
30
31
  example: true,
31
- type: 'boolean'
32
+ type: 'boolean',
33
+ default: false
32
34
  },
33
35
  valid_until: oneOf({
34
36
  description: 'When the abocard expires',
@@ -26,7 +26,8 @@ module.exports = {
26
26
  maxLength: 4096
27
27
  }),
28
28
  deleted: {
29
- type: 'boolean'
29
+ type: 'boolean',
30
+ default: false
30
31
  },
31
32
  active: {
32
33
  type: 'boolean',
@@ -14,7 +14,8 @@ module.exports = {
14
14
  maxLength: 4096
15
15
  }),
16
16
  deleted: {
17
- type: 'boolean'
17
+ type: 'boolean',
18
+ default: false
18
19
  },
19
20
  active: {
20
21
  type: 'boolean',
@@ -78,10 +78,12 @@ module.exports = {
78
78
  maxLength: 4096
79
79
  }),
80
80
  deleted: {
81
- type: 'boolean'
81
+ type: 'boolean',
82
+ default: false
82
83
  },
83
84
  active: {
84
- type: 'boolean'
85
+ type: 'boolean',
86
+ default: true
85
87
  },
86
88
  value_configurations: oneOf({
87
89
  type: 'array',
@@ -113,7 +113,8 @@ module.exports = {
113
113
  ]
114
114
  },
115
115
  deleted: {
116
- type: 'boolean'
116
+ type: 'boolean',
117
+ default: false
117
118
  },
118
119
  progress: {
119
120
  type: 'object'
@@ -31,14 +31,8 @@ module.exports = {
31
31
  },
32
32
  deleted: {
33
33
  description: 'the string representation of boolean values as `false` or `true`',
34
- anyOf: [
35
- {
36
- type: 'boolean'
37
- },
38
- {
39
- type: 'null'
40
- }
41
- ]
34
+ type: 'boolean',
35
+ default: false
42
36
  },
43
37
  ordered_at: {
44
38
  description: 'ISO string (UTC) with timezone',
@@ -51,14 +51,8 @@ module.exports = {
51
51
  description: 'the string representation of boolean values as `false` or `true`. Set to \'true\' if the order item is supposed to be a suggestion (as opposed to an actual item in the order)'
52
52
  },
53
53
  deleted: {
54
- oneOf: [
55
- {
56
- type: 'boolean'
57
- },
58
- {
59
- type: 'null'
60
- }
61
- ],
54
+ type: 'boolean',
55
+ default: false,
62
56
  description: 'the string representation of boolean values as `false` or `true`'
63
57
  },
64
58
  order: {
@@ -3,7 +3,8 @@ const { oneOf } = require('../../helpers/payload-or-null')
3
3
 
4
4
  module.exports = {
5
5
  active: {
6
- type: 'boolean'
6
+ type: 'boolean',
7
+ default: true
7
8
  },
8
9
  type: {
9
10
  type: 'string',
@@ -64,9 +64,11 @@ module.exports = {
64
64
  default: 1
65
65
  },
66
66
  active: {
67
- type: 'boolean'
67
+ type: 'boolean',
68
+ default: true
68
69
  },
69
70
  deleted: {
70
- type: 'boolean'
71
+ type: 'boolean',
72
+ default: false
71
73
  }
72
74
  }
@@ -19,10 +19,11 @@ const request = {
19
19
  type: 'string',
20
20
  example: 'f5cf4198-ae26-463f-aa2b-014bd2fed8e5'
21
21
  }),
22
- active: oneOf({
22
+ active: {
23
23
  description: 'Product group is active',
24
- type: 'boolean'
25
- }),
24
+ type: 'boolean',
25
+ default: true
26
+ },
26
27
  account: oneOf({
27
28
  description: 'Product group revenue account reference',
28
29
  type: 'string',
@@ -26,9 +26,11 @@ module.exports = {
26
26
  }
27
27
  }),
28
28
  deleted: {
29
- type: 'boolean'
29
+ type: 'boolean',
30
+ default: false
30
31
  },
31
32
  active: {
32
- type: 'boolean'
33
+ type: 'boolean',
34
+ default: true
33
35
  }
34
36
  }
@@ -22,10 +22,12 @@ module.exports = {
22
22
  maxLength: 4096
23
23
  },
24
24
  deleted: {
25
- type: 'boolean'
25
+ type: 'boolean',
26
+ default: false
26
27
  },
27
28
  active: {
28
- type: 'boolean'
29
+ type: 'boolean',
30
+ default: true
29
31
  },
30
32
  required: {
31
33
  type: 'boolean',
@@ -59,10 +59,12 @@ module.exports = {
59
59
  }])
60
60
  },
61
61
  deleted: {
62
- type: 'boolean'
62
+ type: 'boolean',
63
+ default: false
63
64
  },
64
65
  active: {
65
- type: 'boolean'
66
+ type: 'boolean',
67
+ default: true
66
68
  },
67
69
  template: {
68
70
  ...oneOf(require('./template'))
@@ -57,11 +57,13 @@ module.exports = {
57
57
  ])
58
58
  },
59
59
  deleted: {
60
- type: 'boolean'
60
+ type: 'boolean',
61
+ default: false
61
62
  },
62
63
  active: {
63
64
  description: 'The reason is active',
64
- type: 'boolean'
65
+ type: 'boolean',
66
+ default: true
65
67
  },
66
68
  type: {
67
69
  description: 'The reason type',
@@ -82,13 +82,11 @@ module.exports = {
82
82
  })
83
83
  },
84
84
  deleted: {
85
- ...oneOf({
86
- type: 'boolean'
87
- })
85
+ type: 'boolean',
86
+ default: false
88
87
  },
89
88
  active: {
90
- ...oneOf({
91
- type: 'boolean'
92
- })
89
+ type: 'boolean',
90
+ default: true
93
91
  }
94
92
  }
@@ -204,10 +204,12 @@ module.exports = {
204
204
  type: 'string'
205
205
  }),
206
206
  active: {
207
- type: 'boolean'
207
+ type: 'boolean',
208
+ default: true
208
209
  },
209
210
  deleted: {
210
- type: 'boolean'
211
+ type: 'boolean',
212
+ default: false
211
213
  },
212
214
  metadata: {
213
215
  type: 'object'
@@ -28,9 +28,11 @@ module.exports = {
28
28
  ]
29
29
  },
30
30
  active: {
31
- type: 'boolean'
31
+ type: 'boolean',
32
+ default: true
32
33
  },
33
34
  deleted: {
34
- type: 'boolean'
35
+ type: 'boolean',
36
+ default: false
35
37
  }
36
38
  }
@@ -7,7 +7,8 @@ module.exports = {
7
7
  type: 'null'
8
8
  },
9
9
  {
10
- type: 'number'
10
+ type: 'number',
11
+ description: 'The quantity of this item/product.'
11
12
  }
12
13
  ]
13
14
  },
@@ -27,6 +28,7 @@ module.exports = {
27
28
  anyOf: [
28
29
  {
29
30
  type: 'string',
31
+ description: 'Alphanumerical uuid of the location, e.g. branch or warehouse',
30
32
  minLength: 1,
31
33
  maxLength: 64
32
34
  },
@@ -39,6 +41,7 @@ module.exports = {
39
41
  anyOf: [
40
42
  {
41
43
  type: 'string',
44
+ description: 'Location type of stock',
42
45
  'enum': [
43
46
  'client',
44
47
  'branch',
@@ -45,10 +45,12 @@ module.exports = {
45
45
  'default': false
46
46
  },
47
47
  active: {
48
- type: 'boolean'
48
+ type: 'boolean',
49
+ default: true
49
50
  },
50
51
  deleted: {
51
- type: 'boolean'
52
+ type: 'boolean',
53
+ default: false
52
54
  },
53
55
  financial_accounts: {
54
56
  anyOf: [
@@ -72,10 +72,12 @@ module.exports = {
72
72
  maxLength: 4096
73
73
  }),
74
74
  deleted: {
75
- type: 'boolean'
75
+ type: 'boolean',
76
+ default: false
76
77
  },
77
78
  active: {
78
- type: 'boolean'
79
+ type: 'boolean',
80
+ default: true
79
81
  },
80
82
  branches: oneOf({
81
83
  type: 'array',
@@ -193,7 +193,8 @@ module.exports = {
193
193
  },
194
194
  active: {
195
195
  description: 'Define whether this voucher is currently active.',
196
- type: 'boolean'
196
+ type: 'boolean',
197
+ default: true
197
198
  },
198
199
  deleted: {
199
200
  description: 'Define whether this voucher is "soft" deleted. This is different than a "hard" delete where the resource is eliminated from the database.',
@@ -99,10 +99,12 @@ module.exports = {
99
99
  ]
100
100
  },
101
101
  active: {
102
- type: 'boolean'
102
+ type: 'boolean',
103
+ default: true
103
104
  },
104
105
  deleted: {
105
- type: 'boolean'
106
+ type: 'boolean',
107
+ default: false
106
108
  },
107
109
  metadata: {
108
110
  type: 'object'
@@ -461,10 +461,12 @@ const request = {
461
461
  example: '921ec83d-c08b-411a-96d8-355f354d790d'
462
462
  }),
463
463
  active: {
464
- type: 'boolean'
464
+ type: 'boolean',
465
+ default: true
465
466
  },
466
467
  deleted: {
467
- type: 'boolean'
468
+ type: 'boolean',
469
+ default: false
468
470
  },
469
471
  type: {
470
472
  type: 'string',
@@ -73,10 +73,12 @@ module.exports = {
73
73
  ]
74
74
  },
75
75
  active: {
76
- type: 'boolean'
76
+ type: 'boolean',
77
+ default: true
77
78
  },
78
79
  deleted: {
79
- type: 'boolean'
80
+ type: 'boolean',
81
+ default: false
80
82
  },
81
83
  supplier: oneOf({
82
84
  type: 'object',
@@ -32,9 +32,11 @@ module.exports = {
32
32
  }
33
33
  }),
34
34
  active: {
35
- type: 'boolean'
35
+ type: 'boolean',
36
+ default: true
36
37
  },
37
38
  deleted: {
38
- type: 'boolean'
39
+ type: 'boolean',
40
+ default: false
39
41
  }
40
42
  }
@@ -6,13 +6,7 @@ module.exports = {
6
6
  additionalProperties: false,
7
7
  properties: {
8
8
  time: oneOf({
9
- type: 'object',
10
- additionalProperties: false,
11
- properties: {
12
- time: {
13
- ...timeConstraints
14
- }
15
- }
9
+ ...timeConstraints
16
10
  })
17
11
  }
18
12
  }
@@ -35,10 +35,12 @@ module.exports = {
35
35
  })
36
36
  },
37
37
  active: {
38
- type: 'boolean'
38
+ type: 'boolean',
39
+ default: true
39
40
  },
40
41
  deleted: {
41
- type: 'boolean'
42
+ type: 'boolean',
43
+ default: false
42
44
  },
43
45
  clients: oneOf({
44
46
  description: 'The reference to the clients',
@@ -121,10 +121,12 @@ module.exports = {
121
121
  ]
122
122
  },
123
123
  active: {
124
- type: 'boolean'
124
+ type: 'boolean',
125
+ default: true
125
126
  },
126
127
  deleted: {
127
- type: 'boolean'
128
+ type: 'boolean',
129
+ default: false
128
130
  },
129
131
  device_configuration: {
130
132
  anyOf: [
@@ -226,9 +226,11 @@ module.exports.base = {
226
226
  ]
227
227
  },
228
228
  active: {
229
- type: 'boolean'
229
+ type: 'boolean',
230
+ default: true
230
231
  },
231
232
  deleted: {
232
- type: 'boolean'
233
+ type: 'boolean',
234
+ default: false
233
235
  }
234
236
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.157.0",
3
+ "version": "6.158.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",