@gls_spain/gps-common 34.3.0 → 34.4.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.
@@ -1,12 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
3
  <component name="ChangeListManager">
4
- <list default="true" id="c2833e40-3178-44f3-9bc5-203849985c7f" name="Default Changelist" comment="">
5
- <change afterPath="$PROJECT_DIR$/errors/ShopCannotSellError.js" afterDir="false" />
6
- <change beforePath="$PROJECT_DIR$/errors/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/index.js" afterDir="false" />
7
- <change beforePath="$PROJECT_DIR$/open-api-spec/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/open-api-spec/index.js" afterDir="false" />
8
- <change beforePath="$PROJECT_DIR$/schemas/definitions/shops.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/shops.js" afterDir="false" />
9
- </list>
4
+ <list default="true" id="c2833e40-3178-44f3-9bc5-203849985c7f" name="Default Changelist" comment="" />
10
5
  <option name="SHOW_DIALOG" value="false" />
11
6
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
12
7
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -125,8 +120,8 @@
125
120
  </configuration>
126
121
  <recent_temporary>
127
122
  <list>
128
- <item itemvalue="JavaScript Debug.documentation.html (1)" />
129
123
  <item itemvalue="npm.build-documentation" />
124
+ <item itemvalue="JavaScript Debug.documentation.html (1)" />
130
125
  <item itemvalue="npm.test" />
131
126
  <item itemvalue="npm.semantic-release" />
132
127
  <item itemvalue="npm.commit" />
@@ -625,7 +620,10 @@
625
620
  <workItem from="1599675057970" duration="1442000" />
626
621
  <workItem from="1599722212402" duration="763000" />
627
622
  <workItem from="1600358026541" duration="773000" />
628
- <workItem from="1600676045368" duration="641000" />
623
+ <workItem from="1600676045368" duration="1246000" />
624
+ <workItem from="1600679037395" duration="238000" />
625
+ <workItem from="1600875504930" duration="94000" />
626
+ <workItem from="1601025758747" duration="988000" />
629
627
  </task>
630
628
  <servers />
631
629
  </component>
@@ -668,22 +666,22 @@
668
666
  <screen x="0" y="23" width="2048" height="1129" />
669
667
  </state>
670
668
  <state x="762" y="341" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.23.2048.1129@0.23.2048.1129" timestamp="1595577705727" />
671
- <state width="2006" height="269" key="GridCell.Tab.0.bottom" timestamp="1600358643265">
669
+ <state width="2006" height="269" key="GridCell.Tab.0.bottom" timestamp="1601026389150">
672
670
  <screen x="0" y="23" width="2048" height="1129" />
673
671
  </state>
674
- <state width="2006" height="269" key="GridCell.Tab.0.bottom/0.23.2048.1129@0.23.2048.1129" timestamp="1600358643265" />
675
- <state width="2006" height="269" key="GridCell.Tab.0.center" timestamp="1600358643265">
672
+ <state width="2006" height="269" key="GridCell.Tab.0.bottom/0.23.2048.1129@0.23.2048.1129" timestamp="1601026389150" />
673
+ <state width="2006" height="269" key="GridCell.Tab.0.center" timestamp="1601026389149">
676
674
  <screen x="0" y="23" width="2048" height="1129" />
677
675
  </state>
678
- <state width="2006" height="269" key="GridCell.Tab.0.center/0.23.2048.1129@0.23.2048.1129" timestamp="1600358643265" />
679
- <state width="2006" height="269" key="GridCell.Tab.0.left" timestamp="1600358643265">
676
+ <state width="2006" height="269" key="GridCell.Tab.0.center/0.23.2048.1129@0.23.2048.1129" timestamp="1601026389149" />
677
+ <state width="2006" height="269" key="GridCell.Tab.0.left" timestamp="1601026389149">
680
678
  <screen x="0" y="23" width="2048" height="1129" />
681
679
  </state>
682
- <state width="2006" height="269" key="GridCell.Tab.0.left/0.23.2048.1129@0.23.2048.1129" timestamp="1600358643265" />
683
- <state width="2006" height="269" key="GridCell.Tab.0.right" timestamp="1600358643265">
680
+ <state width="2006" height="269" key="GridCell.Tab.0.left/0.23.2048.1129@0.23.2048.1129" timestamp="1601026389149" />
681
+ <state width="2006" height="269" key="GridCell.Tab.0.right" timestamp="1601026389149">
684
682
  <screen x="0" y="23" width="2048" height="1129" />
685
683
  </state>
686
- <state width="2006" height="269" key="GridCell.Tab.0.right/0.23.2048.1129@0.23.2048.1129" timestamp="1600358643265" />
684
+ <state width="2006" height="269" key="GridCell.Tab.0.right/0.23.2048.1129@0.23.2048.1129" timestamp="1601026389149" />
687
685
  <state x="725" y="342" width="736" height="612" key="find.popup" timestamp="1598206991663">
688
686
  <screen x="0" y="23" width="2048" height="1129" />
