@tillhub/schemas 6.212.0 → 6.214.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,17 @@
1
+ # [6.214.0](https://github.com/tillhub/schemas/compare/v6.213.0...v6.214.0) (2023-05-02)
2
+
3
+
4
+ ### Features
5
+
6
+ * **permissions:** wallets ([392ee87](https://github.com/tillhub/schemas/commit/392ee87))
7
+
8
+ # [6.213.0](https://github.com/tillhub/schemas/compare/v6.212.0...v6.213.0) (2023-04-27)
9
+
10
+
11
+ ### Features
12
+
13
+ * **register:** update register & add mms ([7dd4555](https://github.com/tillhub/schemas/commit/7dd4555))
14
+
1
15
  # [6.212.0](https://github.com/tillhub/schemas/compare/v6.211.0...v6.212.0) (2023-04-25)
2
16
 
3
17
 
@@ -133,7 +133,15 @@ module.exports.staff = {
133
133
  'staff:staff:orders:others:locked:modify', // allows modifying other staffs' orders (gastro)
134
134
  'staff:staff:orders:preview:print', // allows printing previews for unpaid orders (gastro)
135
135
  'staff:staff:cart:clear', // Can clear the current cart
136
- 'staff:staff:cart:clear:row' // Can remove items from the cart
136
+ 'staff:staff:cart:clear:row', // Can remove items from the cart
137
+ 'staff:staff:wallets', // General access and all rights below
138
+ 'staff:staff:wallets:create', // Can create wallets
139
+ 'staff:staff:wallets:update', // Can update wallets
140
+ 'staff:staff:wallets:read', // Can read wallets
141
+ 'staff:staff:wallets:assign', // Assign Waiter Wallets to Waiters
142
+ 'staff:staff:wallets:transfer', // Transfer cash between the main till and any Waiter Wallet to create the Starting Balance for a Wallet.
143
+ 'staff:staff:wallets:discrepancy', // Accept discrepancies for not matching closing balances for individual Waiter Wallets
144
+ 'staff:staff:wallets:activation' // Activate and deactivate Waiter Wallets
137
145
  ]
138
146
  }
139
147
  }
@@ -0,0 +1,116 @@
1
+ const { oneOf } = require('../../helpers/payload-or-null')
2
+
3
+ module.exports = {
4
+ register_id: {
5
+ description: 'The id of the parent register.',
6
+ type: 'string',
7
+ format: 'uuid'
8
+ },
9
+ mms_id: oneOf({
10
+ description: 'The id of the register that identifies it in Mms.',
11
+ type: 'string',
12
+ format: 'uuid'
13
+ }),
14
+ created_by: oneOf({
15
+ description: 'Who created the register in Mms.',
16
+ type: 'string',
17
+ maxLength: 255,
18
+ minLength: 1
19
+ }),
20
+ updated_by: oneOf({
21
+ description: 'Who updated the register for the last time in Mms.',
22
+ type: 'string',
23
+ maxLength: 255,
24
+ minLength: 1
25
+ }),
26
+ deleted_by: oneOf({
27
+ description: 'Who deleted the register in Mms.',
28
+ type: 'string',
29
+ maxLength: 255,
30
+ minLength: 1
31
+ }),
32
+ scope: oneOf({
33
+ description: 'The scope from Mms.',
34
+ type: 'string',
35
+ format: 'uuid'
36
+ }),
37
+ attributes: oneOf({
38
+ description: 'The attributes of the register.',
39
+ type: 'object'
40
+ }),
41
+ state: oneOf({
42
+ description: 'The state.',
43
+ type: 'string',
44
+ maxLength: 255,
45
+ minLength: 1
46
+ }),
47
+ type: oneOf({
48
+ description: 'The type.',
49
+ type: 'string',
50
+ maxLength: 255,
51
+ minLength: 1
52
+ }),
53
+ enable_cross_channel_referencing: {
54
+ type: 'boolean',
55
+ default: false
56
+ },
57
+ key_pairs: oneOf({
58
+ type: 'array',
59
+ items: {
60
+ type: 'object'
61
+ }
62
+ }),
63
+ payment_products: oneOf({
64
+ type: 'array',
65
+ items: {
66
+ type: 'object'
67
+ }
68
+ }),
69
+ urls: oneOf({
70
+ type: 'array',
71
+ items: {
72
+ type: 'string'
73
+ }
74
+ }),
75
+ website: oneOf({
76
+ description: 'The website.',
77
+ type: 'string',
78
+ maxLength: 255,
79
+ minLength: 1
80
+ }),
81
+ max_amount_per_txn: oneOf({
82
+ type: 'number'
83
+ }),
84
+ max_amount_per_month: oneOf({
85
+ type: 'number'
86
+ }),
87
+ average_amount_per_month: oneOf({
88
+ type: 'number'
89
+ }),
90
+ average_count_per_month: oneOf({
91
+ type: 'number'
92
+ }),
93
+ min_amount_per_month: oneOf({
94
+ type: 'number'
95
+ }),
96
+ min_amount_per_txn: oneOf({
97
+ type: 'number'
98
+ }),
99
+ pci_level: oneOf({
100
+ description: 'The commercial register number.',
101
+ type: 'string',
102
+ maxLength: 255,
103
+ minLength: 1
104
+ }),
105
+ price_information: oneOf({
106
+ description: 'The price information of the register.',
107
+ type: 'object'
108
+ }),
109
+ mcc: oneOf({
110
+ description: 'The mcc of the register.',
111
+ type: 'object'
112
+ }),
113
+ average_basket_size: oneOf({
114
+ type: 'number'
115
+ })
116
+ }
@@ -79,6 +79,20 @@ module.exports = {
79
79
  }
80
80
  ]
81
81
  },
