@gls_spain/gps-common 32.0.1 → 32.0.3

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.
@@ -2,6 +2,7 @@
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$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
5
6
  <change beforePath="$PROJECT_DIR$/open-api-spec/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/open-api-spec/index.js" afterDir="false" />
6
7
  </list>
7
8
  <option name="SHOW_DIALOG" value="false" />
@@ -9,9 +10,6 @@
9
10
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
10
11
  <option name="LAST_RESOLUTION" value="IGNORE" />
11
12
  </component>
12
- <component name="FavoritesManager">
13
- <favorites_list name="gps-common" />
14
- </component>
15
13
  <component name="Git.Settings">
16
14
  <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
17
15
  </component>
@@ -34,7 +32,6 @@
34
32
  </component>
35
33
  <component name="ProjectViewState">
36
34
  <option name="hideEmptyMiddlePackages" value="true" />
37
- <option name="showExcludedFiles" value="true" />
38
35
  <option name="showLibraryContents" value="true" />
39
36
  </component>
40
37
  <component name="PropertiesComponent">
@@ -125,26 +122,14 @@
125
122
  </configuration>
126
123
  <recent_temporary>
127
124
  <list>
128
- <item itemvalue="npm.build-documentation" />
129
125
  <item itemvalue="JavaScript Debug.documentation.html (1)" />
126
+ <item itemvalue="npm.build-documentation" />
130
127
  <item itemvalue="npm.test" />
131
128
  <item itemvalue="Jest.index.test.js" />
132
129
  <item itemvalue="Jest.#errors" />
133
130
  </list>
134
131
  </recent_temporary>
135
132
  </component>
136
- <component name="ServiceViewManager">
137
- <option name="viewStates">
138
- <list>
139
- <serviceView>
140
- <treeState>
141
- <expand />
142
- <select />
143
- </treeState>
144
- </serviceView>
145
- </list>
146
- </option>
147
- </component>
148
133
  <component name="SvnConfiguration">
149
134
  <configuration />
150
135
  </component>
@@ -549,7 +534,21 @@
549
534
  <workItem from="1585557077739" duration="601000" />
550
535
  <workItem from="1585571204150" duration="600000" />
551
536
  <workItem from="1585587710749" duration="604000" />
552
- <workItem from="1585635898343" duration="1736000" />
537
+ <workItem from="1585635898343" duration="2594000" />
538
+ <workItem from="1585663493939" duration="466000" />
539
+ <workItem from="1585670078952" duration="596000" />
540
+ <workItem from="1585725349656" duration="1348000" />
541
+ <workItem from="1585819599856" duration="642000" />
542
+ <workItem from="1585902257563" duration="925000" />
543
+ <workItem from="1585932687294" duration="1089000" />
544
+ <workItem from="1585942481938" duration="276000" />
545
+ <workItem from="1585945064015" duration="1525000" />
546
+ <workItem from="1585948509596" duration="5000" />
547
+ <workItem from="1585949186854" duration="3244000" />
548
+ <workItem from="1586074623503" duration="583000" />
549
+ <workItem from="1586187589788" duration="2393000" />
550
+ <workItem from="1586338496466" duration="17000" />
551
+ <workItem from="1587155562828" duration="428000" />
553
552
  </task>
554
553
  <servers />
555
554
  </component>
@@ -563,7 +562,7 @@
563
562
  </todo-panel>
564
563
  </component>
565
564
  <component name="TypeScriptGeneratedFilesManager">
566
- <option name="version" value="1" />
565
+ <option name="version" value="2" />
567
566
  </component>
568
567
  <component name="Vcs.Log.History.Properties">
569
568
  <option name="COLUMN_ORDER">
@@ -580,13 +579,12 @@
580
579
  <map>
581
580
  <entry key="MAIN">
582
581
  <value>
583
- <State>
584
- <option name="COLUMN_ORDER" />
585
- </State>
582
+ <State />
586
583
  </value>
587
584
  </entry>
588
585
  </map>
589
586
  </option>
587
+ <option name="oldMeFiltersMigrated" value="true" />
590
588
  </component>
591
589
  <component name="WindowStateProjectService">
592
590
  <state x="712" y="322" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog" timestamp="1584696790922">
@@ -605,22 +603,22 @@
605
603
  <screen x="0" y="23" width="2048" height="1129" />
606
604
  </state>
607
605
  <state x="606" y="280" key="EditFileWatcherDialog/0.23.2048.1129@0.23.2048.1129" timestamp="1580283934403" />
608
- <state width="2006" height="269" key="GridCell.Tab.0.bottom" timestamp="1585643647311">
606
+ <state width="2006" height="269" key="GridCell.Tab.0.bottom" timestamp="1585769591024">
609
607
  <screen x="0" y="23" width="2048" height="1129" />
610
608
  </state>
