@gls_spain/gps-common 35.1.5 → 35.1.7
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 +14 -0
- package/package.json +1 -1
- package/schemas/definitions/shops.js +21 -2
- package/schemas/index.js +12 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [35.1.7](https://github.com/GLS-Spain/gps-common/compare/v35.1.6...v35.1.7) (2024-05-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* shop.holidays bugfix ([c390b7a](https://github.com/GLS-Spain/gps-common/commit/c390b7aa9963ce15481dd8392c533a8aa0b87e0c))
|
|
7
|
+
|
|
8
|
+
## [35.1.6](https://github.com/GLS-Spain/gps-common/compare/v35.1.5...v35.1.6) (2024-05-24)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* export schemas ([bbaa84c](https://github.com/GLS-Spain/gps-common/commit/bbaa84c57ce510d28d38566fdfa02b8af708b70f))
|
|
14
|
+
|
|
1
15
|
## [35.1.5](https://github.com/GLS-Spain/gps-common/compare/v35.1.4...v35.1.5) (2024-05-22)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -73,6 +73,24 @@ const shopSchedule = () => ({
|
|
|
73
73
|
},
|
|
74
74
|
],
|
|
75
75
|
});
|
|
76
|
+
|
|
77
|
+
const shopHoliday = () => ({
|
|
78
|
+
title: 'Holidays shop',
|
|
79
|
+
type: 'object',
|
|
80
|
+
properties: {
|
|
81
|
+
_id: uuid(),
|
|
82
|
+
from: datetime(),
|
|
83
|
+
to: datetime(),
|
|
84
|
+
description: { type: 'string' },
|
|
85
|
+
createAt: datetime(),
|
|
86
|
+
},
|
|
87
|
+
required: ['from', 'to', '_id', 'createAt'],
|
|
88
|
+
additionalProperties: false,
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
/*
|
|
92
|
+
2024-05-28 JL+SB este esquema con "absences" no se está utilizando
|
|
93
|
+
|
|
76
94
|
const absencesHolidaysShop = () => ({
|
|
77
95
|
title: 'Absences holidays shop',
|
|
78
96
|
type: 'object',
|
|
@@ -96,6 +114,7 @@ const shopHolidays = () => ({
|
|
|
96
114
|
required: ['absences'],
|
|
97
115
|
additionalProperties: false,
|
|
98
116
|
});
|
|
117
|
+
*/
|
|
99
118
|
|
|
100
119
|
const shopRepresentative = () => ({
|
|
101
120
|
type: 'object',
|
|
@@ -205,7 +224,7 @@ const shop = () => ({
|
|
|
205
224
|
manuallyDisabled: {
|
|
206
225
|
type: 'object',
|
|
207
226
|
properties: {
|
|
208
|
-
_id:uuid(),
|
|
227
|
+
_id: uuid(),
|
|
209
228
|
at: datetime(),
|
|
210
229
|
to: datetime(),
|
|
211
230
|
reason: { type: 'string', trim: true },
|
|
@@ -226,7 +245,7 @@ const shop = () => ({
|
|
|
226
245
|
},
|
|
227
246
|
|
|
228
247
|
openingSchedule: shopSchedule(),
|
|
229
|
-
holidays:
|
|
248
|
+
holidays: { type: 'array', items: shopHoliday(), uniqueItems: true },
|
|
230
249
|
timezone: timezone(),
|
|
231
250
|
contacts: {
|
|
232
251
|
type: 'array',
|
package/schemas/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { addMetadata, errorResponse: sourceErrorResponse } = require('@gls_spain/common-json-schemas');
|
|
2
2
|
const { getDefaultsResponse, updateDefaultsRequest, updateDefaultsResponse } = require('./definitions/defaults');
|
|
3
|
-
const { getCountersResponse } = require('./definitions/counters');
|
|
3
|
+
const { getCountersResponse, counters } = require('./definitions/counters');
|
|
4
4
|
const { loginResponse: sourceLoginResponse } = require('./definitions/login');
|
|
5
5
|
const { logoutResponse: sourceLogoutResponse } = require('./definitions/logout');
|
|
6
6
|
const { becomeRequest: sourceBecomeRequest } = require('./definitions/become');
|
|
@@ -93,6 +93,7 @@ const {
|
|
|
93
93
|
} = require('./definitions/expeditions');
|
|
94
94
|
const { findPodsRequest, findPodsResponse } = require('./definitions/pods');
|
|
95
95
|
const {
|
|
96
|
+
representative,
|
|
96
97
|
createRepresentativeRequest,
|
|
97
98
|
createRepresentativeResponse,
|
|
98
99
|
findRepresentativesRequest,
|
|
@@ -107,6 +108,7 @@ const {
|
|
|
107
108
|
deleteRepresentativeResponse,
|
|
108
109
|
} = require('./definitions/representatives');
|
|
109
110
|
const {
|
|
111
|
+
zone,
|
|
110
112
|
createZoneRequest,
|
|
111
113
|
createZoneResponse,
|
|
112
114
|
listZonesNamesResponse,
|
|
@@ -118,7 +120,7 @@ const {
|
|
|
118
120
|
deleteZoneResponse,
|
|
119
121
|
} = require('./definitions/zones');
|
|
120
122
|
const { findIntegrationsRequest, findIntegrationsResponse, integration } = require('./definitions/integrations');
|
|
121
|
-
const { findHistoricRecordsRequest, findHistoricRecordsResponse } = require('./definitions/historic-records');
|
|
123
|
+
const { findHistoricRecordsRequest, findHistoricRecordsResponse, historicRecord } = require('./definitions/historic-records');
|
|
122
124
|
const {
|
|
123
125
|
createSaleRequest,
|
|
124
126
|
createSaleResponse,
|
|
@@ -297,6 +299,10 @@ const saleSchema = addMetadata(sale(), 'sale');
|
|
|
297
299
|
const integrationSchema = addMetadata(integration(), 'integration');
|
|
298
300
|
const shopSchema = addMetadata(shop(), 'shop');
|
|
299
301
|
const networkSchema = addMetadata(network(), 'network');
|
|
302
|
+
const countersSchema = addMetadata(counters(), 'counters');
|
|
303
|
+
const historicRecordSchema = addMetadata(historicRecord(), 'historicRecord');
|
|
304
|
+
const zoneSchema = addMetadata(zone(), 'zone');
|
|
305
|
+
const representativeSchema = addMetadata(representative(), 'representative');
|
|
300
306
|
|
|
301
307
|
module.exports = {
|
|
302
308
|
errorResponse,
|
|
@@ -447,4 +453,8 @@ module.exports = {
|
|
|
447
453
|
integration: integrationSchema,
|
|
448
454
|
shop: shopSchema,
|
|
449
455
|
network: networkSchema,
|
|
456
|
+
zone: zoneSchema,
|
|
457
|
+
counters: countersSchema,
|
|
458
|
+
historicRecord: historicRecordSchema,
|
|
459
|
+
representative: representativeSchema,
|
|
450
460
|
};
|