689
687
  </state>
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [34.4.1](https://github.com/GLS-Spain/gps-common/compare/v34.4.0...v34.4.1) (2020-09-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fix get own representatives being optional ([90ecbd5](https://github.com/GLS-Spain/gps-common/commit/90ecbd53b677cb41a88e7862072c4cd718ef3d74))
7
+
8
+ # [34.4.0](https://github.com/GLS-Spain/gps-common/compare/v34.3.0...v34.4.0) (2020-09-25)
9
+
10
+
11
+ ### Features
12
+
13
+ * add GET representatives/getOwn ([7e3f5bf](https://github.com/GLS-Spain/gps-common/commit/7e3f5bfd3675f328f9b4f080661a92b9a55202b6))
14
+
1
15
  # [34.3.0](https://github.com/GLS-Spain/gps-common/compare/v34.2.0...v34.3.0) (2020-09-21)
2
16
 
3
17
 
@@ -148,6 +148,7 @@ const {
148
148
  findRepresentativesRequest,
149
149
  findRepresentativesResponse,
150
150
  listRepresentativesNamesResponse,
151
+ getOwnRepresentativesResponse,
151
152
  updateRepresentativeRequest,
152
153
  updateRepresentativeResponse,
153
154
  getRepresentativeCommissionsRequest,
@@ -2066,6 +2067,31 @@ ${securitySchemes.superAdminRole}`,
2066
2067
  },
2067
2068
  },
2068
2069
  },
2070
+ '/representatives/getOwn': {
2071
+ get: {
2072
+ tags: ['Sales representatives'],
2073
+ summary: '[U] Get own',
2074
+ description: `
2075
+ Gets the opening and managing representatives of the user's own shop.
2076
+
2077
+ ${securitySchemes.tokens}
2078
+ ${securitySchemes.shopUserRole}`,
2079
+ responses: {
2080
+ ' 200': {
2081
+ description: 'Contains the opening and managing representative of the shop.',
2082
+ content: { 'application/json': { schema: getOwnRepresentativesResponse() } },
2083
+ },
2084
+ ' 400': responses.badRequest,
2085
+ ' 401': responses.invalidUserInCookieOrHeader,
2086
+ ' 401 ': responses.invalidCookieOrHeader,
2087
+ ' 401 ': responses.missingCookieOrHeader,
2088
+ ' 401 ': responses.unauthorized,
2089
+ ' 403': responses.forbidden,
2090
+ ' 415': responses.unsupportedMediaType,
2091
+ ' 500': responses.internalServerError,
2092
+ },
2093
+ },
2094
+ },
2069
2095
  '/representatives/find': {
2070
2096
  post: {
2071
2097
  tags: ['Sales representatives'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gls_spain/gps-common",
3
- "version": "34.3.0",
3
+ "version": "34.4.1",
4
4
  "description": "Errors, schemas and documentation for the Parcel Shops project",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -76,6 +76,22 @@ const listRepresentativesNamesResponse = () => ({
76
76
  additionalProperties: false,
77
77
  });
78
78
 
79
+ const getOwnRepresentativesResponse = () => ({
80
+ type: 'object',
81
+ properties: {
82
+ get: {
83
+ type: 'object',
84
+ properties: {
85
+ openingRepresentative: representative(),
86
+ managingRepresentative: representative(),
87
+ },
88
+ additionalProperties: false,
89
+ },
90
+ },
91
+ required: ['get'],
92
+ additionalProperties: false,
93
+ });
94
+
79
95
  const updateRepresentativeRequest = () =>
80
96
  updateRequest(
81
97
  findById(),
@@ -168,6 +184,7 @@ module.exports = {
168
184
  findRepresentativesRequest,
169
185
  findRepresentativesResponse,
170
186
  listRepresentativesNamesResponse,
187
+ getOwnRepresentativesResponse,
171
188
  updateRepresentativeRequest,
172
189
  updateRepresentativeResponse,
173
190
  getRepresentativeCommissionsRequest,
package/schemas/index.js CHANGED
@@ -83,6 +83,7 @@ const {
83
83
  findRepresentativesRequest,
84
84
  findRepresentativesResponse,
85
85
  listRepresentativesNamesResponse,
86
+ getOwnRepresentativesResponse,
86
87
  updateRepresentativeRequest,
87
88
  updateRepresentativeResponse,
88
89
  getRepresentativeCommissionsRequest,
@@ -214,6 +215,7 @@ const podsFindResponse = response(findPodsResponse(), 'podsFindResponse');
214
215
  const representativesCreateRequest = request(createRepresentativeRequest(), 'representativesCreateRequest');
215
216
  const representativesCreateResponse = response(createRepresentativeResponse(), 'representativesCreateResponse');
216
217
  const representativesListNamesResponse = response(listRepresentativesNamesResponse(), 'representativesListNamesResponse');
218
+ const representativesGetOwnResponse = response(getOwnRepresentativesResponse(), 'representativesGetOwnResponse');
217
219
  const representativesFindRequest = request(findRepresentativesRequest(), 'representativesFindRequest');
218
220
  const representativesFindResponse = response(findRepresentativesResponse(), 'representativesFindResponse');
219
221
  const representativesUpdateRequest = request(updateRepresentativeRequest(), 'representativesUpdateRequest');
@@ -338,6 +340,7 @@ module.exports = {
338
340
  representativesCreateRequest,
339
341
  representativesCreateResponse,
340
342
  representativesListNamesResponse,
343
+ representativesGetOwnResponse,
341
344
  representativesFindRequest,
342
345
  representativesFindResponse,
343
346
  representativesUpdateRequest,