611
- <state width="2006" height="269" key="GridCell.Tab.0.bottom/0.23.2048.1129@0.23.2048.1129" timestamp="1585643647311" />
612
- <state width="2006" height="269" key="GridCell.Tab.0.center" timestamp="1585643647311">
609
+ <state width="2006" height="269" key="GridCell.Tab.0.bottom/0.23.2048.1129@0.23.2048.1129" timestamp="1585769591024" />
610
+ <state width="2006" height="269" key="GridCell.Tab.0.center" timestamp="1585769591023">
613
611
  <screen x="0" y="23" width="2048" height="1129" />
614
612
  </state>
615
- <state width="2006" height="269" key="GridCell.Tab.0.center/0.23.2048.1129@0.23.2048.1129" timestamp="1585643647311" />
616
- <state width="2006" height="269" key="GridCell.Tab.0.left" timestamp="1585643647310">
613
+ <state width="2006" height="269" key="GridCell.Tab.0.center/0.23.2048.1129@0.23.2048.1129" timestamp="1585769591023" />
614
+ <state width="2006" height="269" key="GridCell.Tab.0.left" timestamp="1585769591023">
617
615
  <screen x="0" y="23" width="2048" height="1129" />
618
616
  </state>
619
- <state width="2006" height="269" key="GridCell.Tab.0.left/0.23.2048.1129@0.23.2048.1129" timestamp="1585643647310" />
620
- <state width="2006" height="269" key="GridCell.Tab.0.right" timestamp="1585643647311">
617
+ <state width="2006" height="269" key="GridCell.Tab.0.left/0.23.2048.1129@0.23.2048.1129" timestamp="1585769591023" />
618
+ <state width="2006" height="269" key="GridCell.Tab.0.right" timestamp="1585769591024">
621
619
  <screen x="0" y="23" width="2048" height="1129" />
622
620
  </state>
623
- <state width="2006" height="269" key="GridCell.Tab.0.right/0.23.2048.1129@0.23.2048.1129" timestamp="1585643647311" />
621
+ <state width="2006" height="269" key="GridCell.Tab.0.right/0.23.2048.1129@0.23.2048.1129" timestamp="1585769591024" />
624
622
  <state x="0" y="23" width="2048" height="1129" key="SettingsEditor" timestamp="1580283935326">
625
623
  <screen x="0" y="23" width="2048" height="1129" />
626
624
  </state>
