@gls_spain/gps-common 34.30.5 → 34.31.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 +16 -2
- package/README.md +11 -11
- package/package.json +2 -1
- package/schemas/definitions/expeditions.js +13 -0
- package/schemas/definitions/sales.js +1 -0
- package/schemas/definitions/shops.js +1 -1
- package/scripts/build-documentation.js +1 -1
- package/scripts/build-json-schemas.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
## [34.
|
|
1
|
+
## [34.31.1](https://github.com/GLS-Spain/gps-common/compare/v34.31.0...v34.31.1) (2023-09-11)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
* add
|
|
6
|
+
* add shopproviders to process scan ([8a9c45d](https://github.com/GLS-Spain/gps-common/commit/8a9c45d017a9ccc513832bf6109050d1ebd07b4a))
|
|
7
7
|
|
|
8
|
+
# [34.31.0](https://github.com/GLS-Spain/gps-common/compare/v34.30.5...v34.31.0) (2023-07-31)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add required filds to schema ([b68c30e](https://github.com/GLS-Spain/gps-common/commit/b68c30eddf6dd9acf89e01a589181c2480a88897))
|
|
14
|
+
|
|
15
|
+
## [34.30.5](https://github.com/GLS-Spain/gps-common/compare/v34.30.4...v34.30.5) (2023-06-14)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* add fourteenService ([3ea355e](https://github.com/GLS-Spain/gps-common/commit/3ea355ecdf899a0bc78f20751cccbafbfb819404))
|
|
21
|
+
|
|
8
22
|
## [34.30.4](https://github.com/GLS-Spain/gps-common/compare/v34.30.3...v34.30.4) (2023-05-23)
|
|
9
23
|
|
|
10
24
|
|
package/README.md
CHANGED
|
@@ -51,17 +51,17 @@ validator.addSchema(loginResponse);
|
|
|
51
51
|
|
|
52
52
|
const myResponse = {
|
|
53
53
|
user: {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
54
|
+
_id: '2d34620b-c67d-42ec-853d-2541a964df56',
|
|
55
|
+
createdAt: '2019-05-23 09:00:00',
|
|
56
|
+
updatedAt: '2019-05-23 09:00:00',
|
|
57
|
+
username: 'bob',
|
|
58
|
+
deletable: false,
|
|
59
|
+
loginEnabled: true,
|
|
60
|
+
role: 'superAdmin',
|
|
61
|
+
name: 'Super administrator',
|
|
62
|
+
emails: [],
|
|
63
|
+
phones: [],
|
|
64
|
+
},
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
const valid = validator.validate(loginResponse, myResponse); // true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gls_spain/gps-common",
|
|
3
|
-
"version": "34.
|
|
3
|
+
"version": "34.31.1",
|
|
4
4
|
"description": "Errors, schemas and documentation for the Parcel Shops project",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gls"
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"@gls_spain/ajv-options": "^1.1.2",
|
|
47
47
|
"@gls_spain/common-errors": "^1.1.0",
|
|
48
48
|
"@gls_spain/common-json-schemas": "^1.2.4",
|
|
49
|
+
"@gls_spain/gps-common": "^34.30.5",
|
|
49
50
|
"@gls_spain/mongodb": "^1.2.0",
|
|
50
51
|
"@gls_spain/winston-transports": "^1.0.2",
|
|
51
52
|
"lodash": "^4.17.21",
|
|
@@ -59,6 +59,17 @@ const driver = () => ({
|
|
|
59
59
|
additionalProperties: false,
|
|
60
60
|
});
|
|
61
61
|
|
|
62
|
+
const shopProvider = () =>({
|
|
63
|
+
title: 'shopProvider',
|
|
64
|
+
type: 'object',
|
|
65
|
+
properties:{
|
|
66
|
+
_id: uuid(),
|
|
67
|
+
name:{ type: 'string', trim: true },
|
|
68
|
+
},
|
|
69
|
+
required: ['_id', 'name'],
|
|
70
|
+
additionalProperties: false,
|
|
71
|
+
})
|
|
72
|
+
|
|
62
73
|
const customer = () => ({
|
|
63
74
|
title: 'customer',
|
|
64
75
|
type: 'object',
|
|
@@ -708,6 +719,7 @@ const processExpeditionsWithDriverRequest = () => ({
|
|
|
708
719
|
properties: {
|
|
709
720
|
expeditions: omit(findByIds(), 'title'),
|
|
710
721
|
driver: driver(),
|
|
722
|
+
shop: shopProvider(),
|
|
711
723
|
},
|
|
712
724
|
required: ['expeditions', 'driver'],
|
|
713
725
|
additionalProperties: false,
|
|
@@ -718,6 +730,7 @@ const processExpeditionsWithCustomerRequest = () => ({
|
|
|
718
730
|
properties: {
|
|
719
731
|
expeditions: omit(findByIds(), 'title'),
|
|
720
732
|
customer: customerWithPod(),
|
|
733
|
+
shop: shopProvider(),
|
|
721
734
|
},
|
|
722
735
|
required: ['expeditions', 'customer'],
|
|
723
736
|
additionalProperties: false,
|
|
@@ -69,6 +69,7 @@ const sale = () => ({
|
|
|
69
69
|
phones: { type: 'array', items: phone(), uniqueItems: true },
|
|
70
70
|
observations: { type: 'string', trim: true },
|
|
71
71
|
notes: { type: 'string', trim: true },
|
|
72
|
+
// suitcasetag: { type: 'string', trim: true, uniqueItems: true },
|
|
72
73
|
},
|
|
73
74
|
required: ['name', 'address', 'emails', 'phones'],
|
|
74
75
|
additionalProperties: false,
|
|
@@ -317,7 +317,7 @@ const createShopRequest = () =>
|
|
|
317
317
|
'clientCode',
|
|
318
318
|
]),
|
|
319
319
|
},
|
|
320
|
-
required: ['network', 'status', 'name', 'address', 'openingSchedule', 'timezone'],
|
|
320
|
+
required: ['network','activity', 'status','contacts', 'name', 'address', 'openingSchedule', 'timezone','managingRepresentative','openingRepresentative'],
|
|
321
321
|
additionalProperties: false,
|
|
322
322
|
});
|
|
323
323
|
|