ToolJet/plugins/packages/woocommerce/lib/operations/definitions.ts
Kiran Ashok 3b96e99d6a
Woocommerce integration 🚀 (#2866)
* base structure

* tested all customer operations

* all product enpoints tested

* all order api tested

* typo fix

* icon updated

* tested all operation , cleanup

* added create coupon operation

* removing unwanted types

* cleanup

* updating test connection bug

* doc updated

* docs updated

* removing logs :: pr updates

* removing types :: pr updates

* cleanup :: pr changes

* operation structure updated

* restructured whole code for seperating operations

* typo bug updated

* updating pr updates remove host , test error case updated

* typo bug fixed

* updating naming conventions

* plugins operation.json reusable fields

* pr changes :: making all ids common

* fixing customer params

* updating all additional param types

* updating all product params

* including some more product params

* adding all order params

* adding all coupon params

* updating common defenitions

* capitalise labels

* updating all list operation definitions

* clearing some typos

* global defenition

* lock file changes

* lock file changes

* server lock file changes

* typo fix

* typo fix

Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
2022-05-19 11:38:14 +05:30

427 lines
8.9 KiB
TypeScript

export const body = {
label: 'Data',
key: 'body',
type: 'codehinter',
description: 'Enter data',
height: '150px',
placeholder: '',
};
export const customer_id = {
label: 'Customer ID',
key: 'customer_id',
type: 'codehinter',
description: 'Enter customer ID',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const product_id = {
label: 'Product ID',
key: 'product_id',
type: 'codehinter',
description: 'Enter product ID',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const order_id = {
label: 'Order ID',
key: 'order_id',
type: 'codehinter',
description: 'Enter order ID',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
// page, context, per_page, search, exclude, include, offset, order, orderby, email, role :: customer/common
export const context = {
label: 'Context',
key: 'context',
type: 'codehinter',
description: 'Enter context',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const page = {
label: 'Page',
key: 'page',
type: 'codehinter',
description: 'Enter page',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const search = {
label: 'Search',
key: 'search',
type: 'codehinter',
description: 'Enter search',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const per_page = {
label: 'Per Page',
key: 'per_page',
type: 'codehinter',
description: 'Enter per_page',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const exclude = {
label: 'Exclude',
key: 'exclude',
type: 'codehinter',
description: 'Enter exclude',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const include = {
label: 'Include',
key: 'include',
type: 'codehinter',
description: 'Enter include',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const offset = {
label: 'Offset',
key: 'offset',
type: 'codehinter',
description: 'Enter offset',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const order = {
label: 'Order',
key: 'order',
type: 'codehinter',
description: 'Enter order',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const orderby = {
label: 'Order By',
key: 'orderby',
type: 'codehinter',
description: 'Enter orderby',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const email = {
label: 'Email',
key: 'email',
type: 'codehinter',
description: 'Enter email',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const role = {
label: 'Role',
key: 'role',
type: 'codehinter',
description: 'Enter role',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
// Products :: slug, status,type,sku,featured,category,tag,shipping_class,attribute,attribute_term,tax_class,on_sale,min_price,max_price,stock_status,before,after,parent_exclude,parent
export const slug = {
label: 'Slug',
key: 'slug',
type: 'codehinter',
description: 'Enter slug',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const status = {
label: 'Status',
key: 'status',
type: 'codehinter',
description: 'Enter status',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const type = {
label: 'Type',
key: 'type',
type: 'codehinter',
description: 'Enter type',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const sku = {
label: 'SKU',
key: 'sku',
type: 'codehinter',
description: 'Enter sku',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const featured = {
label: 'Featured',
key: 'featured',
type: 'codehinter',
description: 'Enter featured',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const category = {
label: 'Category',
key: 'category',
type: 'codehinter',
description: 'Enter category',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const tag = {
label: 'Tag',
key: 'tag',
type: 'codehinter',
description: 'Enter tag',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const shipping_class = {
label: 'Shipping Class',
key: 'shipping_class',
type: 'codehinter',
description: 'Enter shipping_class',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const attribute = {
label: 'Attribute',
key: 'attribute',
type: 'codehinter',
description: 'Enter attribute',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const attribute_term = {
label: 'Attribute Term',
key: 'attribute_term',
type: 'codehinter',
description: 'Enter attribute_term',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const tax_class = {
label: 'Tax Class',
key: 'tax_class',
type: 'codehinter',
description: 'Enter tax_class',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const on_sale = {
label: 'On Sale',
key: 'on_sale',
type: 'codehinter',
description: 'Enter on_sale',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const min_price = {
label: 'Min Price',
key: 'min_price',
type: 'codehinter',
description: 'Enter min_price',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const max_price = {
label: 'Max Price',
key: 'max_price',
type: 'codehinter',
description: 'Enter max_price',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const stock_status = {
label: 'Stock Status',
key: 'stock_status',
type: 'codehinter',
description: 'Enter stock_status',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const before = {
label: 'Before',
key: 'before',
type: 'codehinter',
description: 'Enter before',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const parent_exclude = {
label: 'Parent Exclude',
key: 'parent_exclude',
type: 'codehinter',
description: 'Enter parent_exclude',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const parent = {
label: 'Parent',
key: 'parent',
type: 'codehinter',
description: 'Enter parent',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
// status,customer,product,dp, :: order
export const customer = {
label: 'Customer',
key: 'customer',
type: 'codehinter',
description: 'Enter customer',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const product = {
label: 'Product',
key: 'product',
type: 'codehinter',
description: 'Enter product',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const dp = {
label: 'Decimal Point',
key: 'dp',
type: 'codehinter',
description: 'Enter dp',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
export const after = {
label: 'After',
key: 'after',
type: 'codehinter',
description: 'Enter after',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};
// code :: coupon
export const code = {
label: 'Code',
key: 'code',
type: 'codehinter',
description: 'Enter code',
width: '320px',
height: '36px',
className: 'codehinter-plugins',
placeholder: '',
lineNumbers: false,
};