@wppconnect/server 2.2.0 → 2.2.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/dist/swagger.json CHANGED
@@ -98,23 +98,9 @@
98
98
  "name": "secretkey",
99
99
  "in": "path",
100
100
  "required": true,
101
- "schema": {
102
- "type": "string"
103
- }
104
- },
105
- {
106
- "name": "session",
107
101
  "schema": {
108
102
  "type": "string",
109
- "example": "NERDWHATS_AMERICA"
110
- },
111
- "in": "query"
112
- },
113
- {
114
- "name": "authorization",
115
- "in": "header",
116
- "schema": {
117
- "type": "string"
103
+ "example": "THISISMYSECURETOKEN"
118
104
  }
119
105
  }
120
106
  ],
@@ -4535,52 +4521,6 @@
4535
4521
  "type": "string",
4536
4522
  "example": "NERDWHATS_AMERICA"
4537
4523
  }
4538
- },
4539
- {
4540
- "name": "obj",
4541
- "in": "body",
4542
- "schema": {
4543
- "type": "object",
4544
- "properties": {
4545
- "name": {
4546
- "type": "string",
4547
- "example": "Product name"
4548
- },
4549
- "image": {
4550
- "type": "string",
4551
- "example": "<base64_string>"
4552
- },
4553
- "description": {
4554
- "type": "string",
4555
- "example": "Description for your product"
4556
- },
4557
- "price": {
4558
- "type": "string",
4559
- "example": "8890"
4560
- },
4561
- "url": {
4562
- "type": "string",
4563
- "example": "http://link_for_your_product.com"
4564
- },
4565
- "retailerId": {
4566
- "type": "string",
4567
- "example": "SKU001"
4568
- },
4569
- "currency": {
4570
- "type": "string",
4571
- "example": "BRL"
4572
- }
4573
- },
4574
- "required": [
4575
- "name",
4576
- "image",
4577
- "description",
4578
- "price",
4579
- "url",
4580
- "retailerId",
4581
- "currency"
4582
- ]
4583
- }
4584
4524
  }
4585
4525
  ],
4586
4526
  "responses": {
@@ -4598,7 +4538,53 @@
4598
4538
  {
4599
4539
  "bearerAuth": []
4600
4540
  }
4601
- ]
4541
+ ],
4542
+ "requestBody": {
4543
+ "required": true,
4544
+ "content": {
4545
+ "application/json": {
4546
+ "schema": {
4547
+ "type": "object",
4548
+ "properties": {
4549
+ "name": {
4550
+ "type": "string"
4551
+ },
4552
+ "image": {
4553
+ "type": "string"
4554
+ },
4555
+ "description": {
4556
+ "type": "string"
4557
+ },
4558
+ "price": {
4559
+ "type": "string"
4560
+ },
4561
+ "url": {
4562
+ "type": "string"
4563
+ },
4564
+ "retailerId": {
4565
+ "type": "string"
4566
+ },
4567
+ "currency": {
4568
+ "type": "string"
4569
+ }
4570
+ }
4571
+ },
4572
+ "examples": {
4573
+ "Default": {
4574
+ "value": {
4575
+ "name": "Product name",
4576
+ "image": "<base64_string>",
4577
+ "description": "Description for your product",
4578
+ "price": "8890",
4579
+ "url": "http://link_for_your_product.com",
4580
+ "retailerId": "SKU001",
4581
+ "currency": "BRL"
4582
+ }
4583
+ }
4584
+ }
4585
+ }
4586
+ }
4587
+ }
4602
4588
  }
4603
4589
  },
4604
4590
  "/api/{session}/edit-product": {
@@ -4614,30 +4600,6 @@
4614
4600
  "type": "string",
4615
4601
  "example": "NERDWHATS_AMERICA"
4616
4602
  }
4617
- },
4618
- {
4619
- "name": "obj",
4620
- "in": "body",
4621
- "schema": {
4622
- "type": "object",
4623
- "properties": {
4624
- "id": {
4625
- "type": "string",
4626
- "example": "<product_id>"
4627
- },
4628
- "options": {
4629
- "type": "object",
4630
- "properties": {
4631
- "name": {
4632
- "type": "string",
4633
- "example": "New name for product"
4634
- }
4635
- },
4636
- "required": ["name"]
4637
- }
4638
- },
4639
- "required": ["id", "options"]
4640
- }
4641
4603
  }
4642
4604
  ],
