shopware-api-client 1.0.98__tar.gz → 1.1.1__tar.gz

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 (382) hide show
  1. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/PKG-INFO +95 -275
  2. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/README.md +393 -577
  3. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/pyproject.toml +18 -7
  4. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/base.py +520 -194
  5. shopware_api_client-1.1.1/src/shopware_api_client/cache.py +157 -0
  6. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/client.py +6 -3
  7. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/config.py +4 -3
  8. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/endpoints/admin/__init__.py +20 -4
  9. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/commercial/b2b_components_role.py +18 -0
  10. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/commercial/b2b_components_shopping_list.py +22 -0
  11. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/commercial/b2b_components_shopping_list_line_item.py +20 -0
  12. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/commercial/b2b_employee.py +20 -0
  13. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/commercial/dynamic_access.py +18 -0
  14. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/acl_role.py +20 -0
  15. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/endpoints/admin/core/api_info.py +11 -12
  16. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/app.py +20 -0
  17. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/app_script_condition.py +18 -0
  18. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/category.py +35 -0
  19. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/cms_block.py +20 -0
  20. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/cms_page.py +26 -0
  21. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/cms_section.py +20 -0
  22. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/cms_slot.py +16 -0
  23. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/country.py +27 -0
  24. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/country_state.py +20 -0
  25. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/currency.py +27 -0
  26. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/currency_country_rounding.py +18 -0
  27. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/custom_entity.py +12 -0
  28. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/custom_field.py +12 -0
  29. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/customer.py +46 -0
  30. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/customer_address.py +22 -0
  31. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/customer_group.py +19 -0
  32. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/customer_recovery.py +16 -0
  33. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/customer_wishlist.py +20 -0
  34. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/customer_wishlist_product.py +18 -0
  35. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/delivery_time.py +18 -0
  36. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/document.py +22 -0
  37. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/document_base_config.py +20 -0
  38. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/document_base_config_sales_channel.py +22 -0
  39. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/document_type.py +20 -0
  40. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/integration.py +18 -0
  41. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/landing_page.py +22 -0
  42. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/endpoints/admin/core/language.py +5 -21
  43. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/locale.py +18 -0
  44. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/main_category.py +20 -0
  45. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/endpoints/admin/core/media.py +25 -37
  46. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/media_default_folder.py +15 -0
  47. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/media_folder.py +22 -0
  48. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/media_folder_configuration.py +18 -0
  49. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/media_thumbnail.py +16 -0
  50. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/media_thumbnail_size.py +18 -0
  51. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/order.py +47 -0
  52. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/order_address.py +26 -0
  53. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/order_customer.py +22 -0
  54. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/order_delivery.py +24 -0
  55. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/order_delivery_position.py +18 -0
  56. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/order_line_item.py +32 -0
  57. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/order_line_item_download.py +18 -0
  58. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/order_transaction.py +22 -0
  59. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/order_transaction_capture.py +20 -0
  60. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/order_transaction_capture_refund.py +22 -0
  61. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/order_transaction_capture_refund_position.py +21 -0
  62. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/payment_method.py +30 -0
  63. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/product.py +103 -0
  64. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/product_configurator_setting.py +20 -0
  65. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/product_cross_selling.py +20 -0
  66. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/product_cross_selling_assigned_products.py +20 -0
  67. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/product_download.py +18 -0
  68. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/product_export.py +23 -0
  69. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/product_feature_set.py +16 -0
  70. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/product_manufacturer.py +18 -0
  71. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/product_media.py +19 -0
  72. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/product_price.py +18 -0
  73. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/product_review.py +22 -0
  74. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/product_search_keyword.py +18 -0
  75. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/product_stream.py +25 -0
  76. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/product_visibility.py +18 -0
  77. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/product_warehouse.py +18 -0
  78. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/promotion.py +31 -0
  79. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/promotion_discount.py +20 -0
  80. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/promotion_discount_prices.py +18 -0
  81. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/property_group.py +16 -0
  82. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/property_group_option.py +23 -0
  83. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/endpoints/admin/core/rule.py +5 -24
  84. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/rule_condition.py +20 -0
  85. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/endpoints/admin/core/sales_channel.py +6 -53
  86. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/sales_channel_domain.py +28 -0
  87. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/endpoints/admin/core/salutation.py +5 -20
  88. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/seo_url.py +18 -0
  89. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/shipping_method.py +36 -0
  90. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/shipping_method_price.py +20 -0
  91. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/state_machine.py +20 -0
  92. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/state_machine_history.py +21 -0
  93. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/endpoints/admin/core/state_machine_state.py +6 -20
  94. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/state_machine_transition.py +19 -0
  95. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/system_config.py +16 -0
  96. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/endpoints/admin/core/tag.py +5 -14
  97. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/tax.py +20 -0
  98. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/tax_rule.py +20 -0
  99. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/tax_rule_type.py +16 -0
  100. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/unit.py +16 -0
  101. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/endpoints/admin/core/user.py +5 -31
  102. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/warehouse.py +19 -0
  103. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/warehouse_group.py +20 -0
  104. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/admin/core/warehouse_group_warehouse.py +18 -0
  105. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/endpoints/base_fields.py +13 -22
  106. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/endpoints/relations.py +36 -24
  107. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/__init__.py +49 -0
  108. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/address.py +61 -0
  109. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/cart.py +49 -0
  110. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/category.py +16 -0
  111. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/cms_block.py +10 -0
  112. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/cms_page.py +12 -0
  113. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/cms_section.py +12 -0
  114. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/cms_slot.py +8 -0
  115. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/context.py +58 -0
  116. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/country.py +15 -0
  117. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/country_state.py +19 -0
  118. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/currency.py +12 -0
  119. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/customer.py +34 -0
  120. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/customer_group.py +5 -0
  121. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/delivery_time.py +5 -0
  122. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/document.py +15 -0
  123. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/document_type.py +5 -0
  124. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/landing_page.py +10 -0
  125. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/language.py +18 -0
  126. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/locale.py +5 -0
  127. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/main_category.py +5 -0
  128. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/media.py +8 -0
  129. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/media_thumbnail.py +5 -0
  130. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/order.py +67 -0
  131. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/order_address.py +12 -0
  132. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/order_customer.py +8 -0
  133. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/order_delivery.py +14 -0
  134. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/order_delivery_position.py +5 -0
  135. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/order_line_item.py +14 -0
  136. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/order_transaction.py +12 -0
  137. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/order_transaction_capture.py +12 -0
  138. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/order_transaction_capture_refund.py +12 -0
  139. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/order_transaction_capture_refund_position.py +11 -0
  140. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/payment_method.py +8 -0
  141. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/product.py +60 -0
  142. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/product_configurator_setting.py +10 -0
  143. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/product_cross_selling.py +5 -0
  144. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/product_download.py +10 -0
  145. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/product_manufacturer.py +8 -0
  146. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/product_media.py +10 -0
  147. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/product_review.py +5 -0
  148. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/product_stream.py +5 -0
  149. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/property_group.py +8 -0
  150. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/property_group_option.py +10 -0
  151. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/rule.py +5 -0
  152. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/sales_channel.py +23 -0
  153. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/sales_channel_domain.py +12 -0
  154. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/salutation.py +12 -0
  155. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/seo_url.py +5 -0
  156. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/shipping_method.py +18 -0
  157. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/shipping_method_price.py +5 -0
  158. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/state_machine_state.py +5 -0
  159. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/tag.py +5 -0
  160. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/tax.py +5 -0
  161. shopware_api_client-1.1.1/src/shopware_api_client/endpoints/store/core/unit.py +5 -0
  162. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/exceptions.py +21 -1
  163. shopware_api_client-1.1.1/src/shopware_api_client/fieldsets.py +12 -0
  164. shopware_api_client-1.1.1/src/shopware_api_client/models/acl_role.py +11 -0
  165. {shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core → shopware_api_client-1.1.1/src/shopware_api_client/models}/app.py +3 -27
  166. shopware_api_client-1.1.1/src/shopware_api_client/models/app_script_condition.py +16 -0
  167. shopware_api_client-1.1.1/src/shopware_api_client/models/b2b_components_role.py +12 -0
  168. shopware_api_client-1.1.1/src/shopware_api_client/models/b2b_components_shopping_list.py +13 -0
  169. shopware_api_client-1.1.1/src/shopware_api_client/models/b2b_components_shopping_list_line_item.py +14 -0
  170. shopware_api_client-1.1.1/src/shopware_api_client/models/b2b_employee.py +17 -0
  171. {shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core → shopware_api_client-1.1.1/src/shopware_api_client/models}/category.py +3 -45
  172. shopware_api_client-1.1.1/src/shopware_api_client/models/cms_block.py +23 -0
  173. shopware_api_client-1.1.1/src/shopware_api_client/models/cms_page.py +15 -0
  174. shopware_api_client-1.1.1/src/shopware_api_client/models/cms_section.py +20 -0
  175. shopware_api_client-1.1.1/src/shopware_api_client/models/cms_slot.py +17 -0
  176. shopware_api_client-1.1.1/src/shopware_api_client/models/country.py +27 -0
  177. shopware_api_client-1.1.1/src/shopware_api_client/models/country_state.py +12 -0
  178. shopware_api_client-1.1.1/src/shopware_api_client/models/currency.py +20 -0
  179. shopware_api_client-1.1.1/src/shopware_api_client/models/currency_country_rounding.py +11 -0
  180. {shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core → shopware_api_client-1.1.1/src/shopware_api_client/models}/custom_entity.py +3 -18
  181. shopware_api_client-1.1.1/src/shopware_api_client/models/custom_field.py +8 -0
  182. shopware_api_client-1.1.1/src/shopware_api_client/models/customer.py +47 -0
  183. shopware_api_client-1.1.1/src/shopware_api_client/models/customer_address.py +22 -0
  184. shopware_api_client-1.1.1/src/shopware_api_client/models/customer_group.py +13 -0
  185. shopware_api_client-1.1.1/src/shopware_api_client/models/customer_recovery.py +9 -0
  186. shopware_api_client-1.1.1/src/shopware_api_client/models/customer_wishlist.py +9 -0
  187. shopware_api_client-1.1.1/src/shopware_api_client/models/customer_wishlist_product.py +10 -0
  188. shopware_api_client-1.1.1/src/shopware_api_client/models/delivery_time.py +12 -0
  189. shopware_api_client-1.1.1/src/shopware_api_client/models/document.py +20 -0
  190. shopware_api_client-1.1.1/src/shopware_api_client/models/document_base_config.py +19 -0
  191. shopware_api_client-1.1.1/src/shopware_api_client/models/document_base_config_sales_channel.py +10 -0
  192. shopware_api_client-1.1.1/src/shopware_api_client/models/document_type.py +8 -0
  193. shopware_api_client-1.1.1/src/shopware_api_client/models/dynamic_access.py +9 -0
  194. shopware_api_client-1.1.1/src/shopware_api_client/models/integration.py +15 -0
  195. shopware_api_client-1.1.1/src/shopware_api_client/models/landing_page.py +15 -0
  196. shopware_api_client-1.1.1/src/shopware_api_client/models/language.py +11 -0
  197. shopware_api_client-1.1.1/src/shopware_api_client/models/locale.py +9 -0
  198. shopware_api_client-1.1.1/src/shopware_api_client/models/main_category.py +12 -0
  199. shopware_api_client-1.1.1/src/shopware_api_client/models/media.py +26 -0
  200. shopware_api_client-1.1.1/src/shopware_api_client/models/media_default_folder.py +7 -0
  201. shopware_api_client-1.1.1/src/shopware_api_client/models/media_folder.py +16 -0
  202. shopware_api_client-1.1.1/src/shopware_api_client/models/media_folder_configuration.py +11 -0
  203. shopware_api_client-1.1.1/src/shopware_api_client/models/media_thumbnail.py +15 -0
  204. shopware_api_client-1.1.1/src/shopware_api_client/models/media_thumbnail_size.py +8 -0
  205. shopware_api_client-1.1.1/src/shopware_api_client/models/order.py +36 -0
  206. shopware_api_client-1.1.1/src/shopware_api_client/models/order_address.py +23 -0
  207. shopware_api_client-1.1.1/src/shopware_api_client/models/order_customer.py +18 -0
  208. shopware_api_client-1.1.1/src/shopware_api_client/models/order_delivery.py +19 -0
  209. shopware_api_client-1.1.1/src/shopware_api_client/models/order_delivery_position.py +15 -0
  210. shopware_api_client-1.1.1/src/shopware_api_client/models/order_line_item.py +34 -0
  211. shopware_api_client-1.1.1/src/shopware_api_client/models/order_line_item_download.py +12 -0
  212. shopware_api_client-1.1.1/src/shopware_api_client/models/order_transaction.py +15 -0
  213. shopware_api_client-1.1.1/src/shopware_api_client/models/order_transaction_capture.py +15 -0
  214. shopware_api_client-1.1.1/src/shopware_api_client/models/order_transaction_capture_refund.py +16 -0
  215. shopware_api_client-1.1.1/src/shopware_api_client/models/order_transaction_capture_refund_position.py +15 -0
  216. shopware_api_client-1.1.1/src/shopware_api_client/models/payment_method.py +29 -0
  217. shopware_api_client-1.1.1/src/shopware_api_client/models/product.py +72 -0
  218. shopware_api_client-1.1.1/src/shopware_api_client/models/product_configurator_setting.py +14 -0
  219. shopware_api_client-1.1.1/src/shopware_api_client/models/product_cross_selling.py +17 -0
  220. shopware_api_client-1.1.1/src/shopware_api_client/models/product_cross_selling_assigned_products.py +11 -0
  221. shopware_api_client-1.1.1/src/shopware_api_client/models/product_download.py +11 -0
  222. shopware_api_client-1.1.1/src/shopware_api_client/models/product_export.py +27 -0
  223. shopware_api_client-1.1.1/src/shopware_api_client/models/product_feature_set.py +11 -0
  224. shopware_api_client-1.1.1/src/shopware_api_client/models/product_manufacturer.py +11 -0
  225. shopware_api_client-1.1.1/src/shopware_api_client/models/product_media.py +11 -0
  226. shopware_api_client-1.1.1/src/shopware_api_client/models/product_price.py +15 -0
  227. shopware_api_client-1.1.1/src/shopware_api_client/models/product_review.py +19 -0
  228. shopware_api_client-1.1.1/src/shopware_api_client/models/product_search_keyword.py +13 -0
  229. shopware_api_client-1.1.1/src/shopware_api_client/models/product_stream.py +14 -0
  230. shopware_api_client-1.1.1/src/shopware_api_client/models/product_visibility.py +11 -0
  231. shopware_api_client-1.1.1/src/shopware_api_client/models/product_warehouse.py +10 -0
  232. shopware_api_client-1.1.1/src/shopware_api_client/models/promotion.py +29 -0
  233. shopware_api_client-1.1.1/src/shopware_api_client/models/promotion_discount.py +17 -0
  234. shopware_api_client-1.1.1/src/shopware_api_client/models/promotion_discount_prices.py +10 -0
  235. shopware_api_client-1.1.1/src/shopware_api_client/models/property_group.py +13 -0
  236. shopware_api_client-1.1.1/src/shopware_api_client/models/property_group_option.py +12 -0
  237. shopware_api_client-1.1.1/src/shopware_api_client/models/rule.py +16 -0
  238. shopware_api_client-1.1.1/src/shopware_api_client/models/rule_condition.py +15 -0
  239. shopware_api_client-1.1.1/src/shopware_api_client/models/sales_channel.py +44 -0
  240. shopware_api_client-1.1.1/src/shopware_api_client/models/sales_channel_domain.py +13 -0
  241. shopware_api_client-1.1.1/src/shopware_api_client/models/salutation.py +9 -0
  242. shopware_api_client-1.1.1/src/shopware_api_client/models/seo_url.py +19 -0
  243. shopware_api_client-1.1.1/src/shopware_api_client/models/shipping_method.py +18 -0
  244. shopware_api_client-1.1.1/src/shopware_api_client/models/shipping_method_price.py +15 -0
  245. shopware_api_client-1.1.1/src/shopware_api_client/models/state_machine.py +10 -0
  246. shopware_api_client-1.1.1/src/shopware_api_client/models/state_machine_history.py +18 -0
  247. shopware_api_client-1.1.1/src/shopware_api_client/models/state_machine_state.py +8 -0
  248. shopware_api_client-1.1.1/src/shopware_api_client/models/state_machine_transition.py +11 -0
  249. shopware_api_client-1.1.1/src/shopware_api_client/models/system_config.py +12 -0
  250. shopware_api_client-1.1.1/src/shopware_api_client/models/tag.py +7 -0
  251. shopware_api_client-1.1.1/src/shopware_api_client/models/tax.py +9 -0
  252. shopware_api_client-1.1.1/src/shopware_api_client/models/tax_rule.py +15 -0
  253. shopware_api_client-1.1.1/src/shopware_api_client/models/tax_rule_type.py +11 -0
  254. shopware_api_client-1.1.1/src/shopware_api_client/models/unit.py +8 -0
  255. shopware_api_client-1.1.1/src/shopware_api_client/models/user.py +21 -0
  256. shopware_api_client-1.1.1/src/shopware_api_client/models/warehouse.py +8 -0
  257. shopware_api_client-1.1.1/src/shopware_api_client/models/warehouse_group.py +11 -0
  258. shopware_api_client-1.1.1/src/shopware_api_client/models/warehouse_group_warehouse.py +11 -0
  259. shopware_api_client-1.1.1/src/shopware_api_client/py.typed +0 -0
  260. shopware_api_client-1.1.1/src/shopware_api_client/structs/__init__.py +0 -0
  261. shopware_api_client-1.1.1/src/shopware_api_client/structs/absolute_price_definition.py +6 -0
  262. shopware_api_client-1.1.1/src/shopware_api_client/structs/calculated_cheapest_price.py +6 -0
  263. shopware_api_client-1.1.1/src/shopware_api_client/structs/calculated_price.py +17 -0
  264. shopware_api_client-1.1.1/src/shopware_api_client/structs/calculated_tax.py +8 -0
  265. shopware_api_client-1.1.1/src/shopware_api_client/structs/cart.py +21 -0
  266. shopware_api_client-1.1.1/src/shopware_api_client/structs/cart_price.py +15 -0
  267. shopware_api_client-1.1.1/src/shopware_api_client/structs/cash_rounding_config.py +7 -0
  268. shopware_api_client-1.1.1/src/shopware_api_client/structs/context.py +15 -0
  269. shopware_api_client-1.1.1/src/shopware_api_client/structs/delivery.py +16 -0
  270. shopware_api_client-1.1.1/src/shopware_api_client/structs/delivery_date.py +8 -0
  271. shopware_api_client-1.1.1/src/shopware_api_client/structs/delivery_information.py +13 -0
  272. shopware_api_client-1.1.1/src/shopware_api_client/structs/delivery_position.py +12 -0
  273. shopware_api_client-1.1.1/src/shopware_api_client/structs/delivery_time.py +8 -0
  274. shopware_api_client-1.1.1/src/shopware_api_client/structs/language_info.py +6 -0
  275. shopware_api_client-1.1.1/src/shopware_api_client/structs/line_item.py +39 -0
  276. shopware_api_client-1.1.1/src/shopware_api_client/structs/list_price.py +7 -0
  277. shopware_api_client-1.1.1/src/shopware_api_client/structs/measurement_units.py +8 -0
  278. shopware_api_client-1.1.1/src/shopware_api_client/structs/percentage_price_definition.py +6 -0
  279. shopware_api_client-1.1.1/src/shopware_api_client/structs/price.py +14 -0
  280. shopware_api_client-1.1.1/src/shopware_api_client/structs/quantity_information.py +7 -0
  281. shopware_api_client-1.1.1/src/shopware_api_client/structs/quantity_price_definition.py +14 -0
  282. shopware_api_client-1.1.1/src/shopware_api_client/structs/reference_price.py +5 -0
  283. shopware_api_client-1.1.1/src/shopware_api_client/structs/reference_price_definition.py +7 -0
  284. shopware_api_client-1.1.1/src/shopware_api_client/structs/regulation_price.py +5 -0
  285. shopware_api_client-1.1.1/src/shopware_api_client/structs/sales_channel_context.py +33 -0
  286. shopware_api_client-1.1.1/src/shopware_api_client/structs/shipping_location.py +12 -0
  287. shopware_api_client-1.1.1/src/shopware_api_client/structs/tax_free_config.py +8 -0
  288. shopware_api_client-1.1.1/src/shopware_api_client/structs/tax_rule.py +6 -0
  289. shopware_api_client-1.1.1/src/shopware_api_client/structs/transaction.py +8 -0
  290. shopware_api_client-1.1.1/src/shopware_api_client/structs/variant_listing_config.py +8 -0
  291. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/commercial/b2b_components_role.py +0 -33
  292. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/commercial/b2b_employee.py +0 -42
  293. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/commercial/dynamic_access.py +0 -28
  294. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/acl_role.py +0 -34
  295. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/app_script_condition.py +0 -37
  296. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/cms_block.py +0 -49
  297. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/cms_page.py +0 -47
  298. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/cms_section.py +0 -50
  299. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/cms_slot.py +0 -42
  300. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/country.py +0 -59
  301. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/country_state.py +0 -38
  302. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/currency.py +0 -55
  303. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/currency_country_rounding.py +0 -33
  304. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/custom_field.py +0 -22
  305. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/customer.py +0 -98
  306. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/customer_address.py +0 -49
  307. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/customer_group.py +0 -38
  308. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/customer_recovery.py +0 -27
  309. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/customer_wishlist.py +0 -34
  310. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/customer_wishlist_product.py +0 -32
  311. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/delivery_time.py +0 -34
  312. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/document.py +0 -45
  313. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/document_base_config.py +0 -42
  314. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/document_base_config_sales_channel.py +0 -35
  315. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/document_type.py +0 -34
  316. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/integration.py +0 -38
  317. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/landing_page.py +0 -45
  318. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/locale.py +0 -33
  319. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/main_category.py +0 -34
  320. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/media_default_folder.py +0 -28
  321. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/media_folder.py +0 -43
  322. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/media_folder_configuration.py +0 -34
  323. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/media_thumbnail.py +0 -35
  324. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/media_thumbnail_size.py +0 -29
  325. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/order.py +0 -83
  326. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/order_address.py +0 -54
  327. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/order_customer.py +0 -45
  328. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/order_delivery.py +0 -49
  329. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/order_delivery_position.py +0 -39
  330. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/order_line_item.py +0 -69
  331. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/order_line_item_download.py +0 -36
  332. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/order_transaction.py +0 -42
  333. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/order_transaction_capture.py +0 -42
  334. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/order_transaction_capture_refund.py +0 -43
  335. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/order_transaction_capture_refund_position.py +0 -42
  336. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/payment_method.py +0 -77
  337. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/product.py +0 -169
  338. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/product_configurator_setting.py +0 -41
  339. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/product_cross_selling.py +0 -42
  340. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/product_cross_selling_assigned_products.py +0 -34
  341. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/product_download.py +0 -35
  342. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/product_export.py +0 -52
  343. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/product_feature_set.py +0 -30
  344. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/product_manufacturer.py +0 -36
  345. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/product_media.py +0 -36
  346. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/product_price.py +0 -37
  347. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/product_review.py +0 -46
  348. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/product_search_keyword.py +0 -33
  349. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/product_stream.py +0 -43
  350. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/product_visibility.py +0 -31
  351. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/product_warehouse.py +0 -30
  352. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/promotion.py +0 -64
  353. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/promotion_discount.py +0 -39
  354. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/promotion_discount_prices.py +0 -32
  355. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/property_group.py +0 -35
  356. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/property_group_option.py +0 -41
  357. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/rule_condition.py +0 -38
  358. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/sales_channel_domain.py +0 -46
  359. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/seo_url.py +0 -43
  360. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/shipping_method.py +0 -58
  361. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/state_machine.py +0 -36
  362. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/state_machine_history.py +0 -41
  363. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/state_machine_transition.py +0 -37
  364. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/system_config.py +0 -30
  365. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/tax.py +0 -36
  366. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/tax_rule.py +0 -37
  367. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/tax_rule_type.py +0 -32
  368. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/unit.py +0 -30
  369. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/warehouse.py +0 -29
  370. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/warehouse_group.py +0 -32
  371. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/admin/core/warehouse_group_warehouse.py +0 -30
  372. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/store/__init__.py +0 -16
  373. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/store/core/address.py +0 -78
  374. shopware_api_client-1.0.98/src/shopware_api_client/endpoints/store/core/cart.py +0 -95
  375. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/LICENSE +0 -0
  376. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/__init__.py +0 -0
  377. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/endpoints/__init__.py +0 -0
  378. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/endpoints/admin/commercial/__init__.py +0 -0
  379. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/endpoints/admin/core/__init__.py +0 -0
  380. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/endpoints/store/core/__init__.py +0 -0
  381. {shopware_api_client-1.0.98 → shopware_api_client-1.1.1}/src/shopware_api_client/logging.py +0 -0
  382. /shopware_api_client-1.0.98/src/shopware_api_client/py.typed → /shopware_api_client-1.1.1/src/shopware_api_client/models/__init__.py +0 -0
