@gls_spain/gps-common 32.1.0 → 32.1.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/.idea/workspace.xml +12 -9
- package/CHANGELOG.md +7 -0
- package/open-api-spec/index.js +40 -5
- package/package.json +1 -1
- package/schemas/definitions/expeditions.js +6 -2
- package/schemas/index.js +6 -6
package/.idea/workspace.xml
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
<project version="4">
|
|
3
3
|
<component name="ChangeListManager">
|
|
4
4
|
<list default="true" id="c2833e40-3178-44f3-9bc5-203849985c7f" name="Default Changelist" comment="">
|
|
5
|
+
<change beforePath="$PROJECT_DIR$/open-api-spec/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/open-api-spec/index.js" afterDir="false" />
|
|
5
6
|
<change beforePath="$PROJECT_DIR$/schemas/definitions/expeditions.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/expeditions.js" afterDir="false" />
|
|
7
|
+
<change beforePath="$PROJECT_DIR$/schemas/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/index.js" afterDir="false" />
|
|
6
8
|
</list>
|
|
7
9
|
<option name="SHOW_DIALOG" value="false" />
|
|
8
10
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -551,7 +553,8 @@
|
|
|
551
553
|
<workItem from="1587566126161" duration="142000" />
|
|
552
554
|
<workItem from="1587569584217" duration="5000" />
|
|
553
555
|
<workItem from="1588001875839" duration="425000" />
|
|
554
|
-
<workItem from="1588014009601" duration="
|
|
556
|
+
<workItem from="1588014009601" duration="1578000" />
|
|
557
|
+
<workItem from="1588016472441" duration="409000" />
|
|
555
558
|
</task>
|
|
556
559
|
<servers />
|
|
557
560
|
</component>
|
|
@@ -602,22 +605,22 @@
|
|
|
602
605
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
603
606
|
</state>
|
|
604
607
|
<state x="606" y="280" key="EditFileWatcherDialog/0.23.2048.1129@0.23.2048.1129" timestamp="1580283934403" />
|
|
605
|
-
<state width="2006" height="269" key="GridCell.Tab.0.bottom" timestamp="
|
|
608
|
+
<state width="2006" height="269" key="GridCell.Tab.0.bottom" timestamp="1588016102260">
|
|
606
609
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
607
610
|
</state>
|
|
608
|
-
<state width="2006" height="269" key="GridCell.Tab.0.bottom/0.23.2048.1129@0.23.2048.1129" timestamp="
|
|
609
|
-
<state width="2006" height="269" key="GridCell.Tab.0.center" timestamp="
|
|
611
|
+
<state width="2006" height="269" key="GridCell.Tab.0.bottom/0.23.2048.1129@0.23.2048.1129" timestamp="1588016102260" />
|
|
612
|
+
<state width="2006" height="269" key="GridCell.Tab.0.center" timestamp="1588016102260">
|
|
610
613
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
611
614
|
</state>
|
|
612
|
-
<state width="2006" height="269" key="GridCell.Tab.0.center/0.23.2048.1129@0.23.2048.1129" timestamp="
|
|
613
|
-
<state width="2006" height="269" key="GridCell.Tab.0.left" timestamp="
|
|
615
|
+
<state width="2006" height="269" key="GridCell.Tab.0.center/0.23.2048.1129@0.23.2048.1129" timestamp="1588016102260" />
|
|
616
|
+
<state width="2006" height="269" key="GridCell.Tab.0.left" timestamp="1588016102260">
|
|
614
617
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
615
618
|
</state>
|
|
616
|
-
<state width="2006" height="269" key="GridCell.Tab.0.left/0.23.2048.1129@0.23.2048.1129" timestamp="
|
|
617
|
-
<state width="2006" height="269" key="GridCell.Tab.0.right" timestamp="
|
|
619
|
+
<state width="2006" height="269" key="GridCell.Tab.0.left/0.23.2048.1129@0.23.2048.1129" timestamp="1588016102260" />
|
|
620
|
+
<state width="2006" height="269" key="GridCell.Tab.0.right" timestamp="1588016102260">
|
|
618
621
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
619
622
|
</state>
|
|
620
|
-
<state width="2006" height="269" key="GridCell.Tab.0.right/0.23.2048.1129@0.23.2048.1129" timestamp="
|
|
623
|
+
<state width="2006" height="269" key="GridCell.Tab.0.right/0.23.2048.1129@0.23.2048.1129" timestamp="1588016102260" />
|
|
621
624
|
<state x="0" y="23" width="2048" height="1129" key="SettingsEditor" timestamp="1580283935326">
|
|
622
625
|
<screen x="0" y="23" width="2048" height="1129" />
|
|
623
626
|
</state>
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [32.1.1](https://github.com/GLS-Spain/gps-common/compare/v32.1.0...v32.1.1) (2020-04-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* split find expeditions between network admins and shop users ([299e03c](https://github.com/GLS-Spain/gps-common/commit/299e03cad70be83123c5d5f710eff02a46e68e0e))
|
|
7
|
+
|
|
1
8
|
# [32.1.0](https://github.com/GLS-Spain/gps-common/compare/v32.0.3...v32.1.0) (2020-04-27)
|
|
2
9
|
|
|
3
10
|
|
package/open-api-spec/index.js
CHANGED
|
@@ -102,7 +102,8 @@ const {
|
|
|
102
102
|
createExpeditionRequest,
|
|
103
103
|
createExpeditionResponse,
|
|
104
104
|
findExpeditionsSuperAdminRequest,
|
|
105
|
-
|
|
105
|
+
findExpeditionsNetworkAdminRequest,
|
|
106
|
+
findExpeditionsShopUserRequest,
|
|
106
107
|
findExpeditionsResponse,
|
|
107
108
|
updateExpeditionRequest,
|
|
108
109
|
updateExpeditionResponse,
|
|
@@ -2543,19 +2544,53 @@ ${securitySchemes.anyRole}`,
|
|
|
2543
2544
|
'/expeditions/find ': {
|
|
2544
2545
|
post: {
|
|
2545
2546
|
tags: ['Expeditions'],
|
|
2546
|
-
summary: '[
|
|
2547
|
+
summary: '[N] Find',
|
|
2548
|
+
description: `
|
|
2549
|
+
Finds expeditions by one of several filters.
|
|
2550
|
+
|
|
2551
|
+
${descriptions.findLimitTip}
|
|
2552
|
+
|
|
2553
|
+
The results will be limited to the network the admin belongs to, so for example if he finds by \`_id\` and the expedition is from another
|
|
2554
|
+
network, the find will return no results.
|
|
2555
|
+
|
|
2556
|
+
${securitySchemes.tokens}
|
|
2557
|
+
${securitySchemes.anyRole}`,
|
|
2558
|
+
requestBody: {
|
|
2559
|
+
content: { 'application/json': { schema: findExpeditionsNetworkAdminRequest() } },
|
|
2560
|
+
required: true,
|
|
2561
|
+
},
|
|
2562
|
+
responses: {
|
|
2563
|
+
' 200': {
|
|
2564
|
+
description: 'Contains the found expeditions.',
|
|
2565
|
+
content: { 'application/json': { schema: findExpeditionsResponse() } },
|
|
2566
|
+
},
|
|
2567
|
+
' 400': responses.badRequest,
|
|
2568
|
+
' 401': responses.invalidUserInCookieOrHeader,
|
|
2569
|
+
' 401 ': responses.invalidCookieOrHeader,
|
|
2570
|
+
' 401 ': responses.missingCookieOrHeader,
|
|
2571
|
+
' 401 ': responses.unauthorized,
|
|
2572
|
+
' 403': responses.forbidden,
|
|
2573
|
+
' 415': responses.unsupportedMediaType,
|
|
2574
|
+
' 500': responses.internalServerError,
|
|
2575
|
+
},
|
|
2576
|
+
},
|
|
2577
|
+
},
|
|
2578
|
+
'/expeditions/find ': {
|
|
2579
|
+
post: {
|
|
2580
|
+
tags: ['Expeditions'],
|
|
2581
|
+
summary: '[U] Find',
|
|
2547
2582
|
description: `
|
|
2548
2583
|
Finds expeditions by one of several filters.
|
|
2549
2584
|
|
|
2550
2585
|
${descriptions.findLimitTip}
|
|
2551
2586
|
|
|
2552
|
-
|
|
2553
|
-
|
|
2587
|
+
The results will be limited to the shop the user belongs to, so for example if he finds by \`_id\` and the expedition is from another
|
|
2588
|
+
network or shop, the find will return no results.
|
|
2554
2589
|
|
|
2555
2590
|
${securitySchemes.tokens}
|
|
2556
2591
|
${securitySchemes.anyRole}`,
|
|
2557
2592
|
requestBody: {
|
|
2558
|
-
content: { 'application/json': { schema:
|
|
2593
|
+
content: { 'application/json': { schema: findExpeditionsShopUserRequest() } },
|
|
2559
2594
|
required: true,
|
|
2560
2595
|
},
|
|
2561
2596
|
responses: {
|
package/package.json
CHANGED
|
@@ -474,7 +474,10 @@ const findExpeditionsSuperAdminRequest = () =>
|
|
|
474
474
|
],
|
|
475
475
|
});
|
|
476
476
|
|
|
477
|
-
const
|
|
477
|
+
const findExpeditionsNetworkAdminRequest = () =>
|
|
478
|
+
findRequest({ oneOf: [findById(), findByShop(), findByShopAndStatus(), findByNoShop(), findByNoShopAndStatus(), findByCode()] });
|
|
479
|
+
|
|
480
|
+
const findExpeditionsShopUserRequest = () =>
|
|
478
481
|
findRequest({
|
|
479
482
|
oneOf: [
|
|
480
483
|
findById(),
|
|
@@ -728,7 +731,8 @@ module.exports = {
|
|
|
728
731
|
createExpeditionRequest,
|
|
729
732
|
createExpeditionResponse,
|
|
730
733
|
findExpeditionsSuperAdminRequest,
|
|
731
|
-
|
|
734
|
+
findExpeditionsNetworkAdminRequest,
|
|
735
|
+
findExpeditionsShopUserRequest,
|
|
732
736
|
findExpeditionsResponse,
|
|
733
737
|
updateExpeditionRequest,
|
|
734
738
|
updateExpeditionResponse,
|
package/schemas/index.js
CHANGED
|
@@ -59,7 +59,8 @@ const {
|
|
|
59
59
|
createExpeditionRequest,
|
|
60
60
|
createExpeditionResponse,
|
|
61
61
|
findExpeditionsSuperAdminRequest,
|
|
62
|
-
|
|
62
|
+
findExpeditionsNetworkAdminRequest,
|
|
63
|
+
findExpeditionsShopUserRequest,
|
|
63
64
|
findExpeditionsResponse,
|
|
64
65
|
updateExpeditionRequest,
|
|
65
66
|
updateExpeditionResponse,
|
|
@@ -176,10 +177,8 @@ const shopUsersDeleteResponse = response(deleteShopUserResponse(), 'shopUsersDel
|
|
|
176
177
|
const expeditionsCreateRequest = request(createExpeditionRequest(), 'expeditionsCreateRequest');
|
|
177
178
|
const expeditionsCreateResponse = response(createExpeditionResponse(), 'expeditionsCreateResponse');
|
|
178
179
|
const expeditionsFindSuperAdminRequest = request(findExpeditionsSuperAdminRequest(), 'expeditionsFindSuperAdminRequest');
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
'expeditionsFindNetworkAdminAndShopUserRequest',
|
|
182
|
-
);
|
|
180
|
+
const expeditionsFindNetworkAdminRequest = request(findExpeditionsNetworkAdminRequest(), 'expeditionsFindNetworkAdminRequest');
|
|
181
|
+
const expeditionsFindShopUserRequest = request(findExpeditionsShopUserRequest(), 'expeditionsFindShopUserRequest');
|
|
183
182
|
const expeditionsFindResponse = response(findExpeditionsResponse(), 'expeditionsFindResponse');
|
|
184
183
|
const expeditionsUpdateRequest = request(updateExpeditionRequest(), 'expeditionsUpdateRequest');
|
|
185
184
|
const expeditionsUpdateResponse = response(updateExpeditionResponse(), 'expeditionsUpdateResponse');
|
|
@@ -295,7 +294,8 @@ module.exports = {
|
|
|
295
294
|
expeditionsCreateRequest,
|
|
296
295
|
expeditionsCreateResponse,
|
|
297
296
|
expeditionsFindSuperAdminRequest,
|
|
298
|
-
|
|
297
|
+
expeditionsFindNetworkAdminRequest,
|
|
298
|
+
expeditionsFindShopUserRequest,
|
|
299
299
|
expeditionsFindResponse,
|
|
300
300
|
expeditionsUpdateRequest,
|
|
301
301
|
expeditionsUpdateResponse,
|