wildberries-sdk 0.1.16__py3-none-any.whl → 0.1.18__py3-none-any.whl

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.
Files changed (92) hide show
  1. wildberries_sdk/analytics/__init__.py +3 -7
  2. wildberries_sdk/analytics/api/__init__.py +1 -3
  3. wildberries_sdk/analytics/api/default_api.py +4670 -0
  4. wildberries_sdk/analytics/api_client.py +1 -1
  5. wildberries_sdk/analytics/configuration.py +1 -1
  6. wildberries_sdk/communications/__init__.py +1 -5
  7. wildberries_sdk/communications/api/__init__.py +0 -2
  8. wildberries_sdk/communications/api/default_api.py +4282 -858
  9. wildberries_sdk/communications/api_client.py +1 -1
  10. wildberries_sdk/communications/configuration.py +1 -1
  11. wildberries_sdk/finances/__init__.py +1 -3
  12. wildberries_sdk/finances/api/__init__.py +0 -1
  13. wildberries_sdk/finances/api/default_api.py +367 -2
  14. wildberries_sdk/finances/api_client.py +1 -1
  15. wildberries_sdk/finances/configuration.py +1 -1
  16. wildberries_sdk/general/__init__.py +3 -7
  17. wildberries_sdk/general/api/__init__.py +1 -3
  18. wildberries_sdk/general/api/{api.py → default_api.py} +560 -1
  19. wildberries_sdk/general/api_client.py +1 -1
  20. wildberries_sdk/general/configuration.py +1 -1
  21. wildberries_sdk/in_store_pickup/__init__.py +3 -5
  22. wildberries_sdk/in_store_pickup/api/__init__.py +1 -2
  23. wildberries_sdk/in_store_pickup/api/{api.py → default_api.py} +1798 -2
  24. wildberries_sdk/in_store_pickup/api_client.py +1 -1
  25. wildberries_sdk/in_store_pickup/configuration.py +1 -1
  26. wildberries_sdk/orders_dbs/__init__.py +3 -5
  27. wildberries_sdk/orders_dbs/api/__init__.py +1 -2
  28. wildberries_sdk/orders_dbs/api/{dbs_api.py → default_api.py} +1819 -2
  29. wildberries_sdk/orders_dbs/api_client.py +1 -1
  30. wildberries_sdk/orders_dbs/configuration.py +1 -1
  31. wildberries_sdk/orders_dbw/__init__.py +3 -5
  32. wildberries_sdk/orders_dbw/api/__init__.py +1 -2
  33. wildberries_sdk/orders_dbw/api/{dbw_api.py → default_api.py} +1821 -1
  34. wildberries_sdk/orders_dbw/api_client.py +1 -1
  35. wildberries_sdk/orders_dbw/configuration.py +1 -1
  36. wildberries_sdk/orders_fbs/__init__.py +3 -5
  37. wildberries_sdk/orders_fbs/api/__init__.py +1 -2
  38. wildberries_sdk/orders_fbs/api/default_api.py +10043 -0
  39. wildberries_sdk/orders_fbs/api_client.py +1 -1
  40. wildberries_sdk/orders_fbs/configuration.py +1 -1
  41. wildberries_sdk/orders_fbw/__init__.py +3 -5
  42. wildberries_sdk/orders_fbw/api/__init__.py +1 -2
  43. wildberries_sdk/orders_fbw/api/default_api.py +2368 -0
  44. wildberries_sdk/orders_fbw/api_client.py +1 -1
  45. wildberries_sdk/orders_fbw/configuration.py +1 -1
  46. wildberries_sdk/products/__init__.py +1 -7
  47. wildberries_sdk/products/api/__init__.py +0 -3
  48. wildberries_sdk/products/api/default_api.py +12348 -2
  49. wildberries_sdk/products/api_client.py +1 -1
  50. wildberries_sdk/products/configuration.py +1 -1
  51. wildberries_sdk/products/models/content_v2_get_cards_list_post200_response_cards_inner_tags_inner.py +1 -1
  52. wildberries_sdk/promotion/__init__.py +1 -3
  53. wildberries_sdk/promotion/api/__init__.py +0 -1
  54. wildberries_sdk/promotion/api/default_api.py +10107 -1059
  55. wildberries_sdk/promotion/api_client.py +1 -1
  56. wildberries_sdk/promotion/configuration.py +1 -1
  57. wildberries_sdk/reports/__init__.py +3 -13
  58. wildberries_sdk/reports/api/__init__.py +1 -6
  59. wildberries_sdk/{promotion/api/api.py → reports/api/default_api.py} +2245 -2381
  60. wildberries_sdk/reports/api_client.py +1 -1
  61. wildberries_sdk/reports/configuration.py +1 -1
  62. wildberries_sdk/tariffs/__init__.py +1 -3
  63. wildberries_sdk/tariffs/api/__init__.py +0 -1
  64. wildberries_sdk/tariffs/api/default_api.py +1147 -34
  65. wildberries_sdk/tariffs/api_client.py +1 -1
  66. wildberries_sdk/tariffs/configuration.py +1 -1
  67. wildberries_sdk/wbd/__init__.py +1 -3
  68. wildberries_sdk/wbd/api/__init__.py +0 -1
  69. wildberries_sdk/wbd/api/default_api.py +1662 -89
  70. wildberries_sdk/wbd/api_client.py +1 -1
  71. wildberries_sdk/wbd/configuration.py +1 -1
  72. wildberries_sdk/wbd/models/offer_create_request.py +1 -1
  73. wildberries_sdk/wbd/models/offer_update_request.py +1 -1
  74. wildberries_sdk-0.1.18.dist-info/METADATA +395 -0
  75. {wildberries_sdk-0.1.16.dist-info → wildberries_sdk-0.1.18.dist-info}/RECORD +78 -88
  76. wildberries_sdk/analytics/api/api.py +0 -1490
  77. wildberries_sdk/analytics/api/csv_api.py +0 -1178
  78. wildberries_sdk/communications/api/api.py +0 -1166
  79. wildberries_sdk/finances/api/api.py +0 -404
  80. wildberries_sdk/general/api/api_api.py +0 -341
  81. wildberries_sdk/general/api/wbapi_api.py +0 -291
  82. wildberries_sdk/orders_fbs/api/fbs_api.py +0 -2683
  83. wildberries_sdk/orders_fbw/api/api.py +0 -1153
  84. wildberries_sdk/products/api/api.py +0 -3891
  85. wildberries_sdk/reports/api/api.py +0 -350
  86. wildberries_sdk/reports/api/c_api.py +0 -361
  87. wildberries_sdk/tariffs/api/api.py +0 -1151
  88. wildberries_sdk/wbd/api/api.py +0 -1611
  89. wildberries_sdk-0.1.16.dist-info/METADATA +0 -191
  90. {wildberries_sdk-0.1.16.dist-info → wildberries_sdk-0.1.18.dist-info}/LICENSE +0 -0
  91. {wildberries_sdk-0.1.16.dist-info → wildberries_sdk-0.1.18.dist-info}/WHEEL +0 -0
  92. {wildberries_sdk-0.1.16.dist-info → wildberries_sdk-0.1.18.dist-info}/top_level.txt +0 -0