@@ -1,8 +1,9 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: shopware-api-client
3
- Version: 1.0.98
3
+ Version: 1.1.1
4
4
  Summary: An api client for the Shopware API
5
5
  License: MIT
6
+ License-File: LICENSE
6
7
  Keywords: shopware,api,client
7
8
  Author: GWS Gesellschaft für Warenwirtschafts-Systeme mbH
8
9
  Author-email: ebusiness@gws.ms
@@ -12,10 +13,13 @@ Classifier: Operating System :: OS Independent
12
13
  Classifier: Programming Language :: Python :: 3
13
14
  Classifier: Programming Language :: Python :: 3.12
14
15
  Classifier: Programming Language :: Python :: 3.13
15
- Requires-Dist: httpx (>=0.26,<0.27)
16
- Requires-Dist: httpx-auth (>=0.21,<0.22)
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Provides-Extra: redis
18
+ Requires-Dist: httpx (>=0.28,<0.29)
19
+ Requires-Dist: httpx-auth (>=0.23,<0.24)
17
20
  Requires-Dist: pydantic (>=2.6,<3.0)
18
21
  Requires-Dist: pytest-random-order (>=1.1.1,<2.0.0)
22
+ Requires-Dist: redis (>5.0,<7.0) ; extra == "redis"
19
23
  Project-URL: Bugtracker, https://github.com/GWS-mbH/shopware-api-client/issues
