@gls_spain/gps-common 34.16.1 → 34.18.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/CHANGELOG.md CHANGED
@@ -1,10 +1,24 @@
1
- ## [34.16.1](https://github.com/GLS-Spain/gps-common/compare/v34.16.0...v34.16.1) (2021-05-31)
1
+ # [34.18.0](https://github.com/GLS-Spain/gps-common/compare/v34.17.0...v34.18.0) (2021-06-22)
2
2
 
3
3
 
4
- ### Bug Fixes
4
+ ### Features
5
5
 
6
- * add new property in salesResponse ([949175e](https://github.com/GLS-Spain/gps-common/commit/949175e1c04f951c0b2dd5e084032424ef85be45))
6
+ * new end points in sales ([bf60d34](https://github.com/GLS-Spain/gps-common/commit/bf60d34dc27badc0064abce88b31d1fb53dbc795))
7
7
 
8
+ # [34.17.0](https://github.com/GLS-Spain/gps-common/compare/v34.16.1...v34.17.0) (2021-06-02)
9
+
10
+
11
+ ### Features
12
+
13
+ * add new status on end point find expeditions ([f467878](https://github.com/GLS-Spain/gps-common/commit/f467878d9581a6e1ac51c5d6e70e0805fcbffa94))
14
+
15
+ ## [34.16.1](https://github.com/GLS-Spain/gps-common/compare/v34.16.0...v34.16.1) (2021-05-31)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * add new property in salesResponse ([949175e](https://github.com/GLS-Spain/gps-common/commit/949175e1c04f951c0b2dd5e084032424ef85be45))
21
+
8
22
  # [34.16.0](https://github.com/GLS-Spain/gps-common/compare/v34.15.0...v34.16.0) (2021-05-24)
9
23
 
10
24
 
@@ -3696,6 +3696,210 @@ ${securitySchemes.shopUserRole}`,
3696
3696
  },
3697
3697
  },
3698
3698
  },
3699
+ '/sales/findByNameDestination/{limit}/{skip}?name=Pepe%20Navarro&dateRangeFrom=2021-06-01&dateRangeTo=2021-06-20': {
3700
+ get: {
3701
+ tags: ['Sales'],
3702
+ summary: '[U] Find By Name Destination',
3703
+ parameters: [
3704
+ {
3705
+ name: 'limit',
3706
+ in: 'path',
3707
+ required: false,
3708
+ default: 10,
3709
+ schema: { type: 'string' },
3710
+ description: 'Limit to response'
3711
+ },
3712
+ {
3713
+ name: 'skip',
3714
+ in: 'path',
3715
+ required: true,
3716
+ schema: { type: 'string' },
3717
+ description: `Skip record to find`,
3718
+ },
3719
+ {
3720
+ name: 'name',
3721
+ in: 'query',
3722
+ required: true,
3723
+ schema: { type: 'string' },
3724
+ description: `Name to destination`,
3725
+ },
3726
+ {
3727
+ name: 'dateRangeFrom',
3728
+ in: 'query',
3729
+ required: true,
3730
+ schema: { type: 'string' },
3731
+ description: `Date from to find`,
3732
+ },
3733
+ {
3734
+ name: 'dateRangeTo',
3735
+ in: 'query',
3736
+ required: true,
3737
+ schema: { type: 'string' },
3738
+ description: `Date to to find`,
3739
+ },
3740
+ ],
3741
+ description: `
3742
+ Finds sales by one of several filters.
3743
+
3744
+ The results will be limited to the shop the user belongs to, so for example if he finds by \`name\` destination and between \`dateRangeFrom\` to \`dateRangeTo\` dates and the sale is from another
3745
+ network or shop, the find will return no results.
3746
+
3747
+ ${descriptions.findLimitTip}
3748
+
3749
+ ${securitySchemes.tokens}
3750
+ ${securitySchemes.shopUserRole}`,
3751
+ responses: {
3752
+ ' 200': {
3753
+ description: 'Contains the found sales.',
3754
+ content: { 'application/json': { schema: findSalesResponse() } },
3755
+ },
3756
+ ' 400': responses.badRequest,
3757
+ ' 401': responses.invalidUserInCookieOrHeader,
3758
+ ' 401 ': responses.invalidCookieOrHeader,
3759
+ ' 401 ': responses.missingCookieOrHeader,
3760
+ ' 401 ': responses.unauthorized,
3761
+ ' 403': responses.forbidden,
3762
+ ' 415': responses.unsupportedMediaType,
3763
+ ' 500': responses.internalServerError,
3764
+ },
3765
+ },
3766
+ },
3767
+ '/sales/findByNameSender/{limit}/{skip}?name=Pepe%20Navarro&dateRangeFrom=2021-06-01&dateRangeTo=2021-06-20': {
3768
+ get: {
3769
+ tags: ['Sales'],
3770
+ summary: '[U] Find By Name Sender',
3771
+ parameters: [
3772
+ {
3773
+ name: 'limit',
3774
+ in: 'path',
3775
+ required: false,
3776
+ default: 10,
3777
+ schema: { type: 'string' },
3778
+ description: 'Limit to response'
3779
+ },
3780
+ {
3781
+ name: 'skip',
3782
+ in: 'path',
3783
+ required: true,
3784
+ schema: { type: 'string' },
3785
+ description: `Skip record to find`,
3786
+ },
3787
+ {
3788
+ name: 'name',
3789
+ in: 'query',
3790
+ required: true,
3791
+ schema: { type: 'string' },
3792
+ description: `Name to destination`,
3793
+ },
3794
+ {
3795
+ name: 'dateRangeFrom',
3796
+ in: 'query',
3797
+ required: true,
3798
+ schema: { type: 'string' },
3799
+ description: `Date from to find`,
3800
+ },
3801
+ {
3802
+ name: 'dateRangeTo',
3803
+ in: 'query',
3804
+ required: true,
3805
+ schema: { type: 'string' },
3806
+ description: `Date to to find`,
3807
+ },
3808
+ ],
3809
+ description: `
3810
+ Finds sales by one of several filters.
3811
+
3812
+ The results will be limited to the shop the user belongs to, so for example if he finds by \`name\` sender and between \`dateRangeFrom\` to \`dateRangeTo\` dates and the sale is from another
3813
+ network or shop, the find will return no results.
3814
+
3815
+ ${descriptions.findLimitTip}
3816
+
3817
+ ${securitySchemes.tokens}
3818
+ ${securitySchemes.shopUserRole}`,
3819
+ responses: {
3820
+ ' 200': {
3821
+ description: 'Contains the found sales.',
3822
+ content: { 'application/json': { schema: findSalesResponse() } },
3823
+ },
3824
+ ' 400': responses.badRequest,
3825
+ ' 401': responses.invalidUserInCookieOrHeader,
3826
+ ' 401 ': responses.invalidCookieOrHeader,
3827
+ ' 401 ': responses.missingCookieOrHeader,
3828
+ ' 401 ': responses.unauthorized,
3829
+ ' 403': responses.forbidden,
3830
+ ' 415': responses.unsupportedMediaType,
3831
+ ' 500': responses.internalServerError,
3832
+ },
3833
+ },
3834
+ },
3835
+ '/sales/findByNifSender/{limit}/{skip}?nif=Pepe%20Navarro&dateRangeFrom=2021-06-01&dateRangeTo=2021-06-20': {
3836
+ get: {
3837
+ tags: ['Sales'],
3838
+ summary: '[U] Find By Nif Sender',
3839
+ parameters: [
3840
+ {
3841
+ name: 'limit',
3842
+ in: 'path',
3843
+ required: false,
3844
+ default: 10,
3845
+ schema: { type: 'string' },
3846
+ description: 'Limit to response'
3847
+ },
3848
+ {
3849
+ name: 'skip',
3850
+ in: 'path',
3851
+ required: true,
3852
+ schema: { type: 'string' },
3853
+ description: `Skip record to find`,
3854
+ },
3855
+ {
3856
+ name: 'name',
3857
+ in: 'query',
3858
+ required: true,
3859
+ schema: { type: 'string' },
3860
+ description: `Name to destination`,
3861
+ },
3862
+ {
3863
+ name: 'dateRangeFrom',
3864
+ in: 'query',
3865
+ required: true,
3866
+ schema: { type: 'string' },
3867
+ description: `Date from to find`,
3868
+ },
3869
+ {
3870
+ name: 'dateRangeTo',
3871
+ in: 'query',
3872
+ required: true,
3873
+ schema: { type: 'string' },
3874
+ description: `Date to to find`,
3875
+ },
3876
+ ],
3877
+ description: `
3878
+ Finds sales by one of several filters.
3879
+
3880
+ The results will be limited to the shop the user belongs to, so for example if he finds by \`nif\` and between \`dateRangeFrom\` to \`dateRangeTo\` dates and the sale is from another
3881
+ network or shop, the find will return no results.
3882
+
3883
+ ${descriptions.findLimitTip}
3884
+
3885
+ ${securitySchemes.tokens}
3886
+ ${securitySchemes.shopUserRole}`,
3887
+ responses: {
3888
+ ' 200': {
3889
+ description: 'Contains the found sales.',
3890
+ content: { 'application/json': { schema: findSalesResponse() } },
3891
+ },
3892
+ ' 400': responses.badRequest,
3893
+ ' 401': responses.invalidUserInCookieOrHeader,
3894
+ ' 401 ': responses.invalidCookieOrHeader,
3895
+ ' 401 ': responses.missingCookieOrHeader,
3896
+ ' 401 ': responses.unauthorized,
3897
+ ' 403': responses.forbidden,
3898
+ ' 415': responses.unsupportedMediaType,
3899
+ ' 500': responses.internalServerError,
3900
+ },
3901
+ },
3902
+ },
3699
3903
  '/sales/checkPrice': {
3700
3904
  post: {
3701
3905
  tags: ['Sales'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gls_spain/gps-common",
3
- "version": "34.16.1",
3
+ "version": "34.18.0",
4
4
  "description": "Errors, schemas and documentation for the Parcel Shops project",
5
5
  "keywords": [
6
6
  "gls"
@@ -438,9 +438,10 @@ const findByFiscal = () => ({
438
438
  const networkType = () => ({
439
439
  type: 'string',
440
440
  enum: [
441
- 'ParcelShop',
441
+ 'Business',
442
442
  'Locker',
443
- 'Agency'
443
+ 'Agency',
444
+ 'Premium'
444
445
  ]
445
446
  });
446
447
 
@@ -152,7 +152,7 @@ const expedition = () => ({
152
152
  status: {
153
153
  type: 'object',
154
154
  properties: {
155
- code: { type: 'string', enum: ['incoming', 'inShop', 'inShopExpired', 'delivered'] },
155
+ code: { type: 'string', enum: ['incoming', 'incomingCustomer', 'inShop', 'inShopExpired', 'delivered'] },
156
156
  receivedFrom: {
157
157
  oneOf: [processedWithDriver(), processedWithCustomer()],
158
158
  description: 'how and when did the expedition enter the shop, only available for status inShop or later',