4643
4605
  "responses": {
@@ -4655,7 +4617,35 @@
4655
4617
  {
4656
4618
  "bearerAuth": []
4657
4619
  }
4658
- ]
4620
+ ],
4621
+ "requestBody": {
4622
+ "required": true,
4623
+ "content": {
4624
+ "application/json": {
4625
+ "schema": {
4626
+ "type": "object",
4627
+ "properties": {
4628
+ "id": {
4629
+ "type": "string"
4630
+ },
4631
+ "options": {
4632
+ "type": "object"
4633
+ }
4634
+ }
4635
+ },
4636
+ "examples": {
4637
+ "Default": {
4638
+ "value": {
4639
+ "id": "<product_id>",
4640
+ "options": {
4641
+ "name": "New name for product"
4642
+ }
4643
+ }
4644
+ }
4645
+ }
4646
+ }
4647
+ }
4648
+ }
4659
4649
  }
4660
4650
  },
4661
4651
  "/api/{session}/del-products": {
@@ -4671,20 +4661,6 @@
4671
4661
  "type": "string",
4672
4662
  "example": "NERDWHATS_AMERICA"
4673
4663
  }
4674
- },
4675
- {
4676
- "name": "obj",
4677
- "in": "body",
4678
- "schema": {
4679
- "type": "object",
4680
- "properties": {
4681
- "id": {
4682
- "type": "string",
4683
- "example": "<product_id>"
4684
- }
4685
- },
4686
- "required": ["id"]
4687
- }
4688
4664
  }
4689
4665
  ],
4690
4666
  "responses": {
@@ -4702,7 +4678,29 @@
4702
4678
  {
4703
4679
  "bearerAuth": []
4704
4680
  }
4705
- ]
4681
+ ],
4682
+ "requestBody": {
4683
+ "required": true,
4684
+ "content": {
4685
+ "application/json": {
4686
+ "schema": {
4687
+ "type": "object",
4688
+ "properties": {
4689
+ "id": {
4690
+ "type": "string"
4691
+ }
4692
+ }
4693
+ },
4694
+ "examples": {
4695
+ "Default": {
4696
+ "value": {
4697
+ "id": "<product_id>"
4698
+ }
4699
+ }
4700
+ }
4701
+ }
4702
+ }
4703
+ }
4706
4704
  }
4707
4705
  },
4708
4706
  "/api/{session}/change-product-image": {
@@ -4718,24 +4716,6 @@
4718
4716
  "type": "string",
4719
4717
  "example": "NERDWHATS_AMERICA"
4720
4718
  }
4721
- },
4722
- {
4723
- "name": "obj",
4724
- "in": "body",
4725
- "schema": {
4726
- "type": "object",
4727
- "properties": {
4728
- "id": {
4729
- "type": "string",
4730
- "example": "<product_id>"
4731
- },
4732
- "base64": {
4733
- "type": "string",
4734
- "example": "<base64_string>"
4735
- }
4736
- },
4737
- "required": ["id", "base64"]
4738
- }
4739
4719
  }
4740
4720
  ],
4741
4721
  "responses": {
@@ -4753,7 +4733,33 @@
4753
4733
  {
4754
4734
  "bearerAuth": []
4755
4735
  }
4756
- ]
4736
+ ],
4737
+ "requestBody": {
4738
+ "required": true,
4739
+ "content": {
4740
+ "application/json": {
4741
+ "schema": {
4742
+ "type": "object",
4743
+ "properties": {
4744
+ "id": {
4745
+ "type": "string"
4746
+ },
4747
+ "base64": {
4748
+ "type": "string"
4749
+ }
4750
+ }
4751
+ },
4752
+ "examples": {
4753
+ "Default": {
4754
+ "value": {
4755
+ "id": "<product_id>",
4756
+ "base64": "<base64_string>"
4757
+ }
4758
+ }
4759
+ }
4760
+ }
4761
+ }
4762
+ }
4757
4763
  }
4758
4764
  },
4759
4765
  "/api/{session}/add-product-image": {
@@ -4769,24 +4775,6 @@
4769
4775
  "type": "string",
4770
4776
  "example": "NERDWHATS_AMERICA"
4771
4777
  }
4772
- },
4773
- {
4774
- "name": "obj",
4775
- "in": "body",
4776
- "schema": {
4777
- "type": "object",
4778
- "properties": {
4779
- "id": {
4780
- "type": "string",
4781
- "example": "<product_id>"
4782
- },
4783
- "base64": {
4784
- "type": "string",
4785
- "example": "<base64_string>"
4786
- }
4787
- },
4788
- "required": ["id", "base64"]
4789
- }
4790
4778
  }
4791
4779
  ],
4792
4780
  "responses": {
@@ -4804,7 +4792,33 @@
4804
4792
  {
4805
4793
  "bearerAuth": []
4806
4794
  }
4807
- ]
4795
+ ],
4796
+ "requestBody": {
4797
+ "required": true,
4798
+ "content": {
4799
+ "application/json": {
4800
+ "schema": {
4801
+ "type": "object",
4802
+ "properties": {
4803
+ "id": {
4804
+ "type": "string"
4805
+ },
4806
+ "base64": {
4807
+ "type": "string"
4808
+ }
4809
+ }
4810
+ },
4811
+ "examples": {
4812
+ "Default": {
4813
+ "value": {
4814
+ "id": "<product_id>",
4815
+ "base64": "<base64_string>"
4816
+ }
4817
+ }
4818
+ }
4819
+ }
4820
+ }
4821
+ }
4808
4822
  }