20
24
  Project-URL: Changelog, https://github.com/GWS-mbH/shopware-api-client
21
25
  Project-URL: Documentation, https://github.com/GWS-mbH/shopware-api-client/wiki
@@ -29,8 +33,13 @@ A Django-ORM like, Python 3.12, async Shopware 6 admin and store-front API clien
29
33
 
30
34
  ## Installation
31
35
 
36
+ ```sh
32
37
  pip install shopware-api-client
33
38
 
39
+ # If you want to use the redis cache
40
+ pip install shopware-api-client[redis]
41
+ ```
42
+
34
43
  ## Usage
35
44
 
36
45
  There are two kinds of clients provided by this library. The `client.AdminClient` for the Admin API and the
@@ -96,7 +105,7 @@ Endpoint:
96
105
  customer = await client.customer.first()
97
106
  ```
98
107
 
99
- All available Endpoint functions can be found in the [EndpointBase](#list-of-available-functions) section.
108
+ All available Endpoint functions can be found in the [AdminEndpoint](#list-of-available-functions) section.
100
109
 
101
110
  There are two additional ways how the client can be utilized by using it with the Endpoint-Class directly or the
102
111
  associated Pydantic Model:
@@ -151,7 +160,7 @@ await client.ce_blog.all()
151
160
 
152
161
  # Pydantic Model for the custom entity ce_blog
153
162
  CeBlog = client.ce_blog.model_class
154
- ```
163
+ ```
155
164
  Since custom entities are completely dynamic no autocompletion in IDE is available. However there are some pydantic validations added for the field-types of the custom entity. Relations are currently not supported, but everything else should work as expected.
156
165
 
157
166
  ### client.StoreClient
@@ -173,22 +182,59 @@ SHOP_URL = "https://pets24.shop"
173
182
  config = StoreConfig(url=SHOP_URL, access_key=STORE_API_ACCESS_KEY, context_token=CONTEXT_TOKEN)
174
183
  ```
