@gls_spain/gps-common 34.13.1 → 34.14.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,10 +1,25 @@
1
- ## [34.13.1](https://github.com/GLS-Spain/gps-common/compare/v34.13.0...v34.13.1) (2021-05-21)
1
+ # [34.14.0](https://github.com/GLS-Spain/gps-common/compare/v34.13.2...v34.14.0) (2021-05-21)
2
2
 
3
3
 
4
- ### Bug Fixes
4
+ ### Features
5
5
 
6
- * change role in endpoint depositedFromDriver ([220ef30](https://github.com/GLS-Spain/gps-common/commit/220ef3011c9ff41965497b2866b0c07997568790))
6
+ * new end point notNofiticationReceiver ([8af8d6d](https://github.com/GLS-Spain/gps-common/commit/8af8d6dad7b5b9d6df96446799c7f2f62002b6a0))
7
7
 
8
+ ## [34.13.2](https://github.com/GLS-Spain/gps-common/compare/v34.13.1...v34.13.2) (2021-05-21)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * problem with intenal names ([e10a81f](https://github.com/GLS-Spain/gps-common/commit/e10a81fb457a8ca0a42f896762ed6343d34927b8))
14
+ * problem with names internal ([750ee84](https://github.com/GLS-Spain/gps-common/commit/750ee84eaa9569f7373d82a32553f03eec6cf0e3))
15
+
16
+ ## [34.13.1](https://github.com/GLS-Spain/gps-common/compare/v34.13.0...v34.13.1) (2021-05-21)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * change role in endpoint depositedFromDriver ([220ef30](https://github.com/GLS-Spain/gps-common/commit/220ef3011c9ff41965497b2866b0c07997568790))
22
+
8
23
  # [34.13.0](https://github.com/GLS-Spain/gps-common/compare/v34.12.0...v34.13.0) (2021-05-21)
9
24
 
10
25
 
@@ -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,
@@ -2987,7 +2987,7 @@ ${securitySchemes.superAdminRole}`,
2987
2987
  description: 'Contains the result of the processing for each expedition.',
2988
2988
  content: { 'application/json': { schema: processExpeditionsResponse() } },
2989
2989
  },
2990
- ' 400': responses.badRequest,
2990
+ ' 400': responses.badRequest,
2991
2991
  ' 401': responses.invalidUserInCookieOrHeader,
2992
2992
  ' 401 ': responses.invalidCookieOrHeader,
2993
2993
  ' 401 ': responses.missingCookieOrHeader,
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gls_spain/gps-common",
3
- "version": "34.13.1",
3
+ "version": "34.14.0",
4
4
  "description": "Errors, schemas and documentation for the Parcel Shops project",
5
5
  "keywords": [
6
6
  "gls"
@@ -853,9 +853,30 @@ const reminderResponse = () => ({
853
853
  items: {
854
854
  type: 'object',
855
855
  properties: {
856
- name: { type: 'string' },
857
- address: { type: 'string' },
858
- barcode: { type: 'integer' }
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
  }
@@ -884,6 +905,7 @@ module.exports = {
884
905
  scanExpeditionRequest,
885
906
  scanExpeditionResponse,
886
907
  processExpeditionsWithDriverRequest,
908
+ processExpeditionsDepositedFromRequest,
887
909
  processExpeditionsWithCustomerRequest,
888
910
  processExpeditionsResponse,
889
911
  receiveAllExpeditionsFromDriverRequest,
@@ -894,5 +916,5 @@ module.exports = {
894
916
  unexpireExpeditionRequest,
895
917
  updateExpeditionDerivationRequest,
896
918
  reminderResponse,
897
- processExpeditionsDepositedFromRequest
919
+ notNotificationResponse
898
920
  };
package/schemas/index.js CHANGED
@@ -82,7 +82,9 @@ const {
82
82
  expireExpeditionRequest,
83
83
  unexpireExpeditionRequest,
84
84
  updateExpeditionDerivationRequest,
85
- reminderResponse
85
+ reminderResponse,
86
+ notNotificationResponse,
87
+ processExpeditionsDepositedFromRequest
86
88
  } = require('./definitions/expeditions');
87
89
  const { findPodsRequest, findPodsResponse } = require('./definitions/pods');
88
90
  const {
@@ -216,6 +218,7 @@ const expeditionsScanRequest = request(scanExpeditionRequest(), 'expeditionsScan
216
218
  const expeditionsScanResponse = response(scanExpeditionResponse(), 'expeditionsScanResponse');
217
219
  const expeditionsProcessWithDriverRequest = request(processExpeditionsWithCustomerRequest(), 'expeditionsProcessWithCustomerRequest');
218
220
  const expeditionsProcessWithCustomerRequest = request(processExpeditionsWithDriverRequest(), 'expeditionsProcessWithDriverRequest');
221
+ const expeditionsProcessDepositedFromRequest = request(processExpeditionsDepositedFromRequest(), 'expeditionsProcessDepositedFromRequest');
219
222
  const expeditionsProcessResponse = response(processExpeditionsResponse(), 'expeditionsProcessResponse');
220
223
  const expeditionsReceiveAllFromDriverRequest = request(receiveAllExpeditionsFromDriverRequest(), 'expeditionsReceiveAllFromDriverRequest');
221
224
  const expeditionsReceiveAllFromDriverResponse = response(
@@ -228,6 +231,7 @@ const expeditionsExpireRequest = request(expireExpeditionRequest(), 'expeditions
228
231
  const expeditionsUnexpireRequest = request(unexpireExpeditionRequest(), 'expeditionsUnexpireRequest');
229
232
  const expeditionsUpdateDerivationRequest = request(updateExpeditionDerivationRequest(), 'expeditionsUpdateDerivationRequest');
230
233
  const expeditionsReminderRequest = request(reminderResponse(), 'expeditionsReminderRequest');
234
+ const expeditionsNotNotificationRequest = request(notNotificationResponse(), 'expeditionsNotNotificationRequest');
231
235
 
232
236
  const podsFindRequest = request(findPodsRequest(), 'podsFindRequest');
233
237
  const podsFindResponse = response(findPodsResponse(), 'podsFindResponse');
@@ -357,6 +361,7 @@ module.exports = {
357
361
  expeditionsScanResponse,
358
362
  expeditionsProcessWithDriverRequest,
359
363
  expeditionsProcessWithCustomerRequest,
364
+ expeditionsProcessDepositedFromRequest,
360
365
  expeditionsProcessResponse,
361
366
  expeditionsReceiveAllFromDriverRequest,
362
367
  expeditionsReceiveAllFromDriverResponse,