4809
4823
  },
4810
4824
  "/api/{session}/remove-product-image": {
@@ -4820,24 +4834,6 @@
4820
4834
  "type": "string",
4821
4835
  "example": "NERDWHATS_AMERICA"
4822
4836
  }
4823
- },
4824
- {
4825
- "name": "obj",
4826
- "in": "body",
4827
- "schema": {
4828
- "type": "object",
4829
- "properties": {
4830
- "id": {
4831
- "type": "string",
4832
- "example": "<product_id>"
4833
- },
4834
- "index": {
4835
- "type": "string",
4836
- "example": "1"
4837
- }
4838
- },
4839
- "required": ["id", "index"]
4840
- }
4841
4837
  }
4842
4838
  ],
4843
4839
  "responses": {
@@ -4855,7 +4851,33 @@
4855
4851
  {
4856
4852
  "bearerAuth": []
4857
4853
  }
4858
- ]
4854
+ ],
4855
+ "requestBody": {
4856
+ "required": true,
4857
+ "content": {
4858
+ "application/json": {
4859
+ "schema": {
4860
+ "type": "object",
4861
+ "properties": {
4862
+ "id": {
4863
+ "type": "string"
4864
+ },
4865
+ "index": {
4866
+ "type": "number"
4867
+ }
4868
+ }
4869
+ },
4870
+ "examples": {
4871
+ "Default": {
4872
+ "value": {
4873
+ "id": "<product_id>",
4874
+ "index": 1
4875
+ }
4876
+ }
4877
+ }
4878
+ }
4879
+ }
4880
+ }
4859
4881
  }
4860
4882
  },
4861
4883
  "/api/{session}/get-collections": {
@@ -4928,27 +4950,6 @@
4928
4950
  "type": "string",
4929
4951
  "example": "NERDWHATS_AMERICA"
4930
4952
  }
4931
- },
4932
- {
4933
- "name": "obj",
4934
- "in": "body",
4935
- "schema": {
4936
- "type": "object",
4937
- "properties": {
4938
- "name": {
4939
- "type": "string",
4940
- "example": "Collection name"
4941
- },
4942
- "products": {
4943
- "type": "array",
4944
- "example": ["<id_product1>", "<id_product2>"],
4945
- "items": {
4946
- "type": "string"
4947
- }
4948
- }
4949
- },
4950
- "required": ["name", "products"]
4951
- }
4952
4953
  }
4953
4954
  ],
4954
4955
  "responses": {
@@ -4966,7 +4967,33 @@
4966
4967
  {
4967
4968
  "bearerAuth": []
4968
4969
  }
4969
- ]
4970
+ ],
4971
+ "requestBody": {
4972
+ "required": true,
4973
+ "content": {
4974
+ "application/json": {
4975
+ "schema": {
4976
+ "type": "object",
4977
+ "properties": {
4978
+ "name": {
4979
+ "type": "string"
4980
+ },
4981
+ "products": {
4982
+ "type": "array"
4983
+ }
4984
+ }
4985
+ },
4986
+ "examples": {
4987
+ "Default": {
4988
+ "value": {
4989
+ "name": "Collection name",
4990
+ "products": ["<id_product1>", "<id_product2>"]
4991
+ }
4992
+ }
4993
+ }
4994
+ }
4995
+ }
4996
+ }
4970
4997
  }
4971
4998
  },
4972
4999
  "/api/{session}/edit-collection": {
@@ -4982,29 +5009,6 @@
4982
5009
  "type": "string",
4983
5010
  "example": "NERDWHATS_AMERICA"
4984
5011
  }
4985
- },
4986
- {
4987
- "name": "obj",
4988
- "in": "body",
4989
- "schema": {
4990
- "type": "object",
4991
- "properties": {
4992
- "id": {
4993
- "type": "string",
4994
- "example": "<id_product>"
4995
- },
4996
- "options": {
4997
- "type": "object",
4998
- "properties": {
4999
- "name": {
5000
- "type": "string",
5001
- "example": "New name for collection"
5002
- }
5003
- }
5004
- }
5005
- },
5006
- "required": ["id", "options"]
5007
- }
5008
5012
  }
5009
5013
  ],
