shopware-api-client 1.0.118__py3-none-any.whl → 1.1.1__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.
- shopware_api_client/base.py +338 -176
- shopware_api_client/cache.py +5 -10
- shopware_api_client/endpoints/admin/__init__.py +11 -4
- shopware_api_client/endpoints/admin/commercial/b2b_components_role.py +5 -20
- shopware_api_client/endpoints/admin/commercial/b2b_components_shopping_list.py +5 -25
- shopware_api_client/endpoints/admin/commercial/b2b_components_shopping_list_line_item.py +7 -24
- shopware_api_client/endpoints/admin/commercial/b2b_employee.py +5 -27
- shopware_api_client/endpoints/admin/commercial/dynamic_access.py +9 -19
- shopware_api_client/endpoints/admin/core/acl_role.py +5 -19
- shopware_api_client/endpoints/admin/core/api_info.py +11 -12
- shopware_api_client/endpoints/admin/core/app.py +5 -42
- shopware_api_client/endpoints/admin/core/app_script_condition.py +5 -24
- shopware_api_client/endpoints/admin/core/category.py +5 -56
- shopware_api_client/endpoints/admin/core/cms_block.py +5 -34
- shopware_api_client/endpoints/admin/core/cms_page.py +5 -26
- shopware_api_client/endpoints/admin/core/cms_section.py +5 -35
- shopware_api_client/endpoints/admin/core/cms_slot.py +5 -31
- shopware_api_client/endpoints/admin/core/country.py +5 -37
- shopware_api_client/endpoints/admin/core/country_state.py +5 -23
- shopware_api_client/endpoints/admin/core/currency.py +5 -33
- shopware_api_client/endpoints/admin/core/currency_country_rounding.py +5 -20
- shopware_api_client/endpoints/admin/core/custom_entity.py +4 -26
- shopware_api_client/endpoints/admin/core/custom_field.py +4 -14
- shopware_api_client/endpoints/admin/core/customer.py +5 -57
- shopware_api_client/endpoints/admin/core/customer_address.py +6 -33
- shopware_api_client/endpoints/admin/core/customer_group.py +5 -24
- shopware_api_client/endpoints/admin/core/customer_recovery.py +5 -16
- shopware_api_client/endpoints/admin/core/customer_wishlist.py +5 -19
- shopware_api_client/endpoints/admin/core/customer_wishlist_product.py +5 -19
- shopware_api_client/endpoints/admin/core/delivery_time.py +5 -21
- shopware_api_client/endpoints/admin/core/document.py +5 -28
- shopware_api_client/endpoints/admin/core/document_base_config.py +5 -27
- shopware_api_client/endpoints/admin/core/document_base_config_sales_channel.py +7 -20
- shopware_api_client/endpoints/admin/core/document_type.py +5 -19
- shopware_api_client/endpoints/admin/core/integration.py +5 -25
- shopware_api_client/endpoints/admin/core/landing_page.py +5 -28
- shopware_api_client/endpoints/admin/core/language.py +5 -21
- shopware_api_client/endpoints/admin/core/locale.py +5 -20
- shopware_api_client/endpoints/admin/core/main_category.py +5 -19
- shopware_api_client/endpoints/admin/core/media.py +25 -37
- shopware_api_client/endpoints/admin/core/media_default_folder.py +4 -17
- shopware_api_client/endpoints/admin/core/media_folder.py +5 -26
- shopware_api_client/endpoints/admin/core/media_folder_configuration.py +5 -21
- shopware_api_client/endpoints/admin/core/media_thumbnail.py +5 -26
- shopware_api_client/endpoints/admin/core/media_thumbnail_size.py +7 -18
- shopware_api_client/endpoints/admin/core/order.py +12 -48
- shopware_api_client/endpoints/admin/core/order_address.py +6 -34
- shopware_api_client/endpoints/admin/core/order_customer.py +6 -29
- shopware_api_client/endpoints/admin/core/order_delivery.py +5 -30
- shopware_api_client/endpoints/admin/core/order_delivery_position.py +5 -26
- shopware_api_client/endpoints/admin/core/order_line_item.py +7 -44
- shopware_api_client/endpoints/admin/core/order_line_item_download.py +5 -23
- shopware_api_client/endpoints/admin/core/order_transaction.py +5 -25
- shopware_api_client/endpoints/admin/core/order_transaction_capture.py +5 -27
- shopware_api_client/endpoints/admin/core/order_transaction_capture_refund.py +7 -28
- shopware_api_client/endpoints/admin/core/order_transaction_capture_refund_position.py +8 -29
- shopware_api_client/endpoints/admin/core/payment_method.py +5 -52
- shopware_api_client/endpoints/admin/core/product.py +24 -90
- shopware_api_client/endpoints/admin/core/product_configurator_setting.py +5 -26
- shopware_api_client/endpoints/admin/core/product_cross_selling.py +5 -27
- shopware_api_client/endpoints/admin/core/product_cross_selling_assigned_products.py +7 -21
- shopware_api_client/endpoints/admin/core/product_download.py +5 -22
- shopware_api_client/endpoints/admin/core/product_export.py +5 -34
- shopware_api_client/endpoints/admin/core/product_feature_set.py +5 -19
- shopware_api_client/endpoints/admin/core/product_manufacturer.py +5 -23
- shopware_api_client/endpoints/admin/core/product_media.py +5 -22
- shopware_api_client/endpoints/admin/core/product_price.py +5 -24
- shopware_api_client/endpoints/admin/core/product_review.py +5 -29
- shopware_api_client/endpoints/admin/core/product_search_keyword.py +5 -20
- shopware_api_client/endpoints/admin/core/product_stream.py +5 -23
- shopware_api_client/endpoints/admin/core/product_visibility.py +5 -18
- shopware_api_client/endpoints/admin/core/product_warehouse.py +5 -17
- shopware_api_client/endpoints/admin/core/promotion.py +5 -38
- shopware_api_client/endpoints/admin/core/promotion_discount.py +5 -24
- shopware_api_client/endpoints/admin/core/promotion_discount_prices.py +5 -19
- shopware_api_client/endpoints/admin/core/property_group.py +5 -24
- shopware_api_client/endpoints/admin/core/property_group_option.py +5 -23
- shopware_api_client/endpoints/admin/core/rule.py +5 -24
- shopware_api_client/endpoints/admin/core/rule_condition.py +5 -23
- shopware_api_client/endpoints/admin/core/sales_channel.py +6 -53
- shopware_api_client/endpoints/admin/core/sales_channel_domain.py +5 -23
- shopware_api_client/endpoints/admin/core/salutation.py +5 -20
- shopware_api_client/endpoints/admin/core/seo_url.py +5 -30
- shopware_api_client/endpoints/admin/core/shipping_method.py +8 -30
- shopware_api_client/endpoints/admin/core/shipping_method_price.py +20 -0
- shopware_api_client/endpoints/admin/core/state_machine.py +5 -21
- shopware_api_client/endpoints/admin/core/state_machine_history.py +5 -25
- shopware_api_client/endpoints/admin/core/state_machine_state.py +6 -20
- shopware_api_client/endpoints/admin/core/state_machine_transition.py +5 -23
- shopware_api_client/endpoints/admin/core/system_config.py +5 -19
- shopware_api_client/endpoints/admin/core/tag.py +5 -14
- shopware_api_client/endpoints/admin/core/tax.py +5 -21
- shopware_api_client/endpoints/admin/core/tax_rule.py +5 -22
- shopware_api_client/endpoints/admin/core/tax_rule_type.py +5 -21
- shopware_api_client/endpoints/admin/core/unit.py +5 -19
- shopware_api_client/endpoints/admin/core/user.py +5 -31
- shopware_api_client/endpoints/admin/core/warehouse.py +5 -15
- shopware_api_client/endpoints/admin/core/warehouse_group.py +6 -18
- shopware_api_client/endpoints/admin/core/warehouse_group_warehouse.py +6 -18
- shopware_api_client/endpoints/base_fields.py +13 -22
- shopware_api_client/endpoints/relations.py +36 -24
- shopware_api_client/endpoints/store/__init__.py +37 -4
- shopware_api_client/endpoints/store/core/address.py +51 -68
- shopware_api_client/endpoints/store/core/cart.py +39 -85
- shopware_api_client/endpoints/store/core/category.py +16 -0
- shopware_api_client/endpoints/store/core/cms_block.py +10 -0
- shopware_api_client/endpoints/store/core/cms_page.py +12 -0
- shopware_api_client/endpoints/store/core/cms_section.py +12 -0
- shopware_api_client/endpoints/store/core/cms_slot.py +8 -0
- shopware_api_client/endpoints/store/core/context.py +58 -0
- shopware_api_client/endpoints/store/core/country.py +15 -0
- shopware_api_client/endpoints/store/core/country_state.py +19 -0
- shopware_api_client/endpoints/store/core/currency.py +12 -0
- shopware_api_client/endpoints/store/core/customer.py +34 -0
- shopware_api_client/endpoints/store/core/customer_group.py +5 -0
- shopware_api_client/endpoints/store/core/delivery_time.py +5 -0
- shopware_api_client/endpoints/store/core/document.py +15 -0
- shopware_api_client/endpoints/store/core/document_type.py +5 -0
- shopware_api_client/endpoints/store/core/landing_page.py +10 -0
- shopware_api_client/endpoints/store/core/language.py +18 -0
- shopware_api_client/endpoints/store/core/locale.py +5 -0
- shopware_api_client/endpoints/store/core/main_category.py +5 -0
- shopware_api_client/endpoints/store/core/media.py +8 -0
- shopware_api_client/endpoints/store/core/media_thumbnail.py +5 -0
- shopware_api_client/endpoints/store/core/order.py +67 -0
- shopware_api_client/endpoints/store/core/order_address.py +12 -0
- shopware_api_client/endpoints/store/core/order_customer.py +8 -0
- shopware_api_client/endpoints/store/core/order_delivery.py +14 -0
- shopware_api_client/endpoints/store/core/order_delivery_position.py +5 -0
- shopware_api_client/endpoints/store/core/order_line_item.py +14 -0
- shopware_api_client/endpoints/store/core/order_transaction.py +12 -0
- shopware_api_client/endpoints/store/core/order_transaction_capture.py +12 -0
- shopware_api_client/endpoints/store/core/order_transaction_capture_refund.py +12 -0
- shopware_api_client/endpoints/store/core/order_transaction_capture_refund_position.py +11 -0
- shopware_api_client/endpoints/store/core/payment_method.py +8 -0
- shopware_api_client/endpoints/store/core/product.py +60 -0
- shopware_api_client/endpoints/store/core/product_configurator_setting.py +10 -0
- shopware_api_client/endpoints/store/core/product_cross_selling.py +5 -0
- shopware_api_client/endpoints/store/core/product_download.py +10 -0
- shopware_api_client/endpoints/store/core/product_manufacturer.py +8 -0
- shopware_api_client/endpoints/store/core/product_media.py +10 -0
- shopware_api_client/endpoints/store/core/product_review.py +5 -0
- shopware_api_client/endpoints/store/core/product_stream.py +5 -0
- shopware_api_client/endpoints/store/core/property_group.py +8 -0
- shopware_api_client/endpoints/store/core/property_group_option.py +10 -0
- shopware_api_client/endpoints/store/core/rule.py +5 -0
- shopware_api_client/endpoints/store/core/sales_channel.py +23 -0
- shopware_api_client/endpoints/store/core/sales_channel_domain.py +12 -0
- shopware_api_client/endpoints/store/core/salutation.py +12 -0
- shopware_api_client/endpoints/store/core/seo_url.py +5 -0
- shopware_api_client/endpoints/store/core/shipping_method.py +18 -0
- shopware_api_client/endpoints/store/core/shipping_method_price.py +5 -0
- shopware_api_client/endpoints/store/core/state_machine_state.py +5 -0
- shopware_api_client/endpoints/store/core/tag.py +5 -0
- shopware_api_client/endpoints/store/core/tax.py +5 -0
- shopware_api_client/endpoints/store/core/unit.py +5 -0
- shopware_api_client/exceptions.py +4 -0
- shopware_api_client/fieldsets.py +12 -0
- shopware_api_client/models/__init__.py +0 -0
- shopware_api_client/models/acl_role.py +11 -0
- shopware_api_client/models/app.py +33 -0
- shopware_api_client/models/app_script_condition.py +16 -0
- shopware_api_client/models/b2b_components_role.py +12 -0
- shopware_api_client/models/b2b_components_shopping_list.py +13 -0
- shopware_api_client/models/b2b_components_shopping_list_line_item.py +14 -0
- shopware_api_client/models/b2b_employee.py +17 -0
- shopware_api_client/models/category.py +44 -0
- shopware_api_client/models/cms_block.py +23 -0
- shopware_api_client/models/cms_page.py +15 -0
- shopware_api_client/models/cms_section.py +20 -0
- shopware_api_client/models/cms_slot.py +17 -0
- shopware_api_client/models/country.py +27 -0
- shopware_api_client/models/country_state.py +12 -0
- shopware_api_client/models/currency.py +20 -0
- shopware_api_client/models/currency_country_rounding.py +11 -0
- shopware_api_client/models/custom_entity.py +19 -0
- shopware_api_client/models/custom_field.py +8 -0
- shopware_api_client/models/customer.py +47 -0
- shopware_api_client/models/customer_address.py +22 -0
- shopware_api_client/models/customer_group.py +13 -0
- shopware_api_client/models/customer_recovery.py +9 -0
- shopware_api_client/models/customer_wishlist.py +9 -0
- shopware_api_client/models/customer_wishlist_product.py +10 -0
- shopware_api_client/models/delivery_time.py +12 -0
- shopware_api_client/models/document.py +20 -0
- shopware_api_client/models/document_base_config.py +19 -0
- shopware_api_client/models/document_base_config_sales_channel.py +10 -0
- shopware_api_client/models/document_type.py +8 -0
- shopware_api_client/models/dynamic_access.py +9 -0
- shopware_api_client/models/integration.py +15 -0
- shopware_api_client/models/landing_page.py +15 -0
- shopware_api_client/models/language.py +11 -0
- shopware_api_client/models/locale.py +9 -0
- shopware_api_client/models/main_category.py +12 -0
- shopware_api_client/models/media.py +26 -0
- shopware_api_client/models/media_default_folder.py +7 -0
- shopware_api_client/models/media_folder.py +16 -0
- shopware_api_client/models/media_folder_configuration.py +11 -0
- shopware_api_client/models/media_thumbnail.py +15 -0
- shopware_api_client/models/media_thumbnail_size.py +8 -0
- shopware_api_client/models/order.py +36 -0
- shopware_api_client/models/order_address.py +23 -0
- shopware_api_client/models/order_customer.py +18 -0
- shopware_api_client/models/order_delivery.py +19 -0
- shopware_api_client/models/order_delivery_position.py +15 -0
- shopware_api_client/models/order_line_item.py +34 -0
- shopware_api_client/models/order_line_item_download.py +12 -0
- shopware_api_client/models/order_transaction.py +15 -0
- shopware_api_client/models/order_transaction_capture.py +15 -0
- shopware_api_client/models/order_transaction_capture_refund.py +16 -0
- shopware_api_client/models/order_transaction_capture_refund_position.py +15 -0
- shopware_api_client/models/payment_method.py +29 -0
- shopware_api_client/models/product.py +72 -0
- shopware_api_client/models/product_configurator_setting.py +14 -0
- shopware_api_client/models/product_cross_selling.py +17 -0
- shopware_api_client/models/product_cross_selling_assigned_products.py +11 -0
- shopware_api_client/models/product_download.py +11 -0
- shopware_api_client/models/product_export.py +27 -0
- shopware_api_client/models/product_feature_set.py +11 -0
- shopware_api_client/models/product_manufacturer.py +11 -0
- shopware_api_client/models/product_media.py +11 -0
- shopware_api_client/models/product_price.py +15 -0
- shopware_api_client/models/product_review.py +19 -0
- shopware_api_client/models/product_search_keyword.py +13 -0
- shopware_api_client/models/product_stream.py +14 -0
- shopware_api_client/models/product_visibility.py +11 -0
- shopware_api_client/models/product_warehouse.py +10 -0
- shopware_api_client/models/promotion.py +29 -0
- shopware_api_client/models/promotion_discount.py +17 -0
- shopware_api_client/models/promotion_discount_prices.py +10 -0
- shopware_api_client/models/property_group.py +13 -0
- shopware_api_client/models/property_group_option.py +12 -0
- shopware_api_client/models/rule.py +16 -0
- shopware_api_client/models/rule_condition.py +15 -0
- shopware_api_client/models/sales_channel.py +44 -0
- shopware_api_client/models/sales_channel_domain.py +13 -0
- shopware_api_client/models/salutation.py +9 -0
- shopware_api_client/models/seo_url.py +19 -0
- shopware_api_client/models/shipping_method.py +18 -0
- shopware_api_client/models/shipping_method_price.py +15 -0
- shopware_api_client/models/state_machine.py +10 -0
- shopware_api_client/models/state_machine_history.py +18 -0
- shopware_api_client/models/state_machine_state.py +8 -0
- shopware_api_client/models/state_machine_transition.py +11 -0
- shopware_api_client/models/system_config.py +12 -0
- shopware_api_client/models/tag.py +7 -0
- shopware_api_client/models/tax.py +9 -0
- shopware_api_client/models/tax_rule.py +15 -0
- shopware_api_client/models/tax_rule_type.py +11 -0
- shopware_api_client/models/unit.py +8 -0
- shopware_api_client/models/user.py +21 -0
- shopware_api_client/models/warehouse.py +8 -0
- shopware_api_client/models/warehouse_group.py +11 -0
- shopware_api_client/models/warehouse_group_warehouse.py +11 -0
- shopware_api_client/structs/__init__.py +0 -0
- shopware_api_client/structs/absolute_price_definition.py +6 -0
- shopware_api_client/structs/calculated_cheapest_price.py +6 -0
- shopware_api_client/structs/calculated_price.py +17 -0
- shopware_api_client/structs/calculated_tax.py +8 -0
- shopware_api_client/structs/cart.py +21 -0
- shopware_api_client/structs/cart_price.py +15 -0
- shopware_api_client/structs/cash_rounding_config.py +7 -0
- shopware_api_client/structs/context.py +15 -0
- shopware_api_client/structs/delivery.py +16 -0
- shopware_api_client/structs/delivery_date.py +8 -0
- shopware_api_client/structs/delivery_information.py +13 -0
- shopware_api_client/structs/delivery_position.py +12 -0
- shopware_api_client/structs/delivery_time.py +8 -0
- shopware_api_client/structs/language_info.py +6 -0
- shopware_api_client/structs/line_item.py +39 -0
- shopware_api_client/structs/list_price.py +7 -0
- shopware_api_client/structs/measurement_units.py +8 -0
- shopware_api_client/structs/percentage_price_definition.py +6 -0
- shopware_api_client/structs/price.py +14 -0
- shopware_api_client/structs/quantity_information.py +7 -0
- shopware_api_client/structs/quantity_price_definition.py +14 -0
- shopware_api_client/structs/reference_price.py +5 -0
- shopware_api_client/structs/reference_price_definition.py +7 -0
- shopware_api_client/structs/regulation_price.py +5 -0
- shopware_api_client/structs/sales_channel_context.py +33 -0
- shopware_api_client/structs/shipping_location.py +12 -0
- shopware_api_client/structs/tax_free_config.py +8 -0
- shopware_api_client/structs/tax_rule.py +6 -0
- shopware_api_client/structs/transaction.py +8 -0
- shopware_api_client/structs/variant_listing_config.py +8 -0
- {shopware_api_client-1.0.118.dist-info → shopware_api_client-1.1.1.dist-info}/METADATA +45 -273
- shopware_api_client-1.1.1.dist-info/RECORD +298 -0
- shopware_api_client-1.0.118.dist-info/RECORD +0 -117
- {shopware_api_client-1.0.118.dist-info → shopware_api_client-1.1.1.dist-info}/WHEEL +0 -0
- {shopware_api_client-1.0.118.dist-info → shopware_api_client-1.1.1.dist-info}/licenses/LICENSE +0 -0
shopware_api_client/cache.py
CHANGED
|
@@ -14,24 +14,19 @@ except ModuleNotFoundError:
|
|
|
14
14
|
|
|
15
15
|
class CacheBase(ABC):
|
|
16
16
|
@abstractmethod
|
|
17
|
-
async def get(self, key: str) -> Any | None:
|
|
18
|
-
...
|
|
17
|
+
async def get(self, key: str) -> Any | None: ...
|
|
19
18
|
|
|
20
19
|
@abstractmethod
|
|
21
|
-
async def get_and_decrement(self, key: str) -> int | None:
|
|
22
|
-
...
|
|
20
|
+
async def get_and_decrement(self, key: str) -> int | None: ...
|
|
23
21
|
|
|
24
22
|
@abstractmethod
|
|
25
|
-
async def has_lock(self, key: str, ttl: int) -> bool:
|
|
26
|
-
...
|
|
23
|
+
async def has_lock(self, key: str, ttl: int) -> bool: ...
|
|
27
24
|
|
|
28
25
|
@abstractmethod
|
|
29
|
-
async def set(self, key: str, value: Any, ttl: int | None = None) -> None:
|
|
30
|
-
...
|
|
26
|
+
async def set(self, key: str, value: Any, ttl: int | None = None) -> None: ...
|
|
31
27
|
|
|
32
28
|
@abstractmethod
|
|
33
|
-
async def delete(self, key: str) -> None:
|
|
34
|
-
...
|
|
29
|
+
async def delete(self, key: str) -> None: ...
|
|
35
30
|
|
|
36
31
|
@staticmethod
|
|
37
32
|
def _json_encode(key: str, value: Any) -> str:
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
from typing import TYPE_CHECKING
|
|
2
2
|
|
|
3
|
+
from ...base import AdminModel
|
|
4
|
+
|
|
3
5
|
if TYPE_CHECKING:
|
|
4
6
|
from ...client import AdminClient
|
|
5
7
|
|
|
@@ -96,6 +98,7 @@ from .core.sales_channel_domain import SalesChannelDomain, SalesChannelDomainEnd
|
|
|
96
98
|
from .core.salutation import Salutation, SalutationEndpoint
|
|
97
99
|
from .core.seo_url import SeoUrl, SeoUrlEndpoint
|
|
98
100
|
from .core.shipping_method import ShippingMethod, ShippingMethodEndpoint
|
|
101
|
+
from .core.shipping_method_price import ShippingMethodPrice, ShippingMethodPriceEndpoint
|
|
99
102
|
from .core.state_machine import StateMachine, StateMachineEndpoint
|
|
100
103
|
from .core.state_machine_history import StateMachineHistory, StateMachineHistoryEndpoint
|
|
101
104
|
from .core.state_machine_state import StateMachineState, StateMachineStateEndpoint
|
|
@@ -194,6 +197,7 @@ __all__ = [
|
|
|
194
197
|
"Salutation",
|
|
195
198
|
"SeoUrl",
|
|
196
199
|
"ShippingMethod",
|
|
200
|
+
"ShippingMethodPrice",
|
|
197
201
|
"StateMachine",
|
|
198
202
|
"StateMachineHistory",
|
|
199
203
|
"StateMachineState",
|
|
@@ -218,11 +222,11 @@ class AdminEndpoints:
|
|
|
218
222
|
|
|
219
223
|
from pydantic import AwareDatetime, create_model
|
|
220
224
|
|
|
221
|
-
from ...base import
|
|
225
|
+
from ...base import AdminEndpoint
|
|
222
226
|
from ..base_fields import IdField
|
|
223
227
|
|
|
224
228
|
async for custom_entity in self.custom_entity.iter():
|
|
225
|
-
assert
|
|
229
|
+
assert isinstance(custom_entity, CustomEntity)
|
|
226
230
|
fields: dict[str, Any] = {}
|
|
227
231
|
|
|
228
232
|
for field in custom_entity.fields:
|
|
@@ -262,9 +266,11 @@ class AdminEndpoints:
|
|
|
262
266
|
|
|
263
267
|
fields["_identifier"] = (str, custom_entity.name)
|
|
264
268
|
|
|
265
|
-
ce_model: type[
|
|
269
|
+
ce_model: type[AdminModel[Any]] = create_model(
|
|
270
|
+
custom_entity.name, **fields, __base__=AdminModel[AdminEndpoint]
|
|
271
|
+
)
|
|
266
272
|
|
|
267
|
-
ce_endpoint = new_class(f"{custom_entity.name}Endpoint", (
|
|
273
|
+
ce_endpoint = new_class(f"{custom_entity.name}Endpoint", (AdminEndpoint[AdminModel],))
|
|
268
274
|
ce_endpoint.name = custom_entity.name # type: ignore
|
|
269
275
|
ce_endpoint.path = f"/{custom_entity.name.replace('_', '-')}" # type: ignore
|
|
270
276
|
ce_endpoint.model_class = ce_model # type: ignore
|
|
@@ -356,6 +362,7 @@ class AdminEndpoints:
|
|
|
356
362
|
self.salutation = SalutationEndpoint(client)
|
|
357
363
|
self.seo_url = SeoUrlEndpoint(client)
|
|
358
364
|
self.shipping_method = ShippingMethodEndpoint(client)
|
|
365
|
+
self.shipping_method_price = ShippingMethodPriceEndpoint(client)
|
|
359
366
|
self.state_machine = StateMachineEndpoint(client)
|
|
360
367
|
self.state_machine_history = StateMachineHistoryEndpoint(client)
|
|
361
368
|
self.state_machine_state = StateMachineStateEndpoint(client)
|
|
@@ -1,29 +1,14 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminEndpoint, AdminModel
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation, ManyRelation
|
|
3
|
+
from shopware_api_client.models.b2b_components_role import B2bComponentsRoleBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import IdField
|
|
5
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
class B2bComponentsRoleBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "b2b_components_role"
|
|
10
|
-
|
|
11
|
-
business_partner_customer_id: IdField | None = None
|
|
12
|
-
name: str
|
|
13
|
-
permissions: dict[str, Any] | None = None
|
|
14
|
-
custom_fields: dict[str, Any] | None = None
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class B2bComponentsRoleRelations:
|
|
6
|
+
class B2bComponentsRole(B2bComponentsRoleBase, AdminModel["B2bComponentsRoleEndpoint"]):
|
|
18
7
|
employees: ManyRelation["B2bEmployee"]
|
|
19
8
|
business_partner_customer: ForeignRelation["Customer"]
|
|
20
9
|
|
|
21
10
|
|
|
22
|
-
class
|
|
23
|
-
pass
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class B2bComponentsRoleEndpoint(EndpointBase[B2bComponentsRole]):
|
|
11
|
+
class B2bComponentsRoleEndpoint(AdminEndpoint[B2bComponentsRole]):
|
|
27
12
|
name = "b2b_components_role"
|
|
28
13
|
path = "/b2b-components-role"
|
|
29
14
|
model_class = B2bComponentsRole
|
|
@@ -1,36 +1,16 @@
|
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation, ManyRelation
|
|
3
|
+
from shopware_api_client.models.b2b_components_shopping_list import B2bComponentsShoppingListBase
|
|
1
4
|
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
6
|
-
from ...base_fields import Price
|
|
7
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class B2bComponentsShoppingListBase(ApiModelBase[EndpointClass]):
|
|
11
|
-
_identifier: str = "b2b_components_shopping_list"
|
|
12
|
-
|
|
13
|
-
name: str | None = None
|
|
14
|
-
active: bool | None = None
|
|
15
|
-
custom_fields: dict[str, Any] | None = None
|
|
16
|
-
price: Price | None = None
|
|
17
|
-
sales_channel_id: str | None = None
|
|
18
|
-
customer_id: str | None = None
|
|
19
|
-
employee_id: str | None = None
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class B2bComponentsShoppingListRelations:
|
|
6
|
+
class B2bComponentsShoppingList(B2bComponentsShoppingListBase, AdminModel["B2bComponentsShoppingListEndpoint"]):
|
|
23
7
|
sales_channel: ForeignRelation["SalesChannel"]
|
|
24
8
|
line_items: ManyRelation["B2bComponentsShoppingListLineItem"]
|
|
25
9
|
customer: ForeignRelation["Customer"]
|
|
26
10
|
employee: ForeignRelation["B2bEmployee"]
|
|
27
11
|
|
|
28
12
|
|
|
29
|
-
class
|
|
30
|
-
pass
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class B2bComponentsShoppingListEndpoint(EndpointBase[B2bComponentsShoppingList]):
|
|
13
|
+
class B2bComponentsShoppingListEndpoint(AdminEndpoint[B2bComponentsShoppingList]):
|
|
34
14
|
name = "b2b_components_shopping_list"
|
|
35
15
|
path = "/b2b-components-shopping-list"
|
|
36
16
|
model_class = B2bComponentsShoppingList
|
|
@@ -1,33 +1,16 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
from
|
|
4
|
-
from ...base_fields import IdField
|
|
5
|
-
from ...relations import ForeignRelation
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class B2bComponentsShoppingListLineItemBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "b2b_components_shopping_list_line_item"
|
|
10
|
-
product_id: IdField
|
|
11
|
-
product_version_id: IdField | None = None
|
|
12
|
-
quantity: int
|
|
13
|
-
price: dict[str, Any] | None = None
|
|
14
|
-
custom_fields: dict[str, Any] | None = None
|
|
15
|
-
shopping_list_id: IdField
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class B2bComponentsShoppingListLineItemRelations:
|
|
19
|
-
shopping_list: ForeignRelation["B2bComponentsShoppingList"]
|
|
20
|
-
product: ForeignRelation["Product"]
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation
|
|
3
|
+
from shopware_api_client.models.b2b_components_shopping_list_line_item import B2bComponentsShoppingListLineItemBase
|
|
21
4
|
|
|
22
5
|
|
|
23
6
|
class B2bComponentsShoppingListLineItem(
|
|
24
|
-
B2bComponentsShoppingListLineItemBase["B2bComponentsShoppingListLineItemEndpoint"]
|
|
25
|
-
B2bComponentsShoppingListLineItemRelations,
|
|
7
|
+
B2bComponentsShoppingListLineItemBase, AdminModel["B2bComponentsShoppingListLineItemEndpoint"]
|
|
26
8
|
):
|
|
27
|
-
|
|
9
|
+
shopping_list: ForeignRelation["B2bComponentsShoppingList"]
|
|
10
|
+
product: ForeignRelation["Product"]
|
|
28
11
|
|
|
29
12
|
|
|
30
|
-
class B2bComponentsShoppingListLineItemEndpoint(
|
|
13
|
+
class B2bComponentsShoppingListLineItemEndpoint(AdminEndpoint[B2bComponentsShoppingListLineItem]):
|
|
31
14
|
name = "b2b_components_shopping_list_line_item"
|
|
32
15
|
path = "/b2b-components-shopping-list-line-item"
|
|
33
16
|
model_class = B2bComponentsShoppingListLineItem
|
|
@@ -1,37 +1,15 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminEndpoint, AdminModel
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation
|
|
3
|
+
from shopware_api_client.models.b2b_employee import B2bEmployeeBase
|
|
2
4
|
|
|
3
|
-
from pydantic import AwareDatetime
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
from ...base_fields import IdField
|
|
7
|
-
from ...relations import ForeignRelation
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class B2bEmployeeBase(ApiModelBase[EndpointClass]):
|
|
11
|
-
_identifier: str = "b2b_employee"
|
|
12
|
-
|
|
13
|
-
business_partner_customer_id: IdField | None = None
|
|
14
|
-
role_id: IdField | None = None
|
|
15
|
-
language_id: IdField
|
|
16
|
-
active: bool | None = None
|
|
17
|
-
first_name: str
|
|
18
|
-
last_name: str
|
|
19
|
-
email: str
|
|
20
|
-
recovery_time: AwareDatetime | None = None
|
|
21
|
-
custom_fields: dict[str, Any] | None = None
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class B2bEmployeeRelations:
|
|
6
|
+
class B2bEmployee(B2bEmployeeBase, AdminModel["B2bEmployeeEndpoint"]):
|
|
25
7
|
business_partner_customer: ForeignRelation["Customer"]
|
|
26
8
|
role: ForeignRelation["B2bComponentsRole"]
|
|
27
9
|
language: ForeignRelation["Language"]
|
|
28
10
|
|
|
29
11
|
|
|
30
|
-
class
|
|
31
|
-
pass
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class B2bEmployeeEndpoint(EndpointBase[B2bEmployee]):
|
|
12
|
+
class B2bEmployeeEndpoint(AdminEndpoint[B2bEmployee]):
|
|
35
13
|
name = "b2b_employee"
|
|
36
14
|
path = "/b2b-employee"
|
|
37
15
|
model_class = B2bEmployee
|
|
@@ -1,28 +1,18 @@
|
|
|
1
|
+
from shopware_api_client.base import AdminEndpoint, AdminModel
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation
|
|
3
|
+
from shopware_api_client.models.dynamic_access import DynamicAccessBase
|
|
1
4
|
|
|
2
|
-
from shopware_api_client.endpoints.admin.core.product import Product
|
|
3
|
-
from shopware_api_client.endpoints.admin.core.rule import Rule
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
from ...base_fields import IdField
|
|
7
|
-
from ...relations import ForeignRelation
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class DynamicAccessBase(ApiModelBase[EndpointClass]):
|
|
11
|
-
_identifier: str = "dynamic_access"
|
|
12
|
-
|
|
13
|
-
product_id: IdField
|
|
14
|
-
rule_id: IdField
|
|
15
|
-
|
|
16
|
-
class DynamicAccessRelations:
|
|
6
|
+
class DynamicAccess(DynamicAccessBase, AdminModel["DynamicAccessEndpoint"]):
|
|
17
7
|
product: ForeignRelation["Product"]
|
|
18
8
|
rule: ForeignRelation["Rule"]
|
|
19
9
|
|
|
20
10
|
|
|
21
|
-
class
|
|
22
|
-
pass
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class DynamicAccessEndpoint(EndpointBase[DynamicAccess]):
|
|
11
|
+
class DynamicAccessEndpoint(AdminEndpoint[DynamicAccess]):
|
|
26
12
|
name = "swag_dynamic_access_product_rule"
|
|
27
13
|
path = "/swag-dynamic-access-product-rule"
|
|
28
14
|
model_class = DynamicAccess
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
from ..core.product import Product # noqa: E402
|
|
18
|
+
from ..core.rule import Rule # noqa: E402
|
|
@@ -1,29 +1,15 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminEndpoint, AdminModel
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation, ManyRelation
|
|
3
|
+
from shopware_api_client.models.acl_role import AclRoleBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
class AclRoleBase(ApiModelBase[EndpointClass]):
|
|
8
|
-
_identifier = "acl_role"
|
|
9
|
-
|
|
10
|
-
name: str
|
|
11
|
-
description: str | None = None
|
|
12
|
-
privileges: list[str]
|
|
13
|
-
deleted_at: AwareDatetime | None = None
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class AclRoleRelations:
|
|
6
|
+
class AclRole(AclRoleBase, AdminModel["AclRoleEndpoint"]):
|
|
17
7
|
users: ManyRelation["User"]
|
|
18
8
|
app: ForeignRelation["App"]
|
|
19
9
|
integrations: ManyRelation["Integration"]
|
|
20
10
|
|
|
21
11
|
|
|
22
|
-
class
|
|
23
|
-
pass
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class AclRoleEndpoint(EndpointBase[AclRole]):
|
|
12
|
+
class AclRoleEndpoint(AdminEndpoint[AclRole]):
|
|
27
13
|
name = "acl_role"
|
|
28
14
|
path = "/acl-role"
|
|
29
15
|
model_class = AclRole
|
|
@@ -3,10 +3,9 @@ from typing import Any
|
|
|
3
3
|
from pydantic import BaseModel
|
|
4
4
|
from pydantic.main import IncEx
|
|
5
5
|
|
|
6
|
+
from shopware_api_client.base import AdminEndpoint, AdminModel
|
|
6
7
|
from shopware_api_client.exceptions import SWAPIMethodNotAvailable
|
|
7
8
|
|
|
8
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
9
|
-
|
|
10
9
|
|
|
11
10
|
class Bundle(BaseModel):
|
|
12
11
|
css: list[str]
|
|
@@ -25,7 +24,7 @@ class AppBundle(BaseModel):
|
|
|
25
24
|
name: str
|
|
26
25
|
|
|
27
26
|
|
|
28
|
-
class
|
|
27
|
+
class ApiInfo(AdminModel["ApiInfoEndpoint"]):
|
|
29
28
|
_identifier = "api_info"
|
|
30
29
|
|
|
31
30
|
version: str
|
|
@@ -36,25 +35,23 @@ class ApiInfoBase(ApiModelBase[EndpointClass]):
|
|
|
36
35
|
license_toggles: dict[str, bool] | None = None
|
|
37
36
|
|
|
38
37
|
|
|
39
|
-
class
|
|
40
|
-
pass
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
class ApiInfoEndpoint(EndpointBase[ApiInfo]):
|
|
38
|
+
class ApiInfoEndpoint(AdminEndpoint[ApiInfo]):
|
|
44
39
|
name = "adminWorker"
|
|
45
40
|
path = "/_info/config"
|
|
46
41
|
model_class = ApiInfo
|
|
47
42
|
|
|
48
43
|
async def delete(self, pk: str) -> bool:
|
|
49
44
|
raise SWAPIMethodNotAvailable()
|
|
50
|
-
|
|
45
|
+
|
|
51
46
|
async def get(self, pk: str) -> ApiInfo | dict[str, Any]:
|
|
52
47
|
raise SWAPIMethodNotAvailable()
|
|
53
48
|
|
|
54
49
|
async def create(self, obj: ApiInfo | dict[str, Any]) -> ApiInfo | dict[str, Any] | None:
|
|
55
50
|
raise SWAPIMethodNotAvailable()
|
|
56
51
|
|
|
57
|
-
async def update(
|
|
52
|
+
async def update(
|
|
53
|
+
self, pk: str, obj: ApiInfo | dict[str, Any], update_fields: IncEx | None = None
|
|
54
|
+
) -> ApiInfo | dict[str, Any] | None:
|
|
58
55
|
raise SWAPIMethodNotAvailable()
|
|
59
56
|
|
|
60
57
|
async def bulk_upsert(
|
|
@@ -62,5 +59,7 @@ class ApiInfoEndpoint(EndpointBase[ApiInfo]):
|
|
|
62
59
|
) -> dict[str, Any]:
|
|
63
60
|
raise SWAPIMethodNotAvailable()
|
|
64
61
|
|
|
65
|
-
async def bulk_delete(
|
|
66
|
-
|
|
62
|
+
async def bulk_delete(
|
|
63
|
+
self, objs: list[ApiInfo] | list[dict[str, Any]], fail_silently: bool = False, **request_kwargs: Any
|
|
64
|
+
) -> dict[str, Any]:
|
|
65
|
+
raise SWAPIMethodNotAvailable()
|
|
@@ -1,52 +1,15 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminEndpoint, AdminModel
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation, ManyRelation
|
|
3
|
+
from shopware_api_client.models.app import AppBase
|
|
2
4
|
|
|
3
|
-
from pydantic import Field
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
from ...base_fields import IdField
|
|
7
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class AppBase(ApiModelBase[EndpointClass]):
|
|
11
|
-
_identifier = "app"
|
|
12
|
-
|
|
13
|
-
name: str
|
|
14
|
-
path: str
|
|
15
|
-
author: str | None = None
|
|
16
|
-
copyright: str | None = None
|
|
17
|
-
license: str | None = None
|
|
18
|
-
active: bool
|
|
19
|
-
configurable: bool
|
|
20
|
-
privacy: str | None = None
|
|
21
|
-
version: str
|
|
22
|
-
icon: str | None = Field(None, description="Runtime field, cannot be used as part of the criteria.", exclude=True)
|
|
23
|
-
modules: list[dict[str, Any]] | None = None
|
|
24
|
-
main_module: dict[str, Any] | None = None
|
|
25
|
-
cookies: list[dict[str, Any]] | None = None
|
|
26
|
-
allow_disable: bool
|
|
27
|
-
base_app_url: str | None = None
|
|
28
|
-
allowed_hosts: list[str] | None = None
|
|
29
|
-
template_load_priority: int | None = None
|
|
30
|
-
label: str
|
|
31
|
-
description: str | None = None
|
|
32
|
-
privacy_policy_extensions: str | None = None
|
|
33
|
-
custom_fields: dict[str, Any] | None = None
|
|
34
|
-
integration_id: IdField
|
|
35
|
-
acl_role_id: IdField
|
|
36
|
-
translated: dict[str, Any] | None = None
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class AppRelations:
|
|
6
|
+
class App(AppBase, AdminModel["AppEndpoint"]):
|
|
40
7
|
app: ForeignRelation["App"]
|
|
41
8
|
acl_roles: ManyRelation["AclRole"]
|
|
42
9
|
integrations: ManyRelation["Integration"]
|
|
43
10
|
|
|
44
11
|
|
|
45
|
-
class
|
|
46
|
-
pass
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
class AppEndpoint(EndpointBase[App]):
|
|
12
|
+
class AppEndpoint(AdminEndpoint[App]):
|
|
50
13
|
name = "app"
|
|
51
14
|
path = "/app"
|
|
52
15
|
model_class = App
|
|
@@ -1,33 +1,14 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminEndpoint, AdminModel
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation, ManyRelation
|
|
3
|
+
from shopware_api_client.models.app_script_condition import AppScriptConditionBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import IdField
|
|
5
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
class AppScriptConditionBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier = "app_script_condition"
|
|
10
|
-
|
|
11
|
-
identifier: str
|
|
12
|
-
name: str
|
|
13
|
-
active: bool
|
|
14
|
-
group: str | None = None
|
|
15
|
-
script: str | None = None
|
|
16
|
-
config: list[dict[str, Any]] | None = None
|
|
17
|
-
app_id: IdField
|
|
18
|
-
translated: dict[str, Any] | None = None
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class AppScriptConditionRelations:
|
|
6
|
+
class AppScriptCondition(AppScriptConditionBase, AdminModel["AppScriptConditionEndpoint"]):
|
|
22
7
|
app: ForeignRelation["App"]
|
|
23
8
|
rule_conditions: ManyRelation["RuleCondition"]
|
|
24
9
|
|
|
25
10
|
|
|
26
|
-
class
|
|
27
|
-
pass
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class AppScriptConditionEndpoint(EndpointBase[AppScriptCondition]):
|
|
11
|
+
class AppScriptConditionEndpoint(AdminEndpoint[AppScriptCondition]):
|
|
31
12
|
name = "app_script_condition"
|
|
32
13
|
path = "/app-script-condition"
|
|
33
14
|
model_class = AppScriptCondition
|
|
@@ -1,56 +1,9 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminEndpoint, AdminModel
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation, ManyRelation
|
|
3
|
+
from shopware_api_client.models.category import CategoryBase
|
|
2
4
|
|
|
3
|
-
from pydantic import Field
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
from ...base_fields import IdField
|
|
7
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class CategoryBase(ApiModelBase[EndpointClass]):
|
|
11
|
-
_identifier: str = "category"
|
|
12
|
-
|
|
13
|
-
version_id: IdField | None = None
|
|
14
|
-
parent_id: IdField | None = None
|
|
15
|
-
parent_version_id: IdField | None = None
|
|
16
|
-
after_category_id: IdField | None = None
|
|
17
|
-
after_category_version_id: IdField | None = None
|
|
18
|
-
media_id: IdField | None = None
|
|
19
|
-
display_nested_products: bool
|
|
20
|
-
auto_increment: int | None = Field(default=None, exclude=True)
|
|
21
|
-
breadcrumb: list[str] | None = Field(default=None, exclude=True)
|
|
22
|
-
level: int | None = Field(default=None, exclude=True)
|
|
23
|
-
path: str | None = Field(default=None, exclude=True)
|
|
24
|
-
child_count: int | None = Field(default=None, exclude=True)
|
|
25
|
-
type: str
|
|
26
|
-
product_assignment_type: str
|
|
27
|
-
visible: bool | None = None
|
|
28
|
-
active: bool | None = None
|
|
29
|
-
cms_page_id_sIdFieldched: bool | None = Field(
|
|
30
|
-
default=None, description="Runtime field, cannot be used as part of the criteria."
|
|
31
|
-
)
|
|
32
|
-
visible_child_count: int | None = Field(
|
|
33
|
-
default=None, description="Runtime field, cannot be used as part of the criteria."
|
|
34
|
-
)
|
|
35
|
-
name: str
|
|
36
|
-
custom_fields: dict[str, Any] | None = None
|
|
37
|
-
slot_config: dict[str, Any] | list[Any] | None = None
|
|
38
|
-
link_type: str | None = None
|
|
39
|
-
internal_link: str | None = None
|
|
40
|
-
external_link: str | None = None
|
|
41
|
-
link_new_tab: bool | None = None
|
|
42
|
-
description: str | None = None
|
|
43
|
-
meta_title: str | None = None
|
|
44
|
-
meta_description: str | None = None
|
|
45
|
-
keywords: str | None = None
|
|
46
|
-
cms_page_id: IdField | None = None
|
|
47
|
-
cms_page_version_id: IdField | None = None
|
|
48
|
-
product_stream_id: IdField | None = None
|
|
49
|
-
custom_entity_type_id: IdField | None = None
|
|
50
|
-
translated: dict[str, Any] | None = None
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
class CategoryRelations:
|
|
6
|
+
class Category(CategoryBase, AdminModel["CategoryEndpoint"]):
|
|
54
7
|
parent: ForeignRelation["Category"]
|
|
55
8
|
children: ManyRelation["Category"]
|
|
56
9
|
media: ForeignRelation["Media"]
|
|
@@ -66,11 +19,7 @@ class CategoryRelations:
|
|
|
66
19
|
seo_urls: ManyRelation["SeoUrl"]
|
|
67
20
|
|
|
68
21
|
|
|
69
|
-
class
|
|
70
|
-
pass
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
class CategoryEndpoint(EndpointBase[Category]):
|
|
22
|
+
class CategoryEndpoint(AdminEndpoint[Category]):
|
|
74
23
|
name = "category"
|
|
75
24
|
path = "/category"
|
|
76
25
|
model_class = Category
|
|
@@ -1,44 +1,15 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation, ManyRelation
|
|
3
|
+
from shopware_api_client.models.cms_block import CmsBlockBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import IdField, Visibility
|
|
5
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
class CmsBlockBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "cms_block"
|
|
10
|
-
|
|
11
|
-
position: int
|
|
12
|
-
type: str
|
|
13
|
-
locked: bool | None = None
|
|
14
|
-
name: str | None = None
|
|
15
|
-
section_position: str | None = None
|
|
16
|
-
margin_top: str | None = None
|
|
17
|
-
margin_bottom: str | None = None
|
|
18
|
-
margin_left: str | None = None
|
|
19
|
-
margin_right: str | None = None
|
|
20
|
-
background_color: str | None = None
|
|
21
|
-
background_media_id: IdField | None = None
|
|
22
|
-
background_media_mode: str | None = None
|
|
23
|
-
css_class: str | None = None
|
|
24
|
-
visibility: Visibility | None = None
|
|
25
|
-
section_id: IdField
|
|
26
|
-
custom_fields: dict[str, Any] | None = None
|
|
27
|
-
version_id: IdField | None = None
|
|
28
|
-
cms_section_version_id: IdField | None = None
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
class CmsBlockRelations:
|
|
6
|
+
class CmsBlock(CmsBlockBase, AdminModel["CmsBlockEndpoint"]):
|
|
32
7
|
section: ForeignRelation["CmsSection"]
|
|
33
8
|
background_media: ForeignRelation["Media"]
|
|
34
9
|
slots: ManyRelation["CmsSlot"]
|
|
35
10
|
|
|
36
11
|
|
|
37
|
-
class
|
|
38
|
-
pass
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
class CmsBlockEndpoint(EndpointBase[CmsBlock]):
|
|
12
|
+
class CmsBlockEndpoint(AdminEndpoint[CmsBlock]):
|
|
42
13
|
name = "cms_block"
|
|
43
14
|
path = "/cms-block"
|
|
44
15
|
model_class = CmsBlock
|
|
@@ -1,26 +1,9 @@
|
|
|
1
|
-
from
|
|
1
|
+
from shopware_api_client.base import AdminModel, AdminEndpoint
|
|
2
|
+
from shopware_api_client.endpoints.relations import ForeignRelation, ManyRelation
|
|
3
|
+
from shopware_api_client.models.cms_page import CmsPageBase
|
|
2
4
|
|
|
3
|
-
from ....base import ApiModelBase, EndpointBase, EndpointClass
|
|
4
|
-
from ...base_fields import IdField
|
|
5
|
-
from ...relations import ForeignRelation, ManyRelation
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
class CmsPageBase(ApiModelBase[EndpointClass]):
|
|
9
|
-
_identifier: str = "cms_page"
|
|
10
|
-
|
|
11
|
-
version_id: IdField | None = None
|
|
12
|
-
name: str | None = None
|
|
13
|
-
type: str
|
|
14
|
-
entity: str | None = None
|
|
15
|
-
css_class: str | None = None
|
|
16
|
-
config: dict[str, Any] | None = None
|
|
17
|
-
preview_media_id: IdField | None = None
|
|
18
|
-
custom_fields: dict[str, Any] | None = None
|
|
19
|
-
locked: bool | None = None
|
|
20
|
-
translated: dict[str, Any] | None = None
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class CmsPageRelations:
|
|
6
|
+
class CmsPage(CmsPageBase, AdminModel["CmsPageEndpoint"]):
|
|
24
7
|
sections: ManyRelation["CmsSection"]
|
|
25
8
|
preview_media: ForeignRelation["Media"]
|
|
26
9
|
categories: ManyRelation["Category"]
|
|
@@ -29,11 +12,7 @@ class CmsPageRelations:
|
|
|
29
12
|
products: ManyRelation["Product"]
|
|
30
13
|
|
|
31
14
|
|
|
32
|
-
class
|
|
33
|
-
pass
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class CmsPageEndpoint(EndpointBase[CmsPage]):
|
|
15
|
+
class CmsPageEndpoint(AdminEndpoint[CmsPage]):
|
|
37
16
|
name = "cms_page"
|
|
38
17
|
path = "/cms-page"
|
|
39
18
|
model_class = CmsPage
|