@gls_spain/gps-common 32.0.2 → 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.
- package/.idea/workspace.xml +19 -22
- package/CHANGELOG.md +8 -0
- package/README.md +8 -26
- package/open-api-spec/index.js +0 -10
- package/package.json +1 -1
package/.idea/workspace.xml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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=""
|
|
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" />
|
|
6
|
+
<change beforePath="$PROJECT_DIR$/open-api-spec/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/open-api-spec/index.js" afterDir="false" />
|
|
7
|
+
</list>
|
|
5
8
|
<option name="SHOW_DIALOG" value="false" />
|
|
6
9
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
7
10
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
8
11
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
9
12
|
</component>
|
|
10
|
-
<component name="FavoritesManager">
|
|
11
|
-
<favorites_list name="gps-common" />
|
|
12
|
-
</component>
|
|
13
13
|
<component name="Git.Settings">
|
|
14
14
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
15
15
|
</component>
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
</component>
|
|
33
33
|
<component name="ProjectViewState">
|
|
34
34
|
<option name="hideEmptyMiddlePackages" value="true" />
|
|
35
|
-
<option name="showExcludedFiles" value="true" />
|
|
36
35
|
<option name="showLibraryContents" value="true" />
|
|
37
36
|
</component>
|
|
38
37
|
<component name="PropertiesComponent">
|
|
@@ -131,18 +130,6 @@
|
|
|
131
130
|
</list>
|
|
132
131
|
</recent_temporary>
|
|
133
132
|
</component>
|
|
134
|
-
<component name="ServiceViewManager">
|
|
135
|
-
<option name="viewStates">
|
|
136
|
-
<list>
|
|
137
|
-
<serviceView>
|
|
138
|
-
<treeState>
|
|
139
|
-
<expand />
|
|
140
|
-
<select />
|
|
141
|
-
</treeState>
|
|
142
|
-
</serviceView>
|
|
143
|
-
</list>
|
|
144
|
-
</option>
|
|
145
|
-
</component>
|
|
146
133
|
<component name="SvnConfiguration">
|
|
147
134
|
<configuration />
|
|
148
135
|
</component>
|
|
@@ -550,7 +537,18 @@
|
|
|
550
537
|
<workItem from="1585635898343" duration="2594000" />
|
|
551
538
|
<workItem from="1585663493939" duration="466000" />
|
|
552
539
|
<workItem from="1585670078952" duration="596000" />
|
|
553
|
-
<workItem from="1585725349656" duration="
|
|
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" />
|
|
554
552
|
</task>
|
|
555
553
|
<servers />
|
|
556
554
|
</component>
|
|
@@ -564,7 +562,7 @@
|
|
|
564
562
|
</todo-panel>
|
|
565
563
|
</component>
|
|
566
564
|
<component name="TypeScriptGeneratedFilesManager">
|
|
567
|
-
<option name="version" value="
|
|
565
|
+
<option name="version" value="2" />
|
|
568
566
|
</component>
|
|
569
567
|
<component name="Vcs.Log.History.Properties">
|
|
570
568
|
<option name="COLUMN_ORDER">
|
|
@@ -581,13 +579,12 @@
|
|
|
581
579
|
<map>
|
|
582
580
|
<entry key="MAIN">
|
|
583
581
|
<value>
|
|
584
|
-
<State
|
|
585
|
-
<option name="COLUMN_ORDER" />
|
|
586
|
-
</State>
|
|
582
|
+
<State />
|
|
587
583
|
</value>
|
|
588
584
|
</entry>
|
|
589
585
|
</map>
|
|
590
586
|
</option>
|
|
587
|
+
<option name="oldMeFiltersMigrated" value="true" />
|
|
591
588
|
</component>
|
|
592
589
|
<component name="WindowStateProjectService">
|
|
593
590
|
<state x="712" y="322" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog" timestamp="1584696790922">
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
|
|
1
9
|
## [32.0.2](https://github.com/GLS-Spain/gps-common/compare/v32.0.1...v32.0.2) (2020-04-01)
|
|
2
10
|
|
|
3
11
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
60
|
-
```
|
|
45
|
+
const { schemas } = require('@gls_spain/gps-common');
|
|
61
46
|
|
|
62
|
-
|
|
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
|
|
75
|
+
const { openApiSpec } = require('@gls_spain/gps-common');
|
|
94
76
|
|
|
95
77
|
console.log(openApiSpec);
|
|
96
78
|
/*
|
package/open-api-spec/index.js
CHANGED
|
@@ -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: {
|