@gls_spain/gps-common 34.6.0 → 34.8.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/.idea/prettier.xml +7 -0
- package/.idea/scopes/Source_files.xml +3 -0
- package/.idea/workspace.xml +24 -27
- package/CHANGELOG.md +19 -0
- package/errors/GLSRecordingError.js +11 -0
- package/errors/LabelDoesNotExistError.js +11 -0
- package/errors/index.js +6 -0
- package/open-api-spec/index.js +78 -1
- package/package.json +2 -2
- package/schemas/definitions/expeditions.js +10 -0
- package/schemas/definitions/sales.js +12 -0
- package/schemas/index.js +6 -0
- package/.idea/watcherTasks.xml +0 -45
package/.idea/workspace.xml
CHANGED
|
@@ -2,9 +2,15 @@
|
|
|
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 afterPath="$PROJECT_DIR
|
|
5
|
+
<change afterPath="$PROJECT_DIR$/.idea/prettier.xml" afterDir="false" />
|
|
6
|
+
<change afterPath="$PROJECT_DIR$/errors/LabelDoesNotExistError.js" afterDir="false" />
|
|
7
|
+
<change beforePath="$PROJECT_DIR$/.idea/watcherTasks.xml" beforeDir="false" />
|
|
6
8
|
<change beforePath="$PROJECT_DIR$/errors/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/errors/index.js" afterDir="false" />
|
|
7
9
|
<change beforePath="$PROJECT_DIR$/open-api-spec/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/open-api-spec/index.js" afterDir="false" />
|
|
10
|
+
<change beforePath="$PROJECT_DIR$/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/package-lock.json" afterDir="false" />
|
|
11
|
+
<change beforePath="$PROJECT_DIR$/schemas/definitions/expeditions.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/expeditions.js" afterDir="false" />
|
|
12
|
+
<change beforePath="$PROJECT_DIR$/schemas/definitions/sales.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/sales.js" afterDir="false" />
|
|
13
|
+
<change beforePath="$PROJECT_DIR$/schemas/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/index.js" afterDir="false" />
|
|
8
14
|
</list>
|
|
9
15
|
<option name="SHOW_DIALOG" value="false" />
|
|
10
16
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -43,8 +49,8 @@
|
|
|
43
49
|
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
|
44
50
|
<property name="TERMINAL_CUSTOM_COMMANDS_GOT_IT" value="true" />
|
|
45
51
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
|
46
|
-
<property name="javascript.nodejs.core.library.configured.version" value="
|
|
47
|
-
<property name="javascript.nodejs.core.library.typings.version" value="
|
|
52
|
+
<property name="javascript.nodejs.core.library.configured.version" value="14.11.0" />
|
|
53
|
+
<property name="javascript.nodejs.core.library.typings.version" value="14.11.0" />
|
|
48
54
|
<property name="last_opened_file_path" value="$PROJECT_DIR$/errors" />
|
|
49
55
|
<property name="node.js.detected.package.eslint" value="true" />
|
|
50
56
|
<property name="node.js.detected.package.standard" value="true" />
|
|
@@ -58,7 +64,7 @@
|
|
|
58
64
|
<property name="nodejs_package_manager_path" value="npm" />
|
|
59
65
|
<property name="prettier.import.notification.dismissed" value="true" />
|
|
60
66
|
<property name="prettierjs.PrettierConfiguration.Package" value="$PROJECT_DIR$/node_modules/prettier" />
|
|
61
|
-
<property name="settings.editor.selected.configurable" value="
|
|
67
|
+
<property name="settings.editor.selected.configurable" value="settings.javascript.prettier" />
|
|
62
68
|
<property name="ts.external.directory.path" value="$APPLICATION_HOME_DIR$/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external" />
|
|
63
69
|
<property name="vue.rearranger.settings.migration" value="true" />
|
|
64
70
|
</component>
|
|
@@ -124,8 +130,8 @@
|
|
|
124
130
|
</configuration>
|
|
125
131
|
<recent_temporary>
|
|
126
132
|
<list>
|
|
127
|
-
<item itemvalue="npm.test" />
|
|
128
133
|
<item itemvalue="npm.build-documentation" />
|
|
134
|
+
<item itemvalue="npm.test" />
|
|
129
135
|
<item itemvalue="JavaScript Debug.documentation.html (1)" />
|
|
130
136
|
<item itemvalue="npm.semantic-release" />
|
|
131
137
|
<item itemvalue="npm.commit" />
|
|
@@ -636,7 +642,16 @@
|
|
|
636
642
|
<workItem from="1603705612447" duration="352000" />
|
|
637
643
|
<workItem from="1603706953993" duration="423000" />
|
|
638
644
|
<workItem from="1605609847030" duration="706000" />
|
|
639
|
-
<workItem from="1605809676752" duration="
|
|
645
|
+
<workItem from="1605809676752" duration="1017000" />
|
|
646
|
+
<workItem from="1605876571382" duration="624000" />
|
|
647
|
+
<workItem from="1605900661533" duration="76000" />
|
|
648
|
+
<workItem from="1606052972013" duration="21000" />
|
|
649
|
+
<workItem from="1606121670993" duration="473000" />
|
|
650
|
+
<workItem from="1606141520470" duration="29000" />
|
|
651
|
+
<workItem from="1606477130384" duration="74000" />
|
|
652
|
+
<workItem from="1606835326733" duration="48000" />
|
|
653
|
+
<workItem from="1607951320583" duration="589000" />
|
|
654
|
+
<workItem from="1610108917407" duration="2232000" />
|
|
640
655
|
</task>
|
|
641
656
|
<servers />
|
|
642
657
|
</component>
|
|
@@ -674,26 +689,8 @@
|
|
|
674
689
|
</option>
|
|
675
690
|
<option name="oldMeFiltersMigrated" value="true" />
|
|
676
691
|
</component>
|
|
677
|
-
<component name="
|
|
678
|
-
<
|
|
679
|
-
|
|
680
|
-
</state>
|
|
681
|
-
<state width="2006" height="269" key="GridCell.Tab.0.bottom/0.23.2048.1129@0.23.2048.1129" timestamp="1605810518546" />
|
|
682
|
-
<state width="2006" height="269" key="GridCell.Tab.0.center" timestamp="1605810518545">
|
|
683
|
-
<screen x="0" y="23" width="2048" height="1129" />
|
|
684
|
-
</state>
|
|
685
|
-
<state width="2006" height="269" key="GridCell.Tab.0.center/0.23.2048.1129@0.23.2048.1129" timestamp="1605810518545" />
|
|
686
|
-
<state width="2006" height="269" key="GridCell.Tab.0.left" timestamp="1605810518545">
|
|
687
|
-
<screen x="0" y="23" width="2048" height="1129" />
|
|
688
|
-
</state>
|
|
689
|
-
<state width="2006" height="269" key="GridCell.Tab.0.left/0.23.2048.1129@0.23.2048.1129" timestamp="1605810518545" />
|
|
690
|
-
<state width="2006" height="269" key="GridCell.Tab.0.right" timestamp="1605810518545">
|
|
691
|
-
<screen x="0" y="23" width="2048" height="1129" />
|
|
692
|
-
</state>
|
|
693
|
-
<state width="2006" height="269" key="GridCell.Tab.0.right/0.23.2048.1129@0.23.2048.1129" timestamp="1605810518545" />
|
|
694
|
-
<state x="725" y="342" width="736" height="612" key="find.popup" timestamp="1598206991663">
|
|
695
|
-
<screen x="0" y="23" width="2048" height="1129" />
|
|
696
|
-
</state>
|
|
697
|
-
<state x="725" y="342" width="736" height="612" key="find.popup/0.23.2048.1129@0.23.2048.1129" timestamp="1598206991663" />
|
|
692
|
+
<component name="XSLT-Support.FileAssociations.UIState">
|
|
693
|
+
<expand />
|
|
694
|
+
<select />
|
|
698
695
|
</component>
|
|
699
696
|
</project>
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
# [34.8.0](https://github.com/GLS-Spain/gps-common/compare/v34.7.0...v34.8.0) (2021-01-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add download label to expeditions and sales ([68c49db](https://github.com/GLS-Spain/gps-common/commit/68c49dbc306caa24f28d07fb72dfc9f19cbf3c10))
|
|
7
|
+
|
|
8
|
+
# [34.7.0](https://github.com/GLS-Spain/gps-common/compare/v34.6.0...v34.7.0) (2020-12-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* change get defaults permissions to any role ([92c5f19](https://github.com/GLS-Spain/gps-common/commit/92c5f193ec744ac9cb66021ba20ef1b499ccd2f1))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* add gls recording error ([15731bb](https://github.com/GLS-Spain/gps-common/commit/15731bb6e10a02178ecc536bd12ea34cde06ca97))
|
|
19
|
+
|
|
1
20
|
# [34.6.0](https://github.com/GLS-Spain/gps-common/compare/v34.5.1...v34.6.0) (2020-11-19)
|
|
2
21
|
|
|
3
22
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class GLSRecordingError extends DatabaseError {
|
|
4
|
+
constructor(message = 'GLS Spain recording layer error.') {
|
|
5
|
+
// noinspection JSCheckFunctionSignatures
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'GLSRecordingError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = GLSRecordingError;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const { DatabaseError } = require('@gls_spain/mongodb');
|
|
2
|
+
|
|
3
|
+
class LabelDoesNotExistError extends DatabaseError {
|
|
4
|
+
constructor(message = 'Label does not exist.') {
|
|
5
|
+
// noinspection JSCheckFunctionSignatures
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'LabelDoesNotExistError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = LabelDoesNotExistError;
|
package/errors/index.js
CHANGED
|
@@ -33,6 +33,8 @@ const SaleAlreadyExistsError = require('./SaleAlreadyExistsError');
|
|
|
33
33
|
const InconsistentSalesSettingsError = require('./InconsistentSalesSettingsError');
|
|
34
34
|
const InvalidSaleDestinationError = require('./InvalidSaleDestinationError');
|
|
35
35
|
const GLSSpainError = require('./GLSSpainError');
|
|
36
|
+
const GLSRecordingError = require('./GLSRecordingError');
|
|
37
|
+
const LabelDoesNotExistError = require('./LabelDoesNotExistError');
|
|
36
38
|
|
|
37
39
|
const errorsNames = {
|
|
38
40
|
DatabaseNotEmptyError: 'DatabaseNotEmptyError',
|
|
@@ -70,6 +72,8 @@ const errorsNames = {
|
|
|
70
72
|
InconsistentSalesSettingsError: 'InconsistentSalesSettingsError',
|
|
71
73
|
InvalidSaleDestinationError: 'InvalidSaleDestinationError',
|
|
72
74
|
GLSSpainError: 'GLSSpainError',
|
|
75
|
+
GLSRecordingError: 'GLSRecordingError',
|
|
76
|
+
LabelDoesNotExistError: 'LabelDoesNotExistError',
|
|
73
77
|
};
|
|
74
78
|
|
|
75
79
|
module.exports = {
|
|
@@ -108,5 +112,7 @@ module.exports = {
|
|
|
108
112
|
InconsistentSalesSettingsError,
|
|
109
113
|
InvalidSaleDestinationError,
|
|
110
114
|
GLSSpainError,
|
|
115
|
+
GLSRecordingError,
|
|
116
|
+
LabelDoesNotExistError,
|
|
111
117
|
errorsNames,
|
|
112
118
|
};
|
package/open-api-spec/index.js
CHANGED
|
@@ -44,6 +44,7 @@ const {
|
|
|
44
44
|
InconsistentSalesSettingsError,
|
|
45
45
|
InvalidSaleDestinationError,
|
|
46
46
|
GLSSpainError,
|
|
47
|
+
LabelDoesNotExistError,
|
|
47
48
|
} = require('../errors');
|
|
48
49
|
const { timezoneNames } = require('../schemas/definitions/common');
|
|
49
50
|
const { loginResponse } = require('../schemas/definitions/login');
|
|
@@ -126,6 +127,7 @@ const {
|
|
|
126
127
|
processExpeditionsResponse,
|
|
127
128
|
receiveAllExpeditionsFromDriverRequest,
|
|
128
129
|
receiveAllExpeditionsFromDriverResponse,
|
|
130
|
+
downloadExpeditionLabelRequest,
|
|
129
131
|
} = require('../schemas/definitions/expeditions');
|
|
130
132
|
const { defaults, getDefaultsResponse, updateDefaultsRequest, updateDefaultsResponse } = require('../schemas/definitions/defaults');
|
|
131
133
|
const { counters, getCountersResponse } = require('../schemas/definitions/counters');
|
|
@@ -183,6 +185,7 @@ const {
|
|
|
183
185
|
checkSalePriceResponse,
|
|
184
186
|
updateSaleRequest,
|
|
185
187
|
updateSaleResponse,
|
|
188
|
+
downloadSaleLabelRequest,
|
|
186
189
|
} = require('../schemas/definitions/sales');
|
|
187
190
|
|
|
188
191
|
const openApiSpec = { openapi: '3.0.2' };
|
|
@@ -910,6 +913,7 @@ const errors = {
|
|
|
910
913
|
inconsistentSalesSettings: new InconsistentSalesSettingsError(),
|
|
911
914
|
invalidSaleDestination: new InvalidSaleDestinationError(),
|
|
912
915
|
glsSpainError: new GLSSpainError(),
|
|
916
|
+
labelDoesNotExist: new LabelDoesNotExistError(),
|
|
913
917
|
};
|
|
914
918
|
|
|
915
919
|
const responses = {
|
|
@@ -1081,6 +1085,10 @@ const responses = {
|
|
|
1081
1085
|
description: 'Cannot create the sale due to an error from the GLS Spain integration.',
|
|
1082
1086
|
content: { 'application/json': { schema: specificHttpError(errors.glsSpainError) } },
|
|
1083
1087
|
},
|
|
1088
|
+
labelDoesNotExist: {
|
|
1089
|
+
description: 'The label does not exist.',
|
|
1090
|
+
content: { 'application/json': { schema: specificHttpError(errors.labelDoesNotExist) } },
|
|
1091
|
+
},
|
|
1084
1092
|
};
|
|
1085
1093
|
|
|
1086
1094
|
const securitySchemes = {
|
|
@@ -1302,7 +1310,7 @@ ${securitySchemes.basicAuth}`,
|
|
|
1302
1310
|
'/config/defaults/get': {
|
|
1303
1311
|
get: {
|
|
1304
1312
|
tags: ['Config'],
|
|
1305
|
-
summary: '[
|
|
1313
|
+
summary: '[SNU] Get defaults',
|
|
1306
1314
|
description: `
|
|
1307
1315
|
Get the default settings.
|
|
1308
1316
|
|
|
@@ -3109,6 +3117,39 @@ ${securitySchemes.superAdminRole}`,
|
|
|
3109
3117
|
},
|
|
3110
3118
|
},
|
|
3111
3119
|
},
|
|
3120
|
+
'/expeditions/downloadLabel': {
|
|
3121
|
+
post: {
|
|
3122
|
+
tags: ['Expeditions'],
|
|
3123
|
+
summary: '[SNU] Download label',
|
|
3124
|
+
description: `
|
|
3125
|
+
Downloads the PDF label of the expedition.
|
|
3126
|
+
|
|
3127
|
+
Once the expedition has been delivered to its destination the label becomes unavailable and the API will return a \`500 LabelDoesNotExistError\`.
|
|
3128
|
+
|
|
3129
|
+
${securitySchemes.tokens}
|
|
3130
|
+
${securitySchemes.anyRole}`,
|
|
3131
|
+
requestBody: {
|
|
3132
|
+
content: { 'application/json': { schema: downloadExpeditionLabelRequest() } },
|
|
3133
|
+
required: true,
|
|
3134
|
+
},
|
|
3135
|
+
responses: {
|
|
3136
|
+
' 200': {
|
|
3137
|
+
description: 'The printable label of the expedition.',
|
|
3138
|
+
content: { 'application/pdf': { schema: { type: 'string', format: 'binary' } } },
|
|
3139
|
+
},
|
|
3140
|
+
' 400': responses.badRequest,
|
|
3141
|
+
' 401': responses.invalidUserInCookieOrHeader,
|
|
3142
|
+
' 401 ': responses.invalidCookieOrHeader,
|
|
3143
|
+
' 401 ': responses.missingCookieOrHeader,
|
|
3144
|
+
' 401 ': responses.unauthorized,
|
|
3145
|
+
' 403': responses.forbidden,
|
|
3146
|
+
' 415': responses.unsupportedMediaType,
|
|
3147
|
+
' 500': responses.internalServerError,
|
|
3148
|
+
' 500 ': responses.expeditionDoesNotExist,
|
|
3149
|
+
' 500 ': responses.labelDoesNotExist,
|
|
3150
|
+
},
|
|
3151
|
+
},
|
|
3152
|
+
},
|
|
3112
3153
|
'/pods/find': {
|
|
3113
3154
|
post: {
|
|
3114
3155
|
tags: ['Pods'],
|
|
@@ -3364,6 +3405,42 @@ ${securitySchemes.superAdminRole}`,
|
|
|
3364
3405
|
},
|
|
3365
3406
|
},
|
|
3366
3407
|
},
|
|
3408
|
+
'/sales/downloadLabel': {
|
|
3409
|
+
post: {
|
|
3410
|
+
tags: ['Sales'],
|
|
3411
|
+
summary: '[SNU] Download label',
|
|
3412
|
+
description: `
|
|
3413
|
+
Downloads the PDF label of the expedition associated to the sale.
|
|
3414
|
+
|
|
3415
|
+
If the sale has no expedition yet because it has not been paid then the API will return a \`500 ExpeditionDoesNotExistError\`.
|
|
3416
|
+
|
|
3417
|
+
Once the expedition has been delivered to its destination the label becomes unavailable and the API will return a \`500 LabelDoesNotExistError\`.
|
|
3418
|
+
|
|
3419
|
+
${securitySchemes.tokens}
|
|
3420
|
+
${securitySchemes.anyRole}`,
|
|
3421
|
+
requestBody: {
|
|
3422
|
+
content: { 'application/json': { schema: downloadSaleLabelRequest() } },
|
|
3423
|
+
required: true,
|
|
3424
|
+
},
|
|
3425
|
+
responses: {
|
|
3426
|
+
' 200': {
|
|
3427
|
+
description: 'The printable label of the expedition associated to the sale.',
|
|
3428
|
+
content: { 'application/pdf': { schema: { type: 'string', format: 'binary' } } },
|
|
3429
|
+
},
|
|
3430
|
+
' 400': responses.badRequest,
|
|
3431
|
+
' 401': responses.invalidUserInCookieOrHeader,
|
|
3432
|
+
' 401 ': responses.invalidCookieOrHeader,
|
|
3433
|
+
' 401 ': responses.missingCookieOrHeader,
|
|
3434
|
+
' 401 ': responses.unauthorized,
|
|
3435
|
+
' 403': responses.forbidden,
|
|
3436
|
+
' 415': responses.unsupportedMediaType,
|
|
3437
|
+
' 500': responses.internalServerError,
|
|
3438
|
+
' 500 ': responses.saleDoesNotExist,
|
|
3439
|
+
' 500 ': responses.expeditionDoesNotExist,
|
|
3440
|
+
' 500 ': responses.labelDoesNotExist,
|
|
3441
|
+
},
|
|
3442
|
+
},
|
|
3443
|
+
},
|
|
3367
3444
|
'/historicRecords/find': {
|
|
3368
3445
|
post: {
|
|
3369
3446
|
tags: ['Historic records'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gls_spain/gps-common",
|
|
3
|
-
"version": "34.
|
|
3
|
+
"version": "34.8.0",
|
|
4
4
|
"description": "Errors, schemas and documentation for the Parcel Shops project",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"keywords": [
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"jest": "^25.5.4",
|
|
44
44
|
"prettier": "^1.19.1",
|
|
45
45
|
"redoc-cli": "^0.9.12",
|
|
46
|
-
"semantic-release": "^17.
|
|
46
|
+
"semantic-release": "^17.3.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@gls_spain/ajv-options": "^1.1.2",
|
|
@@ -759,6 +759,15 @@ const receiveAllExpeditionsFromDriverResponse = () => ({
|
|
|
759
759
|
additionalProperties: false,
|
|
760
760
|
});
|
|
761
761
|
|
|
762
|
+
const downloadExpeditionLabelRequest = () => ({
|
|
763
|
+
type: 'object',
|
|
764
|
+
properties: {
|
|
765
|
+
download: objectWithUuid(),
|
|
766
|
+
},
|
|
767
|
+
required: ['download'],
|
|
768
|
+
additionalProperties: false,
|
|
769
|
+
});
|
|
770
|
+
|
|
762
771
|
module.exports = {
|
|
763
772
|
processedWithDriver,
|
|
764
773
|
processedWithCustomer,
|
|
@@ -784,4 +793,5 @@ module.exports = {
|
|
|
784
793
|
processExpeditionsResponse,
|
|
785
794
|
receiveAllExpeditionsFromDriverRequest,
|
|
786
795
|
receiveAllExpeditionsFromDriverResponse,
|
|
796
|
+
downloadExpeditionLabelRequest,
|
|
787
797
|
};
|
|
@@ -12,6 +12,7 @@ const {
|
|
|
12
12
|
updateResponse,
|
|
13
13
|
mergeSchemas,
|
|
14
14
|
pickProperties,
|
|
15
|
+
objectWithUuid,
|
|
15
16
|
} = require('@gls_spain/common-json-schemas');
|
|
16
17
|
const { country, findAll, findById } = require('./common');
|
|
17
18
|
const { address } = require('./common');
|
|
@@ -42,6 +43,7 @@ const sale = () => ({
|
|
|
42
43
|
status: {
|
|
43
44
|
type: 'object',
|
|
44
45
|
properties: {
|
|
46
|
+
// todo add paidAt if status=paymentRequested
|
|
45
47
|
code: {
|
|
46
48
|
type: 'string',
|
|
47
49
|
enum: ['invalidOrIncomplete', 'cancelledByCustomer', 'authorizationRefused', 'paymentRequested', 'paymentDeleted', 'refund'],
|
|
@@ -191,6 +193,15 @@ const updateSaleRequest = () =>
|
|
|
191
193
|
|
|
192
194
|
const updateSaleResponse = () => updateResponse(sale());
|
|
193
195
|
|
|
196
|
+
const downloadSaleLabelRequest = () => ({
|
|
197
|
+
type: 'object',
|
|
198
|
+
properties: {
|
|
199
|
+
download: objectWithUuid(),
|
|
200
|
+
},
|
|
201
|
+
required: ['download'],
|
|
202
|
+
additionalProperties: false,
|
|
203
|
+
});
|
|
204
|
+
|
|
194
205
|
module.exports = {
|
|
195
206
|
sale,
|
|
196
207
|
createSaleRequest,
|
|
@@ -203,4 +214,5 @@ module.exports = {
|
|
|
203
214
|
checkSalePriceResponse,
|
|
204
215
|
updateSaleRequest,
|
|
205
216
|
updateSaleResponse,
|
|
217
|
+
downloadSaleLabelRequest,
|
|
206
218
|
};
|
package/schemas/index.js
CHANGED
|
@@ -75,6 +75,7 @@ const {
|
|
|
75
75
|
processExpeditionsResponse,
|
|
76
76
|
receiveAllExpeditionsFromDriverRequest,
|
|
77
77
|
receiveAllExpeditionsFromDriverResponse,
|
|
78
|
+
downloadExpeditionLabelRequest,
|
|
78
79
|
} = require('./definitions/expeditions');
|
|
79
80
|
const { findPodsRequest, findPodsResponse } = require('./definitions/pods');
|
|
80
81
|
const {
|
|
@@ -115,6 +116,7 @@ const {
|
|
|
115
116
|
checkSalePriceResponse,
|
|
116
117
|
updateSaleRequest,
|
|
117
118
|
updateSaleResponse,
|
|
119
|
+
downloadSaleLabelRequest,
|
|
118
120
|
} = require('./definitions/sales');
|
|
119
121
|
|
|
120
122
|
function request(schema, $id) {
|
|
@@ -208,6 +210,7 @@ const expeditionsReceiveAllFromDriverResponse = response(
|
|
|
208
210
|
receiveAllExpeditionsFromDriverResponse(),
|
|
209
211
|
'expeditionsReceiveAllFromDriverResponse',
|
|
210
212
|
);
|
|
213
|
+
const expeditionsDownloadLabelRequest = request(downloadExpeditionLabelRequest(), 'expeditionsDownloadLabelRequest');
|
|
211
214
|
|
|
212
215
|
const podsFindRequest = request(findPodsRequest(), 'podsFindRequest');
|
|
213
216
|
const podsFindResponse = response(findPodsResponse(), 'podsFindResponse');
|
|
@@ -251,6 +254,7 @@ const salesCheckPriceRequest = request(checkSalePriceRequest(), 'salesCheckPrice
|
|
|
251
254
|
const salesCheckPriceResponse = response(checkSalePriceResponse(), 'salesCheckPriceResponse');
|
|
252
255
|
const salesUpdateRequest = request(updateSaleRequest(), 'salesUpdateRequest');
|
|
253
256
|
const salesUpdateResponse = response(updateSaleResponse(), 'salesUpdateResponse');
|
|
257
|
+
const salesDownloadLabelRequest = request(downloadSaleLabelRequest(), 'salesDownloadLabelRequest');
|
|
254
258
|
|
|
255
259
|
module.exports = {
|
|
256
260
|
errorResponse,
|
|
@@ -333,6 +337,7 @@ module.exports = {
|
|
|
333
337
|
expeditionsProcessResponse,
|
|
334
338
|
expeditionsReceiveAllFromDriverRequest,
|
|
335
339
|
expeditionsReceiveAllFromDriverResponse,
|
|
340
|
+
expeditionsDownloadLabelRequest,
|
|
336
341
|
|
|
337
342
|
podsFindRequest,
|
|
338
343
|
podsFindResponse,
|
|
@@ -376,4 +381,5 @@ module.exports = {
|
|
|
376
381
|
salesCheckPriceResponse,
|
|
377
382
|
salesUpdateRequest,
|
|
378
383
|
salesUpdateResponse,
|
|
384
|
+
salesDownloadLabelRequest,
|
|
379
385
|
};
|
package/.idea/watcherTasks.xml
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectTasksOptions">
|
|
4
|
-
<TaskOptions isEnabled="true">
|
|
5
|
-
<option name="arguments" value="--write $FilePathRelativeToProjectRoot$" />
|
|
6
|
-
<option name="checkSyntaxErrors" value="true" />
|
|
7
|
-
<option name="description" />
|
|
8
|
-
<option name="exitCodeBehavior" value="ERROR" />
|
|
9
|
-
<option name="fileExtension" value="js" />
|
|
10
|
-
<option name="immediateSync" value="false" />
|
|
11
|
-
<option name="name" value="Prettier Javascript" />
|
|
12
|
-
<option name="output" value="$FilePathRelativeToProjectRoot$" />
|
|
13
|
-
<option name="outputFilters">
|
|
14
|
-
<array />
|
|
15
|
-
</option>
|
|
16
|
-
<option name="outputFromStdout" value="false" />
|
|
17
|
-
<option name="program" value="$ProjectFileDir$/node_modules/.bin/prettier" />
|
|
18
|
-
<option name="runOnExternalChanges" value="true" />
|
|
19
|
-
<option name="scopeName" value="Project Files" />
|
|
20
|
-
<option name="trackOnlyRoot" value="false" />
|
|
21
|
-
<option name="workingDir" value="$ProjectFileDir$" />
|
|
22
|
-
<envs />
|
|
23
|
-
</TaskOptions>
|
|
24
|
-
<TaskOptions isEnabled="true">
|
|
25
|
-
<option name="arguments" value="--write $FilePathRelativeToProjectRoot$" />
|
|
26
|
-
<option name="checkSyntaxErrors" value="true" />
|
|
27
|
-
<option name="description" />
|
|
28
|
-
<option name="exitCodeBehavior" value="ERROR" />
|
|
29
|
-
<option name="fileExtension" value="json" />
|
|
30
|
-
<option name="immediateSync" value="false" />
|
|
31
|
-
<option name="name" value="Prettier JSON" />
|
|
32
|
-
<option name="output" value="$FilePathRelativeToProjectRoot$" />
|
|
33
|
-
<option name="outputFilters">
|
|
34
|
-
<array />
|
|
35
|
-
</option>
|
|
36
|
-
<option name="outputFromStdout" value="false" />
|
|
37
|
-
<option name="program" value="$ProjectFileDir$/node_modules/.bin/prettier" />
|
|
38
|
-
<option name="runOnExternalChanges" value="true" />
|
|
39
|
-
<option name="scopeName" value="Project Files" />
|
|
40
|
-
<option name="trackOnlyRoot" value="false" />
|
|
41
|
-
<option name="workingDir" value="$ProjectFileDir$" />
|
|
42
|
-
<envs />
|
|
43
|
-
</TaskOptions>
|
|
44
|
-
</component>
|
|
45
|
-
</project>
|