@tillhub/schemas 6.119.0 → 6.122.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 (44) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/lib/common/address.js +67 -82
  3. package/lib/common/base.js +3 -0
  4. package/lib/common/images.js +63 -0
  5. package/lib/common/query.js +64 -0
  6. package/lib/common/response.js +10 -9
  7. package/lib/v0/branches/base.js +55 -63
  8. package/lib/v0/branches/create.js +18 -0
  9. package/lib/v0/branches/index.js +1 -0
  10. package/lib/v0/branches/read.js +119 -0
  11. package/lib/v0/branches/update.js +18 -0
  12. package/lib/v0/customers/base.js +352 -576
  13. package/lib/v0/customers/baseExt.js +35 -0
  14. package/lib/v0/customers/create.js +41 -0
  15. package/lib/v0/customers/ext.js +113 -7
  16. package/lib/v0/customers/index.js +18 -50
  17. package/lib/v0/customers/properties/anaylytics.js +7 -7
  18. package/lib/v0/customers/read.js +42 -0
  19. package/lib/v0/customers/update.js +30 -0
  20. package/lib/v0/deliveries/base.js +3 -3
  21. package/lib/v0/orders/create.request.js +3 -3
  22. package/lib/v0/pdfs/templates.deliveries.create.request.js +3 -7
  23. package/lib/v0/pdfs/templates.delivery_notes.create.request.js +3 -7
  24. package/lib/v0/pdfs/templates.full_receipts.create.request.js +3 -7
  25. package/lib/v0/pdfs/templates.invoices.create.request.js +3 -7
  26. package/lib/v0/pdfs/templates.transaction_receipts.create.request.js +3 -7
  27. package/lib/v1/branches/index.js +1 -0
  28. package/lib/v1/branches/read.js +16 -0
  29. package/lib/v1/carts/base.js +182 -0
  30. package/lib/v1/carts/create.js +30 -0
  31. package/lib/v1/carts/index.js +3 -8
  32. package/lib/v1/carts/items/create.js +150 -227
  33. package/lib/v1/carts/patch.js +29 -0
  34. package/lib/v1/carts/read.js +54 -0
  35. package/lib/v1/index.js +6 -5
  36. package/package.json +1 -1
  37. package/test/branches/branches.v0.spec.js +50 -11
  38. package/test/branches/branches.v1.spec.js +19 -0
  39. package/test/carts/carts.v1.spec.js +46 -6
  40. package/test/customers/customers.v0.spec.js +93 -5
  41. package/lib/v0/customers/create.request.js +0 -24
  42. package/lib/v0/customers/update.request.js +0 -14
  43. package/lib/v1/carts/create.request.js +0 -268
  44. package/lib/v1/carts/patch.request.js +0 -259
