first commit
This commit is contained in:
45
plugins/stWebApiPlugin/config/config.php
Normal file
45
plugins/stWebApiPlugin/config/config.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* SOTESHOP/stWebApiPlugin
|
||||
*
|
||||
* Ten plik należy do aplikacji stWebApiPlugin opartej na licencji (Open License SOTE) Otwarta Licencja SOTE.
|
||||
* Nie zmieniaj tego pliku, jeśli chcesz korzystać z automatycznych aktualizacji oprogramowania.
|
||||
* Jeśli chcesz wprowadzać swoje modyfikacje do programu, zapoznaj się z dokumentacją, jak zmieniać
|
||||
* oprogramowanie bez zmiany kodu bazowego http://www.sote.pl/modifications
|
||||
*
|
||||
* @package stWebApiPlugin
|
||||
* @subpackage libs
|
||||
* @copyright SOTE (www.sote.pl)
|
||||
* @license http://www.sote.pl/license/open (Open License SOTE) Otwarta Licencja SOTE
|
||||
* @version $Id: config.php 10 2009-08-24 09:32:18Z michal $
|
||||
* @author Michal Prochowski <michal.prochowski@sote.pl>
|
||||
*/
|
||||
|
||||
if (SF_APP == 'backend') {
|
||||
stPluginHelper::addEnableModule('stWebApiBackend', 'backend');
|
||||
stPluginHelper::addRouting('stWebApiPlugin', '/webapi/:action/*', 'stWebApiBackend', 'list', 'backend');
|
||||
|
||||
// pobieramy instancję obiektu sfEventDispatcher
|
||||
$dispatcher = stEventDispatcher::getInstance();
|
||||
|
||||
// dodajemy sluchacza dla zdarzenia stAdminGenerator.generateStDemo
|
||||
$dispatcher->connect('stAdminGenerator.generateStProducer', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStCategory', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStPaymentType', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStProduct', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStUser', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStOrder', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStCurrencyBackend', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStDiscountBackend', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStGiftCardBackend', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStDeliveryBackend', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStLanguageBackend', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStProductOptionsBackend', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStProductGroup', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStBlogBackend', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStWebpageBackend', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStBoxBackend', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStTextBackend', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateAppProductAttributeBackend', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
$dispatcher->connect('stAdminGenerator.generateStThemeBackend', array('stWebApiListener', 'attachAdminGeneratorFile'));
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
name: {type: string}
|
||||
culture: {type: string}
|
||||
|
||||
|
||||
methods:
|
||||
CountAttributeI18n:
|
||||
type: count
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
GetAttributeI18nList:
|
||||
type: list
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, name]
|
||||
UpdateAttributeI18n:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name]
|
||||
out: [_update]
|
||||
|
||||
CountAttributeVariantI18n:
|
||||
type: count
|
||||
model_class: appProductAttributeVariant
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
GetAttributeVariantI18nList:
|
||||
type: list
|
||||
model_class: appProductAttributeVariant
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, name]
|
||||
UpdateAttributeVariantI18n:
|
||||
type: update
|
||||
model_class: appProductAttributeVariant
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name]
|
||||
out: [_update]
|
||||
31
plugins/stWebApiPlugin/config/generator/extendGenerator.php
Normal file
31
plugins/stWebApiPlugin/config/generator/extendGenerator.php
Normal file
@@ -0,0 +1,31 @@
|
||||
public function executeSoap()
|
||||
{
|
||||
if (!stWebApi::isEnabled())
|
||||
{
|
||||
$i18n = $this->getContext()->getI18N();
|
||||
$this->setFlash('error', $i18n->__('Musisz włączyć webapi', null, 'stWebApiBackend'), false);
|
||||
$this->getResponse()->setStatusCode(503);
|
||||
return $this->forward('stWebApiBackend', 'config');
|
||||
}
|
||||
|
||||
$config = stConfig::getInstance('stWebApiBackend');
|
||||
if ($config->get('ssl', false) && !$this->getRequest()->isSecure()) throw new SoapFault('SSL', 'Please try via SSL.');
|
||||
|
||||
$this->setLayout(false);
|
||||
$response = $this->getResponse();
|
||||
$response->setContentType( "text/xml" );
|
||||
|
||||
if ($this->hasRequestParameter('wsdl')) {
|
||||
return $this->renderText(trim($this->getRenderPartial('webapi_wsdl')));
|
||||
} else {
|
||||
ini_set("soap.wsdl_cache_enabled",0);
|
||||
|
||||
$WSDLFile = $this->getController()->genUrl('<?php echo $this->getModuleName() ?>/soap', true);
|
||||
|
||||
$soap = new SoapServer($WSDLFile.'?wsdl');
|
||||
$soap->setClass( "<?php echo $this->getModuleName() ?>WebApi");
|
||||
ob_start();
|
||||
$soap->handle();
|
||||
return $this->renderText(ob_get_clean());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
title: {type: string}
|
||||
url: {type: string}
|
||||
head_description: {type: string}
|
||||
long_description: {type: string}
|
||||
short_description: {type: string}
|
||||
cta_button_name: {type: string}
|
||||
cta_button_url: {type: string}
|
||||
cta_description_head: {type: string}
|
||||
cta_description_foot: {type: string}
|
||||
name: {type: string}
|
||||
description: {type: string}
|
||||
|
||||
methods:
|
||||
CountBlogI18n:
|
||||
type: count
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
GetBlogI18nList:
|
||||
type: list
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, url, title, head_description, short_description, long_description, cta_button_name, cta_button_url, cta_description_head, cta_description_foot]
|
||||
UpdateBlogI18n:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, url, title, head_description, short_description, long_description, cta_button_name, cta_button_url, cta_description_head, cta_description_foot]
|
||||
out: [_update]
|
||||
|
||||
CountBlogCategoryI18n:
|
||||
type: count
|
||||
model_class: BlogCategory
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
|
||||
GetBlogCategoryI18nList:
|
||||
type: list
|
||||
model_class: BlogCategory
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, name, description, url]
|
||||
|
||||
UpdateBlogCategoryI18n:
|
||||
type: update
|
||||
model_class: BlogCategory
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name, description, url]
|
||||
out: [_update]
|
||||
@@ -0,0 +1,29 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
name: {type: string}
|
||||
content: {type: string}
|
||||
culture: {type: string}
|
||||
|
||||
methods:
|
||||
CountBoxI18n:
|
||||
type: count
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
GetBoxI18nList:
|
||||
type: list
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, name, content]
|
||||
UpdateBoxI18n:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name, content]
|
||||
out: [_update]
|
||||
97
plugins/stWebApiPlugin/config/generator/stCategoryWebApi.yml
Normal file
97
plugins/stWebApiPlugin/config/generator/stCategoryWebApi.yml
Normal file
@@ -0,0 +1,97 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
name: {type: string}
|
||||
parent_id: {type: integer}
|
||||
product_id: {type: integer}
|
||||
image: {type: string}
|
||||
image_filename: {type: string}
|
||||
description: {type: string}
|
||||
is_default: {type: integer}
|
||||
main_page: {type: integer}
|
||||
is_active: {type: integer}
|
||||
is_hidden: {type: integer}
|
||||
url: {type: string}
|
||||
category_id: {type: integer}
|
||||
show_children_products: {type: integer}
|
||||
link: {type: string, custom: true}
|
||||
|
||||
methods:
|
||||
AddCategory:
|
||||
type: add
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=name, =parent_id, image, image_filename, description, main_page, is_active, is_hidden, show_children_products, url]
|
||||
out: [id]
|
||||
|
||||
UpdateCategory:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name, image, image_filename, description, main_page, is_active, is_hidden, show_children_products, url]
|
||||
out: [_update]
|
||||
|
||||
GetCategory:
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [created_at, updated_at, id, name, parent_id, image, image_filename, description, main_page, is_active, is_hidden, show_children_products, url, link]
|
||||
|
||||
DeleteCategory:
|
||||
type: delete
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [_delete]
|
||||
|
||||
GetCategoryList:
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [parent_id, product_id, _offset, _limit, _modified_from, _modified_to]
|
||||
out: [created_at, updated_at, id, name, parent_id, image, image_filename, description, main_page, is_active, is_hidden, show_children_products, url, link]
|
||||
|
||||
CountCategory:
|
||||
type: count
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
|
||||
GetCategoryChildrens:
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [=parent_id]
|
||||
out: [created_at, updated_at, id, name, parent_id, image, image_filename, description, main_page, is_active, is_hidden, show_children_products, url, link]
|
||||
|
||||
getProductCategoryList:
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [=id, _offset, _limit, _modified_from, _modified_to]
|
||||
out: [created_at, updated_at, id, category_id, is_default]
|
||||
|
||||
CountCategoryI18n:
|
||||
type: count
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
|
||||
GetCategoryI18nList:
|
||||
type: list
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, name, url, description]
|
||||
|
||||
UpdateCategoryI18n:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name, url, description]
|
||||
out: [_update]
|
||||
@@ -0,0 +1,54 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
name: {type: string}
|
||||
shortcut: {type: string}
|
||||
exchange: {type: double}
|
||||
active: {type: integer}
|
||||
|
||||
methods:
|
||||
UpdateCurrencyExchange:
|
||||
culture: false
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, exchange]
|
||||
out: [_update]
|
||||
|
||||
GetCurrency:
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [id, name, shortcut, exchange, active]
|
||||
|
||||
UpdateCurrencyExchangeByShortcut:
|
||||
culture: false
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=shortcut, exchange]
|
||||
out: [_update]
|
||||
|
||||
GetCurrencyByShortcut:
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=shortcut]
|
||||
out: [id, name, shortcut, exchange, active]
|
||||
|
||||
CountCurrency:
|
||||
culture: false
|
||||
type: count
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
|
||||
GetCurrencyList:
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit]
|
||||
out: [id, name, shortcut, exchange, active]
|
||||
@@ -0,0 +1,86 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
is_active: {type: boolean}
|
||||
is_default: {type: boolean}
|
||||
is_weekend_delivery: {type: boolean}
|
||||
is_express_delivery: {type: boolean}
|
||||
allow_in_selected_products: {type: boolean}
|
||||
name: {type: string}
|
||||
cost_brutto: {type: double}
|
||||
cost_netto: {type: double}
|
||||
free_from: {type: double}
|
||||
weekend_delivery_cost_netto: {type: double}
|
||||
express_delivery_cost_brutto: {type: double}
|
||||
express_delivery_cost_netto: {type: double}
|
||||
express_delivery_cost_brutto: {type: double}
|
||||
delivery_id: {type: integer}
|
||||
cost_type: {type: string}
|
||||
payment_type_id: {type: integer}
|
||||
payment_type_name: {type: string}
|
||||
group: {type: string}
|
||||
additional_cost_type: {type: string}
|
||||
from: {type: double}
|
||||
width: {type: double}
|
||||
height: {type: double}
|
||||
depth: {type: double}
|
||||
type: {type: string}
|
||||
type_id: {type: integer}
|
||||
products: {type: ArrayOfInteger}
|
||||
country: {type: string}
|
||||
|
||||
methods:
|
||||
GetAvailableDeliveryList:
|
||||
culture: true
|
||||
peer: Delivery
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [=country, =products]
|
||||
out:
|
||||
- id
|
||||
- type_id
|
||||
- is_weekend_delivery
|
||||
- is_express_delivery
|
||||
- name
|
||||
- cost_brutto
|
||||
- cost_netto
|
||||
- width
|
||||
- height
|
||||
- depth
|
||||
GetAvailableDeliveryPaymentTypeList:
|
||||
type: list
|
||||
peer: DeliveryHasPaymentType
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [=delivery_id]
|
||||
out: [payment_type_id, payment_type_name, cost_brutto, cost_netto]
|
||||
GetDeliveryTypeList:
|
||||
culture: false
|
||||
peer: DeliveryType
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit]
|
||||
out: [id, name, type]
|
||||
CountDeliveryI18n:
|
||||
type: count
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
GetDeliveryI18nList:
|
||||
type: list
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, name]
|
||||
UpdateDeliveryI18n:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name]
|
||||
out: [_update]
|
||||
@@ -0,0 +1,60 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
code: {type: string}
|
||||
used: {type: integer}
|
||||
valid_usage: {type: integer}
|
||||
valid_from: {type: dateTime}
|
||||
valid_to: {type: dateTime}
|
||||
discount: {type: double}
|
||||
|
||||
methods:
|
||||
AddDiscountCouponCode:
|
||||
culture: false
|
||||
peer: DiscountCouponCode
|
||||
type: add
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [code, =discount, valid_usage, valid_from, valid_to]
|
||||
out: [id]
|
||||
CountDiscountCouponCode:
|
||||
culture: false
|
||||
peer: DiscountCouponCode
|
||||
type: count
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
DeleteDiscountCouponCode:
|
||||
culture: false
|
||||
peer: DiscountCouponCode
|
||||
type: delete
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [_delete]
|
||||
GetDiscountCouponCode:
|
||||
culture: false
|
||||
peer: DiscountCouponCode
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [id, code, discount, valid_usage, valid_from, valid_to, used]
|
||||
GetDiscountCouponCodeList:
|
||||
culture: false
|
||||
peer: DiscountCouponCode
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, code, =discount, valid_usage, valid_from, valid_to, used]
|
||||
UpdateDiscountCouponCode:
|
||||
culture: false
|
||||
peer: DiscountCouponCode
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, code, =discount, valid_usage, valid_from, valid_to]
|
||||
out: [_update]
|
||||
@@ -0,0 +1,60 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
code: {type: string}
|
||||
min_order_amount: {type: integer}
|
||||
valid_to: {type: date}
|
||||
amount: {type: double}
|
||||
currency_id: {type: integer}
|
||||
status: {type: string}
|
||||
|
||||
methods:
|
||||
AddGiftCard:
|
||||
culture: false
|
||||
peer: GiftCard
|
||||
type: add
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [code, =amount, =currency_id, min_order_amount, valid_to]
|
||||
out: [id]
|
||||
CountGiftCard:
|
||||
culture: false
|
||||
peer: GiftCard
|
||||
type: count
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
DeleteGiftCard:
|
||||
culture: false
|
||||
peer: GiftCard
|
||||
type: delete
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [_delete]
|
||||
GetGiftCard:
|
||||
culture: false
|
||||
peer: GiftCard
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [id, code, amount, currency_id, min_order_amount, valid_to, status]
|
||||
GetGiftCardList:
|
||||
culture: false
|
||||
peer: GiftCard
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, code, amount, currency_id, min_order_amount, valid_to, status]
|
||||
UpdateGiftCard:
|
||||
culture: false
|
||||
peer: GiftCard
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, code, amount, currency_id, min_order_amount, valid_to]
|
||||
out: [_update]
|
||||
@@ -0,0 +1,14 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
|
||||
webapi:
|
||||
fields:
|
||||
language: {type: string}
|
||||
|
||||
methods:
|
||||
GetDefaultLanguage:
|
||||
culture: false
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: []
|
||||
out: [language]
|
||||
523
plugins/stWebApiPlugin/config/generator/stOrderWebApi.yml
Normal file
523
plugins/stWebApiPlugin/config/generator/stOrderWebApi.yml
Normal file
@@ -0,0 +1,523 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
number: {type: string}
|
||||
sf_guard_user_id: {type: integer}
|
||||
user_name: {type: string}
|
||||
user_id: {type: integer}
|
||||
client_email: {type: string, custom: true}
|
||||
order_status_id: {type: integer}
|
||||
is_confirmed: {type: integer}
|
||||
has_allegro_smart_delivery: {type: integer, custom: true}
|
||||
is_allegro_order: {type: boolean}
|
||||
description: {type: string}
|
||||
merchant_notes: {type: string}
|
||||
order_user_data_delivery_country: {type: string, custom: true}
|
||||
order_user_data_delivery_name: {type: string, custom: true}
|
||||
order_user_data_delivery_surname: {type: string, custom: true}
|
||||
order_user_data_delivery_street: {type: string, custom: true}
|
||||
order_user_data_delivery_house: {type: string, custom: true}
|
||||
order_user_data_delivery_flat: {type: string, custom: true}
|
||||
order_user_data_delivery_code: {type: string, custom: true}
|
||||
order_user_data_delivery_town: {type: string, custom: true}
|
||||
order_user_data_delivery_phone: {type: string, custom: true}
|
||||
order_user_data_delivery_company: {type: string, custom: true}
|
||||
order_user_data_delivery_vat_number: {type: string, custom: true}
|
||||
order_user_data_billing_country: {type: string, custom: true}
|
||||
order_user_data_billing_name: {type: string, custom: true}
|
||||
order_user_data_billing_surname: {type: string, custom: true}
|
||||
order_user_data_billing_street: {type: string, custom: true}
|
||||
order_user_data_billing_house: {type: string, custom: true}
|
||||
order_user_data_billing_flat: {type: string, custom: true}
|
||||
order_user_data_billing_code: {type: string, custom: true}
|
||||
order_user_data_billing_town: {type: string, custom: true}
|
||||
order_user_data_billing_phone: {type: string, custom: true}
|
||||
order_user_data_billing_company: {type: string, custom: true}
|
||||
order_user_data_billing_vat_number: {type: string, custom: true}
|
||||
order_user_data_billing_address: {type: string, custom: true}
|
||||
order_user_data_billing_address_more: {type: string, custom: true}
|
||||
order_user_data_delivery_address: {type: string, custom: true}
|
||||
order_user_data_delivery_address_more: {type: string, custom: true}
|
||||
order_user_data_delivery_full_name: {type: string, custom: true}
|
||||
order_user_data_billing_full_name: {type: string, custom: true}
|
||||
order_delivery_name: {type: string, custom: true}
|
||||
order_delivery_cost: {type: double, custom: true}
|
||||
order_delivery_tax: {type: double, custom: true}
|
||||
order_delivery_number: {type: string, custom: true}
|
||||
order_delivery_inpost: {type: string, custom: true}
|
||||
order_delivery_pickup_point: {type: string, custom: true}
|
||||
order_delivery_type: {type: string, custom: true}
|
||||
order_currency_name: {type: string, custom: true}
|
||||
order_currency_exchange: {type: double, custom: true}
|
||||
order_currency_shortcut: {type: string, custom: true}
|
||||
total_amount: {type: double, custom: true}
|
||||
order_discount_value: {type: double, custom: true}
|
||||
order_discount_type: {type: string, custom: true}
|
||||
discount_amount: {type: double, custom: true}
|
||||
discount_type: {type: string, custom: true}
|
||||
order_allegro_auction_id: {type: string, custom: true}
|
||||
order_allegro_delivery_method_id: {type: string, custom: true}
|
||||
order_allegro_checkout_form_id: {type: string, custom: true}
|
||||
order_allegro_username: {type: string, custom: true}
|
||||
client_request_invoice: {type: boolean}
|
||||
name: {type: string}
|
||||
|
||||
types:
|
||||
OrderProductSetType:
|
||||
fields:
|
||||
id: { type: integer, required: true }
|
||||
code: { type: string, required: true }
|
||||
name: { type: string, required: true }
|
||||
price: { type: double, required: true }
|
||||
price_brutto: { type: double, required: true }
|
||||
|
||||
OrderProductDiscountType:
|
||||
fields:
|
||||
value: { type: double, required: true }
|
||||
type: { type: string }
|
||||
|
||||
OrderDeliveryType:
|
||||
fields:
|
||||
delivery_id: { type: integer, required: true }
|
||||
is_weekend_delivery: { type: boolean }
|
||||
is_express_delivery: { type: boolean }
|
||||
tracking_numbers: { type: ArrayOfString }
|
||||
|
||||
OrderUserDataType:
|
||||
fields:
|
||||
company: { type: string }
|
||||
full_name: { type: string }
|
||||
address: { type: string, required: true }
|
||||
address_more: { type: string }
|
||||
country: { type: string, required: true }
|
||||
zip_code: { type: string, required: true }
|
||||
town: { type: string, required: true }
|
||||
phone: { type: string }
|
||||
vat_number: { type: string }
|
||||
|
||||
OrderUserType:
|
||||
fields:
|
||||
email: { type: string, required: true }
|
||||
billing: { type: OrderUserDataType, required: true }
|
||||
delivery: { type: OrderUserDataType, required: true }
|
||||
|
||||
OrderProductType:
|
||||
fields:
|
||||
product_id: { type: integer, required: true }
|
||||
quantity: { type: double }
|
||||
options: { type: ArrayOfInteger }
|
||||
discount: { type: OrderProductDiscountType }
|
||||
|
||||
OrderPaymentType:
|
||||
fields:
|
||||
payment_type_id: { type: integer, required: true }
|
||||
amount: { type: double }
|
||||
is_paid: { type: boolean }
|
||||
|
||||
OrderProductSetTypeArray:
|
||||
arrayType: OrderProductSetType
|
||||
|
||||
ArrayOfOrderProductType:
|
||||
arrayType: OrderProductType
|
||||
|
||||
ArrayOfOrderPaymentType:
|
||||
arrayType: OrderPaymentType
|
||||
|
||||
methods:
|
||||
AddOrder:
|
||||
type: add
|
||||
inOutTypes: {in: object, out: object}
|
||||
custom_fields:
|
||||
currency: { type: string, custom: true }
|
||||
products: { type: ArrayOfOrderProductType, custom: true }
|
||||
delivery: { type: OrderDeliveryType, custom: true }
|
||||
payments: { type: ArrayOfOrderPaymentType, custom: true }
|
||||
user: { type: OrderUserType, custom: true }
|
||||
status_id: { type: integer , custom: true }
|
||||
fields:
|
||||
in:
|
||||
- =currency
|
||||
- =user
|
||||
- =products
|
||||
- =delivery
|
||||
- =payments
|
||||
- is_confirmed
|
||||
- status_id
|
||||
- client_request_invoice
|
||||
- merchant_notes
|
||||
out:
|
||||
- id
|
||||
|
||||
GetOrderList:
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to, order_status_id, sf_guard_user_id, client_email, number, is_confirmed, is_allegro_order]
|
||||
out:
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- number
|
||||
- is_confirmed
|
||||
- has_allegro_smart_delivery
|
||||
- client_request_invoice
|
||||
- client_email
|
||||
- sf_guard_user_id
|
||||
- order_status_id
|
||||
- order_allegro_auction_id
|
||||
- order_allegro_delivery_method_id
|
||||
- order_allegro_checkout_form_id
|
||||
- order_allegro_username
|
||||
- description
|
||||
- order_discount_value
|
||||
- order_discount_type
|
||||
- total_amount
|
||||
- order_user_data_delivery_country
|
||||
- order_user_data_delivery_name
|
||||
- order_user_data_delivery_surname
|
||||
- order_user_data_delivery_street
|
||||
- order_user_data_delivery_house
|
||||
- order_user_data_delivery_flat
|
||||
- order_user_data_delivery_code
|
||||
- order_user_data_delivery_town
|
||||
- order_user_data_delivery_phone
|
||||
- order_user_data_delivery_company
|
||||
- order_user_data_delivery_vat_number
|
||||
- order_user_data_billing_country
|
||||
- order_user_data_billing_name
|
||||
- order_user_data_billing_surname
|
||||
- order_user_data_billing_street
|
||||
- order_user_data_billing_house
|
||||
- order_user_data_billing_flat
|
||||
- order_user_data_billing_code
|
||||
- order_user_data_billing_town
|
||||
- order_user_data_billing_phone
|
||||
- order_user_data_billing_company
|
||||
- order_user_data_billing_vat_number
|
||||
- order_delivery_name
|
||||
- order_delivery_type
|
||||
- order_delivery_cost
|
||||
- order_delivery_tax
|
||||
- order_delivery_number
|
||||
- order_delivery_inpost
|
||||
- order_delivery_pickup_point
|
||||
- order_currency_name
|
||||
- order_currency_exchange
|
||||
- order_currency_shortcut
|
||||
- order_user_data_billing_address
|
||||
- order_user_data_billing_address_more
|
||||
- order_user_data_delivery_address
|
||||
- order_user_data_delivery_address_more
|
||||
- order_user_data_delivery_full_name
|
||||
- order_user_data_billing_full_name
|
||||
- merchant_notes
|
||||
|
||||
GetOrderListByUser:
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [user_id, user_name, order_status_id, _offset, _limit, _modified_from, _modified_to]
|
||||
out:
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- number
|
||||
- is_confirmed
|
||||
- has_allegro_smart_delivery
|
||||
- client_request_invoice
|
||||
- client_email
|
||||
- sf_guard_user_id
|
||||
- order_status_id
|
||||
- order_allegro_auction_id
|
||||
- order_allegro_delivery_method_id
|
||||
- order_allegro_checkout_form_id
|
||||
- order_allegro_username
|
||||
- description
|
||||
- order_discount_value
|
||||
- order_discount_type
|
||||
- total_amount
|
||||
- order_user_data_delivery_country
|
||||
- order_user_data_delivery_name
|
||||
- order_user_data_delivery_surname
|
||||
- order_user_data_delivery_street
|
||||
- order_user_data_delivery_house
|
||||
- order_user_data_delivery_flat
|
||||
- order_user_data_delivery_code
|
||||
- order_user_data_delivery_town
|
||||
- order_user_data_delivery_phone
|
||||
- order_user_data_delivery_company
|
||||
- order_user_data_delivery_vat_number
|
||||
- order_user_data_billing_country
|
||||
- order_user_data_billing_name
|
||||
- order_user_data_billing_surname
|
||||
- order_user_data_billing_street
|
||||
- order_user_data_billing_house
|
||||
- order_user_data_billing_flat
|
||||
- order_user_data_billing_code
|
||||
- order_user_data_billing_town
|
||||
- order_user_data_billing_phone
|
||||
- order_user_data_billing_company
|
||||
- order_user_data_billing_vat_number
|
||||
- order_delivery_name
|
||||
- order_delivery_type
|
||||
- order_delivery_cost
|
||||
- order_delivery_tax
|
||||
- order_delivery_number
|
||||
- order_delivery_inpost
|
||||
- order_delivery_pickup_point
|
||||
- order_currency_name
|
||||
- order_currency_exchange
|
||||
- order_currency_shortcut
|
||||
- order_user_data_billing_address
|
||||
- order_user_data_billing_address_more
|
||||
- order_user_data_delivery_address
|
||||
- order_user_data_delivery_address_more
|
||||
- order_user_data_delivery_full_name
|
||||
- order_user_data_billing_full_name
|
||||
- merchant_notes
|
||||
|
||||
GetOrder:
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out:
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- number
|
||||
- is_confirmed
|
||||
- has_allegro_smart_delivery
|
||||
- client_request_invoice
|
||||
- client_email
|
||||
- sf_guard_user_id
|
||||
- order_status_id
|
||||
- order_allegro_auction_id
|
||||
- order_allegro_delivery_method_id
|
||||
- order_allegro_checkout_form_id
|
||||
- order_allegro_username
|
||||
- description
|
||||
- order_discount_value
|
||||
- order_discount_type
|
||||
- total_amount
|
||||
- order_user_data_delivery_country
|
||||
- order_user_data_delivery_name
|
||||
- order_user_data_delivery_surname
|
||||
- order_user_data_delivery_street
|
||||
- order_user_data_delivery_house
|
||||
- order_user_data_delivery_flat
|
||||
- order_user_data_delivery_code
|
||||
- order_user_data_delivery_town
|
||||
- order_user_data_delivery_phone
|
||||
- order_user_data_delivery_company
|
||||
- order_user_data_delivery_vat_number
|
||||
- order_user_data_billing_country
|
||||
- order_user_data_billing_name
|
||||
- order_user_data_billing_surname
|
||||
- order_user_data_billing_street
|
||||
- order_user_data_billing_house
|
||||
- order_user_data_billing_flat
|
||||
- order_user_data_billing_code
|
||||
- order_user_data_billing_town
|
||||
- order_user_data_billing_phone
|
||||
- order_user_data_billing_company
|
||||
- order_user_data_billing_vat_number
|
||||
- order_delivery_name
|
||||
- order_delivery_type
|
||||
- order_delivery_cost
|
||||
- order_delivery_tax
|
||||
- order_delivery_number
|
||||
- order_delivery_inpost
|
||||
- order_delivery_pickup_point
|
||||
- order_currency_name
|
||||
- order_currency_exchange
|
||||
- order_currency_shortcut
|
||||
- order_user_data_billing_address
|
||||
- order_user_data_billing_address_more
|
||||
- order_user_data_delivery_address
|
||||
- order_user_data_delivery_address_more
|
||||
- order_user_data_delivery_full_name
|
||||
- order_user_data_billing_full_name
|
||||
- merchant_notes
|
||||
|
||||
GetOrderByNumber:
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=number]
|
||||
out:
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- number
|
||||
- is_confirmed
|
||||
- has_allegro_smart_delivery
|
||||
- client_request_invoice
|
||||
- client_email
|
||||
- sf_guard_user_id
|
||||
- order_status_id
|
||||
- order_allegro_auction_id
|
||||
- order_allegro_delivery_method_id
|
||||
- order_allegro_checkout_form_id
|
||||
- order_allegro_username
|
||||
- description
|
||||
- order_discount_value
|
||||
- order_discount_type
|
||||
- total_amount
|
||||
- order_user_data_delivery_country
|
||||
- order_user_data_delivery_name
|
||||
- order_user_data_delivery_surname
|
||||
- order_user_data_delivery_street
|
||||
- order_user_data_delivery_house
|
||||
- order_user_data_delivery_flat
|
||||
- order_user_data_delivery_code
|
||||
- order_user_data_delivery_town
|
||||
- order_user_data_delivery_phone
|
||||
- order_user_data_delivery_company
|
||||
- order_user_data_delivery_vat_number
|
||||
- order_user_data_billing_country
|
||||
- order_user_data_billing_name
|
||||
- order_user_data_billing_surname
|
||||
- order_user_data_billing_street
|
||||
- order_user_data_billing_house
|
||||
- order_user_data_billing_flat
|
||||
- order_user_data_billing_code
|
||||
- order_user_data_billing_town
|
||||
- order_user_data_billing_phone
|
||||
- order_user_data_billing_company
|
||||
- order_user_data_billing_vat_number
|
||||
- order_delivery_name
|
||||
- order_delivery_type
|
||||
- order_delivery_cost
|
||||
- order_delivery_tax
|
||||
- order_delivery_number
|
||||
- order_delivery_inpost
|
||||
- order_delivery_pickup_point
|
||||
- order_currency_name
|
||||
- order_currency_exchange
|
||||
- order_currency_shortcut
|
||||
- order_user_data_billing_address
|
||||
- order_user_data_billing_address_more
|
||||
- order_user_data_delivery_address
|
||||
- order_user_data_delivery_address_more
|
||||
- order_user_data_delivery_full_name
|
||||
- order_user_data_billing_full_name
|
||||
- merchant_notes
|
||||
|
||||
GetOrderCount:
|
||||
type: count
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [_modified_from, _modified_to]
|
||||
out: [_count]
|
||||
GetOrderPayment:
|
||||
peer: OrderHasPayment
|
||||
custom_fields:
|
||||
order_id: {type: integer}
|
||||
amount: {type: double}
|
||||
status: {type: integer}
|
||||
cancel: {type: integer}
|
||||
payed_at: {type: dateTime}
|
||||
payment_opt_name: {type: string, custom: true}
|
||||
transaction_id: {type: string}
|
||||
allegro_payment_type: {type: string}
|
||||
is_cod: {type: boolean}
|
||||
type: get
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [=order_id]
|
||||
out: [created_at, updated_at, id, amount, status, cancel, payed_at, is_cod, payment_opt_name, transaction_id, allegro_payment_type]
|
||||
GetOrderProductCount:
|
||||
peer: OrderProduct
|
||||
custom_fields:
|
||||
order_id: {type: integer}
|
||||
type: count
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=order_id, _modified_from, _modified_to]
|
||||
out: [_count]
|
||||
GetOrderProductList:
|
||||
peer: OrderProduct
|
||||
custom_fields:
|
||||
order_id: {type: integer}
|
||||
code: {type: string}
|
||||
name: {type: string}
|
||||
vat: {type: double}
|
||||
price: {type: double}
|
||||
price_brutto: {type: double}
|
||||
quantity: {type: double}
|
||||
product_id: {type: integer}
|
||||
discount_in_percent: {type: double}
|
||||
options: {type: string, custom: true}
|
||||
points_value: {type: integer}
|
||||
points_earn: {type: integer}
|
||||
product_for_points: {type: integer}
|
||||
allegro_offer_id: {type: string, custom: true}
|
||||
set: {type: OrderProductSetTypeArray}
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, =order_id, _modified_from, _modified_to]
|
||||
out: [created_at, updated_at, id, product_id, code, name, price, price_brutto, vat, quantity, discount_in_percent, discount_amount, discount_type, options, points_value, points_earn, product_for_points, allegro_offer_id, set]
|
||||
GetOrderStatusList:
|
||||
peer: OrderStatus
|
||||
custom_fields:
|
||||
opt_name: {type: string}
|
||||
type: {type: string}
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [created_at, updated_at, id, opt_name, type]
|
||||
SetOrderPaymentStatus:
|
||||
peer: OrderHasPayment
|
||||
custom_fields:
|
||||
order_id: {type: integer}
|
||||
status: {type: integer}
|
||||
cancel: {type: integer}
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=order_id, status, cancel]
|
||||
out: [_update]
|
||||
UpdateOrder:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, merchant_notes, order_delivery_number]
|
||||
out: [_update]
|
||||
UpdateOrderStatus:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, =order_status_id]
|
||||
out: [_update]
|
||||
CountOrderStatusI18n:
|
||||
type: count
|
||||
model_class: OrderStatus
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
GetOrderStatusI18nList:
|
||||
type: list
|
||||
model_class: OrderStatus
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, name, description]
|
||||
UpdateOrderStatusI18n:
|
||||
type: update
|
||||
model_class: OrderStatus
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name, description]
|
||||
out: [_update]
|
||||
UpdateOrderDeliveryNumber:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, =order_delivery_number]
|
||||
out: [_update]
|
||||
@@ -0,0 +1,53 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
is_active: {type: boolean}
|
||||
name: {type: string}
|
||||
description: {type: string}
|
||||
|
||||
methods:
|
||||
CountPaymentType:
|
||||
culture: false
|
||||
peer: PaymentType
|
||||
type: count
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [is_active]
|
||||
out: [_count]
|
||||
GetPaymentType:
|
||||
culture: true
|
||||
peer: PaymentType
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [id, name, is_active]
|
||||
GetPaymentTypeList:
|
||||
culture: true
|
||||
peer: PaymentType
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, is_active]
|
||||
out: [id, name, is_active]
|
||||
CountPaymentTypeI18n:
|
||||
type: count
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
GetPaymentTypeI18nList:
|
||||
type: list
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, name, description]
|
||||
UpdatePaymentTypeI18n:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name, description]
|
||||
out: [_update]
|
||||
73
plugins/stWebApiPlugin/config/generator/stProducerWebApi.yml
Normal file
73
plugins/stWebApiPlugin/config/generator/stProducerWebApi.yml
Normal file
@@ -0,0 +1,73 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
image: {type: string}
|
||||
image_filename: {type: string}
|
||||
name: {type: string}
|
||||
url: {type: string}
|
||||
link: {type: string, custom: true}
|
||||
description: {type: string}
|
||||
|
||||
methods:
|
||||
AddProducer:
|
||||
type: add
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=name, image, image_filename, url]
|
||||
out: [id]
|
||||
|
||||
UpdateProducer:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name, image, image_filename, url]
|
||||
out: [_update]
|
||||
|
||||
GetProducer:
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [created_at, updated_at, id, name, image, image_filename, url, link]
|
||||
|
||||
DeleteProducer:
|
||||
type: delete
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [_delete]
|
||||
|
||||
CountProducer:
|
||||
type: count
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
|
||||
GetProducerList:
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [created_at, updated_at, id, name, image, image_filename, url, link]
|
||||
|
||||
CountProducerI18n:
|
||||
type: count
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
GetProducerI18nList:
|
||||
type: list
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, name, url, description]
|
||||
UpdateProducerI18n:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name, url, description]
|
||||
out: [_update]
|
||||
@@ -0,0 +1,28 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
name: {type: string}
|
||||
url: {type: string}
|
||||
|
||||
methods:
|
||||
CountProductGroupI18n:
|
||||
type: count
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
GetProductGroupI18nList:
|
||||
type: list
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, name, url]
|
||||
UpdateProductGroupI18n:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name, url]
|
||||
out: [_update]
|
||||
@@ -0,0 +1,55 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
name: {type: string}
|
||||
value: {type: string}
|
||||
|
||||
methods:
|
||||
CountProductOptionValueI18n:
|
||||
type: count
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
|
||||
GetProductOptionValueI18nList:
|
||||
type: list
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, value]
|
||||
|
||||
UpdateProductOptionValueI18n:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, value]
|
||||
out: [_update]
|
||||
|
||||
CountProductOptionFieldI18n:
|
||||
type: count
|
||||
model_class: ProductOptionsField
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
|
||||
GetProductOptionFieldI18nList:
|
||||
type: list
|
||||
model_class: ProductOptionsField
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, name]
|
||||
|
||||
UpdateProductOptionFieldI18n:
|
||||
type: update
|
||||
model_class: ProductOptionsField
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name]
|
||||
out: [_update]
|
||||
393
plugins/stWebApiPlugin/config/generator/stProductWebApi.yml
Normal file
393
plugins/stWebApiPlugin/config/generator/stProductWebApi.yml
Normal file
@@ -0,0 +1,393 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
code: {type: string}
|
||||
price: {type: double}
|
||||
price_brutto: {type: double}
|
||||
name: {type: string}
|
||||
category_id: {type: integer}
|
||||
producer_id: {type: integer}
|
||||
active: {type: integer}
|
||||
short_description: {type: string}
|
||||
description: {type: string}
|
||||
description2: {type: string}
|
||||
stock: {type: double}
|
||||
availability_id: {type: integer, custom: true}
|
||||
availability_name: {type: string}
|
||||
stock_from: {type: double}
|
||||
is_system_default: {type: integer}
|
||||
image_filename: {type: string}
|
||||
product_id: {type: integer}
|
||||
product_code: {type: string}
|
||||
is_default: {type: integer}
|
||||
image: {type: string}
|
||||
tax_id: {type: integer, custom: true}
|
||||
vat: {type: double}
|
||||
vat_name: {type: string}
|
||||
wholesale_a_netto: {type: double}
|
||||
wholesale_a_brutto: {type: double}
|
||||
wholesale_b_netto: {type: double}
|
||||
wholesale_b_brutto: {type: double}
|
||||
wholesale_c_netto: {type: double}
|
||||
wholesale_c_brutto: {type: double}
|
||||
product_options: {type: string, custom: true}
|
||||
weight: {type: double}
|
||||
old_price: {type: double}
|
||||
old_price_brutto: {type: double}
|
||||
url: {type: string}
|
||||
link: {type: string, custom: true}
|
||||
uom: {type: string}
|
||||
is_stock_validated: {type: integer, custom: true}
|
||||
man_code: {type: string}
|
||||
points_value: {type: integer}
|
||||
points_earn: {type: integer}
|
||||
points_only: {type: integer}
|
||||
recommended: {type: ArrayOfInteger}
|
||||
accessories: {type: ArrayOfInteger}
|
||||
currency_id: {type: integer}
|
||||
option_id: {type: integer}
|
||||
path: {type: string}
|
||||
pum: {type: double}
|
||||
format: {type: string}
|
||||
width: {type: double}
|
||||
height: {type: double}
|
||||
depth: {type: double}
|
||||
attributes_label: {type: string}
|
||||
execution_time: {type: string}
|
||||
|
||||
methods:
|
||||
UpdateRecommendedList:
|
||||
type: update
|
||||
custom: true
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=product_id, =recommended]
|
||||
out: [_update]
|
||||
UpdateProductOption:
|
||||
type: update
|
||||
custom: true
|
||||
inOutTypes: {in: object, out: object}
|
||||
custom_fields:
|
||||
price: {type: string}
|
||||
old_price: {type: double}
|
||||
price_type: {type: string}
|
||||
weight: {type: string}
|
||||
image_id: {type: integer}
|
||||
value: {type: string}
|
||||
is_stock_enabled: {type: integer, custom: true}
|
||||
fields:
|
||||
in: [=option_id, value, image_id, price, old_price, stock, is_stock_enabled, weight, code, man_code, pum]
|
||||
out: [_update]
|
||||
GetProductOptionsList:
|
||||
type: list
|
||||
custom: true
|
||||
inOutTypes: {in: object, out: array}
|
||||
custom_fields:
|
||||
price: {type: string}
|
||||
old_price: {type: double}
|
||||
price_type: {type: string}
|
||||
weight: {type: string}
|
||||
image_id: {type: integer}
|
||||
product_id: {type: integer}
|
||||
parent_id: {type: integer}
|
||||
value: {type: string}
|
||||
is_stock_enabled: {type: integer, custom: true}
|
||||
fields:
|
||||
in: [product_id, product_code, _offset, _limit]
|
||||
out: [id, product_id, parent_id, image_id, name, value, price_type, price, old_price, stock, is_stock_enabled, weight, code, man_code, pum]
|
||||
CountProductOptionsList:
|
||||
type: count
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [product_id, product_code]
|
||||
out: [_count]
|
||||
GetRecommendedList:
|
||||
type: list
|
||||
custom: true
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [=product_id]
|
||||
out: [created_at, updated_at, id, name, code, price, price_brutto, category_id, producer_id, active, short_description, description, tax_id, vat, stock, availability_id, wholesale_a_netto, wholesale_b_netto, wholesale_c_netto, product_options, weight, wholesale_a_brutto, wholesale_b_brutto, wholesale_c_brutto, old_price, old_price_brutto, url, uom, is_stock_validated, man_code, points_value, points_earn, points_only, width, height, depth, link]
|
||||
UpdateAccessoriesList:
|
||||
type: update
|
||||
custom: true
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=product_id, =accessories]
|
||||
out: [_update]
|
||||
GetAccessoriesList:
|
||||
type: list
|
||||
custom: true
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [=product_id]
|
||||
out: [created_at, updated_at, id, name, code, price, price_brutto, category_id, producer_id, active, short_description, description, tax_id, vat, stock, availability_id, wholesale_a_netto, wholesale_b_netto, wholesale_c_netto, product_options, weight, wholesale_a_brutto, wholesale_b_brutto, wholesale_c_brutto, old_price, old_price_brutto, url, uom, is_stock_validated, man_code, points_value, points_earn, points_only, width, height, depth, link]
|
||||
AddProduct:
|
||||
type: add
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=name, =code, =price, price_brutto, category_id, producer_id, active, short_description, description, tax_id, stock, availability_id, wholesale_a_netto, wholesale_b_netto, wholesale_c_netto, product_options, weight, wholesale_a_brutto, wholesale_b_brutto, wholesale_c_brutto, old_price, old_price_brutto, uom, is_stock_validated, man_code, points_value, points_earn, points_only, url, width, height, depth]
|
||||
out: [id]
|
||||
CountProduct:
|
||||
type: count
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
DeleteProduct:
|
||||
type: delete
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [_delete]
|
||||
GetProduct:
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [created_at, updated_at, id, name, price, price_brutto, code, category_id, producer_id, active, short_description, description, tax_id, vat, stock, availability_id, wholesale_a_netto, wholesale_b_netto, wholesale_c_netto, product_options, weight, wholesale_a_brutto, wholesale_b_brutto, wholesale_c_brutto, old_price, old_price_brutto, url, uom, is_stock_validated, man_code, points_value, points_earn, points_only, width, height, depth, link]
|
||||
GetProductByCode:
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=code]
|
||||
out: [created_at, updated_at, id, name, price, price_brutto, code, category_id, producer_id, active, short_description, description, tax_id, vat, stock, availability_id, wholesale_a_netto, wholesale_b_netto, wholesale_c_netto, product_options, weight, wholesale_a_brutto, wholesale_b_brutto, wholesale_c_brutto, old_price, old_price_brutto, url, uom, is_stock_validated, man_code, points_value, points_earn, points_only, width, height, depth, link]
|
||||
GetProductList:
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to, category_id]
|
||||
out: [created_at, updated_at, id, name, code, price, price_brutto, category_id, producer_id, active, short_description, description, tax_id, vat, stock, availability_id, wholesale_a_netto, wholesale_b_netto, wholesale_c_netto, product_options, weight, wholesale_a_brutto, wholesale_b_brutto, wholesale_c_brutto, old_price, old_price_brutto, url, uom, is_stock_validated, man_code, points_value, points_earn, points_only, width, height, depth, link]
|
||||
UpdateProduct:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name, price, price_brutto, code, category_id, producer_id, active, short_description, description, tax_id, stock, availability_id, wholesale_a_netto, wholesale_b_netto, wholesale_c_netto, product_options, weight, wholesale_a_brutto, wholesale_b_brutto, wholesale_c_brutto, old_price, old_price_brutto, url, uom, is_stock_validated, man_code, points_value, points_earn, points_only, width, height, depth]
|
||||
out: [_update]
|
||||
UpdateProductByCode:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=code, name, price, price_brutto, category_id, producer_id, active, short_description, description, tax_id, stock, availability_id, wholesale_a_netto, wholesale_b_netto, wholesale_c_netto, product_options, weight, wholesale_a_brutto, wholesale_b_brutto, wholesale_c_brutto, old_price, old_price_brutto, url, uom, is_stock_validated, man_code, points_value, points_earn, points_only, width, height, depth]
|
||||
out: [_update]
|
||||
CountProductI18n:
|
||||
type: count
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [active]
|
||||
out: [_count]
|
||||
GetProductI18nList:
|
||||
type: list
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to, active]
|
||||
out: [id, active, name, url, short_description, description, description2, attributes_label, uom, execution_time]
|
||||
UpdateProductI18n:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name, url, short_description, description, description2, attributes_label, uom, execution_time]
|
||||
out: [_update]
|
||||
# Ceny w Walutach
|
||||
AddProductPrice:
|
||||
culture: false
|
||||
peer: AddPrice
|
||||
type: add
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=product_id, =currency_id, tax_id, price, old_price, wholesale_a_netto, wholesale_b_netto, wholesale_c_netto, price_brutto, old_price_brutto, wholesale_a_brutto, wholesale_b_brutto, wholesale_c_brutto]
|
||||
out: [product_id, currency_id]
|
||||
UpdateProductPrice:
|
||||
culture: false
|
||||
peer: AddPrice
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=product_id, =currency_id, tax_id, price, old_price, wholesale_a_netto, wholesale_b_netto, wholesale_c_netto, price_brutto, old_price_brutto, wholesale_a_brutto, wholesale_b_brutto, wholesale_c_brutto]
|
||||
out: [_update]
|
||||
GetProductPrice:
|
||||
culture: false
|
||||
peer: AddPrice
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=product_id, =currency_id]
|
||||
out: [product_id, currency_id, tax_id, price, old_price, wholesale_a_netto, wholesale_b_netto, wholesale_c_netto, price_brutto, old_price_brutto, wholesale_a_brutto, wholesale_b_brutto, wholesale_c_brutto]
|
||||
CountProductPrice:
|
||||
culture: false
|
||||
peer: AddPrice
|
||||
type: count
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [product_id]
|
||||
out: [_count]
|
||||
GetProductPriceList:
|
||||
culture: false
|
||||
peer: AddPrice
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to, product_id]
|
||||
out: [product_id, currency_id, tax_id, price, old_price, wholesale_a_netto, wholesale_b_netto, wholesale_c_netto, price_brutto, old_price_brutto, wholesale_a_brutto, wholesale_b_brutto, wholesale_c_brutto]
|
||||
DeleteProductPrice:
|
||||
culture: false
|
||||
peer: AddPrice
|
||||
type: delete
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=product_id, =currency_id]
|
||||
out: [_delete]
|
||||
## Produkty i kategorie
|
||||
AssignProductToCategory:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, =category_id, is_default]
|
||||
out: [_update]
|
||||
RemoveProductFromCategory:
|
||||
type: delete
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, =category_id]
|
||||
out: [_delete]
|
||||
## Availability
|
||||
AddAvailability:
|
||||
peer: Availability
|
||||
type: add
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=availability_name, =stock_from]
|
||||
out: [id]
|
||||
CountAvailability:
|
||||
peer: Availability
|
||||
type: count
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
DeleteAvailability:
|
||||
peer: Availability
|
||||
type: delete
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [_delete]
|
||||
GetAvailability:
|
||||
peer: Availability
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [created_at, updated_at, id, availability_name, stock_from, is_system_default]
|
||||
GetAvailabilityList:
|
||||
peer: Availability
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [created_at, updated_at, id, availability_name, stock_from, is_system_default]
|
||||
UpdateAvailability:
|
||||
peer: Availability
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, availability_name, stock_from]
|
||||
out: [_update]
|
||||
CountAvailabilityI18n:
|
||||
type: count
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
GetAvailabilityI18nList:
|
||||
type: list
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, availability_name]
|
||||
UpdateAvailabilityI18n:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, availability_name]
|
||||
out: [_update]
|
||||
## Images
|
||||
AddProductImage:
|
||||
peer: ProductHasSfAsset
|
||||
type: add
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=product_id, =image, =image_filename, is_default]
|
||||
out: [id]
|
||||
CountProductImage:
|
||||
peer: ProductHasSfAsset
|
||||
type: count
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=product_id]
|
||||
out: [_count]
|
||||
DeleteProductImage:
|
||||
peer: ProductHasSfAsset
|
||||
type: delete
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [_delete]
|
||||
GetProductImage:
|
||||
peer: ProductHasSfAsset
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, format]
|
||||
out: [id, product_id, image, image_filename, is_default]
|
||||
GetProductImageList:
|
||||
peer: ProductHasSfAsset
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, =product_id, format]
|
||||
out: [id, product_id, image, image_filename, is_default]
|
||||
## Tax
|
||||
AddTax:
|
||||
peer: Tax
|
||||
type: add
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=vat, =vat_name, is_default]
|
||||
out: [id]
|
||||
CountTax:
|
||||
peer: Tax
|
||||
type: count
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
DeleteTax:
|
||||
peer: Tax
|
||||
type: delete
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [_delete]
|
||||
GetTax:
|
||||
peer: Tax
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [id, vat, vat_name, is_default]
|
||||
GetTaxList:
|
||||
peer: Tax
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit]
|
||||
out: [id, vat, vat_name, is_default]
|
||||
UpdateTax:
|
||||
peer: Tax
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, vat_name, is_default]
|
||||
out: [_update]
|
||||
@@ -0,0 +1,29 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
name: {type: string}
|
||||
content: {type: string}
|
||||
culture: {type: string}
|
||||
|
||||
methods:
|
||||
CountTextI18n:
|
||||
type: count
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
GetTextI18nList:
|
||||
type: list
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, name, content]
|
||||
UpdateTextI18n:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name, content]
|
||||
out: [_update]
|
||||
@@ -0,0 +1,32 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
name: {type: string}
|
||||
content: {type: string}
|
||||
culture: {type: string}
|
||||
|
||||
methods:
|
||||
CountThemeContentI18n:
|
||||
type: count
|
||||
model_class: ThemeContent
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
GetThemeContentI18nList:
|
||||
type: list
|
||||
model_class: ThemeContent
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, name, content]
|
||||
UpdateThemeContentI18n:
|
||||
type: update
|
||||
model_class: ThemeContent
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name, content]
|
||||
out: [_update]
|
||||
111
plugins/stWebApiPlugin/config/generator/stUserWebApi.yml
Normal file
111
plugins/stWebApiPlugin/config/generator/stUserWebApi.yml
Normal file
@@ -0,0 +1,111 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
username: {type: string}
|
||||
last_login: {type: integer}
|
||||
is_active: {type: boolean}
|
||||
is_confirm: {type: boolean}
|
||||
is_admin_confirm: {type: boolean}
|
||||
wholesale: {type: integer, custom: true}
|
||||
points: {type: integer}
|
||||
sf_guard_user_id: {type: integer}
|
||||
countries_id: {type: integer}
|
||||
is_billing: {type: integer}
|
||||
is_default: {type: integer}
|
||||
name: {type: string}
|
||||
surname: {type: string}
|
||||
street: {type: string}
|
||||
house: {type: string}
|
||||
flat: {type: string}
|
||||
full_name: {type: string}
|
||||
address: {type: string}
|
||||
address_more: {type: string}
|
||||
code: {type: string}
|
||||
town: {type: string}
|
||||
phone: {type: string}
|
||||
company: {type: string}
|
||||
vat_number: {type: string}
|
||||
last_login: {type: dateTime}
|
||||
password: {type: string}
|
||||
discount: {type: double, custom: true}
|
||||
|
||||
methods:
|
||||
AddUser:
|
||||
type: add
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=username, =password, is_confirm, is_admin_confirm, wholesale, discount]
|
||||
out: [id]
|
||||
CountUser:
|
||||
type: count
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [_count]
|
||||
GetUser:
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [created_at, id, username, last_login, is_confirm, is_admin_confirm, wholesale, points, discount]
|
||||
DeleteUser:
|
||||
type: delete
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [_delete]
|
||||
GetUserList:
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [created_at, id, username, last_login, is_confirm, is_admin_confirm, wholesale, points, discount]
|
||||
UpdateUser:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, is_confirm, is_admin_confirm, wholesale, discount]
|
||||
out: [_update]
|
||||
AddUserProfile:
|
||||
peer: UserData
|
||||
type: add
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=sf_guard_user_id, =countries_id, is_billing, is_default, name, surname, street, house, flat, full_name, address, address_more, code, town, phone, company, vat_number]
|
||||
out: [id]
|
||||
CountUserProfile:
|
||||
peer: UserData
|
||||
type: count
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [_offset, _limit, sf_guard_user_id, _modified_from, _modified_to]
|
||||
out: [_count]
|
||||
DeleteUserProfile:
|
||||
peer: UserData
|
||||
type: delete
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [_delete]
|
||||
GetUserProfile:
|
||||
peer: UserData
|
||||
type: get
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id]
|
||||
out: [created_at, updated_at, id, sf_guard_user_id, countries_id, is_billing, is_default, name, surname, street, house, flat, code, town, phone, company, vat_number, full_name, address, address_more]
|
||||
GetUserProfileList:
|
||||
peer: UserData
|
||||
type: list
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, sf_guard_user_id, _modified_from, _modified_to]
|
||||
out: [created_at, updated_at, id, sf_guard_user_id, countries_id, is_billing, is_default, name, surname, street, house, flat, code, town, phone, company, vat_number, full_name, address, address_more]
|
||||
UpdateUserProfile:
|
||||
peer: UserData
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, sf_guard_user_id, countries_id, is_billing, is_default, name, surname, street, house, flat, full_name, address, address_more, code, town, phone, company, vat_number]
|
||||
out: [_update]
|
||||
@@ -0,0 +1,55 @@
|
||||
include_action_files: [/plugins/stWebApiPlugin/config/generator/extendGenerator.php]
|
||||
|
||||
webapi:
|
||||
fields:
|
||||
id: {type: integer}
|
||||
title: {type: string}
|
||||
content: {type: string}
|
||||
culture: {type: string}
|
||||
name: {type: string}
|
||||
other_link: {type: string}
|
||||
url: {type: string}
|
||||
|
||||
methods:
|
||||
CountWebpageI18n:
|
||||
type: count
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
GetWebpageI18nList:
|
||||
type: list
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, title, content, other_link, url]
|
||||
UpdateWebpageI18n:
|
||||
type: update
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, title, content, other_link, url]
|
||||
out: [_update]
|
||||
|
||||
CountWebpageGroupI18n:
|
||||
type: count
|
||||
model_class: WebpageGroup
|
||||
peer_method: doCountWithI18n
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
out: [_count]
|
||||
GetWebpageGroupI18nList:
|
||||
type: list
|
||||
model_class: WebpageGroup
|
||||
peer_method: doSelectWithI18n
|
||||
inOutTypes: {in: object, out: array}
|
||||
fields:
|
||||
in: [_offset, _limit, _modified_from, _modified_to]
|
||||
out: [id, name]
|
||||
UpdateWebpageGroupI18n:
|
||||
type: update
|
||||
model_class: WebpageGroup
|
||||
inOutTypes: {in: object, out: object}
|
||||
fields:
|
||||
in: [=id, name]
|
||||
out: [_update]
|
||||
28
plugins/stWebApiPlugin/config/schema.yml
Normal file
28
plugins/stWebApiPlugin/config/schema.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
propel:
|
||||
_attributes:
|
||||
defaultIdMethod: native
|
||||
package: plugins.stWebApiPlugin.lib.model
|
||||
st_web_api_session:
|
||||
_attributes:
|
||||
phpName: WebApiSession
|
||||
created_at:
|
||||
type: timestamp
|
||||
updated_at:
|
||||
type: timestamp
|
||||
id:
|
||||
type: INTEGER
|
||||
primaryKey: true
|
||||
required: true
|
||||
autoIncrement: true
|
||||
sf_guard_user_id:
|
||||
type: INTEGER
|
||||
required: true
|
||||
foreignTable: sf_guard_user
|
||||
foreignReference: id
|
||||
onDelete: restrict
|
||||
hash:
|
||||
type: VARCHAR
|
||||
size: 255
|
||||
active:
|
||||
type: INTEGER
|
||||
Reference in New Issue
Block a user