175
184
 
176
- This config can be used with the `StoreClient`, which works exactly like the `AdminClient`.
185
+ This config can be used with the `StoreClient`, ~~which works exactly like the `AdminClient`~~.
186
+ The `StoreClient` has far less endpoints and does mostly not support full updated of models, but uses
187
+ helper-functions.
188
+
189
+ ### Redis Caching for Rate Limits
190
+
191
+ Both the AdminClient and the StoreClient use a built-in rate limiter. Shopware's rate limits differ based on the endpoints, both for the [SaaS-](https://docs.shopware.com/en/en/shopware-6-en/saas/rate-limits) and the [on-premise-solution](https://developer.shopware.com/docs/guides/hosting/infrastructure/rate-limiter.html).
192
+
193
+ To be able to respect the rate limit when sending requests from multiple clients, it is possible to use redis as a cache-backend for route-based rate-limit data. If redis is not used, each Client independently keeps track of the rate limit. Please note that the non-Redis cache is not thread-safe.
194
+
195
+ To use redis, simply hand over a redis-client to the client config:
196
+ ```py
197
+ import redis
198
+ from shopware_api_client.config import AdminConfig, StoreConfig
199
+ from shopware_api_client.client import AdminClient, StoreClient
200
+
201
+ redis_client = redis.Redis()
202
+
203
+ admin_config = AdminConfig(
204
+ url='',
205
+ client_id='...',
206
+ client_secre='...',
207
+ redis_client=redis_client,
208
+ )
209
+ admin_client = AdminClient(config=config) # <- This client uses the redis client now
210
+
211
+ store_config = StoreConfig(
212
+ url='',
213
+ access_key='',
214
+ context_token=''
215
+ redis_client=redis_client,
216
+ )
217
+ store_client = StoreClient(config=config) # <- Works for store client as well (Only do this in safe environments)
218
+ ```
219
+
220
+ __Note:__ Shopware currently enforces rate limits on a per–public‑IP basis. As a result, you should only share Redis‑backed rate‑limit caching among clients that originate from the same public IP address.
177
221
 