package/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## [32.0.3](https://github.com/GLS-Spain/gps-common/compare/v32.0.2...v32.0.3) (2020-04-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fix old descriptions in readme and openapi ([d2b68e7](https://github.com/GLS-Spain/gps-common/commit/d2b68e78c05b1e4e701ea812c8d74b83ddaa2fa7))
7
+ * remove .npmrc ([a06b501](https://github.com/GLS-Spain/gps-common/commit/a06b50138e6979db223de0b72b443fd0d7b747e6))
8
+
9
+ ## [32.0.2](https://github.com/GLS-Spain/gps-common/compare/v32.0.1...v32.0.2) (2020-04-01)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * remove expiration date from the gls spain receive from customer event ([3d199b1](https://github.com/GLS-Spain/gps-common/commit/3d199b1b8eb72bc9a759c155bec25ae4a57231f6))
15
+
1
16
  ## [32.0.1](https://github.com/GLS-Spain/gps-common/compare/v32.0.0...v32.0.1) (2020-03-31)
2
17
 
3
18
 
package/README.md CHANGED
@@ -14,9 +14,7 @@ Also remember to include a [.npmrc file](https://docs.npmjs.com/using-private-pa
14
14
 
15
15
  ## Use
16
16
 
17
- This package provides error classes, json schemas for route validation and an OpenAPI specification.
18
-
19
- It is recommended that you import what you need individually (see below), but you can also import the entire package at once:
17
+ This package provides error classes, json schemas for route validation and an OpenAPI specification:
20
18
 
21
19
  ```javascript
22
20
  const { errors, openApiSpec, schemas } = require('@gls_spain/gps-common');
@@ -28,22 +26,12 @@ const { loginResponse } = schemas;
28
26
 
29
27
  ### Errors
30
28
 
31
- You can import all the errors at once:
29
+ Import the errors to have access to individual errors and a list of all the error names:
32
30
 
33
31
  ```javascript
34
- const errors = require('@gls_spain/gps-common');
35
- ```
32
+ const { errors } = require('@gls_spain/gps-common');
36
33
 
37
- Or you can import them individually:
38
-
39
- ```javascript
40
- const DatabaseNotEmptyError = require('@gls_spain/gps-common/errors/DatabaseNotEmptyError');
41
- ```
42
-
43
- There is also a list of all the error names:
44
-
45
- ```javascript
46
- const { errorsNames } = require('@gls_spain/gps-common/errors');
34
+ const { DatabaseNotEmptyError, errorsNames } = errors;
47
35
 
48
36
  console.log(errorsNames.UserDoesNotExistError);
49
37
  // UserDoesNotExistError
@@ -51,18 +39,12 @@ console.log(errorsNames.UserDoesNotExistError);
51
39
 
52
40
  ### JSON Schemas
53
41
 
54
- The provided json schemas are the requests and responses schemas of the API. They can be used for validation and unit testing.
55
-
56
- You can import all of them at once:
42
+ The provided json schemas are the requests and responses schemas of the API. They can be used for validation and unit testing:
57
43
 
58
44
  ```javascript
59
- const schemas = require('@gls_spain/gps-common/schemas');
60
- ```
45
+ const { schemas } = require('@gls_spain/gps-common');
61
46
 
62
- Or each one of them individually:
63
-
64
- ```javascript
65
- const loginResponse = require('@gls_spain/gps-common/schemas/login-response');
47
+ const { loginResponse } = schemas;
66
48
  const Ajv = require('ajv');
67
49
  const validator = Ajv();
68
50
  validator.addSchema(loginResponse);
@@ -90,7 +72,7 @@ const valid = validator.validate(loginResponse, myResponse); // true
90
72
  The exported `openApiSpec` is an OpenAPI specification that can be used to build a documentation. If you need a static HTML version see scripts below.
91
73
 
92
74
  ```javascript
93
- const openApiSpec = require('@gls_spain/gps-common/open-api-spec');
75
+ const { openApiSpec } = require('@gls_spain/gps-common');
94
76
 
95
77
  console.log(openApiSpec);
96
78
  /*
@@ -1279,9 +1279,6 @@ ${descriptions.createIdIsOptional}
1279
1279
 
1280
1280
  ${descriptions.optionalArrayPropertiesEmptyByDefault}
1281
1281
 
1282
- The only value in the \`integrations\` property applicable to super admins is \`glsApi\`, as explained in the [GLS integration](#tag/GLS)
1283
- section.
1284
-
1285
1282
  ${securitySchemes.tokens}
1286
1283
  ${securitySchemes.superAdminRole}`,
1287
1284
  requestBody: {
@@ -1424,8 +1421,6 @@ ${descriptions.optionalArrayPropertiesEmptyByDefault}
1424
1421
  To set custom \`derivationSettings\` and \`expirationSettings\` provide theses properties, or do not provide them and the values under the
1425
1422
  \`defaults\` property will be used.
1426
1423
 
1427
- See the [GLS integration](#tag/GLS) section for more information about the \`integrations\` property.
1428
-
1429
1424
  ${securitySchemes.tokens}
1430
1425
  ${securitySchemes.superAdminRole}`,
1431
1426
  requestBody: {
@@ -1588,8 +1583,6 @@ ${descriptions.optionalArrayPropertiesEmptyByDefault}
1588
1583
  The \`network._id\` property that associates a network admin with his network cannot be changed after creation.
1589
1584
  If the provided network does not exist the API will return a \`500 NetworkDoesNotExistError\`.
1590
1585
 
1591
- The \`integrations\` property is not used yet for network admins, leave it empty for now.
1592
-
1593
1586
  ${securitySchemes.tokens}
1594
1587
  ${securitySchemes.superAdminRole}`,
1595
1588
  requestBody: {
@@ -2276,9 +2269,6 @@ ${descriptions.optionalArrayPropertiesEmptyByDefault}
2276
2269
  The \`network._id\` and \`shop._id\` properties associate a shop user with his network and shop, and cannot be changed after creation.
2277
2270
  If the provided network or shop do not exist the API will return a \`500 NetworkDoesNotExistError\` or a \`500 ShopDoesNotExistError\`.
2278
2271
 
2279
- The only value in the \`integrations\` property applicable to shop users is \`canReceiveAllFromDriver\`. Only those shop users that have it
2280
- are authorized to call the [receiveAllFromDriver](#tag/Expeditions/paths/~1expeditions~1receiveAllFromDriver/post) endpoint.
2281
-
2282
2272
  ${securitySchemes.tokens}
2283
2273
  ${securitySchemes.superAdminRole}`,
2284
2274
  requestBody: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gls_spain/gps-common",
3
- "version": "32.0.1",
3
+ "version": "32.0.3",
4
4
  "description": "Errors, schemas and documentation for the Parcel Shops project",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -28,12 +28,7 @@ const receiveFromCustomerEvent = () => ({
28
28
  type: 'object',
29
29
  properties: {
30
30
  _id: expedition().properties._id,
31
- receiveFromCustomer: mergeSchemas(
32
- processedWithCustomerWithPod(),
33
- objectWithShopId(),
34
- objectWithNetworkId(),
35
- objectWithExpirationDate(),
36
- ),
31
+ receiveFromCustomer: mergeSchemas(processedWithCustomerWithPod(), objectWithShopId(), objectWithNetworkId()),
37
32
  expedition: expedition(),
38
33
  },
39
34
  required: ['_id', 'receiveFromCustomer', 'expedition'],