Files
grzanieplus.pl/plugins/stWebApiPlugin/config/generator/stCategoryWebApi.yml
2025-03-12 17:06:23 +01:00

97 lines
4.1 KiB
YAML

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]