@gls_spain/gps-common 32.0.3 → 32.1.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.
@@ -2,8 +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" />
6
- <change beforePath="$PROJECT_DIR$/open-api-spec/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/open-api-spec/index.js" afterDir="false" />
5
+ <change beforePath="$PROJECT_DIR$/schemas/definitions/expeditions.js" beforeDir="false" afterPath="$PROJECT_DIR$/schemas/definitions/expeditions.js" afterDir="false" />
7
6
  </list>
8
7
  <option name="SHOW_DIALOG" value="false" />
9
8
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -122,8 +121,8 @@
122
121
  </configuration>
123
122
  <recent_temporary>
124
123
  <list>
125
- <item itemvalue="JavaScript Debug.documentation.html (1)" />
126
124
  <item itemvalue="npm.build-documentation" />
125
+ <item itemvalue="JavaScript Debug.documentation.html (1)" />
127
126
  <item itemvalue="npm.test" />
128
127
  <item itemvalue="Jest.index.test.js" />
129
128
  <item itemvalue="Jest.#errors" />
@@ -548,7 +547,11 @@
548
547
  <workItem from="1586074623503" duration="583000" />
549
548
  <workItem from="1586187589788" duration="2393000" />
550
549
  <workItem from="1586338496466" duration="17000" />
551
- <workItem from="1587155562828" duration="428000" />
550
+ <workItem from="1587155562828" duration="643000" />
551
+ <workItem from="1587566126161" duration="142000" />
552
+ <workItem from="1587569584217" duration="5000" />
553
+ <workItem from="1588001875839" duration="425000" />
554
+ <workItem from="1588014009601" duration="1351000" />
552
555
  </task>
553
556
  <servers />
554
557
  </component>
@@ -595,30 +598,26 @@
595
598
  <screen x="0" y="23" width="2048" height="1129" />
596
599
  </state>
597
600
  <state x="762" y="341" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.23.2048.1129@0.23.2048.1129" timestamp="1584283363756" />
598
- <state x="100" y="123" width="1848" height="929" key="DiffContextDialog" timestamp="1579112408515">
599
- <screen x="0" y="23" width="2048" height="1129" />
600
- </state>
601
- <state x="100" y="123" width="1848" height="929" key="DiffContextDialog/0.23.2048.1129@0.23.2048.1129" timestamp="1579112408515" />
602
601
  <state x="606" y="280" key="EditFileWatcherDialog" timestamp="1580283934403">
603
602
  <screen x="0" y="23" width="2048" height="1129" />
604
603
  </state>
605
604
  <state x="606" y="280" key="EditFileWatcherDialog/0.23.2048.1129@0.23.2048.1129" timestamp="1580283934403" />
606
- <state width="2006" height="269" key="GridCell.Tab.0.bottom" timestamp="1585769591024">
605
+ <state width="2006" height="269" key="GridCell.Tab.0.bottom" timestamp="1588016053665">
607
606
  <screen x="0" y="23" width="2048" height="1129" />
608
607
  </state>
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">
608
+ <state width="2006" height="269" key="GridCell.Tab.0.bottom/0.23.2048.1129@0.23.2048.1129" timestamp="1588016053665" />
609
+ <state width="2006" height="269" key="GridCell.Tab.0.center" timestamp="1588016053665">
611
610
  <screen x="0" y="23" width="2048" height="1129" />
612
611
  </state>
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">
612
+ <state width="2006" height="269" key="GridCell.Tab.0.center/0.23.2048.1129@0.23.2048.1129" timestamp="1588016053665" />
613
+ <state width="2006" height="269" key="GridCell.Tab.0.left" timestamp="1588016053665">
615
614
  <screen x="0" y="23" width="2048" height="1129" />
616
615
  </state>
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">
616
+ <state width="2006" height="269" key="GridCell.Tab.0.left/0.23.2048.1129@0.23.2048.1129" timestamp="1588016053665" />
617
+ <state width="2006" height="269" key="GridCell.Tab.0.right" timestamp="1588016053665">
619
618
  <screen x="0" y="23" width="2048" height="1129" />
620
619
  </state>
621
- <state width="2006" height="269" key="GridCell.Tab.0.right/0.23.2048.1129@0.23.2048.1129" timestamp="1585769591024" />
620
+ <state width="2006" height="269" key="GridCell.Tab.0.right/0.23.2048.1129@0.23.2048.1129" timestamp="1588016053665" />
622
621
  <state x="0" y="23" width="2048" height="1129" key="SettingsEditor" timestamp="1580283935326">
623
622
  <screen x="0" y="23" width="2048" height="1129" />
624
623
  </state>
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [32.1.0](https://github.com/GLS-Spain/gps-common/compare/v32.0.3...v32.1.0) (2020-04-27)
2
+
3
+
4
+ ### Features
5
+
6
+ * add find expeditions by shop and types and status ([7f6d137](https://github.com/GLS-Spain/gps-common/commit/7f6d13773419f5aa215435646d0862cd0a4cb7e7))
7
+
1
8
  ## [32.0.3](https://github.com/GLS-Spain/gps-common/compare/v32.0.2...v32.0.3) (2020-04-17)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gls_spain/gps-common",
3
- "version": "32.0.3",
3
+ "version": "32.1.0",
4
4
  "description": "Errors, schemas and documentation for the Parcel Shops project",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -408,6 +408,35 @@ const findByStatus = () => ({
408
408
  additionalProperties: false,
409
409
  });
410
410
 
411
+ const findByShopAndTypesAndStatus = () =>
412
+ mergeSchemas(findByShop(), {
413
+ title: 'find by shop and types and status',
414
+ type: 'object',
415
+ properties: {
416
+ typesAndStatus: {
417
+ type: 'array',
418
+ items: {
419
+ type: 'object',
420
+ properties: {
421
+ type: expedition().properties.type,
422
+ status: {
423
+ type: 'object',
424
+ properties: { code: expedition().properties.status.properties.code },
425
+ required: ['code'],
426
+ additionalProperties: false,
427
+ },
428
+ },
429
+ required: ['type', 'status'],
430
+ additionalProperties: false,
431
+ },
432
+ uniqueItems: true,
433
+ minItems: 1,
434
+ },
435
+ },
436
+ required: ['typesAndStatus'],
437
+ additionalProperties: false,
438
+ });
439
+
411
440
  const findByShopAndStatus = () => mergeSchemas(findByShop(), findByStatus(), { title: 'find by shop and status' });
412
441
 
413
442
  const findByNoShopAndStatus = () => mergeSchemas(findByNoShop(), findByStatus(), { title: 'find by no shop and status' });
@@ -446,7 +475,17 @@ const findExpeditionsSuperAdminRequest = () =>
446
475
  });
447
476
 
448
477
  const findExpeditionsNetworkAdminAndShopUserRequest = () =>
449
- findRequest({ oneOf: [findById(), findByShop(), findByShopAndStatus(), findByNoShop(), findByNoShopAndStatus(), findByCode()] });
478
+ findRequest({
479
+ oneOf: [
480
+ findById(),
481
+ findByShop(),
482
+ findByShopAndStatus(),
483
+ findByShopAndTypesAndStatus(),
484
+ findByNoShop(),
485
+ findByNoShopAndStatus(),
486
+ findByCode(),
487
+ ],
488
+ });
450
489
 
451
490
  const findExpeditionsResponse = () => findResponse(expedition());
452
491