@@ -1,1166 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Общение с покупателями
5
-
6
- <div class=\"description_important\"> Узнать больше об общении с покупателями можно в <a href=\"https://seller.wildberries.ru/instructions/category/f7f6c465-dd12-422d-80a0-a6d9562115d5?goBackOption=prevRoute&categoryId=30817062-14cc-4a82-bc78-3600c2b0685b\">справочном центре</a> </div> С помощью методов общения с покупателями вы можете работать с: 1. [Вопросами](/openapi/user-communication#tag/Voprosy) и [отзывами](/openapi/user-communication#tag/Otzyvy) покупателей 2. [Закреплёнными отзывами](/openapi/user-communication#tag/Zakreplyonnye-otzyvy) 3. [Чатами с покупателями](/openapi/user-communication#tag/Chat-s-pokupatelyami) 4. [Заявками покупателей на возврат](/openapi/user-communication#tag/Vozvraty-pokupatelyami)
7
-
8
- The version of the OpenAPI document: communication
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
10
-
11
- Do not edit the class manually.
12
- """ # noqa: E501
13
-
14
- import warnings
15
- from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
- from typing import Any, Dict, List, Optional, Tuple, Union
17
- from typing_extensions import Annotated
18
-
19
- from pydantic import Field, StrictBytes, StrictInt, StrictStr
20
- from typing import List, Optional, Tuple, Union
21
- from typing_extensions import Annotated
22
- from wildberries_sdk.communications.models.chats_response import ChatsResponse
23
- from wildberries_sdk.communications.models.events_response import EventsResponse
24
- from wildberries_sdk.communications.models.message_response import MessageResponse
25
-
26
- from wildberries_sdk.communications.api_client import ApiClient, RequestSerialized
27
- from wildberries_sdk.communications.api_response import ApiResponse
28
- from wildberries_sdk.communications.rest import RESTResponseType
29
-
30
-
31
- class Api:
32
- """NOTE: This class is auto generated by OpenAPI Generator
33
- Ref: https://openapi-generator.tech
34
-
35
- Do not edit the class manually.
36
- """
37
-
38
- def __init__(self, api_client=None) -> None:
39
- if api_client is None:
40
- api_client = ApiClient.get_default()
41
- self.api_client = api_client
42
-
43
-
44
- @validate_call
45
- def api_v1_seller_chats_get(
46
- self,
47
- _request_timeout: Union[
48
- None,
49
- Annotated[StrictFloat, Field(gt=0)],
50
- Tuple[
51
- Annotated[StrictFloat, Field(gt=0)],
52
- Annotated[StrictFloat, Field(gt=0)]
53
- ]
54
- ] = None,
55
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
56
- _content_type: Optional[StrictStr] = None,
57
- _headers: Optional[Dict[StrictStr, Any]] = None,
58
- _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
59
- ) -> ChatsResponse:
60
- """Список чатов
61
-
62
- Метод возвращает список всех чатов продавца. По этим данным можно получить [события чатов](/openapi/user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1events/get) или [отправить сообщение покупателю](/openapi/user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1message/post). <div class=\"description_limit\"> <a href=\"/openapi/api-information#tag/Vvedenie/Limity-zaprosov\">Лимит запросов</a> на один аккаунт продавца: | Период | Лимит | Интервал | Всплеск | | --- | --- | --- | --- | | 10 секунд | 10 запросов | 1 секунда | 10 запросов | </div>
63
-
64
- :param _request_timeout: timeout setting for this request. If one
65
- number provided, it will be total request
66
- timeout. It can also be a pair (tuple) of
67
- (connection, read) timeouts.
68
- :type _request_timeout: int, tuple(int, int), optional
69
- :param _request_auth: set to override the auth_settings for an a single
70
- request; this effectively ignores the
71
- authentication in the spec for a single request.
72
- :type _request_auth: dict, optional
73
- :param _content_type: force content-type for the request.
74
- :type _content_type: str, Optional
75
- :param _headers: set to override the headers for a single
76
- request; this effectively ignores the headers
77
- in the spec for a single request.
78
- :type _headers: dict, optional
79
- :param _host_index: set to override the host_index for a single
80
- request; this effectively ignores the host_index
81
- in the spec for a single request.
82
- :type _host_index: int, optional
83
- :return: Returns the result object.
84
- """ # noqa: E501
85
-
86
- _param = self._api_v1_seller_chats_get_serialize(
87
- _request_auth=_request_auth,
88
- _content_type=_content_type,
89
- _headers=_headers,
90
- _host_index=_host_index
91
- )
92
-
93
- _response_types_map: Dict[str, Optional[str]] = {
94
- '200': "ChatsResponse",
95
- '401': "ApiV1NewFeedbacksQuestionsGet401Response",
96
- '429': "ApiV1NewFeedbacksQuestionsGet401Response",
97
- }
98
- response_data = self.api_client.call_api(
99
- *_param,
100
- _request_timeout=_request_timeout
101
- )
102
- response_data.read()
103
- return self.api_client.response_deserialize(
104
- response_data=response_data,
105
- response_types_map=_response_types_map,
106
- ).data
107
-
108
-
109
- @validate_call
110
- def api_v1_seller_chats_get_with_http_info(
111
- self,
112
- _request_timeout: Union[
113
- None,
114
- Annotated[StrictFloat, Field(gt=0)],
115
- Tuple[
116
- Annotated[StrictFloat, Field(gt=0)],
117
- Annotated[StrictFloat, Field(gt=0)]
118
- ]
119
- ] = None,
120
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
121
- _content_type: Optional[StrictStr] = None,
122
- _headers: Optional[Dict[StrictStr, Any]] = None,
123
- _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
124
- ) -> ApiResponse[ChatsResponse]:
125
- """Список чатов
126
-
127
- Метод возвращает список всех чатов продавца. По этим данным можно получить [события чатов](/openapi/user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1events/get) или [отправить сообщение покупателю](/openapi/user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1message/post). <div class=\"description_limit\"> <a href=\"/openapi/api-information#tag/Vvedenie/Limity-zaprosov\">Лимит запросов</a> на один аккаунт продавца: | Период | Лимит | Интервал | Всплеск | | --- | --- | --- | --- | | 10 секунд | 10 запросов | 1 секунда | 10 запросов | </div>
128
-
129
- :param _request_timeout: timeout setting for this request. If one
130
- number provided, it will be total request
131
- timeout. It can also be a pair (tuple) of
132
- (connection, read) timeouts.
133
- :type _request_timeout: int, tuple(int, int), optional
134
- :param _request_auth: set to override the auth_settings for an a single
135
- request; this effectively ignores the
136
- authentication in the spec for a single request.
137
- :type _request_auth: dict, optional
138
- :param _content_type: force content-type for the request.
139
- :type _content_type: str, Optional
140
- :param _headers: set to override the headers for a single
141
- request; this effectively ignores the headers
142
- in the spec for a single request.
143
- :type _headers: dict, optional
144
- :param _host_index: set to override the host_index for a single
145
- request; this effectively ignores the host_index
146
- in the spec for a single request.
147
- :type _host_index: int, optional
148
- :return: Returns the result object.
149
- """ # noqa: E501
150
-
151
- _param = self._api_v1_seller_chats_get_serialize(
152
- _request_auth=_request_auth,
153
- _content_type=_content_type,
154
- _headers=_headers,
155
- _host_index=_host_index
156
- )
157
-
158
- _response_types_map: Dict[str, Optional[str]] = {
159
- '200': "ChatsResponse",
160
- '401': "ApiV1NewFeedbacksQuestionsGet401Response",
161
- '429': "ApiV1NewFeedbacksQuestionsGet401Response",
162
- }
163
- response_data = self.api_client.call_api(
164
- *_param,
165
- _request_timeout=_request_timeout
166
- )
167
- response_data.read()
168
- return self.api_client.response_deserialize(
169
- response_data=response_data,
170
- response_types_map=_response_types_map,
171
- )
172
-
173
-
174
- @validate_call
175
- def api_v1_seller_chats_get_without_preload_content(
176
- self,
177
- _request_timeout: Union[
178
- None,
179
- Annotated[StrictFloat, Field(gt=0)],
180
- Tuple[
181
- Annotated[StrictFloat, Field(gt=0)],
182
- Annotated[StrictFloat, Field(gt=0)]
183
- ]
184
- ] = None,
185
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
186
- _content_type: Optional[StrictStr] = None,
187
- _headers: Optional[Dict[StrictStr, Any]] = None,
188
- _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
189
- ) -> RESTResponseType:
190
- """Список чатов
191
-
192
- Метод возвращает список всех чатов продавца. По этим данным можно получить [события чатов](/openapi/user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1events/get) или [отправить сообщение покупателю](/openapi/user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1message/post). <div class=\"description_limit\"> <a href=\"/openapi/api-information#tag/Vvedenie/Limity-zaprosov\">Лимит запросов</a> на один аккаунт продавца: | Период | Лимит | Интервал | Всплеск | | --- | --- | --- | --- | | 10 секунд | 10 запросов | 1 секунда | 10 запросов | </div>
193
-
194
- :param _request_timeout: timeout setting for this request. If one
195
- number provided, it will be total request
196
- timeout. It can also be a pair (tuple) of
197
- (connection, read) timeouts.
198
- :type _request_timeout: int, tuple(int, int), optional
199
- :param _request_auth: set to override the auth_settings for an a single
200
- request; this effectively ignores the
201
- authentication in the spec for a single request.
202
- :type _request_auth: dict, optional
203
- :param _content_type: force content-type for the request.
204
- :type _content_type: str, Optional
205
- :param _headers: set to override the headers for a single
206
- request; this effectively ignores the headers
207
- in the spec for a single request.
208
- :type _headers: dict, optional
209
- :param _host_index: set to override the host_index for a single
210
- request; this effectively ignores the host_index
211
- in the spec for a single request.
212
- :type _host_index: int, optional
213
- :return: Returns the result object.
214
- """ # noqa: E501
215
-
216
- _param = self._api_v1_seller_chats_get_serialize(
217
- _request_auth=_request_auth,
218
- _content_type=_content_type,
219
- _headers=_headers,
220
- _host_index=_host_index
221
- )
222
-
223
- _response_types_map: Dict[str, Optional[str]] = {
224
- '200': "ChatsResponse",
225
- '401': "ApiV1NewFeedbacksQuestionsGet401Response",
226
- '429': "ApiV1NewFeedbacksQuestionsGet401Response",
227
- }
228
- response_data = self.api_client.call_api(
229
- *_param,
230
- _request_timeout=_request_timeout
231
- )
232
- return response_data.response
233
-
234
-
235
- def _api_v1_seller_chats_get_serialize(
236
- self,
237
- _request_auth,
238
- _content_type,
239
- _headers,
240
- _host_index,
241
- ) -> RequestSerialized:
242
-
243
- _hosts = [
244
- 'https://buyer-chat-api.wildberries.ru'
245
- ]
246
- _host = _hosts[_host_index]
247
-
248
- _collection_formats: Dict[str, str] = {
249
- }
250
-
251
- _path_params: Dict[str, str] = {}
252
- _query_params: List[Tuple[str, str]] = []
253
- _header_params: Dict[str, Optional[str]] = _headers or {}
254
- _form_params: List[Tuple[str, str]] = []
255
- _files: Dict[
256
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
257
- ] = {}
258
- _body_params: Optional[bytes] = None
259
-
260
- # process the path parameters
261
- # process the query parameters
262
- # process the header parameters
263
- # process the form parameters
264
- # process the body parameter
265
-
266
-
267
- # set the HTTP header `Accept`
268
- if 'Accept' not in _header_params:
269
- _header_params['Accept'] = self.api_client.select_header_accept(
270
- [
271
- 'application/json'
272
- ]
273
- )
274
-
275
-
276
- # authentication setting
277
- _auth_settings: List[str] = [
278
- 'HeaderApiKey'
279
- ]
280
-
281
- return self.api_client.param_serialize(
282
- method='GET',
283
- resource_path='/api/v1/seller/chats',
284
- path_params=_path_params,
285
- query_params=_query_params,
286
- header_params=_header_params,
287
- body=_body_params,
288
- post_params=_form_params,
289
- files=_files,
290
- auth_settings=_auth_settings,
291
- collection_formats=_collection_formats,
292
- _host=_host,
293
- _request_auth=_request_auth
294
- )
295
-
296
-
297
-
298
-
299
- @validate_call
300
- def api_v1_seller_download_id_get(
301
- self,
302
- id: Annotated[StrictStr, Field(description="ID файла, см. значение поля `downloadID` в методе [События чатов](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1events/get)")],
303
- _request_timeout: Union[
304
- None,
305
- Annotated[StrictFloat, Field(gt=0)],
306
- Tuple[
307
- Annotated[StrictFloat, Field(gt=0)],
308
- Annotated[StrictFloat, Field(gt=0)]
309
- ]
310
- ] = None,
311
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
312
- _content_type: Optional[StrictStr] = None,
313
- _headers: Optional[Dict[StrictStr, Any]] = None,
314
- _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
315
- ) -> bytearray:
316
- """Получить файл из сообщения
317
-
318
- Метод возвращает файл или изображение из сообщения по его ID. <div class=\"description_limit\"> <a href=\"/openapi/api-information#tag/Vvedenie/Limity-zaprosov\">Лимит запросов</a> на один аккаунт продавца: | Период | Лимит | Интервал | Всплеск | | --- | --- | --- | --- | | 10 секунд | 10 запросов | 1 секунда | 10 запросов | </div>
319
-
320
- :param id: ID файла, см. значение поля `downloadID` в методе [События чатов](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1events/get) (required)
321
- :type id: str
322
- :param _request_timeout: timeout setting for this request. If one
323
- number provided, it will be total request
324
- timeout. It can also be a pair (tuple) of
325
- (connection, read) timeouts.
326
- :type _request_timeout: int, tuple(int, int), optional
327
- :param _request_auth: set to override the auth_settings for an a single
328
- request; this effectively ignores the
329
- authentication in the spec for a single request.
330
- :type _request_auth: dict, optional
331
- :param _content_type: force content-type for the request.
332
- :type _content_type: str, Optional
333
- :param _headers: set to override the headers for a single
334
- request; this effectively ignores the headers
335
- in the spec for a single request.
336
- :type _headers: dict, optional
337
- :param _host_index: set to override the host_index for a single
338
- request; this effectively ignores the host_index
339
- in the spec for a single request.
340
- :type _host_index: int, optional
341
- :return: Returns the result object.
342
- """ # noqa: E501
343
-
344
- _param = self._api_v1_seller_download_id_get_serialize(
345
- id=id,
346
- _request_auth=_request_auth,
347
- _content_type=_content_type,
348
- _headers=_headers,
349
- _host_index=_host_index
350
- )
351
-
352
- _response_types_map: Dict[str, Optional[str]] = {
353
- '200': "bytearray",
354
- '202': "ApiV1SellerDownloadIdGet202Response",
355
- '400': "ApiV1SellerEventsGet400Response",
356
- '451': "ApiV1SellerDownloadIdGet451Response",
357
- }
358
- response_data = self.api_client.call_api(
359
- *_param,
360
- _request_timeout=_request_timeout
361
- )
362
- response_data.read()
363
- return self.api_client.response_deserialize(
364
- response_data=response_data,
365
- response_types_map=_response_types_map,
366
- ).data
367
-
368
-
369
- @validate_call
370
- def api_v1_seller_download_id_get_with_http_info(
371
- self,
372
- id: Annotated[StrictStr, Field(description="ID файла, см. значение поля `downloadID` в методе [События чатов](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1events/get)")],
373
- _request_timeout: Union[
374
- None,
375
- Annotated[StrictFloat, Field(gt=0)],
376
- Tuple[
377
- Annotated[StrictFloat, Field(gt=0)],
378
- Annotated[StrictFloat, Field(gt=0)]
379
- ]
380
- ] = None,
381
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
382
- _content_type: Optional[StrictStr] = None,
383
- _headers: Optional[Dict[StrictStr, Any]] = None,
384
- _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
385
- ) -> ApiResponse[bytearray]:
386
- """Получить файл из сообщения
387
-
388
- Метод возвращает файл или изображение из сообщения по его ID. <div class=\"description_limit\"> <a href=\"/openapi/api-information#tag/Vvedenie/Limity-zaprosov\">Лимит запросов</a> на один аккаунт продавца: | Период | Лимит | Интервал | Всплеск | | --- | --- | --- | --- | | 10 секунд | 10 запросов | 1 секунда | 10 запросов | </div>
389
-
390
- :param id: ID файла, см. значение поля `downloadID` в методе [События чатов](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1events/get) (required)
391
- :type id: str
392
- :param _request_timeout: timeout setting for this request. If one
393
- number provided, it will be total request
394
- timeout. It can also be a pair (tuple) of
395
- (connection, read) timeouts.
396
- :type _request_timeout: int, tuple(int, int), optional
397
- :param _request_auth: set to override the auth_settings for an a single
398
- request; this effectively ignores the
399
- authentication in the spec for a single request.
400
- :type _request_auth: dict, optional
401
- :param _content_type: force content-type for the request.
402
- :type _content_type: str, Optional
403
- :param _headers: set to override the headers for a single
404
- request; this effectively ignores the headers
405
- in the spec for a single request.
406
- :type _headers: dict, optional
407
- :param _host_index: set to override the host_index for a single
408
- request; this effectively ignores the host_index
409
- in the spec for a single request.
410
- :type _host_index: int, optional
411
- :return: Returns the result object.
412
- """ # noqa: E501
413
-
414
- _param = self._api_v1_seller_download_id_get_serialize(
415
- id=id,
416
- _request_auth=_request_auth,
417
- _content_type=_content_type,
418
- _headers=_headers,
419
- _host_index=_host_index
420
- )
421
-
422
- _response_types_map: Dict[str, Optional[str]] = {
423
- '200': "bytearray",
424
- '202': "ApiV1SellerDownloadIdGet202Response",
425
- '400': "ApiV1SellerEventsGet400Response",
426
- '451': "ApiV1SellerDownloadIdGet451Response",
427
- }
428
- response_data = self.api_client.call_api(
429
- *_param,
430
- _request_timeout=_request_timeout
431
- )
432
- response_data.read()
433
- return self.api_client.response_deserialize(
434
- response_data=response_data,
435
- response_types_map=_response_types_map,
436
- )
437
-
438
-
439
- @validate_call
440
- def api_v1_seller_download_id_get_without_preload_content(
441
- self,
442
- id: Annotated[StrictStr, Field(description="ID файла, см. значение поля `downloadID` в методе [События чатов](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1events/get)")],
443
- _request_timeout: Union[
444
- None,
445
- Annotated[StrictFloat, Field(gt=0)],
446
- Tuple[
447
- Annotated[StrictFloat, Field(gt=0)],
448
- Annotated[StrictFloat, Field(gt=0)]
449
- ]
450
- ] = None,
451
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
452
- _content_type: Optional[StrictStr] = None,
453
- _headers: Optional[Dict[StrictStr, Any]] = None,
454
- _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
455
- ) -> RESTResponseType:
456
- """Получить файл из сообщения
457
-
458
- Метод возвращает файл или изображение из сообщения по его ID. <div class=\"description_limit\"> <a href=\"/openapi/api-information#tag/Vvedenie/Limity-zaprosov\">Лимит запросов</a> на один аккаунт продавца: | Период | Лимит | Интервал | Всплеск | | --- | --- | --- | --- | | 10 секунд | 10 запросов | 1 секунда | 10 запросов | </div>
459
-
460
- :param id: ID файла, см. значение поля `downloadID` в методе [События чатов](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1events/get) (required)
461
- :type id: str
462
- :param _request_timeout: timeout setting for this request. If one
463
- number provided, it will be total request
464
- timeout. It can also be a pair (tuple) of
465
- (connection, read) timeouts.
466
- :type _request_timeout: int, tuple(int, int), optional
467
- :param _request_auth: set to override the auth_settings for an a single
468
- request; this effectively ignores the
469
- authentication in the spec for a single request.
470
- :type _request_auth: dict, optional
471
- :param _content_type: force content-type for the request.
472
- :type _content_type: str, Optional
473
- :param _headers: set to override the headers for a single
474
- request; this effectively ignores the headers
475
- in the spec for a single request.
476
- :type _headers: dict, optional
477
- :param _host_index: set to override the host_index for a single
478
- request; this effectively ignores the host_index
479
- in the spec for a single request.
480
- :type _host_index: int, optional
481
- :return: Returns the result object.
482
- """ # noqa: E501
483
-
484
- _param = self._api_v1_seller_download_id_get_serialize(
485
- id=id,
486
- _request_auth=_request_auth,
487
- _content_type=_content_type,
488
- _headers=_headers,
489
- _host_index=_host_index
490
- )
491
-
492
- _response_types_map: Dict[str, Optional[str]] = {
493
- '200': "bytearray",
494
- '202': "ApiV1SellerDownloadIdGet202Response",
495
- '400': "ApiV1SellerEventsGet400Response",
496
- '451': "ApiV1SellerDownloadIdGet451Response",
497
- }
498
- response_data = self.api_client.call_api(
499
- *_param,
500
- _request_timeout=_request_timeout
501
- )
502
- return response_data.response
503
-
504
-
505
- def _api_v1_seller_download_id_get_serialize(
506
- self,
507
- id,
508
- _request_auth,
509
- _content_type,
510
- _headers,
511
- _host_index,
512
- ) -> RequestSerialized:
513
-
514
- _hosts = [
515
- 'https://buyer-chat-api.wildberries.ru'
516
- ]
517
- _host = _hosts[_host_index]
518
-
519
- _collection_formats: Dict[str, str] = {
520
- }
521
-
522
- _path_params: Dict[str, str] = {}
523
- _query_params: List[Tuple[str, str]] = []
524
- _header_params: Dict[str, Optional[str]] = _headers or {}
525
- _form_params: List[Tuple[str, str]] = []
526
- _files: Dict[
527
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
528
- ] = {}
529
- _body_params: Optional[bytes] = None
530
-
531
- # process the path parameters
532
- if id is not None:
533
- _path_params['id'] = id
534
- # process the query parameters
535
- # process the header parameters
536
- # process the form parameters
537
- # process the body parameter
538
-
539
-
540
- # set the HTTP header `Accept`
541
- if 'Accept' not in _header_params:
542
- _header_params['Accept'] = self.api_client.select_header_accept(
543
- [
544
- 'application/pdf',
545
- 'image/jpeg',
546
- 'image/png',
547
- 'application/json',
548
- 'application/problem+json'
549
- ]
550
- )
551
-
552
-
553
- # authentication setting
554
- _auth_settings: List[str] = [
555
- 'HeaderApiKey'
556
- ]
557
-
558
- return self.api_client.param_serialize(
559
- method='GET',
560
- resource_path='/api/v1/seller/download/{id}',
561
- path_params=_path_params,
562
- query_params=_query_params,
563
- header_params=_header_params,
564
- body=_body_params,
565
- post_params=_form_params,
566
- files=_files,
567
- auth_settings=_auth_settings,
568
- collection_formats=_collection_formats,
569
- _host=_host,
570
- _request_auth=_request_auth
571
- )
572
-
573
-
574
-
575
-
576
- @validate_call
577
- def api_v1_seller_events_get(
578
- self,
579
- next: Annotated[Optional[StrictInt], Field(description="Пагинатор. С какого момента получить следующий пакет данных.<br>Формат Unix timestamp **с миллисекундами** ")] = None,
580
- _request_timeout: Union[
581
- None,
582
- Annotated[StrictFloat, Field(gt=0)],
583
- Tuple[
584
- Annotated[StrictFloat, Field(gt=0)],
585
- Annotated[StrictFloat, Field(gt=0)]
586
- ]
587
- ] = None,
588
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
589
- _content_type: Optional[StrictStr] = None,
590
- _headers: Optional[Dict[StrictStr, Any]] = None,
591
- _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
592
- ) -> EventsResponse:
593
- """События чатов
594
-
595
- Метод возвращает список событий всех [чатов с покупателями](/openapi/user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1chats/get). Чтобы получить все события: 1. Сделайте первый запрос без параметра `next`. 2. Повторяйте запрос со значением параметра `next` из ответа на предыдущий запрос, пока `totalEvents` не станет равным `0`. Это будет означать, что вы получили все события. <div class=\"description_limit\"> <a href=\"/openapi/api-information#tag/Vvedenie/Limity-zaprosov\">Лимит запросов</a> на один аккаунт продавца: | Период | Лимит | Интервал | Всплеск | | --- | --- | --- | --- | | 10 секунд | 10 запросов | 1 секунда | 10 запросов | </div>
596
-
597
- :param next: Пагинатор. С какого момента получить следующий пакет данных.<br>Формат Unix timestamp **с миллисекундами**
598
- :type next: int
599
- :param _request_timeout: timeout setting for this request. If one
600
- number provided, it will be total request
601
- timeout. It can also be a pair (tuple) of
602
- (connection, read) timeouts.
603
- :type _request_timeout: int, tuple(int, int), optional
604
- :param _request_auth: set to override the auth_settings for an a single
605
- request; this effectively ignores the
606
- authentication in the spec for a single request.
607
- :type _request_auth: dict, optional
608
- :param _content_type: force content-type for the request.
609
- :type _content_type: str, Optional
610
- :param _headers: set to override the headers for a single
611
- request; this effectively ignores the headers
612
- in the spec for a single request.
613
- :type _headers: dict, optional
614
- :param _host_index: set to override the host_index for a single
615
- request; this effectively ignores the host_index
616
- in the spec for a single request.
617
- :type _host_index: int, optional
618
- :return: Returns the result object.
619
- """ # noqa: E501
620
-
621
- _param = self._api_v1_seller_events_get_serialize(
622
- next=next,
623
- _request_auth=_request_auth,
624
- _content_type=_content_type,
625
- _headers=_headers,
626
- _host_index=_host_index
627
- )
628
-
629
- _response_types_map: Dict[str, Optional[str]] = {
630
- '200': "EventsResponse",
631
- '400': "ApiV1SellerEventsGet400Response",
632
- '401': "ApiV1NewFeedbacksQuestionsGet401Response",
633
- '429': "ApiV1NewFeedbacksQuestionsGet401Response",
634
- }
635
- response_data = self.api_client.call_api(
636
- *_param,
637
- _request_timeout=_request_timeout
638
- )
639
- response_data.read()
640
- return self.api_client.response_deserialize(
641
- response_data=response_data,
642
- response_types_map=_response_types_map,
643
- ).data
644
-
645
-
646
- @validate_call
647
- def api_v1_seller_events_get_with_http_info(
648
- self,
649
- next: Annotated[Optional[StrictInt], Field(description="Пагинатор. С какого момента получить следующий пакет данных.<br>Формат Unix timestamp **с миллисекундами** ")] = None,
650
- _request_timeout: Union[
651
- None,
652
- Annotated[StrictFloat, Field(gt=0)],
653
- Tuple[
654
- Annotated[StrictFloat, Field(gt=0)],
655
- Annotated[StrictFloat, Field(gt=0)]
656
- ]
657
- ] = None,
658
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
659
- _content_type: Optional[StrictStr] = None,
660
- _headers: Optional[Dict[StrictStr, Any]] = None,
661
- _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
662
- ) -> ApiResponse[EventsResponse]:
663
- """События чатов
664
-
665
- Метод возвращает список событий всех [чатов с покупателями](/openapi/user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1chats/get). Чтобы получить все события: 1. Сделайте первый запрос без параметра `next`. 2. Повторяйте запрос со значением параметра `next` из ответа на предыдущий запрос, пока `totalEvents` не станет равным `0`. Это будет означать, что вы получили все события. <div class=\"description_limit\"> <a href=\"/openapi/api-information#tag/Vvedenie/Limity-zaprosov\">Лимит запросов</a> на один аккаунт продавца: | Период | Лимит | Интервал | Всплеск | | --- | --- | --- | --- | | 10 секунд | 10 запросов | 1 секунда | 10 запросов | </div>
666
-
667
- :param next: Пагинатор. С какого момента получить следующий пакет данных.<br>Формат Unix timestamp **с миллисекундами**
668
- :type next: int
669
- :param _request_timeout: timeout setting for this request. If one
670
- number provided, it will be total request
671
- timeout. It can also be a pair (tuple) of
672
- (connection, read) timeouts.
673
- :type _request_timeout: int, tuple(int, int), optional
674
- :param _request_auth: set to override the auth_settings for an a single
675
- request; this effectively ignores the
676
- authentication in the spec for a single request.
677
- :type _request_auth: dict, optional
678
- :param _content_type: force content-type for the request.
679
- :type _content_type: str, Optional
680
- :param _headers: set to override the headers for a single
681
- request; this effectively ignores the headers
682
- in the spec for a single request.
683
- :type _headers: dict, optional
684
- :param _host_index: set to override the host_index for a single
685
- request; this effectively ignores the host_index
686
- in the spec for a single request.
687
- :type _host_index: int, optional
688
- :return: Returns the result object.
689
- """ # noqa: E501
690
-
691
- _param = self._api_v1_seller_events_get_serialize(
692
- next=next,
693
- _request_auth=_request_auth,
694
- _content_type=_content_type,
695
- _headers=_headers,
696
- _host_index=_host_index
697
- )
698
-
699
- _response_types_map: Dict[str, Optional[str]] = {
700
- '200': "EventsResponse",
701
- '400': "ApiV1SellerEventsGet400Response",
702
- '401': "ApiV1NewFeedbacksQuestionsGet401Response",
703
- '429': "ApiV1NewFeedbacksQuestionsGet401Response",
704
- }
705
- response_data = self.api_client.call_api(
706
- *_param,
707
- _request_timeout=_request_timeout
708
- )
709
- response_data.read()
710
- return self.api_client.response_deserialize(
711
- response_data=response_data,
712
- response_types_map=_response_types_map,
713
- )
714
-
715
-
716
- @validate_call
717
- def api_v1_seller_events_get_without_preload_content(
718
- self,
719
- next: Annotated[Optional[StrictInt], Field(description="Пагинатор. С какого момента получить следующий пакет данных.<br>Формат Unix timestamp **с миллисекундами** ")] = None,
720
- _request_timeout: Union[
721
- None,
722
- Annotated[StrictFloat, Field(gt=0)],
723
- Tuple[
724
- Annotated[StrictFloat, Field(gt=0)],
725
- Annotated[StrictFloat, Field(gt=0)]
726
- ]
727
- ] = None,
728
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
729
- _content_type: Optional[StrictStr] = None,
730
- _headers: Optional[Dict[StrictStr, Any]] = None,
731
- _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
732
- ) -> RESTResponseType:
733
- """События чатов
734
-
735
- Метод возвращает список событий всех [чатов с покупателями](/openapi/user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1chats/get). Чтобы получить все события: 1. Сделайте первый запрос без параметра `next`. 2. Повторяйте запрос со значением параметра `next` из ответа на предыдущий запрос, пока `totalEvents` не станет равным `0`. Это будет означать, что вы получили все события. <div class=\"description_limit\"> <a href=\"/openapi/api-information#tag/Vvedenie/Limity-zaprosov\">Лимит запросов</a> на один аккаунт продавца: | Период | Лимит | Интервал | Всплеск | | --- | --- | --- | --- | | 10 секунд | 10 запросов | 1 секунда | 10 запросов | </div>
736
-
737
- :param next: Пагинатор. С какого момента получить следующий пакет данных.<br>Формат Unix timestamp **с миллисекундами**
738
- :type next: int
739
- :param _request_timeout: timeout setting for this request. If one
740
- number provided, it will be total request
741
- timeout. It can also be a pair (tuple) of
742
- (connection, read) timeouts.
743
- :type _request_timeout: int, tuple(int, int), optional
744
- :param _request_auth: set to override the auth_settings for an a single
745
- request; this effectively ignores the
746
- authentication in the spec for a single request.
747
- :type _request_auth: dict, optional
748
- :param _content_type: force content-type for the request.
749
- :type _content_type: str, Optional
750
- :param _headers: set to override the headers for a single
751
- request; this effectively ignores the headers
752
- in the spec for a single request.
753
- :type _headers: dict, optional
754
- :param _host_index: set to override the host_index for a single
755
- request; this effectively ignores the host_index
756
- in the spec for a single request.
757
- :type _host_index: int, optional
758
- :return: Returns the result object.
759
- """ # noqa: E501
760
-
761
- _param = self._api_v1_seller_events_get_serialize(
762
- next=next,
763
- _request_auth=_request_auth,
764
- _content_type=_content_type,
765
- _headers=_headers,
766
- _host_index=_host_index
767
- )
768
-
769
- _response_types_map: Dict[str, Optional[str]] = {
770
- '200': "EventsResponse",
771
- '400': "ApiV1SellerEventsGet400Response",
772
- '401': "ApiV1NewFeedbacksQuestionsGet401Response",
773
- '429': "ApiV1NewFeedbacksQuestionsGet401Response",
774
- }
775
- response_data = self.api_client.call_api(
776
- *_param,
777
- _request_timeout=_request_timeout
778
- )
779
- return response_data.response
780
-
781
-
782
- def _api_v1_seller_events_get_serialize(
783
- self,
784
- next,
785
- _request_auth,
786
- _content_type,
787
- _headers,
788
- _host_index,
789
- ) -> RequestSerialized:
790
-
791
- _hosts = [
792
- 'https://buyer-chat-api.wildberries.ru'
793
- ]
794
- _host = _hosts[_host_index]
795
-
796
- _collection_formats: Dict[str, str] = {
797
- }
798
-
799
- _path_params: Dict[str, str] = {}
800
- _query_params: List[Tuple[str, str]] = []
801
- _header_params: Dict[str, Optional[str]] = _headers or {}
802
- _form_params: List[Tuple[str, str]] = []
803
- _files: Dict[
804
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
805
- ] = {}
806
- _body_params: Optional[bytes] = None
807
-
808
- # process the path parameters
809
- # process the query parameters
810
- if next is not None:
811
-
812
- _query_params.append(('next', next))
813
-
814
- # process the header parameters
815
- # process the form parameters
816
- # process the body parameter
817
-
818
-
819
- # set the HTTP header `Accept`
820
- if 'Accept' not in _header_params:
821
- _header_params['Accept'] = self.api_client.select_header_accept(
822
- [
823
- 'application/json'
824
- ]
825
- )
826
-
827
-
828
- # authentication setting
829
- _auth_settings: List[str] = [
830
- 'HeaderApiKey'
831
- ]
832
-
833
- return self.api_client.param_serialize(
834
- method='GET',
835
- resource_path='/api/v1/seller/events',
836
- path_params=_path_params,
837
- query_params=_query_params,
838
- header_params=_header_params,
839
- body=_body_params,
840
- post_params=_form_params,
841
- files=_files,
842
- auth_settings=_auth_settings,
843
- collection_formats=_collection_formats,
844
- _host=_host,
845
- _request_auth=_request_auth
846
- )
847
-
848
-
849
-
850
-
851
- @validate_call
852
- def api_v1_seller_message_post(
853
- self,
854
- reply_sign: Annotated[str, Field(strict=True, max_length=255, description="Подпись чата. Можно получить из [информации по чату](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1chats/get) или [данных события](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1events/get), если в событии есть поле `\\\"isNewChat\\\": true`. ")],
855
- message: Annotated[Optional[Annotated[str, Field(strict=True, max_length=1000)]], Field(description="Текст сообщения. Максимум 1000 символов.")] = None,
856
- file: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="Файлы, формат JPEG, PDF или PNG, максимальный размер — 5 Мб каждый. Максимальный суммарный размер файлов — 30 Мб. ")] = None,
857
- _request_timeout: Union[
858
- None,
859
- Annotated[StrictFloat, Field(gt=0)],
860
- Tuple[
861
- Annotated[StrictFloat, Field(gt=0)],
862
- Annotated[StrictFloat, Field(gt=0)]
863
- ]
864
- ] = None,
865
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
866
- _content_type: Optional[StrictStr] = None,
867
- _headers: Optional[Dict[StrictStr, Any]] = None,
868
- _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
869
- ) -> MessageResponse:
870
- """Отправить сообщение
871
-
872
- Метод отправляет сообщения в [чат с покупателем](/openapi/user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1chats/get). <div class=\"description_limit\"> <a href=\"/openapi/api-information#tag/Vvedenie/Limity-zaprosov\">Лимит запросов</a> на один аккаунт продавца: | Период | Лимит | Интервал | Всплеск | | --- | --- | --- | --- | | 10 секунд | 10 запросов | 1 секунда | 10 запросов | </div>
873
-
874
- :param reply_sign: Подпись чата. Можно получить из [информации по чату](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1chats/get) или [данных события](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1events/get), если в событии есть поле `\\\"isNewChat\\\": true`. (required)
875
- :type reply_sign: str
876
- :param message: Текст сообщения. Максимум 1000 символов.
877
- :type message: str
878
- :param file: Файлы, формат JPEG, PDF или PNG, максимальный размер — 5 Мб каждый. Максимальный суммарный размер файлов — 30 Мб.
879
- :type file: List[bytearray]
880
- :param _request_timeout: timeout setting for this request. If one
881
- number provided, it will be total request
882
- timeout. It can also be a pair (tuple) of
883
- (connection, read) timeouts.
884
- :type _request_timeout: int, tuple(int, int), optional
885
- :param _request_auth: set to override the auth_settings for an a single
886
- request; this effectively ignores the
887
- authentication in the spec for a single request.
888
- :type _request_auth: dict, optional
889
- :param _content_type: force content-type for the request.
890
- :type _content_type: str, Optional
891
- :param _headers: set to override the headers for a single
892
- request; this effectively ignores the headers
893
- in the spec for a single request.
894
- :type _headers: dict, optional
895
- :param _host_index: set to override the host_index for a single
896
- request; this effectively ignores the host_index
897
- in the spec for a single request.
898
- :type _host_index: int, optional
899
- :return: Returns the result object.
900
- """ # noqa: E501
901
-
902
- _param = self._api_v1_seller_message_post_serialize(
903
- reply_sign=reply_sign,
904
- message=message,
905
- file=file,
906
- _request_auth=_request_auth,
907
- _content_type=_content_type,
908
- _headers=_headers,
909
- _host_index=_host_index
910
- )
911
-
912
- _response_types_map: Dict[str, Optional[str]] = {
913
- '200': "MessageResponse",
914
- '400': "ApiV1SellerEventsGet400Response",
915
- '401': "ApiV1NewFeedbacksQuestionsGet401Response",
916
- '429': "ApiV1NewFeedbacksQuestionsGet401Response",
917
- }
918
- response_data = self.api_client.call_api(
919
- *_param,
920
- _request_timeout=_request_timeout
921
- )
922
- response_data.read()
923
- return self.api_client.response_deserialize(
924
- response_data=response_data,
925
- response_types_map=_response_types_map,
926
- ).data
927
-
928
-
929
- @validate_call
930
- def api_v1_seller_message_post_with_http_info(
931
- self,
932
- reply_sign: Annotated[str, Field(strict=True, max_length=255, description="Подпись чата. Можно получить из [информации по чату](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1chats/get) или [данных события](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1events/get), если в событии есть поле `\\\"isNewChat\\\": true`. ")],
933
- message: Annotated[Optional[Annotated[str, Field(strict=True, max_length=1000)]], Field(description="Текст сообщения. Максимум 1000 символов.")] = None,
934
- file: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="Файлы, формат JPEG, PDF или PNG, максимальный размер — 5 Мб каждый. Максимальный суммарный размер файлов — 30 Мб. ")] = None,
935
- _request_timeout: Union[
936
- None,
937
- Annotated[StrictFloat, Field(gt=0)],
938
- Tuple[
939
- Annotated[StrictFloat, Field(gt=0)],
940
- Annotated[StrictFloat, Field(gt=0)]
941
- ]
942
- ] = None,
943
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
944
- _content_type: Optional[StrictStr] = None,
945
- _headers: Optional[Dict[StrictStr, Any]] = None,
946
- _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
947
- ) -> ApiResponse[MessageResponse]:
948
- """Отправить сообщение
949
-
950
- Метод отправляет сообщения в [чат с покупателем](/openapi/user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1chats/get). <div class=\"description_limit\"> <a href=\"/openapi/api-information#tag/Vvedenie/Limity-zaprosov\">Лимит запросов</a> на один аккаунт продавца: | Период | Лимит | Интервал | Всплеск | | --- | --- | --- | --- | | 10 секунд | 10 запросов | 1 секунда | 10 запросов | </div>
951
-
952
- :param reply_sign: Подпись чата. Можно получить из [информации по чату](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1chats/get) или [данных события](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1events/get), если в событии есть поле `\\\"isNewChat\\\": true`. (required)
953
- :type reply_sign: str
954
- :param message: Текст сообщения. Максимум 1000 символов.
955
- :type message: str
956
- :param file: Файлы, формат JPEG, PDF или PNG, максимальный размер — 5 Мб каждый. Максимальный суммарный размер файлов — 30 Мб.
957
- :type file: List[bytearray]
958
- :param _request_timeout: timeout setting for this request. If one
959
- number provided, it will be total request
960
- timeout. It can also be a pair (tuple) of
961
- (connection, read) timeouts.
962
- :type _request_timeout: int, tuple(int, int), optional
963
- :param _request_auth: set to override the auth_settings for an a single
964
- request; this effectively ignores the
965
- authentication in the spec for a single request.
966
- :type _request_auth: dict, optional
967
- :param _content_type: force content-type for the request.
968
- :type _content_type: str, Optional
969
- :param _headers: set to override the headers for a single
970
- request; this effectively ignores the headers
971
- in the spec for a single request.
972
- :type _headers: dict, optional
973
- :param _host_index: set to override the host_index for a single
974
- request; this effectively ignores the host_index
975
- in the spec for a single request.
976
- :type _host_index: int, optional
977
- :return: Returns the result object.
978
- """ # noqa: E501
979
-
980
- _param = self._api_v1_seller_message_post_serialize(
981
- reply_sign=reply_sign,
982
- message=message,
983
- file=file,
984
- _request_auth=_request_auth,
985
- _content_type=_content_type,
986
- _headers=_headers,
987
- _host_index=_host_index
988
- )
989
-
990
- _response_types_map: Dict[str, Optional[str]] = {
991
- '200': "MessageResponse",
992
- '400': "ApiV1SellerEventsGet400Response",
993
- '401': "ApiV1NewFeedbacksQuestionsGet401Response",
994
- '429': "ApiV1NewFeedbacksQuestionsGet401Response",
995
- }
996
- response_data = self.api_client.call_api(
997
- *_param,
998
- _request_timeout=_request_timeout
999
- )
1000
- response_data.read()
1001
- return self.api_client.response_deserialize(
1002
- response_data=response_data,
1003
- response_types_map=_response_types_map,
1004
- )
1005
-
1006
-
1007
- @validate_call
1008
- def api_v1_seller_message_post_without_preload_content(
1009
- self,
1010
- reply_sign: Annotated[str, Field(strict=True, max_length=255, description="Подпись чата. Можно получить из [информации по чату](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1chats/get) или [данных события](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1events/get), если в событии есть поле `\\\"isNewChat\\\": true`. ")],
1011
- message: Annotated[Optional[Annotated[str, Field(strict=True, max_length=1000)]], Field(description="Текст сообщения. Максимум 1000 символов.")] = None,
1012
- file: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="Файлы, формат JPEG, PDF или PNG, максимальный размер — 5 Мб каждый. Максимальный суммарный размер файлов — 30 Мб. ")] = None,
1013
- _request_timeout: Union[
1014
- None,
1015
- Annotated[StrictFloat, Field(gt=0)],
1016
- Tuple[
1017
- Annotated[StrictFloat, Field(gt=0)],
1018
- Annotated[StrictFloat, Field(gt=0)]
1019
- ]
1020
- ] = None,
1021
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1022
- _content_type: Optional[StrictStr] = None,
1023
- _headers: Optional[Dict[StrictStr, Any]] = None,
1024
- _host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
1025
- ) -> RESTResponseType:
1026
- """Отправить сообщение
1027
-
1028
- Метод отправляет сообщения в [чат с покупателем](/openapi/user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1chats/get). <div class=\"description_limit\"> <a href=\"/openapi/api-information#tag/Vvedenie/Limity-zaprosov\">Лимит запросов</a> на один аккаунт продавца: | Период | Лимит | Интервал | Всплеск | | --- | --- | --- | --- | | 10 секунд | 10 запросов | 1 секунда | 10 запросов | </div>
1029
-
1030
- :param reply_sign: Подпись чата. Можно получить из [информации по чату](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1chats/get) или [данных события](./user-communication#tag/Chat-s-pokupatelyami/paths/~1api~1v1~1seller~1events/get), если в событии есть поле `\\\"isNewChat\\\": true`. (required)
1031
- :type reply_sign: str
1032
- :param message: Текст сообщения. Максимум 1000 символов.
1033
- :type message: str
1034
- :param file: Файлы, формат JPEG, PDF или PNG, максимальный размер — 5 Мб каждый. Максимальный суммарный размер файлов — 30 Мб.
1035
- :type file: List[bytearray]
1036
- :param _request_timeout: timeout setting for this request. If one
1037
- number provided, it will be total request
1038
- timeout. It can also be a pair (tuple) of
1039
- (connection, read) timeouts.
1040
- :type _request_timeout: int, tuple(int, int), optional
1041
- :param _request_auth: set to override the auth_settings for an a single
1042
- request; this effectively ignores the
1043
- authentication in the spec for a single request.
1044
- :type _request_auth: dict, optional
1045
- :param _content_type: force content-type for the request.
1046
- :type _content_type: str, Optional
1047
- :param _headers: set to override the headers for a single
1048
- request; this effectively ignores the headers
1049
- in the spec for a single request.
1050
- :type _headers: dict, optional
1051
- :param _host_index: set to override the host_index for a single
1052
- request; this effectively ignores the host_index
1053
- in the spec for a single request.
1054
- :type _host_index: int, optional
1055
- :return: Returns the result object.
1056
- """ # noqa: E501
1057
-
1058
- _param = self._api_v1_seller_message_post_serialize(
1059
- reply_sign=reply_sign,
1060
- message=message,
1061
- file=file,
1062
- _request_auth=_request_auth,
1063
- _content_type=_content_type,
1064
- _headers=_headers,
1065
- _host_index=_host_index
1066
- )
1067
-
1068
- _response_types_map: Dict[str, Optional[str]] = {
1069
- '200': "MessageResponse",
1070
- '400': "ApiV1SellerEventsGet400Response",
1071
- '401': "ApiV1NewFeedbacksQuestionsGet401Response",
1072
- '429': "ApiV1NewFeedbacksQuestionsGet401Response",
1073
- }
1074
- response_data = self.api_client.call_api(
1075
- *_param,
1076
- _request_timeout=_request_timeout
1077
- )
1078
- return response_data.response
1079
-
1080
-
1081
- def _api_v1_seller_message_post_serialize(
1082
- self,
1083
- reply_sign,
1084
- message,
1085
- file,
1086
- _request_auth,
1087
- _content_type,
1088
- _headers,
1089
- _host_index,
1090
- ) -> RequestSerialized:
1091
-
1092
- _hosts = [
1093
- 'https://buyer-chat-api.wildberries.ru'
1094
- ]
1095
- _host = _hosts[_host_index]
1096
-
1097
- _collection_formats: Dict[str, str] = {
1098
- 'file': 'csv',
1099
- }
1100
-
1101
- _path_params: Dict[str, str] = {}
1102
- _query_params: List[Tuple[str, str]] = []
1103
- _header_params: Dict[str, Optional[str]] = _headers or {}
1104
- _form_params: List[Tuple[str, str]] = []
1105
- _files: Dict[
1106
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1107
- ] = {}
1108
- _body_params: Optional[bytes] = None
1109
-
1110
- # process the path parameters
1111
- # process the query parameters
1112
- # process the header parameters
1113
- # process the form parameters
1114
- if reply_sign is not None:
1115
- _form_params.append(('replySign', reply_sign))
1116
- if message is not None:
1117
- _form_params.append(('message', message))
1118
- if file is not None:
1119
- _files['file'] = file
1120
- # process the body parameter
1121
-
1122
-
1123
- # set the HTTP header `Accept`
1124
- if 'Accept' not in _header_params:
1125
- _header_params['Accept'] = self.api_client.select_header_accept(
1126
- [
1127
- 'application/json',
1128
- 'application/problem+json'
1129
- ]
1130
- )
1131
-
1132
- # set the HTTP header `Content-Type`
1133
- if _content_type:
1134
- _header_params['Content-Type'] = _content_type
1135
- else:
1136
- _default_content_type = (
1137
- self.api_client.select_header_content_type(
1138
- [
1139
- 'multipart/form-data'
1140
- ]
1141
- )
1142
- )
1143
- if _default_content_type is not None:
1144
- _header_params['Content-Type'] = _default_content_type
1145
-
1146
- # authentication setting
1147
- _auth_settings: List[str] = [
1148
- 'HeaderApiKey'
1149
- ]
1150
-
1151
- return self.api_client.param_serialize(
1152
- method='POST',
1153
- resource_path='/api/v1/seller/message',
1154
- path_params=_path_params,
1155
- query_params=_query_params,
1156
- header_params=_header_params,
1157
- body=_body_params,
1158
- post_params=_form_params,
1159
- files=_files,
1160
- auth_settings=_auth_settings,
1161
- collection_formats=_collection_formats,
1162
- _host=_host,
1163
- _request_auth=_request_auth
1164
- )
1165
-
1166
-