@gls_spain/gps-common 34.9.0 → 34.9.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 +7 -6
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/schemas/definitions/common.js +8 -0
- package/schemas/definitions/sales.js +12 -4
package/.idea/workspace.xml
CHANGED
|
@@ -2,11 +2,8 @@
|
|
|
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" />
|
|
6
5
|
<change beforePath="$PROJECT_DIR$/schemas/definitions/common.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/common.js" afterDir="false" />
|
|
7
|
-
<change beforePath="$PROJECT_DIR$/schemas/definitions/expeditions.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/expeditions.js" afterDir="false" />
|
|
8
6
|
<change beforePath="$PROJECT_DIR$/schemas/definitions/sales.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/sales.js" afterDir="false" />
|
|
9
|
-
<change beforePath="$PROJECT_DIR$/schemas/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/index.js" afterDir="false" />
|
|
10
7
|
</list>
|
|
11
8
|
<option name="SHOW_DIALOG" value="false" />
|
|
12
9
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -60,7 +57,7 @@
|
|
|
60
57
|
<property name="nodejs_package_manager_path" value="npm" />
|
|
61
58
|
<property name="prettier.import.notification.dismissed" value="true" />
|
|
62
59
|
<property name="prettierjs.PrettierConfiguration.Package" value="$PROJECT_DIR$/node_modules/prettier" />
|
|
63
|
-
<property name="settings.editor.selected.configurable" value="settings
|
|
60
|
+
<property name="settings.editor.selected.configurable" value="watcher.settings" />
|
|
64
61
|
<property name="ts.external.directory.path" value="$APPLICATION_HOME_DIR$/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external" />
|
|
65
62
|
<property name="vue.rearranger.settings.migration" value="true" />
|
|
66
63
|
</component>
|
|
@@ -126,9 +123,9 @@
|
|
|
126
123
|
</configuration>
|
|
127
124
|
<recent_temporary>
|
|
128
125
|
<list>
|
|
129
|
-
<item itemvalue="npm.test" />
|
|
130
126
|
<item itemvalue="npm.build-documentation" />
|
|
131
127
|
<item itemvalue="JavaScript Debug.documentation.html (1)" />
|
|
128
|
+
<item itemvalue="npm.test" />
|
|
132
129
|
<item itemvalue="npm.semantic-release" />
|
|
133
130
|
<item itemvalue="npm.commit" />
|
|
134
131
|
</list>
|
|
@@ -650,7 +647,11 @@
|
|
|
650
647
|
<workItem from="1610108917407" duration="2502000" />
|
|
651
648
|
<workItem from="1610134729440" duration="18000" />
|
|
652
649
|
<workItem from="1610542075615" duration="660000" />
|
|
653
|
-
<workItem from="1610988300441" duration="
|
|
650
|
+
<workItem from="1610988300441" duration="4439000" />
|
|
651
|
+
<workItem from="1610996494321" duration="612000" />
|
|
652
|
+
<workItem from="1611040774303" duration="609000" />
|
|
653
|
+
<workItem from="1611059922357" duration="15000" />
|
|
654
|
+
<workItem from="1611060068624" duration="1331000" />
|
|
654
655
|
</task>
|
|
655
656
|
<servers />
|
|
656
657
|
</component>
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [34.9.1](https://github.com/GLS-Spain/gps-common/compare/v34.9.0...v34.9.1) (2021-01-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* fix find sales by createdAt range instead of date range ([c50f662](https://github.com/GLS-Spain/gps-common/commit/c50f662d9aaafca0ebc4345c0d78e0d9f68cdcff))
|
|
7
|
+
|
|
1
8
|
# [34.9.0](https://github.com/GLS-Spain/gps-common/compare/v34.8.1...v34.9.0) (2021-01-18)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const {
|
|
2
2
|
uuid,
|
|
3
3
|
dateRange,
|
|
4
|
+
datetimeRange,
|
|
4
5
|
address: genericAddress,
|
|
5
6
|
objectWithUuid,
|
|
6
7
|
email,
|
|
@@ -352,6 +353,12 @@ const findByOptionalDateRange = () => ({
|
|
|
352
353
|
additionalProperties: false,
|
|
353
354
|
});
|
|
354
355
|
|
|
356
|
+
const findByOptionalCreatedAtRange = () => ({
|
|
357
|
+
type: 'object',
|
|
358
|
+
properties: { createdAtRange: datetimeRange() },
|
|
359
|
+
additionalProperties: false,
|
|
360
|
+
});
|
|
361
|
+
|
|
355
362
|
const timezone = () => ({ type: 'string', format: 'timezone' });
|
|
356
363
|
|
|
357
364
|
const timezoneNames = () => ({ type: 'string', enum: timezones });
|
|
@@ -423,6 +430,7 @@ module.exports = {
|
|
|
423
430
|
findByDate,
|
|
424
431
|
findByDateRange,
|
|
425
432
|
findByOptionalDateRange,
|
|
433
|
+
findByOptionalCreatedAtRange,
|
|
426
434
|
timezone,
|
|
427
435
|
timezoneNames,
|
|
428
436
|
objectWithUuidAndName,
|
|
@@ -14,7 +14,7 @@ const {
|
|
|
14
14
|
pickProperties,
|
|
15
15
|
objectWithUuid,
|
|
16
16
|
} = require('@gls_spain/common-json-schemas');
|
|
17
|
-
const { country, findAll, findById,
|
|
17
|
+
const { country, findAll, findById, findByOptionalCreatedAtRange } = require('./common');
|
|
18
18
|
const { address } = require('./common');
|
|
19
19
|
const { saleSize, salesSettings } = require('./defaults');
|
|
20
20
|
const { network, objectWithNetworkId } = require('./networks');
|
|
@@ -156,15 +156,23 @@ const findByShop = () => mergeSchemas(objectWithShopId(), { title: 'find by shop
|
|
|
156
156
|
|
|
157
157
|
const findSalesSuperAdminRequest = () =>
|
|
158
158
|
findRequest({
|
|
159
|
-
oneOf: [
|
|
159
|
+
oneOf: [
|
|
160
|
+
mergeSchemas(findByNetwork(), findByOptionalCreatedAtRange()),
|
|
161
|
+
mergeSchemas(findByShop(), findByOptionalCreatedAtRange()),
|
|
162
|
+
findById(),
|
|
163
|
+
],
|
|
160
164
|
});
|
|
161
165
|
|
|
162
166
|
const findSalesNetworkAdminRequest = () =>
|
|
163
167
|
findRequest({
|
|
164
|
-
oneOf: [
|
|
168
|
+
oneOf: [
|
|
169
|
+
mergeSchemas(findAll(), findByOptionalCreatedAtRange()),
|
|
170
|
+
mergeSchemas(findByShop(), findByOptionalCreatedAtRange()),
|
|
171
|
+
findById(),
|
|
172
|
+
],
|
|
165
173
|
});
|
|
166
174
|
|
|
167
|
-
const findSalesShopUserRequest = () => findRequest({ oneOf: [mergeSchemas(findAll(),
|
|
175
|
+
const findSalesShopUserRequest = () => findRequest({ oneOf: [mergeSchemas(findAll(), findByOptionalCreatedAtRange()), findById()] });
|
|
168
176
|
|
|
169
177
|
const findSalesResponse = () => findResponse(sale());
|
|
170
178
|
|