178
- ## EndpointBase
179
- The `base.EndpointBase` class should be used for creating new Endpoints. It provides some usefull functions to call
222
+ ## AdminEndpoint
223
+ The `base.AdminEndpoint` class should be used for creating new Admin-Endpoints. It provides some usefull functions to call
180
224
  the Shopware-API.
181
225
 
182
226
  The base structure of an Endpoint is pretty simple:
183
227
 
184
228
  ```python
185
- from shopware_api_client.base import ApiModelBase, EndpointBase
229
+ from shopware_api_client.base import EndpointMixin, AdminEndpoint
186
230
 
187
- class CustomerGroup(ApiModelBase["CustomerGroupEndpoint"]):
231
+
232
+ class CustomerGroup(EndpointMixin["CustomerGroupEndpoint"]):
188
233
  # Model definition
189
234
  pass
190
235
 
191
- class CustomerGroupEndpoint(EndpointBase[CustomerGroup]):
236
+
237
+ class CustomerGroupEndpoint(AdminEndpoint[CustomerGroup]):
192
238
  name = "customer_group" # name of the Shopware-Endpoint (snaky)
193
239
  path = "/customer-group" # path of the Shopware-Endpoint
194
240
  model_class = CustomerGroup # Pydantic-Model of this Endpoint
@@ -212,6 +258,7 @@ class CustomerGroupEndpoint(EndpointBase[CustomerGroup]):
212
258
  - `bulk_delete(objs: list[ModelClass] | list[dict[str, Any]` deletes multiple objects. Does always return dict or plain response. (POST /_action/sync)
213
259
 
214
260
  Not all functions are available for the StoreClient-Endpoints. But some of them have some additional functions.
261
+ StoreClient-Endpoints using the `base.StoreSearchEndpoint` can use most of the filter functions, but not create/update/delete.
215
262
 
216
263
  ### Filter
217
264
 
@@ -248,18 +295,23 @@ The base structure of an Endpoint-Model looks like this. Field names are convert
248
295
  ```python
249
296
  from pydantic import Field
250
297
  from typing import Any
251
- from shopware_api_client.base import ApiModelBase
298
+ from shopware_api_client.base import ApiModelBase, CustomFieldsMixin
252
299
 
253
- class CustomerGroup(ApiModelBase["CustomerGroupEndpoint"]):
300
+
301
+ class CustomerGroup(ApiModelBase, CustomFieldsMixin):
254
302
  _identifier = "customer_group" # name of the Shopware-Endpoint (snaky)
255
303
 
256
304
  name: str # Field with type
257
305
  display_gross: bool | None = None
258
- custom_fields: dict[str, Any] | None = None
259
306
  # other fields...
260
307
  ```
261
308
 
262
- The `id`, `created_at` and `updated_at` attributes are provided in the ApiModelBase and must not be added.
309
+ This Base-Models live in `shopware_api_client.models`
310
+
311
+ The `id`, `version_id`, `created_at`, `updated_at` and `translated` attributes are provided in the ApiModelBase and
312
+ must not be added. This are default fields of Shopwares `Entity` class, even they are not always used.
313
+
314
+ If an entity supports the `EntityCustomFieldsTrait` you can add the `CustomFieldsMixin` to add the custom_fields field.
263
315
 
264
316
  ### List of available Function
265
317
 
@@ -267,7 +319,7 @@ The `id`, `created_at` and `updated_at` attributes are provided in the ApiModelB
267
319
  - `delete()` executes `Endpoint.delete()`
268
320
 
269
321
 
270
- ### Relations
322
+ ### AdminModel + Relations
271
323
 
272
324
  To make relations to other models work, we have to define them in the Model. There are two classes to make this work:
273
325
  `endpoints.relations.ForeignRelation` and `endpoints.relations.ManyRelation`.
@@ -280,41 +332,43 @@ relation links.
280
332
  - `class`: Class of the related model
281
333
 
282
334
  Example (Customer):
335
+
283
336
  ```python
284
337
  from pydantic import Field
285
- from typing import TYPE_CHECKING
286
338
 
287
- from shopware_api_client.base import ApiModelBase, EndpointClass
339
+ from shopware_api_client.base import AdminModel
340
+ from shopware_api_client.endpoints.base_fields import IdField
288
341
  from shopware_api_client.endpoints.relations import ForeignRelation, ManyRelation
342
+ from shopware_api_client.models.customer import Customer as CustomerBase
289
343
 
290
- from ...base_fields import IdField
291
-
292
- if TYPE_CHECKING:
293
- from shopware_api_client.endpoints.admin import CustomerAddress
294
-
295
- # Base-Class for the normal model fields
296
- class CustomerBase(ApiModelBase[EndpointClass]):
344
+ """
345
+ // shopware_api_client.models.customer.Customer:
346
+ class Customer(ApiModelBase):
297
347
  # we have an id so we can create a ForeignRelation to it
298
348
  default_billing_address_id: IdField
349
+ """
299
350
 
300
-
301
- # Relations-Class for the related fields
302
- class CustomerRelations:
351
+ # final model containing relations for admin api. Must be AdminModel
352
+ class Customer(CustomerBase, AdminModel["CustomerEndpoint"]):
303
353
  default_billing_address: ForeignRelation["CustomerAddress"]
304
354
 
305
355
  # We don't have a field for all addresses of a customer, but there is a relation for it!
306
356
  addresses: ManyRelation["CustomerAddress"]
307
357
 
358
+ # model relation classes have to be imported at the end. pydantic needs the full import (not just TYPE_CHECKING)
359
+ # and this saves us from circular imports
360
+ from shopware_api_client.endpoints.admin import CustomerAddress # noqa: E402
308
361
 
309
- # Final Class, that combines both of them
310
- class Customer(CustomerBase["CustomerEndpoint"], CustomerRelations):
311
- pass
312
362
  ```
313
363
 
314
- We have two classes `Base` and `Relations`. This way we can [reuse the Base-Model](#reusing-admin-models-for-store-endpoints).
315
-
316
364
  ## Development
317
365
 
366
+ ### Testing
367
+
368
+ You can use `poetry build` and `poetry run pip install -e .` to install the current src.
369
+
370
+ Then run `poetry run pytest .` to execute the tests.
371
+
318
372
  ### Model Creation
319
373
 
320
374
  Shopware provides API-definitions for their whole API. You can download it from `<shopurl>/api/_info/openapi3.json`
@@ -326,7 +380,7 @@ datamodel-codegen --input openapi3.json --output model_openapi3.py --snake-case-
326
380
 
327
381
  The file may look confusing at first, but you can search for Endpoint-Name + JsonApi (Example: class CustomerJsonApi)
328
382
  to get all returned fields + relationships class as an overview over the available Relations. However, the Models will
329
- need some Modifications. But it's a good start.
383
+ need some modifications. But it's a good start.
330
384
 
331
385
  Not all fields returned by the API are writeable and the API will throw an error when you try to set it. So this fields
332
386
  must have an `exclude=True` in their definition. To find out which fields need to be excluded check the Shopware
@@ -340,245 +394,8 @@ don't get cleaned away as unused imports by code-formaters/cleaners.
340
394
  We need to import all related models at the **end** of the file. If we don't add them, Pydantic fails to build the model. If we add them before
341
395
  our model definition, we run into circular imports.
342
396
 
343
- ### Step by Step Example (Admin Endpoint Media Thumbnail)
344
-
345
- 1. Create the file for the endpoint. Since Media Thumbnail is an Admin > Core Endpoint we create a file called `media_thumbnail.py` in `endpoints/admin/core/`
346
-
347
- 2. You can copy & paste the following example as a base for the new Endpoint:
348
-
349
- ```python
350
- from typing import Any
351
-
352
- from pydantic import Field
353
-
354
- from ....base import ApiModelBase, EndpointBase, EndpointClass
355
- from ...base_fields import IdField
356
- from ...relations import ForeignRelation, ManyRelation
357
-
358
-
359
- class YourModelBase(ApiModelBase[EndpointClass]):
360
- _identifier = "your_model"
361
-
362
- foreign_id: IdField
363
- # more direct fields
364
-
365
-
366
- class YourModelRelations:
367
- foreign: ForeignRelation["ForeignRelationModel"]
368
- many: ManyRelation["ManyRelationModel"]
369
-
370
-
371
- class YourModel(YourModelBase["YourModelEndpoint"], YourModelRelations):
372
- pass
373
-
374
-
375
- class YourModelEndpoint(EndpointBase[YourModel]):
376
- name = "your_model"
377
- path = "/your-model"
378
- model_class = YourModel
379
-
380
-
381
- from .foreign_relation_model import ForeignRelationModel # noqa: E402
382
- from .may_relation_model import ManyRelationModel # noqa: E402
383
-
384
- ```
385
-
386
- 3. Update the example to your needs (Media Thumbnail Example):
387
- * Replace `YourModel` with `MediaThumbnail`
388
- * Replace `your_model` with `media_thumbnail`
389
- * Replace `your-model` with `media-thumbnail`
390
-
391
- 4. Assuming you used the datamodel-codegen command above to generate datamodels you can search the file for
392
- `class MediaThumbnailJsonApi` and copy all fields except `id`, `created_at`, `updated_at` (included in ApiModelBase) and `relationships`.
393
- ID-Fields will use the type `constr(pattern=r"^[0-9a-f]{32}$")`. Replace it with `IdField` from `endpoints.base_fields`.
394
- Remove the generated alias entries, because we use a generator for this.
395
-
396
- 5. Now your `media_thumbnail.py` should look like this:
397
-
398
- ```python
399
- from typing import TYPE_CHECKING, Any, ClassVar
400
-
401
- from pydantic import Field
402
-
403
- from ....base import ApiModelBase, EndpointBase, EndpointClass
404
- from ....client import registry
405
- from ...base_fields import IdField
406
- from ...relations import ForeignRelation, ManyRelation
407
-
408
-
409
- class MediaThumbnailBase(ApiModelBase[EndpointClass]):
410
- _identifier = "media_thumbnail"
411
-
412
- media_id: IdField
413
- width: int
414
- height: int
415
- url: str | None = Field(
416
- None, description="Runtime field, cannot be used as part of the criteria."
417
- )
418
- path: str | None = None
419
- custom_fields: dict[str, Any] | None = None
420
-
421
-
422
- class MediaThumbnailRelations:
423
- foreign: ClassVar[ForeignRelation["ForeignRelationModel"]] = ForeignRelation("ForeignRelationModel", "foreign_id")
424
- many: ClassVar[ManyRelation["ManyRelationModel"]] = ManyRelation("ManyRelationModel", "manyRelation")
425
-
426
-
427
- class MediaThumbnail(MediaThumbnailBase["MediaThumbnailEndpoint"], MediaThumbnailRelations):
428
- pass
429
-
430
-
431
- class MediaThumbnailEndpoint(EndpointBase[MediaThumbnail]):
432
- name = "media_thumbnail"
433
- path = "/media-thumbnail"
434
- model_class = MediaThumbnail
435
-
436
-
437
- from .foreign_relation_model import ForeignRelationModel # noqa: E402
438
- from .may_relation_model import ManyRelationModel # noqa: E402
439
- ```
440
-
441
- 6. Next up: Relations. For this check the type of the `relationships`. `MediaThumbnail` has only one relation to `media`.
442
- If you follow the types of `media > data` you can see the actual model type in the `type` field as examples attribute: media.
443
- So it relates to the Media Endpoint.
444
- For this relation our related Field looks like this:
445
- `media: ForeignRelation["Media"]`.
446
- We add it to the Relations class.
447
-
448
- 7. Updated `media_thumbnails.py`:
449
- ```python
450
- from typing import Any
451
-
452
- from pydantic import Field
453
-
454
- from ....base import ApiModelBase, EndpointBase, EndpointClass
455
- from ...base_fields import IdField
456
- from ...relations import ForeignRelation
457
-
458
-
459
- class MediaThumbnailBase(ApiModelBase[EndpointClass]):
460
- _identifier = "media_thumbnail"
461
-
462
- media_id: IdField
463
- width: int
464
- height: int
465
- url: str | None = Field(
466
- None, description="Runtime field, cannot be used as part of the criteria."
467
- )
468
- path: str | None = None
469
- custom_fields: dict[str, Any] | None = None
470
-
471
-
472
- class MediaThumbnailRelations:
473
- media: ForeignRelation["Media"]
474
-
475
-
476
- class MediaThumbnail(MediaThumbnailBase["MediaThumbnailEndpoint"], MediaThumbnailRelations):
477
- pass
478
-
479
-
480
- class MediaThumbnailEndpoint(EndpointBase[MediaThumbnail]):
481
- name = "media_thumbnail"
482
- path = "/media-thumbnail"
483
- model_class = MediaThumbnail
484
-
485
-
486
- from .media import Media # noqa: E402
487
- ```
488
-
489
- 8. Now we have to check, which fields are read-only fields. The easiest way for this is to head to the POST section of the documentation of this Endpoint: https://shopware.stoplight.io/docs/admin-api/9724c473cce7d-create-a-new-media-thumbnail-resources
490
- All fields that aren't listed here are read-only fields. So for our example this are: width, height, path, created_at and updated_at. We need to add an `exclude=True` to this fields, to make Pydantic ignore this fields when we send them back to the
491
- API for saving or creating entries. We try to provide default values for excluded fields which are required, so we don't have to set them, when we create
492
- a new object.
493
-
494
- 9. After adding `exclude=True` our final file should look like this:
495
- ```python
496
- from typing import Any
497
-
498
- from pydantic import AwareDatetime, Field
499
-
500
- from ....base import ApiModelBase, EndpointBase, EndpointClass
501
- from ....client import registry
502
- from ...base_fields import IdField
503
- from ...relations import ForeignRelation
504
-
505
-
506
- class MediaThumbnailBase(ApiModelBase[EndpointClass]):
507
- _identifier = "media_thumbnail"
508
-
509
- media_id: IdField
510
- width: int = Field(default=0, exclude=True)
511
- height: int = Field(default=0, exclude=True)
512
- url: str | None = Field(
513
- None, description="Runtime field, cannot be used as part of the criteria."
514
- )
515
- path: str | None = Field(None, exclude=True)
516
- custom_fields: dict[str, Any] | None = None
517
-
518
-
519
- class MediaThumbnailRelations:
520
- media: ClassVar[ForeignRelation["Media"]] = ForeignRelation("Media", "media_id")
521
-
522
-
523
- class MediaThumbnail(MediaThumbnailBase["MediaThumbnailEndpoint"], MediaThumbnailRelations):
524
- pass
525
-
526
-
527
- class MediaThumbnailEndpoint(EndpointBase[MediaThumbnail]):
528
- name = "media_thumbnail"
529
- path = "/media-thumbnail"
530
- model_class = MediaThumbnail
531
-
532
-
533
- from .media import Media # noqa: E402
534
- ```
535
- 10. As final step we need to add an import for the Model to `endpoints/admin/__init__.py` and add the Model to `__all__` and to the `AdminEndpoints.init_endpoints`
536
- ```python
537
- # other imports
538
- from .core.admin.media_thumbnail import MediaThumbnail, MediaThumbnailEndpoint
539
- # more imports
540
-
541
- __all__ = [
542
- # other models
543
- "MediaThumbnail",
544
- # more models
545
- ]
546
-
547
- ...
548
-
549
- class AdminEndpoints:
550
- def init_endpoints(self, client: "AdminClient"):
551
- # other endpoints
552
- self.media_thumbnail = MediaThumbnailEndpoint(client)
553
- # more endpoints
554
- ```
555
-
556
- We are done and you are now ready to use your new endpoint! 🎉
557
-
558
- ### Reusing Admin-Models for Store-Endpoints
559
-
560
- The Store-Endpoints use the same Model structure as the Admin-Endpoints, but have no relations. Some of the related
561
- objects are added to the response directly. We can use the Base-Models from our Admin-Endpoints for this purpose:
562
-
563
- ```python
564
- from ...admin.core.country import CountryBase
565
- from ...admin.core.country_state import CountryStateBase
566
- from ...admin.core.customer_address import CustomerAddressBase
567
- from ...admin.core.salutation import SalutationBase
568
-
569
-
570
- class Address(CustomerAddressBase["AddressEndpoint"]):
571
- _identifier = "address"
572
-
573
- country: CountryBase | None = None
574
- customer_state: CountryStateBase | None = None
575
- salutation: SalutationBase | None = None
576
- ```
577
-
578
- Since country, customerState and salutation are returned in the response, we can use their Base-Models to define
579
- their types.
580
-
581
- This "related" fields should always be optional, because their value is not always returned (object-creation).
397
+ Every model has a base model that lives in `models/<model_file>.py`. This model only contains direct fields (no relations), which are used by
398
+ both endpoints (store & admin). This base models are extended in the endpoints to contain relations (`endpoints/admin/core/<model_file>.py` & `endpoints/store/core/<model_file>.py`).
582
399
 
583
400
  ### Structure
584
401
 
@@ -593,7 +410,10 @@ This "related" fields should always be optional, because their value is not alwa
593
410
  > core -- StoreAPI > Core
594
411
  > commercial -- StoreAPI > Commercial
595
412
  > digital_sales_rooms -- StoreAPI > Digital Sales Rooms
596
- base.py -- All the Base Classes
413
+ > models -- base models to be extended in admin/store endpoints (shopware => Entity)
414
+ > structs -- data structures that do not have a model (shopware => Struct)
415
+ base.py -- All the Base Classes (nearly)
416
+ fieldsets.py -- FieldSetBase has its own file to prevent pydantic problems
597
417
  client.py -- Clients & Registry
598
418
  config.py -- Configs
599
419
  exceptions.py -- Exceptions