@@ -1,259 +0,0 @@
1
- const items = require('./items').create
2
- module.exports = {
3
- $id: 'https://schemas.tillhub.com/v1/carts.patch.request.schema.json',
4
- $schema: 'http://json-schema.org/draft-07/schema#',
5
- type: 'object',
6
- additionalProperties: false,
7
- required: [
8
- ],
9
- properties: {
10
- date: {
11
- oneOf: [
12
- {
13
- type: 'string',
14
- format: 'date-time'
15
- },
16
- {
17
- type: 'null'
18
- }
19
- ]
20
- },
21
- done_at: {
22
- oneOf: [
23
- {
24
- type: 'string',
25
- format: 'date-time'
26
- },
27
- {
28
- type: 'null'
29
- }
30
- ]
31
- },
32
- branch: {
33
- oneOf: [
34
- {
35
- type: 'string',
36
- format: 'uuid'
37
- },
38
- {
39
- type: 'null'
40
- }
41
- ]
42
- },
43
- register: {
44
- oneOf: [
45
- {
46
- type: 'string',
47
- format: 'uuid'
48
- },
49
- {
50
- type: 'null'
51
- }
52
- ]
53
- },
54
- cashier_staff: {
55
- oneOf: [
56
- {
57
- type: 'string',
58
- format: 'uuid'
59
- },
60
- {
61
- type: 'null'
62
- }
63
- ]
64
- },
65
- temporary_staff: {
66
- oneOf: [
67
- {
68
- type: 'string',
69
- format: 'uuid'
70
- },
71
- {
72
- type: 'null'
73
- }
74
- ]
75
- },
76
- currency: {
77
- oneOf: [
78
- {
79
- type: 'string',
80
- minLength: 3,
81
- maxLength: 3
82
- },
83
- {
84
- type: 'null'
85
- }
86
- ]
87
- },
88
- custom_id: {
89
- oneOf: [
90
- {
91
- type: 'string',
92
- maxLength: 128
93
- },
94
- {
95
- type: 'null'
96
- }
97
- ]
98
- },
99
- client_id: {
100
- oneOf: [
101
- {
102
- type: 'string',
103
- minLength: 12,
104
- maxLength: 64
105
- },
106
- {
107
- type: 'null'
108
- }
109
- ]
110
- },
111
- cart_id: {
112
- oneOf: [
113
- {
114
- type: 'string',
115
- maxLength: 128
116
- },
117
- {
118
- type: 'null'
119
- }
120
- ]
121
- },
122
- external_reference_id: {
123
- oneOf: [
124
- {
125
- type: 'string',
126
- maxLength: 128
127
- },
128
- {
129
- type: 'null'
130
- }
131
- ]
132
- },
133
- lps: {
134
- description: 'Lean Payment System: If TRUE the client application will process this cart with minimal validation and without forced property fetching. Use on at your own risk.',
135
- oneOf: [
136
- {
137
- type: 'boolean'
138
- },
139
- {
140
- type: 'null'
141
- }
142
- ]
143
- },
144
- instant_checkout: {
145
- description: 'If TRUE this cart will be checked out immediately and thus landing on the payment screen.',
146
- oneOf: [
147
- {
148
- type: 'boolean'
149
- },
150
- {
151
- type: 'null'
152
- }
153
- ]
154
- },
155
- immutable: {
156
- description: 'If TRUE this cart will not be editable, thus a user can not remove nor add new items.',
157
- oneOf: [
158
- {
159
- type: 'boolean'
160
- },
161
- {
162
- type: 'null'
163
- }
164
- ]
165
- },
166
- customer: {
167
- oneOf: [
168
- {
169
- type: 'string',
170
- format: 'uuid'
171
- },
172
- {
173
- type: 'null'
174
- }
175
- ]
176
- },
177
- customer_name: {
178
- oneOf: [
179
- {
180
- type: 'string',
181
- maxLength: 64
182
- },
183
- {
184
- type: 'null'
185
- }
186
- ]
187
- },
188
- customer_description: {
189
- oneOf: [
190
- {
191
- type: 'string',
192
- maxLength: 128
193
- },
194
- {
195
- type: 'null'
196
- }
197
- ]
198
- },
199
- customer_number: {
200
- oneOf: [
201
- {
202
- type: 'string',
203
- maxLength: 128
204
- },
205
- {
206
- type: 'null'
207
- }
208
- ]
209
- },
210
- name: {
211
- oneOf: [
212
- {
213
- type: 'string',
214
- maxLength: 128
215
- },
216
- {
217
- type: 'null'
218
- }
219
- ]
220
- },
221
- description: {
222
- oneOf: [
223
- {
224
- type: 'string',
225
- maxLength: 512
226
- },
227
- {
228
- type: 'null'
229
- }
230
- ]
231
- },
232
- comments: {
233
- oneOf: [
234
- {
235
- type: 'string',
236
- maxLength: 4096
237
- },
238
- {
239
- type: 'null'
240
- }
241
- ]
242
- },
243
- items,
244
- metadata: {
245
- type: 'object'
246
- },
247
- opened_at: {
248
- oneOf: [
249
- {
250
- type: 'string',
251
- format: 'date-time'
252
- },
253
- {
254
- type: 'null'
255
- }
256
- ]
257
- }
258
- }
259
- }