repull-sdk 0.2.0__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 (375) hide show
  1. repull/__init__.py +8 -0
  2. repull/api/__init__.py +1 -0
  3. repull/api/ai/__init__.py +1 -0
  4. repull/api/ai/create_ai_operation.py +218 -0
  5. repull/api/airbnb/__init__.py +1 -0
  6. repull/api/airbnb/airbnb_listing_action.py +123 -0
  7. repull/api/airbnb/airbnb_reservation_action.py +121 -0
  8. repull/api/airbnb/create_airbnb_listing.py +162 -0
  9. repull/api/airbnb/get_airbnb_listing.py +183 -0
  10. repull/api/airbnb/get_airbnb_listing_availability.py +121 -0
  11. repull/api/airbnb/get_airbnb_listing_pricing.py +121 -0
  12. repull/api/airbnb/get_airbnb_reservation.py +179 -0
  13. repull/api/airbnb/list_airbnb_listing_photos.py +121 -0
  14. repull/api/airbnb/list_airbnb_listings.py +166 -0
  15. repull/api/airbnb/list_airbnb_reservations.py +166 -0
  16. repull/api/airbnb/list_airbnb_reviews.py +162 -0
  17. repull/api/airbnb/list_airbnb_thread_messages.py +183 -0
  18. repull/api/airbnb/list_airbnb_threads.py +162 -0
  19. repull/api/airbnb/respond_airbnb_review.py +110 -0
  20. repull/api/airbnb/send_airbnb_message.py +123 -0
  21. repull/api/airbnb/sync_airbnb.py +108 -0
  22. repull/api/airbnb/update_airbnb_listing_availability.py +121 -0
  23. repull/api/airbnb/update_airbnb_listing_pricing.py +121 -0
  24. repull/api/airbnb/upload_airbnb_listing_photos.py +121 -0
  25. repull/api/atlas/__init__.py +1 -0
  26. repull/api/atlas/get_listing_segments.py +282 -0
  27. repull/api/atlas/list_listing_comps.py +307 -0
  28. repull/api/availability/__init__.py +1 -0
  29. repull/api/availability/get_availability.py +219 -0
  30. repull/api/availability/update_availability.py +138 -0
  31. repull/api/billing/__init__.py +1 -0
  32. repull/api/billing/create_billing_checkout.py +131 -0
  33. repull/api/billing/get_billing.py +110 -0
  34. repull/api/booking_com/__init__.py +1 -0
  35. repull/api/booking_com/create_booking_property.py +162 -0
  36. repull/api/booking_com/get_booking_content.py +110 -0
  37. repull/api/booking_com/get_booking_listing_pricing.py +304 -0
  38. repull/api/booking_com/list_booking_conversations.py +158 -0
  39. repull/api/booking_com/list_booking_properties.py +162 -0
  40. repull/api/booking_com/send_booking_message.py +110 -0
  41. repull/api/booking_com/sync_booking.py +110 -0
  42. repull/api/booking_com/update_booking_availability.py +110 -0
  43. repull/api/booking_com/update_booking_content.py +110 -0
  44. repull/api/booking_com/update_booking_listing_pricing.py +245 -0
  45. repull/api/connect/__init__.py +1 -0
  46. repull/api/connect/create_connect_session.py +207 -0
  47. repull/api/connect/create_connection.py +227 -0
  48. repull/api/connect/delete_connection.py +123 -0
  49. repull/api/connect/get_connect_status.py +183 -0
  50. repull/api/connect/list_connect_booking_rooms.py +239 -0
  51. repull/api/connect/list_connect_providers.py +162 -0
  52. repull/api/connect/list_connections.py +158 -0
  53. repull/api/connect/map_connect_booking_rooms.py +270 -0
  54. repull/api/connect/select_connect_provider.py +220 -0
  55. repull/api/connect/verify_booking_hotel.py +277 -0
  56. repull/api/conversations/__init__.py +1 -0
  57. repull/api/conversations/get_conversation.py +236 -0
  58. repull/api/conversations/list_conversation_messages.py +302 -0
  59. repull/api/conversations/list_conversations.py +310 -0
  60. repull/api/guests/__init__.py +1 -0
  61. repull/api/guests/get_guest.py +236 -0
  62. repull/api/guests/list_guests.py +315 -0
  63. repull/api/listings/__init__.py +1 -0
  64. repull/api/listings/create_listing.py +207 -0
  65. repull/api/listings/generate_listing_content.py +223 -0
  66. repull/api/listings/get_listing.py +229 -0
  67. repull/api/listings/get_listing_publish_status.py +183 -0
  68. repull/api/listings/list_listings.py +294 -0
  69. repull/api/listings/publish_listing_to_airbnb.py +219 -0
  70. repull/api/listings/publish_listing_to_booking.py +191 -0
  71. repull/api/markets/__init__.py +1 -0
  72. repull/api/markets/get_market.py +221 -0
  73. repull/api/markets/get_market_calendar.py +259 -0
  74. repull/api/markets/list_market_browse.py +315 -0
  75. repull/api/markets/list_markets.py +186 -0
  76. repull/api/plumguide/__init__.py +1 -0
  77. repull/api/plumguide/get_plumguide_availability.py +110 -0
  78. repull/api/plumguide/get_plumguide_pricing.py +108 -0
  79. repull/api/plumguide/list_plumguide_listings.py +162 -0
  80. repull/api/plumguide/update_plumguide_availability.py +110 -0
  81. repull/api/plumguide/update_plumguide_pricing.py +110 -0
  82. repull/api/pricing/__init__.py +1 -0
  83. repull/api/pricing/apply_listing_pricing.py +216 -0
  84. repull/api/pricing/bulk_apply_pricing.py +272 -0
  85. repull/api/pricing/get_listing_pricing.py +255 -0
  86. repull/api/pricing/get_listing_pricing_history.py +310 -0
  87. repull/api/pricing/get_listing_pricing_strategy.py +191 -0
  88. repull/api/pricing/update_listing_pricing_strategy.py +208 -0
  89. repull/api/properties/__init__.py +1 -0
  90. repull/api/properties/get_property.py +191 -0
  91. repull/api/properties/list_properties.py +273 -0
  92. repull/api/reservations/__init__.py +1 -0
  93. repull/api/reservations/cancel_reservation.py +123 -0
  94. repull/api/reservations/create_reservation.py +195 -0
  95. repull/api/reservations/get_reservation.py +240 -0
  96. repull/api/reservations/list_reservations.py +400 -0
  97. repull/api/reservations/update_reservation.py +142 -0
  98. repull/api/reviews/__init__.py +1 -0
  99. repull/api/reviews/get_review.py +236 -0
  100. repull/api/reviews/list_reviews.py +379 -0
  101. repull/api/schema/__init__.py +1 -0
  102. repull/api/schema/create_custom_schema.py +252 -0
  103. repull/api/schema/delete_custom_schema.py +206 -0
  104. repull/api/schema/get_custom_schema.py +206 -0
  105. repull/api/schema/list_custom_schemas.py +173 -0
  106. repull/api/schema/update_custom_schema.py +253 -0
  107. repull/api/system/__init__.py +1 -0
  108. repull/api/system/get_health.py +162 -0
  109. repull/api/vrbo/__init__.py +1 -0
  110. repull/api/vrbo/get_vrbo_listing_pricing.py +221 -0
  111. repull/api/vrbo/list_vrbo_listings.py +162 -0
  112. repull/api/vrbo/list_vrbo_reservations.py +162 -0
  113. repull/api/vrbo/update_vrbo_listing_pricing.py +205 -0
  114. repull/api/webhooks/__init__.py +1 -0
  115. repull/api/webhooks/create_webhook.py +199 -0
  116. repull/api/webhooks/delete_webhook.py +122 -0
  117. repull/api/webhooks/get_webhook.py +184 -0
  118. repull/api/webhooks/get_webhook_delivery.py +193 -0
  119. repull/api/webhooks/list_webhook_deliveries.py +249 -0
  120. repull/api/webhooks/list_webhook_event_types.py +162 -0
  121. repull/api/webhooks/list_webhooks.py +162 -0
  122. repull/api/webhooks/ping_webhook.py +122 -0
  123. repull/api/webhooks/replay_webhook_delivery.py +127 -0
  124. repull/api/webhooks/rotate_webhook_secret.py +184 -0
  125. repull/api/webhooks/test_fire_webhook.py +127 -0
  126. repull/api/webhooks/test_webhook.py +133 -0
  127. repull/api/webhooks/update_webhook.py +208 -0
  128. repull/client.py +271 -0
  129. repull/errors.py +14 -0
  130. repull/models/__init__.py +485 -0
  131. repull/models/ai_operation.py +114 -0
  132. repull/models/ai_operation_input.py +66 -0
  133. repull/models/ai_operation_operation.py +11 -0
  134. repull/models/airbnb_listing.py +224 -0
  135. repull/models/airbnb_listing_list_response.py +124 -0
  136. repull/models/airbnb_reservation.py +234 -0
  137. repull/models/airbnb_reservation_list_response.py +124 -0
  138. repull/models/airbnb_reservation_status.py +11 -0
  139. repull/models/airbnb_review.py +199 -0
  140. repull/models/airbnb_review_list_response.py +124 -0
  141. repull/models/airbnb_thread.py +178 -0
  142. repull/models/airbnb_thread_list_response.py +124 -0
  143. repull/models/booking_connect_listing_option.py +108 -0
  144. repull/models/booking_connect_room.py +159 -0
  145. repull/models/booking_connect_rooms_response.py +149 -0
  146. repull/models/booking_connect_rooms_response_status.py +9 -0
  147. repull/models/booking_conversation.py +157 -0
  148. repull/models/booking_conversation_list_response.py +124 -0
  149. repull/models/booking_pricing_rate_update.py +204 -0
  150. repull/models/booking_pricing_rate_update_date_range.py +93 -0
  151. repull/models/booking_pricing_rate_update_restrictions.py +155 -0
  152. repull/models/booking_pricing_response.py +89 -0
  153. repull/models/booking_pricing_update_request.py +96 -0
  154. repull/models/booking_pricing_update_response.py +160 -0
  155. repull/models/booking_pricing_update_response_errors_item.py +65 -0
  156. repull/models/booking_pricing_update_response_raw.py +66 -0
  157. repull/models/booking_property.py +152 -0
  158. repull/models/booking_property_list_response.py +124 -0
  159. repull/models/booking_room_mapping.py +101 -0
  160. repull/models/booking_verify_hotel_request.py +87 -0
  161. repull/models/booking_verify_hotel_response.py +188 -0
  162. repull/models/bulk_pricing_failure.py +138 -0
  163. repull/models/bulk_pricing_failure_error_code.py +10 -0
  164. repull/models/bulk_pricing_item.py +102 -0
  165. repull/models/bulk_pricing_request.py +109 -0
  166. repull/models/bulk_pricing_request_action.py +8 -0
  167. repull/models/bulk_pricing_response.py +120 -0
  168. repull/models/calendar_day.py +118 -0
  169. repull/models/calendar_response.py +100 -0
  170. repull/models/connect_host.py +179 -0
  171. repull/models/connect_provider.py +187 -0
  172. repull/models/connect_provider_category.py +8 -0
  173. repull/models/connect_provider_connect_pattern.py +10 -0
  174. repull/models/connect_provider_list_response.py +100 -0
  175. repull/models/connect_provider_status.py +9 -0
  176. repull/models/connect_session.py +124 -0
  177. repull/models/connect_status.py +200 -0
  178. repull/models/connect_status_status.py +9 -0
  179. repull/models/connection.py +189 -0
  180. repull/models/connection_list_response.py +124 -0
  181. repull/models/connection_status.py +9 -0
  182. repull/models/conversation.py +311 -0
  183. repull/models/conversation_detail.py +384 -0
  184. repull/models/conversation_guest.py +141 -0
  185. repull/models/conversation_guest_contact.py +105 -0
  186. repull/models/conversation_host.py +129 -0
  187. repull/models/conversation_list_response.py +125 -0
  188. repull/models/conversation_message_attachment.py +118 -0
  189. repull/models/conversation_platform.py +11 -0
  190. repull/models/conversation_status.py +8 -0
  191. repull/models/create_ai_operation_response_200.py +87 -0
  192. repull/models/create_billing_checkout_body.py +90 -0
  193. repull/models/create_billing_checkout_body_plan.py +9 -0
  194. repull/models/create_connect_session_body.py +133 -0
  195. repull/models/create_connection_body.py +129 -0
  196. repull/models/create_connection_body_access_type.py +8 -0
  197. repull/models/create_reservation_body.py +163 -0
  198. repull/models/create_webhook_body.py +119 -0
  199. repull/models/cursor_pagination.py +107 -0
  200. repull/models/custom_schema.py +156 -0
  201. repull/models/custom_schema_create.py +122 -0
  202. repull/models/custom_schema_create_response.py +155 -0
  203. repull/models/custom_schema_delete_response.py +76 -0
  204. repull/models/custom_schema_list_response.py +125 -0
  205. repull/models/custom_schema_mappings.py +74 -0
  206. repull/models/custom_schema_summary.py +155 -0
  207. repull/models/custom_schema_update.py +132 -0
  208. repull/models/error.py +88 -0
  209. repull/models/error_error.py +222 -0
  210. repull/models/error_error_support.py +98 -0
  211. repull/models/get_health_response_200.py +87 -0
  212. repull/models/get_listing_segments_level.py +8 -0
  213. repull/models/guest.py +311 -0
  214. repull/models/guest_contact.py +142 -0
  215. repull/models/guest_flag.py +146 -0
  216. repull/models/guest_list_response.py +125 -0
  217. repull/models/guest_note.py +177 -0
  218. repull/models/guest_profile.py +461 -0
  219. repull/models/guest_reservations_summary.py +106 -0
  220. repull/models/list_conversation_messages_order.py +8 -0
  221. repull/models/list_conversations_platform.py +11 -0
  222. repull/models/list_conversations_status.py +8 -0
  223. repull/models/list_listings_status.py +9 -0
  224. repull/models/list_market_browse_sort.py +8 -0
  225. repull/models/list_properties_status.py +8 -0
  226. repull/models/list_reservations_status.py +10 -0
  227. repull/models/list_reviews_platform.py +9 -0
  228. repull/models/list_reviews_reviewer_role.py +9 -0
  229. repull/models/list_reviews_status.py +9 -0
  230. repull/models/list_webhook_deliveries_status.py +9 -0
  231. repull/models/listing.py +223 -0
  232. repull/models/listing_address.py +112 -0
  233. repull/models/listing_channel.py +106 -0
  234. repull/models/listing_comp.py +345 -0
  235. repull/models/listing_comp_nightly.py +121 -0
  236. repull/models/listing_comp_ratings.py +100 -0
  237. repull/models/listing_comps_response.py +172 -0
  238. repull/models/listing_comps_response_date_range.py +110 -0
  239. repull/models/listing_content.py +165 -0
  240. repull/models/listing_create_request.py +289 -0
  241. repull/models/listing_create_request_cancellation_policy.py +10 -0
  242. repull/models/listing_create_response.py +78 -0
  243. repull/models/listing_generate_content_request.py +115 -0
  244. repull/models/listing_generate_content_request_style.py +9 -0
  245. repull/models/listing_generate_content_response.py +111 -0
  246. repull/models/listing_list_response.py +124 -0
  247. repull/models/listing_pricing_apply_request.py +105 -0
  248. repull/models/listing_pricing_apply_request_action.py +8 -0
  249. repull/models/listing_pricing_apply_response.py +121 -0
  250. repull/models/listing_pricing_history_entry.py +224 -0
  251. repull/models/listing_pricing_history_entry_recommendation_factors.py +66 -0
  252. repull/models/listing_pricing_history_entry_status.py +10 -0
  253. repull/models/listing_pricing_history_response.py +125 -0
  254. repull/models/listing_pricing_recommendation.py +298 -0
  255. repull/models/listing_pricing_recommendation_factors.py +66 -0
  256. repull/models/listing_pricing_recommendation_status.py +9 -0
  257. repull/models/listing_pricing_response.py +203 -0
  258. repull/models/listing_pricing_response_comp_summary_type_0.py +143 -0
  259. repull/models/listing_pricing_response_date_range.py +110 -0
  260. repull/models/listing_pricing_response_listing_type_0.py +192 -0
  261. repull/models/listing_pricing_response_listing_type_0_ai_base_price_factors_type_0.py +65 -0
  262. repull/models/listing_pricing_strategy.py +349 -0
  263. repull/models/listing_pricing_strategy_comp_position_target.py +9 -0
  264. repull/models/listing_pricing_strategy_day_of_week_multipliers.py +66 -0
  265. repull/models/listing_pricing_strategy_input.py +298 -0
  266. repull/models/listing_pricing_strategy_input_comp_position_target.py +9 -0
  267. repull/models/listing_pricing_strategy_input_day_of_week_multipliers.py +65 -0
  268. repull/models/listing_pricing_strategy_input_mode.py +8 -0
  269. repull/models/listing_pricing_strategy_mode.py +8 -0
  270. repull/models/listing_publish_airbnb_request.py +98 -0
  271. repull/models/listing_publish_response.py +123 -0
  272. repull/models/listing_publish_response_channel.py +8 -0
  273. repull/models/listing_publish_response_result.py +66 -0
  274. repull/models/listing_publish_status_channel.py +191 -0
  275. repull/models/listing_publish_status_channel_push_status.py +10 -0
  276. repull/models/listing_publish_status_response.py +109 -0
  277. repull/models/listing_quality_tier.py +130 -0
  278. repull/models/listing_quality_tier_tier.py +10 -0
  279. repull/models/listing_segment.py +252 -0
  280. repull/models/listing_segment_quality_tier_type_1.py +10 -0
  281. repull/models/listing_segment_quality_tier_type_2_type_1.py +10 -0
  282. repull/models/listing_segment_quality_tier_type_3_type_1.py +10 -0
  283. repull/models/listing_segment_recommendation.py +139 -0
  284. repull/models/listing_segment_recommendation_evidence_type_0.py +65 -0
  285. repull/models/listing_segment_recommendation_kind.py +13 -0
  286. repull/models/listing_segments_response.py +305 -0
  287. repull/models/listing_segments_response_level.py +8 -0
  288. repull/models/listing_segments_response_my_quality_tier_type_1.py +10 -0
  289. repull/models/listing_segments_response_my_quality_tier_type_2_type_1.py +10 -0
  290. repull/models/listing_segments_response_my_quality_tier_type_3_type_1.py +10 -0
  291. repull/models/listing_segments_response_scope.py +114 -0
  292. repull/models/listing_status.py +9 -0
  293. repull/models/map_connect_booking_rooms_request.py +104 -0
  294. repull/models/map_connect_booking_rooms_response.py +100 -0
  295. repull/models/market_browse_category.py +87 -0
  296. repull/models/market_browse_entry.py +137 -0
  297. repull/models/market_browse_featured.py +130 -0
  298. repull/models/market_browse_response.py +124 -0
  299. repull/models/market_calendar_day.py +295 -0
  300. repull/models/market_calendar_day_events_item.py +142 -0
  301. repull/models/market_calendar_response.py +160 -0
  302. repull/models/market_calendar_response_date_range.py +110 -0
  303. repull/models/market_detail_response.py +401 -0
  304. repull/models/market_detail_response_bedroom_breakdown_item.py +65 -0
  305. repull/models/market_detail_response_benchmarks_item.py +65 -0
  306. repull/models/market_detail_response_capacity_gap.py +65 -0
  307. repull/models/market_detail_response_health_summary_type_0.py +65 -0
  308. repull/models/market_detail_response_market_position_type_0.py +65 -0
  309. repull/models/market_detail_response_price_distribution_item.py +151 -0
  310. repull/models/market_detail_response_property_type_mix_item.py +109 -0
  311. repull/models/market_detail_response_supply_trend_item.py +87 -0
  312. repull/models/market_detail_response_top_comps.py +153 -0
  313. repull/models/market_detail_response_wheelhouse_trends_item.py +65 -0
  314. repull/models/market_event.py +322 -0
  315. repull/models/market_my_listing.py +218 -0
  316. repull/models/market_my_listing_type.py +7 -0
  317. repull/models/market_summary.py +275 -0
  318. repull/models/market_top_comp.py +328 -0
  319. repull/models/markets_overview_response.py +256 -0
  320. repull/models/markets_overview_response_browse.py +140 -0
  321. repull/models/markets_overview_response_subscriptions.py +88 -0
  322. repull/models/markets_overview_response_totals.py +96 -0
  323. repull/models/message.py +349 -0
  324. repull/models/message_direction.py +8 -0
  325. repull/models/message_list_response.py +125 -0
  326. repull/models/pagination.py +107 -0
  327. repull/models/plumguide_listing.py +110 -0
  328. repull/models/plumguide_listing_list_response.py +124 -0
  329. repull/models/property_.py +196 -0
  330. repull/models/property_list_response.py +124 -0
  331. repull/models/reservation.py +269 -0
  332. repull/models/reservation_guest_details.py +67 -0
  333. repull/models/reservation_list_response.py +127 -0
  334. repull/models/reservation_platform_type_1.py +13 -0
  335. repull/models/reservation_platform_type_2_type_1.py +13 -0
  336. repull/models/reservation_platform_type_3_type_1.py +13 -0
  337. repull/models/reservation_status.py +10 -0
  338. repull/models/review.py +544 -0
  339. repull/models/review_category.py +123 -0
  340. repull/models/review_list_response.py +125 -0
  341. repull/models/review_platform.py +9 -0
  342. repull/models/review_response.py +115 -0
  343. repull/models/review_reviewer_role.py +8 -0
  344. repull/models/rotate_webhook_secret_response_200.py +109 -0
  345. repull/models/select_connect_provider_body.py +76 -0
  346. repull/models/select_provider_response.py +120 -0
  347. repull/models/select_provider_response_pattern.py +10 -0
  348. repull/models/test_webhook_body.py +96 -0
  349. repull/models/update_availability_body.py +100 -0
  350. repull/models/update_listing_pricing_strategy_response_200.py +78 -0
  351. repull/models/update_reservation_body.py +128 -0
  352. repull/models/update_webhook_body.py +135 -0
  353. repull/models/update_webhook_body_status.py +8 -0
  354. repull/models/vrbo_listing.py +110 -0
  355. repull/models/vrbo_listing_list_response.py +124 -0
  356. repull/models/vrbo_reservation.py +150 -0
  357. repull/models/vrbo_reservation_list_response.py +124 -0
  358. repull/models/webhook_delivery.py +286 -0
  359. repull/models/webhook_delivery_detail.py +315 -0
  360. repull/models/webhook_delivery_detail_payload.py +65 -0
  361. repull/models/webhook_delivery_detail_request_headers_type_0.py +65 -0
  362. repull/models/webhook_delivery_detail_response_headers_type_0.py +65 -0
  363. repull/models/webhook_delivery_list_response.py +124 -0
  364. repull/models/webhook_event_catalog.py +100 -0
  365. repull/models/webhook_event_catalog_domains_item.py +118 -0
  366. repull/models/webhook_event_catalog_domains_item_events_item.py +129 -0
  367. repull/models/webhook_event_catalog_domains_item_events_item_sample_payload.py +65 -0
  368. repull/models/webhook_list_response.py +124 -0
  369. repull/models/webhook_subscription.py +411 -0
  370. repull/models/webhook_subscription_status.py +9 -0
  371. repull/types.py +53 -0
  372. repull_sdk-0.2.0.dist-info/METADATA +214 -0
  373. repull_sdk-0.2.0.dist-info/RECORD +375 -0
  374. repull_sdk-0.2.0.dist-info/WHEEL +4 -0
  375. repull_sdk-0.2.0.dist-info/licenses/LICENSE +21 -0