5010
5014
  "responses": {
@@ -5022,7 +5026,35 @@
5022
5026
  {
5023
5027
  "bearerAuth": []
5024
5028
  }
5025
- ]
5029
+ ],
5030
+ "requestBody": {
5031
+ "required": true,
5032
+ "content": {
5033
+ "application/json": {
5034
+ "schema": {
5035
+ "type": "object",
5036
+ "properties": {
5037
+ "id": {
5038
+ "type": "string"
5039
+ },
5040
+ "products": {
5041
+ "type": "array"
5042
+ }
5043
+ }
5044
+ },
5045
+ "examples": {
5046
+ "Default": {
5047
+ "value": {
5048
+ "id": "<product_id>",
5049
+ "options": {
5050
+ "name": "New name for collection"
5051
+ }
5052
+ }
5053
+ }
5054
+ }
5055
+ }
5056
+ }
5057
+ }
5026
5058
  }
5027
5059
  },
5028
5060
  "/api/{session}/del-collection": {
@@ -5038,20 +5070,6 @@
5038
5070
  "type": "string",
5039
5071
  "example": "NERDWHATS_AMERICA"
5040
5072
  }
5041
- },
5042
- {
5043
- "name": "obj",
5044
- "in": "body",
5045
- "schema": {
5046
- "type": "object",
5047
- "properties": {
5048
- "id": {
5049
- "type": "string",
5050
- "example": "<id_product>"
5051
- }
5052
- },
5053
- "required": ["id"]
5054
- }
5055
5073
  }
5056
5074
  ],
5057
5075
  "responses": {
@@ -5069,7 +5087,29 @@
5069
5087
  {
5070
5088
  "bearerAuth": []
5071
5089
  }
5072
- ]
5090
+ ],
5091
+ "requestBody": {
5092
+ "required": true,
5093
+ "content": {
5094
+ "application/json": {
5095
+ "schema": {
5096
+ "type": "object",
5097
+ "properties": {
5098
+ "id": {
5099
+ "type": "string"
5100
+ }
5101
+ }
5102
+ },
5103
+ "examples": {
5104
+ "Default": {
5105
+ "value": {
5106
+ "id": "<product_id>"
5107
+ }
5108
+ }
5109
+ }
5110
+ }
5111
+ }
5112
+ }
5073
5113
  }
5074
5114
  },
5075
5115
  "/api/{session}/send-link-catalog": {
@@ -5123,7 +5163,8 @@
5123
5163
  {
5124
5164
  "bearerAuth": []
5125
5165
  }
5126
- ]
5166
+ ],
5167
+ "requestBody": {}
5127
5168
  }
5128
5169
  },
5129
5170
  "/api/{session}/set-product-visibility": {
@@ -5174,7 +5215,33 @@
5174
5215
  {
5175
5216
  "bearerAuth": []
5176
5217
  }
5177
- ]
5218
+ ],
5219
+ "requestBody": {
5220
+ "required": true,
5221
+ "content": {
5222
+ "application/json": {
5223
+ "schema": {
5224
+ "type": "object",
5225
+ "properties": {
5226
+ "id": {
5227
+ "type": "string"
5228
+ },
5229
+ "value": {
5230
+ "type": "boolean"
5231
+ }
5232
+ }
5233
+ },
5234
+ "examples": {
5235
+ "Default": {
5236
+ "value": {
5237
+ "id": "<product_id>",
5238
+ "value": false
5239
+ }
5240
+ }
5241
+ }
5242
+ }
5243
+ }
5244
+ }
5178
5245
  }
5179
5246
  },
5180
5247
  "/api/{session}/set-cart-enabled": {
@@ -5190,20 +5257,6 @@
5190
5257
  "type": "string",
5191
5258
  "example": "NERDWHATS_AMERICA"
5192
5259
  }
5193
- },
5194
- {
5195
- "name": "obj",
5196
- "in": "body",
5197
- "schema": {
5198
- "type": "object",
5199
- "properties": {
5200
- "enabled": {
5201
- "type": "boolean",
5202
- "example": true
5203
- }
5204
- },
5205
- "required": ["enabled"]
5206
- }
5207
5260
  }
5208
5261
  ],
5209
5262
  "responses": {
@@ -5221,7 +5274,29 @@
5221
5274
  {
5222
5275
  "bearerAuth": []
5223
5276
  }
5224
- ]
5277
+ ],
5278
+ "requestBody": {
5279
+ "required": true,
5280
+ "content": {
5281
+ "application/json": {
5282
+ "schema": {
5283
+ "type": "object",
5284
+ "properties": {
5285
+ "enabled": {
5286
+ "type": "boolean"
5287
+ }
5288
+ }
5289
+ },
5290
+ "examples": {
5291
+ "Default": {
5292
+ "value": {
5293
+ "enabled": true
5294
+ }
5295
+ }
5296
+ }
5297
+ }
5298
+ }
5299
+ }
5225
5300
  }
5226
5301
  },
5227
5302
  "/api/{session}/send-text-storie": {