@gls_spain/gps-common 34.13.2 → 34.15.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,11 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
# [34.15.0](https://github.com/GLS-Spain/gps-common/compare/v34.14.0...v34.15.0) (2021-05-24)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Features
|
|
5
5
|
|
|
6
|
-
*
|
|
7
|
-
* problem with names internal ([750ee84](https://github.com/GLS-Spain/gps-common/commit/750ee84eaa9569f7373d82a32553f03eec6cf0e3))
|
|
6
|
+
* add new property 'type' in network ([1bbd68f](https://github.com/GLS-Spain/gps-common/commit/1bbd68fd2493568a2be84ba36fd29684d1123901))
|
|
8
7
|
|
|
8
|
+
# [34.14.0](https://github.com/GLS-Spain/gps-common/compare/v34.13.2...v34.14.0) (2021-05-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* new end point notNofiticationReceiver ([8af8d6d](https://github.com/GLS-Spain/gps-common/commit/8af8d6dad7b5b9d6df96446799c7f2f62002b6a0))
|
|
14
|
+
|
|
15
|
+
## [34.13.2](https://github.com/GLS-Spain/gps-common/compare/v34.13.1...v34.13.2) (2021-05-21)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* problem with intenal names ([e10a81f](https://github.com/GLS-Spain/gps-common/commit/e10a81fb457a8ca0a42f896762ed6343d34927b8))
|
|
21
|
+
* problem with names internal ([750ee84](https://github.com/GLS-Spain/gps-common/commit/750ee84eaa9569f7373d82a32553f03eec6cf0e3))
|
|
22
|
+
|
|
9
23
|
## [34.13.1](https://github.com/GLS-Spain/gps-common/compare/v34.13.0...v34.13.1) (2021-05-21)
|
|
10
24
|
|
|
11
25
|
|
package/open-api-spec/index.js
CHANGED
|
@@ -135,6 +135,7 @@ const {
|
|
|
135
135
|
unexpireExpeditionRequest,
|
|
136
136
|
updateExpeditionDerivationRequest,
|
|
137
137
|
reminderResponse,
|
|
138
|
+
notNotificationResponse,
|
|
138
139
|
processExpeditionsDepositedFromRequest
|
|
139
140
|
} = require('../schemas/definitions/expeditions');
|
|
140
141
|
const { defaults, getDefaultsResponse, updateDefaultsRequest, updateDefaultsResponse } = require('../schemas/definitions/defaults');
|
|
@@ -151,7 +152,6 @@ const {
|
|
|
151
152
|
upsertShopEvent,
|
|
152
153
|
upsertNetworkEvent,
|
|
153
154
|
upsertSaleEvent,
|
|
154
|
-
depositedFromDriverEvent,
|
|
155
155
|
} = require('../schemas/definitions/gls-spain-integration-events');
|
|
156
156
|
const {
|
|
157
157
|
representative,
|
|
@@ -3401,6 +3401,41 @@ ${securitySchemes.shopUserRole}
|
|
|
3401
3401
|
}
|
|
3402
3402
|
}
|
|
3403
3403
|
},
|
|
3404
|
+
'/expeditions/notNotificationReceiver/{shopId}': {
|
|
3405
|
+
get: {
|
|
3406
|
+
tags: ['Expeditions'],
|
|
3407
|
+
parameters: [
|
|
3408
|
+
{
|
|
3409
|
+
name: 'shopId',
|
|
3410
|
+
in: 'path',
|
|
3411
|
+
required: true,
|
|
3412
|
+
schema: { type: 'string' },
|
|
3413
|
+
description: `Shop Id to find expeditions reminder`,
|
|
3414
|
+
},
|
|
3415
|
+
],
|
|
3416
|
+
summary: '[S] Expeditions to not notification not receiver',
|
|
3417
|
+
description: `
|
|
3418
|
+
Return expeditions to receiver and the shop not notification
|
|
3419
|
+
|
|
3420
|
+
${securitySchemes.tokens}
|
|
3421
|
+
|
|
3422
|
+
${securitySchemes.shopUserRole}
|
|
3423
|
+
`,
|
|
3424
|
+
responses: {
|
|
3425
|
+
'200': {
|
|
3426
|
+
description: 'Contains expeditions to reminder',
|
|
3427
|
+
content: { 'application/json': { schema: notNotificationResponse() } }
|
|
3428
|
+
},
|
|
3429
|
+
' 400': responses.badRequest,
|
|
3430
|
+
' 401': responses.invalidUserInCookieOrHeader,
|
|
3431
|
+
' 401 ': responses.invalidCookieOrHeader,
|
|
3432
|
+
' 401 ': responses.missingCookieOrHeader,
|
|
3433
|
+
' 401 ': responses.unauthorized,
|
|
3434
|
+
' 403': responses.forbidden,
|
|
3435
|
+
' 500': responses.internalServerError,
|
|
3436
|
+
}
|
|
3437
|
+
}
|
|
3438
|
+
},
|
|
3404
3439
|
'/pods/find': {
|
|
3405
3440
|
post: {
|
|
3406
3441
|
tags: ['Pods'],
|
package/package.json
CHANGED
|
@@ -435,6 +435,15 @@ const findByFiscal = () => ({
|
|
|
435
435
|
additionalProperties: false,
|
|
436
436
|
});
|
|
437
437
|
|
|
438
|
+
const networkType = () => ({
|
|
439
|
+
type: 'string',
|
|
440
|
+
enum: [
|
|
441
|
+
'ParcelShop',
|
|
442
|
+
'Locker',
|
|
443
|
+
'Agency'
|
|
444
|
+
]
|
|
445
|
+
});
|
|
446
|
+
|
|
438
447
|
module.exports = {
|
|
439
448
|
specificErrorResponse,
|
|
440
449
|
date,
|
|
@@ -459,4 +468,5 @@ module.exports = {
|
|
|
459
468
|
contact,
|
|
460
469
|
fiscal,
|
|
461
470
|
findByFiscal,
|
|
471
|
+
networkType
|
|
462
472
|
};
|
|
@@ -853,9 +853,30 @@ const reminderResponse = () => ({
|
|
|
853
853
|
items: {
|
|
854
854
|
type: 'object',
|
|
855
855
|
properties: {
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
856
|
+
nameSender: { type: 'string' },
|
|
857
|
+
nameDestination: { type: 'string' },
|
|
858
|
+
expiredAt: { type: 'string' },
|
|
859
|
+
codeExpedition: { type: 'integer' }
|
|
860
|
+
},
|
|
861
|
+
},
|
|
862
|
+
}
|
|
863
|
+
},
|
|
864
|
+
additionalProperties: false
|
|
865
|
+
});
|
|
866
|
+
|
|
867
|
+
const notNotificationResponse = () => ({
|
|
868
|
+
title: 'expeditions',
|
|
869
|
+
type: 'object',
|
|
870
|
+
properties:{
|
|
871
|
+
expeditions: {
|
|
872
|
+
type: 'array',
|
|
873
|
+
items: {
|
|
874
|
+
type: 'object',
|
|
875
|
+
properties: {
|
|
876
|
+
nameSender: { type: 'string' },
|
|
877
|
+
nameDestination: { type: 'string' },
|
|
878
|
+
expiredAt: { type: 'string' },
|
|
879
|
+
codeExpedition: { type: 'integer' }
|
|
859
880
|
},
|
|
860
881
|
},
|
|
861
882
|
}
|
|
@@ -895,4 +916,5 @@ module.exports = {
|
|
|
895
916
|
unexpireExpeditionRequest,
|
|
896
917
|
updateExpeditionDerivationRequest,
|
|
897
918
|
reminderResponse,
|
|
919
|
+
notNotificationResponse
|
|
898
920
|
};
|
|
@@ -12,7 +12,7 @@ const {
|
|
|
12
12
|
deleteResponse,
|
|
13
13
|
pickProperties,
|
|
14
14
|
} = require('@gls_spain/common-json-schemas');
|
|
15
|
-
const { findAll, findById, findByName, objectWithUuidAndName, contact, fiscal } = require('./common');
|
|
15
|
+
const { findAll, findById, findByName, objectWithUuidAndName, contact, fiscal, networkType } = require('./common');
|
|
16
16
|
const { defaults, derivationSettings, expirationSettings } = require('./defaults');
|
|
17
17
|
|
|
18
18
|
const network = () => ({
|
|
@@ -47,8 +47,9 @@ const network = () => ({
|
|
|
47
47
|
required: ['networkPercentage', 'shopPercentage'],
|
|
48
48
|
additionalProperties: false,
|
|
49
49
|
},
|
|
50
|
+
type: networkType()
|
|
50
51
|
},
|
|
51
|
-
required: ['_id', 'createdAt', 'updatedAt', 'deletable', 'readonly', 'defaults', 'name', 'contacts', 'salesSettings'],
|
|
52
|
+
required: ['_id', 'createdAt', 'updatedAt', 'deletable', 'readonly', 'defaults', 'name', 'contacts', 'salesSettings', 'type'],
|
|
52
53
|
additionalProperties: false,
|
|
53
54
|
});
|
|
54
55
|
|
|
@@ -73,6 +74,7 @@ const createNetworkRequest = () =>
|
|
|
73
74
|
'derivationSettings',
|
|
74
75
|
'expirationSettings',
|
|
75
76
|
'salesSettings',
|
|
77
|
+
'type'
|
|
76
78
|
]),
|
|
77
79
|
},
|
|
78
80
|
required: ['name', 'salesSettings'],
|
package/schemas/index.js
CHANGED
|
@@ -83,6 +83,7 @@ const {
|
|
|
83
83
|
unexpireExpeditionRequest,
|
|
84
84
|
updateExpeditionDerivationRequest,
|
|
85
85
|
reminderResponse,
|
|
86
|
+
notNotificationResponse,
|
|
86
87
|
processExpeditionsDepositedFromRequest
|
|
87
88
|
} = require('./definitions/expeditions');
|
|
88
89
|
const { findPodsRequest, findPodsResponse } = require('./definitions/pods');
|
|
@@ -230,6 +231,7 @@ const expeditionsExpireRequest = request(expireExpeditionRequest(), 'expeditions
|
|
|
230
231
|
const expeditionsUnexpireRequest = request(unexpireExpeditionRequest(), 'expeditionsUnexpireRequest');
|
|
231
232
|
const expeditionsUpdateDerivationRequest = request(updateExpeditionDerivationRequest(), 'expeditionsUpdateDerivationRequest');
|
|
232
233
|
const expeditionsReminderRequest = request(reminderResponse(), 'expeditionsReminderRequest');
|
|
234
|
+
const expeditionsNotNotificationRequest = request(notNotificationResponse(), 'expeditionsNotNotificationRequest');
|
|
233
235
|
|
|
234
236
|
const podsFindRequest = request(findPodsRequest(), 'podsFindRequest');
|
|
235
237
|
const podsFindResponse = response(findPodsResponse(), 'podsFindResponse');
|