repull/__init__.py ADDED
@@ -0,0 +1,8 @@
1
+
2
+ """ A client library for accessing Repull API """
3
+ from .client import AuthenticatedClient, Client
4
+
5
+ __all__ = (
6
+ "AuthenticatedClient",
7
+ "Client",
8
+ )
repull/api/__init__.py ADDED
@@ -0,0 +1 @@
1
+ """ Contains methods for accessing the API """
@@ -0,0 +1 @@
1
+ """ Contains endpoint functions for accessing the API """
@@ -0,0 +1,218 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, cast
3
+ from urllib.parse import quote
4
+
5
+ import httpx
6
+
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...types import Response, UNSET
9
+ from ... import errors
10
+
11
+ from ...models.ai_operation import AIOperation
12
+ from ...models.create_ai_operation_response_200 import CreateAiOperationResponse200
13
+ from ...types import UNSET, Unset
14
+ from typing import cast
15
+
16
+
17
+
18
+ def _get_kwargs(
19
+ *,
20
+ body: AIOperation | Unset = UNSET,
21
+
22
+ ) -> dict[str, Any]:
23
+ headers: dict[str, Any] = {}
24
+
25
+
26
+
27
+
28
+
29
+
30
+ _kwargs: dict[str, Any] = {
31
+ "method": "post",
32
+ "url": "/v1/ai",
33
+ }
34
+
35
+
36
+ if not isinstance(body, Unset):
37
+ _kwargs["json"] = body.to_dict()
38
+
39
+
40
+ headers["Content-Type"] = "application/json"
41
+
42
+ _kwargs["headers"] = headers
43
+ return _kwargs
44
+
45
+
46
+
47
+ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CreateAiOperationResponse200 | None:
48
+ if response.status_code == 200:
49
+ response_200 = CreateAiOperationResponse200.from_dict(response.json())
50
+
51
+
52
+
53
+ return response_200
54
+
55
+ if client.raise_on_unexpected_status:
56
+ raise errors.UnexpectedStatus(response.status_code, response.content)
57
+ else:
58
+ return None
59
+
60
+
61
+ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CreateAiOperationResponse200]:
62
+ return Response(
63
+ status_code=HTTPStatus(response.status_code),
64
+ content=response.content,
65
+ headers=response.headers,
66
+ parsed=_parse_response(client=client, response=response),
67
+ )
68
+
69
+
70
+ def sync_detailed(
71
+ *,
72
+ client: AuthenticatedClient | Client,
73
+ body: AIOperation | Unset = UNSET,
74
+
75
+ ) -> Response[CreateAiOperationResponse200]:
76
+ """ AI operation
77
+
78
+ Perform an AI-powered operation.
79
+
80
+ Operations:
81
+ - `respond-to-guest` — Generate a contextual guest response
82
+ - `classify-intent` — Classify the intent of a guest message
83
+ - `generate-listing` — Generate optimized listing description
84
+ - `review-response` — Generate a review response
85
+ - `price-suggestion` — Get AI pricing suggestions
86
+
87
+ Args:
88
+ body (AIOperation | Unset):
89
+
90
+ Raises:
91
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
92
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
93
+
94
+ Returns:
95
+ Response[CreateAiOperationResponse200]
96
+ """
97
+
98
+
99
+ kwargs = _get_kwargs(
100
+ body=body,
101
+
102
+ )
103
+
104
+ response = client.get_httpx_client().request(
105
+ **kwargs,
106
+ )
107
+
108
+ return _build_response(client=client, response=response)
109
+
110
+ def sync(
111
+ *,
112
+ client: AuthenticatedClient | Client,
113
+ body: AIOperation | Unset = UNSET,
114
+
115
+ ) -> CreateAiOperationResponse200 | None:
116
+ """ AI operation
117
+
118
+ Perform an AI-powered operation.
119
+
120
+ Operations:
121
+ - `respond-to-guest` — Generate a contextual guest response
122
+ - `classify-intent` — Classify the intent of a guest message
123
+ - `generate-listing` — Generate optimized listing description
124
+ - `review-response` — Generate a review response
125
+ - `price-suggestion` — Get AI pricing suggestions
126
+
127
+ Args:
128
+ body (AIOperation | Unset):
129
+
130
+ Raises:
131
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
132
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
133
+
134
+ Returns:
135
+ CreateAiOperationResponse200
136
+ """
137
+
138
+
139
+ return sync_detailed(
140
+ client=client,
141
+ body=body,
142
+
143
+ ).parsed
144
+
145
+ async def asyncio_detailed(
146
+ *,
147
+ client: AuthenticatedClient | Client,
148
+ body: AIOperation | Unset = UNSET,
149
+
150
+ ) -> Response[CreateAiOperationResponse200]:
151
+ """ AI operation
152
+
153
+ Perform an AI-powered operation.
154
+
155
+ Operations:
156
+ - `respond-to-guest` — Generate a contextual guest response
157
+ - `classify-intent` — Classify the intent of a guest message
158
+ - `generate-listing` — Generate optimized listing description
159
+ - `review-response` — Generate a review response
160
+ - `price-suggestion` — Get AI pricing suggestions
161
+
162
+ Args:
163
+ body (AIOperation | Unset):
164
+
165
+ Raises:
166
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
167
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
168
+
169
+ Returns:
170
+ Response[CreateAiOperationResponse200]
171
+ """
172
+
173
+
174
+ kwargs = _get_kwargs(
175
+ body=body,
176
+
177
+ )
178
+
179
+ response = await client.get_async_httpx_client().request(
180
+ **kwargs
181
+ )
182
+
183
+ return _build_response(client=client, response=response)
184
+
185
+ async def asyncio(
186
+ *,
187
+ client: AuthenticatedClient | Client,
188
+ body: AIOperation | Unset = UNSET,
189
+
190
+ ) -> CreateAiOperationResponse200 | None:
191
+ """ AI operation
192
+
193
+ Perform an AI-powered operation.
194
+
195
+ Operations:
196
+ - `respond-to-guest` — Generate a contextual guest response
197
+ - `classify-intent` — Classify the intent of a guest message
198
+ - `generate-listing` — Generate optimized listing description
199
+ - `review-response` — Generate a review response
200
+ - `price-suggestion` — Get AI pricing suggestions
201
+
202
+ Args:
203
+ body (AIOperation | Unset):
204
+
205
+ Raises:
206
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
207
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
208
+
209
+ Returns:
210
+ CreateAiOperationResponse200
211
+ """
212
+
213
+
214
+ return (await asyncio_detailed(
215
+ client=client,
216
+ body=body,
217
+
218
+ )).parsed
@@ -0,0 +1 @@
1
+ """ Contains endpoint functions for accessing the API """
@@ -0,0 +1,123 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, cast
3
+ from urllib.parse import quote
4
+
5
+ import httpx
6
+
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...types import Response, UNSET
9
+ from ... import errors
10
+
11
+
12
+
13
+
14
+ def _get_kwargs(
15
+ id: str,
16
+
17
+ ) -> dict[str, Any]:
18
+
19
+
20
+
21
+
22
+
23
+
24
+ _kwargs: dict[str, Any] = {
25
+ "method": "post",
26
+ "url": "/v1/channels/airbnb/listings/{id}".format(id=quote(str(id), safe=""),),
27
+ }
28
+
29
+
30
+ return _kwargs
31
+
32
+
33
+
34
+ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None:
35
+ if response.status_code == 200:
36
+ return None
37
+
38
+ if client.raise_on_unexpected_status:
39
+ raise errors.UnexpectedStatus(response.status_code, response.content)
40
+ else:
41
+ return None
42
+
43
+
44
+ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]:
45
+ return Response(
46
+ status_code=HTTPStatus(response.status_code),
47
+ content=response.content,
48
+ headers=response.headers,
49
+ parsed=_parse_response(client=client, response=response),
50
+ )
51
+
52
+
53
+ def sync_detailed(
54
+ id: str,
55
+ *,
56
+ client: AuthenticatedClient | Client,
57
+
58
+ ) -> Response[Any]:
59
+ """ Listing action (push/publish/unlist/delete)
60
+
61
+ Apply a state action to an Airbnb listing — `push` (sync local changes upstream), `publish` (make
62
+ publicly bookable), `unlist` (hide), or `delete` (permanent). Each action has different
63
+ reversibility — see docs.
64
+
65
+ Args:
66
+ id (str):
67
+
68
+ Raises:
69
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
70
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
71
+
72
+ Returns:
73
+ Response[Any]
74
+ """
75
+
76
+
77
+ kwargs = _get_kwargs(
78
+ id=id,
79
+
80
+ )
81
+
82
+ response = client.get_httpx_client().request(
83
+ **kwargs,
84
+ )
85
+
86
+ return _build_response(client=client, response=response)
87
+
88
+
89
+ async def asyncio_detailed(
90
+ id: str,
91
+ *,
92
+ client: AuthenticatedClient | Client,
93
+
94
+ ) -> Response[Any]:
95
+ """ Listing action (push/publish/unlist/delete)
96
+
97
+ Apply a state action to an Airbnb listing — `push` (sync local changes upstream), `publish` (make
98
+ publicly bookable), `unlist` (hide), or `delete` (permanent). Each action has different
99
+ reversibility — see docs.
100
+
101
+ Args:
102
+ id (str):
103
+
104
+ Raises:
105
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
106
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
107
+
108
+ Returns:
109
+ Response[Any]
110
+ """
111
+
112
+
113
+ kwargs = _get_kwargs(
114
+ id=id,
115
+
116
+ )
117
+
118
+ response = await client.get_async_httpx_client().request(
119
+ **kwargs
120
+ )
121
+
122
+ return _build_response(client=client, response=response)
123
+
@@ -0,0 +1,121 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, cast
3
+ from urllib.parse import quote
4
+
5
+ import httpx
6
+
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...types import Response, UNSET
9
+ from ... import errors
10
+
11
+
12
+
13
+
14
+ def _get_kwargs(
15
+ code: str,
16
+
17
+ ) -> dict[str, Any]:
18
+
19
+
20
+
21
+
22
+
23
+
24
+ _kwargs: dict[str, Any] = {
25
+ "method": "post",
26
+ "url": "/v1/channels/airbnb/reservations/{code}".format(code=quote(str(code), safe=""),),
27
+ }
28
+
29
+
30
+ return _kwargs
31
+
32
+
33
+
34
+ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None:
35
+ if response.status_code == 200:
36
+ return None
37
+
38
+ if client.raise_on_unexpected_status:
39
+ raise errors.UnexpectedStatus(response.status_code, response.content)
40
+ else:
41
+ return None
42
+
43
+
44
+ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]:
45
+ return Response(
46
+ status_code=HTTPStatus(response.status_code),
47
+ content=response.content,
48
+ headers=response.headers,
49
+ parsed=_parse_response(client=client, response=response),
50
+ )
51
+
52
+
53
+ def sync_detailed(
54
+ code: str,
55
+ *,
56
+ client: AuthenticatedClient | Client,
57
+
58
+ ) -> Response[Any]:
59
+ """ Accept/decline/cancel Airbnb reservation
60
+
61
+ Apply a state action to an Airbnb reservation — `accept` / `decline` (for inquiries and reservation
62
+ requests), `cancel` (host cancellation, carries penalties), `pre-approve` (for inquiries).
63
+
64
+ Args:
65
+ code (str):
66
+
67
+ Raises:
68
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
69
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
70
+
71
+ Returns:
72
+ Response[Any]
73
+ """
74
+
75
+
76
+ kwargs = _get_kwargs(
77
+ code=code,
78
+
79
+ )
80
+
81
+ response = client.get_httpx_client().request(
82
+ **kwargs,
83
+ )
84
+
85
+ return _build_response(client=client, response=response)
86
+
87
+
88
+ async def asyncio_detailed(
89
+ code: str,
90
+ *,
91
+ client: AuthenticatedClient | Client,
92
+
93
+ ) -> Response[Any]:
94
+ """ Accept/decline/cancel Airbnb reservation
95
+
96
+ Apply a state action to an Airbnb reservation — `accept` / `decline` (for inquiries and reservation
97
+ requests), `cancel` (host cancellation, carries penalties), `pre-approve` (for inquiries).
98
+
99
+ Args:
100
+ code (str):
101
+
102
+ Raises:
103
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
104
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
105
+
106
+ Returns:
107
+ Response[Any]
108
+ """
109
+
110
+
111
+ kwargs = _get_kwargs(
112
+ code=code,
113
+
114
+ )
115
+
116
+ response = await client.get_async_httpx_client().request(
117
+ **kwargs
118
+ )
119
+
120
+ return _build_response(client=client, response=response)
121
+
@@ -0,0 +1,162 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, cast
3
+ from urllib.parse import quote
4
+
5
+ import httpx
6
+
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...types import Response, UNSET
9
+ from ... import errors
10
+
11
+ from ...models.airbnb_listing import AirbnbListing
12
+ from typing import cast
13
+
14
+
15
+
16
+ def _get_kwargs(
17
+
18
+ ) -> dict[str, Any]:
19
+
20
+
21
+
22
+
23
+
24
+
25
+ _kwargs: dict[str, Any] = {
26
+ "method": "post",
27
+ "url": "/v1/channels/airbnb/listings",
28
+ }
29
+
30
+
31
+ return _kwargs
32
+
33
+
34
+
35
+ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AirbnbListing | None:
36
+ if response.status_code == 201:
37
+ response_201 = AirbnbListing.from_dict(response.json())
38
+
39
+
40
+
41
+ return response_201
42
+
43
+ if client.raise_on_unexpected_status:
44
+ raise errors.UnexpectedStatus(response.status_code, response.content)
45
+ else:
46
+ return None
47
+
48
+
49
+ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AirbnbListing]:
50
+ return Response(
51
+ status_code=HTTPStatus(response.status_code),
52
+ content=response.content,
53
+ headers=response.headers,
54
+ parsed=_parse_response(client=client, response=response),
55
+ )
56
+
57
+
58
+ def sync_detailed(
59
+ *,
60
+ client: AuthenticatedClient | Client,
61
+
62
+ ) -> Response[AirbnbListing]:
63
+ """ Create/push Airbnb listing
64
+
65
+ Create a new Airbnb listing or push an existing Repull listing to Airbnb. Requires a connected
66
+ Airbnb account. Returns the created listing id; publishing happens via the listing-action endpoint.
67
+
68
+ Raises:
69
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
70
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
71
+
72
+ Returns:
73
+ Response[AirbnbListing]
74
+ """
75
+
76
+
77
+ kwargs = _get_kwargs(
78
+
79
+ )
80
+
81
+ response = client.get_httpx_client().request(
82
+ **kwargs,
83
+ )
84
+
85
+ return _build_response(client=client, response=response)
86
+
87
+ def sync(
88
+ *,
89
+ client: AuthenticatedClient | Client,
90
+
91
+ ) -> AirbnbListing | None:
92
+ """ Create/push Airbnb listing
93
+
94
+ Create a new Airbnb listing or push an existing Repull listing to Airbnb. Requires a connected
95
+ Airbnb account. Returns the created listing id; publishing happens via the listing-action endpoint.
96
+
97
+ Raises:
98
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
99
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
100
+
101
+ Returns:
102
+ AirbnbListing
103
+ """
104
+
105
+
106
+ return sync_detailed(
107
+ client=client,
108
+
109
+ ).parsed
110
+
111
+ async def asyncio_detailed(
112
+ *,
113
+ client: AuthenticatedClient | Client,
114
+
115
+ ) -> Response[AirbnbListing]:
116
+ """ Create/push Airbnb listing
117
+
118
+ Create a new Airbnb listing or push an existing Repull listing to Airbnb. Requires a connected
119
+ Airbnb account. Returns the created listing id; publishing happens via the listing-action endpoint.
120
+
121
+ Raises:
122
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
123
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
124
+
125
+ Returns:
126
+ Response[AirbnbListing]
127
+ """
128
+
129
+
130
+ kwargs = _get_kwargs(
131
+
132
+ )
133
+
134
+ response = await client.get_async_httpx_client().request(
135
+ **kwargs
136
+ )
137
+
138
+ return _build_response(client=client, response=response)
139
+
140
+ async def asyncio(
141
+ *,
142
+ client: AuthenticatedClient | Client,
143
+
144
+ ) -> AirbnbListing | None:
145
+ """ Create/push Airbnb listing
146
+
147
+ Create a new Airbnb listing or push an existing Repull listing to Airbnb. Requires a connected
148
+ Airbnb account. Returns the created listing id; publishing happens via the listing-action endpoint.
149
+
150
+ Raises:
151
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
152
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
153
+
154
+ Returns:
155
+ AirbnbListing
156
+ """
157
+
158
+
159
+ return (await asyncio_detailed(
160
+ client=client,
161
+
162
+ )).parsed