82
+ external_custom_id: {
83
+ description: 'Unique ID of this branch in external system. Uses for synchronization.',
84
+ example: '7882448928329',
85
+ anyOf: [
86
+ {
87
+ type: 'string',
88
+ maxLength: 64,
89
+ minLength: 1
90
+ },
91
+ {
92
+ type: 'null'
93
+ }
94
+ ]
95
+ },
82
96
  custom_ids: {
83
97
  anyOf: [
84
98
  {
@@ -129,6 +143,18 @@ module.exports = {
129
143
  type: 'boolean',
130
144
  default: false
131
145
  },
146
+ created_at: oneOf({
147
+ description: 'The date when register was created.',
148
+ example: '2023-04-05T16:06:04.849Z',
149
+ type: 'string',
150
+ format: 'date-time'
151
+ }),
152
+ updated_at: oneOf({
153
+ description: 'The date when register was last updated.',
154
+ example: '2023-04-05T16:06:04.849Z',
155
+ type: 'string',
156
+ format: 'date-time'
157
+ }),
132
158
  deleted_at: oneOf({
133
159
  description: 'The date when register was deleted.',
134
160
  example: '2023-04-05T16:06:04.849Z',
@@ -0,0 +1,10 @@
1
+ const baseMms = require('./base-mms')
2
+
3
+ module.exports = {
4
+ $id: 'https://schemas.tillhub.com/v1/registers.create.mms.schema.json',
5
+ $schema: 'http://json-schema.org/draft-07/schema#',
6
+ additionalProperties: false,
7
+ type: 'object',
8
+ required: ['register_id'],
9
+ properties: { ...baseMms }
10
+ }
@@ -1,4 +1,4 @@
1
1
 
2
- module.exports.create = { request: require('./create.request') }
2
+ module.exports.create = { request: require('./create.request'), mms: require('./create.mms') }
3
3
  module.exports.update = { request: require('./update.request') }
4
4
  module.exports.notification = require('./notification')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tillhub/schemas",
3
- "version": "6.212.0",
3
+ "version": "6.214.0",
4
4
  "private": false,
5
5
  "description": "All Tillhub API OpenAPI 3 compatible JSON Schemas.",
6
6
  "main": "./lib/index.js",