n8n/packages/nodes-base/nodes/Shopify/OrderDescription.ts

950 lines
21 KiB
TypeScript
Raw Normal View History

2020-04-23 17:56:53 -07:00
import {
INodeProperties,
} from 'n8n-workflow';
2020-04-23 17:56:53 -07:00
export const orderOperations: INodeProperties[] = [
2020-04-23 17:56:53 -07:00
{
displayName: 'Operation',
name: 'operation',
type: 'options',
refactor: Apply more nodelinting rules (#3324) * :pencil2: Alphabetize lint rules * :fire: Remove duplicates * :zap: Update `lintfix` script * :shirt: Apply `node-param-operation-without-no-data-expression` (#3329) * :shirt: Apply `node-param-operation-without-no-data-expression` * :shirt: Add exceptions * :shirt: Apply `node-param-description-weak` (#3328) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-option-value-duplicate` (#3331) * :shirt: Apply `node-param-description-miscased-json` (#3337) * :shirt: Apply `node-param-display-name-excess-inner-whitespace` (#3335) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-type-options-missing-from-limit` (#3336) * Rule workig as intended * :pencil2: Uncomment rules Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-option-name-duplicate` (#3338) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-description-wrong-for-simplify` (#3334) * :zap: fix * :zap: exceptions * :zap: changed rule ignoring from file to line * :shirt: Apply `node-param-resource-without-no-data-expression` (#3339) * :shirt: Apply `node-param-display-name-untrimmed` (#3341) * :shirt: Apply `node-param-display-name-miscased-id` (#3340) Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-resource-with-plural-option` (#3342) * :shirt: Apply `node-param-description-wrong-for-upsert` (#3333) * :zap: fix * :zap: replaced record with contact in description * :zap: fix Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :shirt: Apply `node-param-option-description-identical-to-name` (#3343) * :shirt: Apply `node-param-option-name-containing-star` (#3347) * :shirt: Apply `node-param-display-name-wrong-for-update-fields` (#3348) * :shirt: Apply `node-param-option-name-wrong-for-get-all` (#3345) * :zap: fix * :zap: exceptions * :shirt: Apply node-param-display-name-wrong-for-simplify (#3344) * Rule working as intended * Uncomented other rules * :shirt: Undo and add exceptions Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * :zap: Alphabetize lint rules * :zap: Restore `lintfix` script Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com> Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com>
2022-05-20 14:47:24 -07:00
noDataExpression: true,
2020-04-23 17:56:53 -07:00
displayOptions: {
show: {
resource: [
'order',
],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create an order',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete an order',
},
{
name: 'Get',
value: 'get',
description: 'Get an order',
},
{
name: 'Get All',
value: 'getAll',
description: 'Get all orders',
},
{
name: 'Update',
value: 'update',
description: 'Update an order',
},
],
default: 'create',
},
];
2020-04-23 17:56:53 -07:00
export const orderFields: INodeProperties[] = [
2020-04-23 17:56:53 -07:00
/* -------------------------------------------------------------------------- */
/* order:create */
/* -------------------------------------------------------------------------- */
2020-04-23 17:56:53 -07:00
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'order',
],
},
},
default: {},
options: [
{
displayName: 'Billing Address',
name: 'billingAddressUi',
placeholder: 'Add Billing Address',
type: 'fixedCollection',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
default: {},
2020-04-23 17:56:53 -07:00
typeOptions: {
multipleValues: false,
},
options: [
{
name: 'billingAddressValues',
displayName: 'Billing Address',
values: [
{
displayName: 'First Name',
name: 'firstName',
type: 'string',
default: '',
},
{
displayName: 'Last Name',
name: 'lastName',
type: 'string',
default: '',
},
{
displayName: 'Company',
name: 'company',
type: 'string',
default: '',
},
{
displayName: 'Country',
name: 'country',
type: 'string',
default: '',
},
{
displayName: 'Address Line 1',
name: 'address1',
type: 'string',
default: '',
},
{
displayName: 'Address Line 2',
name: 'address2',
type: 'string',
default: '',
},
{
displayName: 'City',
name: 'city',
type: 'string',
default: '',
},
{
displayName: 'Province',
name: 'province',
type: 'string',
default: '',
},
{
displayName: 'Zip Code',
name: 'zip',
type: 'string',
default: '',
},
{
displayName: 'Phone',
name: 'phone',
type: 'string',
default: '',
},
],
},
],
},
{
displayName: 'Discount Codes',
name: 'discountCodesUi',
placeholder: 'Add Discount Code',
type: 'fixedCollection',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
default: {},
2020-04-23 17:56:53 -07:00
typeOptions: {
multipleValues: true,
},
options: [
{
name: 'discountCodesValues',
displayName: 'Discount Code',
values: [
{
displayName: 'Amount',
name: 'amount',
type: 'string',
default: '',
description: 'The amount that\'s deducted from the order total',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Code',
name: 'code',
type: 'string',
default: '',
description: 'When the associated discount application is of type code',
},
{
displayName: 'Type',
name: 'type',
type: 'options',
options: [
{
name: 'Fixed Amount',
value: 'fixedAmount',
description: 'Applies amount as a unit of the store\'s currency',
2020-04-23 17:56:53 -07:00
},
{
name: 'Percentage',
value: 'percentage',
description: 'Applies a discount of amount as a percentage of the order total',
2020-04-23 17:56:53 -07:00
},
{
name: 'Shipping',
value: 'shipping',
description: 'Applies a free shipping discount on orders that have a shipping rate less than or equal to amount',
2020-04-23 17:56:53 -07:00
},
],
default: 'fixedAmount',
description: 'When the associated discount application is of type code',
},
],
},
],
},
{
displayName: 'Email',
name: 'email',
type: 'string',
default: '',
description: 'The customer\'s email address',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Fulfillment Status',
name: 'fulfillmentStatus',
type: 'options',
options: [
{
name: 'Fulfilled',
value: 'fulfilled',
description: 'Every line item in the order has been fulfilled',
2020-04-23 17:56:53 -07:00
},
{
name: 'Null',
value: 'null',
description: 'None of the line items in the order have been fulfilled',
2020-04-23 17:56:53 -07:00
},
{
name: 'Partial',
value: 'partial',
description: 'At least one line item in the order has been fulfilled',
2020-04-23 17:56:53 -07:00
},
{
name: 'Restocked',
value: 'restocked',
description: 'Every line item in the order has been restocked and the order canceled',
2020-04-23 17:56:53 -07:00
},
],
default: '',
description: 'The order\'s status in terms of fulfilled line items',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Inventory Behaviour',
name: 'inventoryBehaviour',
type: 'options',
options: [
{
name: 'Bypass',
value: 'bypass',
description: 'Do not claim inventory',
2020-04-23 17:56:53 -07:00
},
{
name: 'Decrement Ignoring Policy',
value: 'decrementIgnoringPolicy',
description: 'Ignore the product\'s inventory policy and claim inventory',
2020-04-23 17:56:53 -07:00
},
{
name: 'Decrement Obeying Policy',
value: 'decrementObeyingPolicy',
description: 'Follow the product\'s inventory policy and claim inventory, if possible',
2020-04-23 17:56:53 -07:00
},
],
default: 'bypass',
description: 'The behaviour to use when updating inventory',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Location ID',
name: 'locationId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getLocations',
},
default: '',
description: 'The ID of the physical location where the order was processed',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Note',
name: 'note',
type: 'string',
typeOptions: {
alwaysOpenEditWindow: true,
},
default: '',
description: 'An optional note that a shop owner can attach to the order',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Send Fulfillment Receipt',
name: 'sendFulfillmentReceipt',
type: 'boolean',
default: false,
description: 'Whether to send a shipping confirmation to the customer',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Send Receipt',
name: 'sendReceipt',
type: 'boolean',
default: false,
description: 'Whether to send an order confirmation to the customer',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Shipping Address',
name: 'shippingAddressUi',
placeholder: 'Add Shipping',
type: 'fixedCollection',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
default: {},
2020-04-23 17:56:53 -07:00
typeOptions: {
multipleValues: false,
},
options: [
{
name: 'shippingAddressValues',
displayName: 'shipping Address',
values: [
{
displayName: 'First Name',
name: 'firstName',
type: 'string',
default: '',
},
{
displayName: 'Last Name',
name: 'lastName',
type: 'string',
default: '',
},
{
displayName: 'Company',
name: 'company',
type: 'string',
default: '',
},
{
displayName: 'Country',
name: 'country',
type: 'string',
default: '',
},
{
displayName: 'Address Line 1',
name: 'address1',
type: 'string',
default: '',
},
{
displayName: 'Address Line 2',
name: 'address2',
type: 'string',
default: '',
},
{
displayName: 'City',
name: 'city',
type: 'string',
default: '',
},
{
displayName: 'Province',
name: 'province',
type: 'string',
default: '',
},
{
displayName: 'Zip Code',
name: 'zip',
type: 'string',
default: '',
},
{
displayName: 'Phone',
name: 'phone',
type: 'string',
default: '',
},
],
},
],
},
{
displayName: 'Source Name',
name: 'sourceName',
type: 'string',
default: '',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
description: 'Where the order originated. Can be set only during order creation, and is not writeable afterwards.',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Tags',
name: 'tags',
type: 'string',
default: '',
description: 'Tags attached to the order, formatted as a string of comma-separated values',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Test',
name: 'test',
type: 'boolean',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
default: false,
description: 'Whether this is a test order',
2020-04-23 17:56:53 -07:00
},
],
},
{
displayName: 'Line Items',
name: 'limeItemsUi',
placeholder: 'Add Line Item',
type: 'fixedCollection',
typeOptions: {
multipleValues: true,
},
displayOptions: {
show: {
resource: [
'order',
],
operation: [
'create',
],
},
},
default: {},
options: [
{
displayName: 'Line Item',
name: 'lineItemValues',
values: [
{
displayName: 'Product ID',
name: 'productId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getProducts',
},
default: '',
description: 'The ID of the product that the line item belongs to',
},
{
displayName: 'Variant ID',
name: 'variantId',
type: 'string',
default: '',
description: 'The ID of the product variant',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Title',
name: 'title',
type: 'string',
default: '',
description: 'The title of the product',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Grams',
name: 'grams',
type: 'string',
default: '',
description: 'The weight of the item in grams',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Quantity',
name: 'quantity',
type: 'number',
typeOptions: {
minValue: 1,
},
default: 1,
description: 'The number of items that were purchased',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Price',
name: 'price',
type: 'string',
default: '',
},
],
},
],
},
/* -------------------------------------------------------------------------- */
/* order:delete */
/* -------------------------------------------------------------------------- */
2020-04-23 17:56:53 -07:00
{
displayName: 'Order ID',
name: 'orderId',
type: 'string',
default: '',
displayOptions: {
show: {
resource: [
'order',
],
operation: [
'delete',
],
},
},
required: true,
},
/* -------------------------------------------------------------------------- */
/* order:get */
/* -------------------------------------------------------------------------- */
2020-04-23 17:56:53 -07:00
{
displayName: 'Order ID',
name: 'orderId',
type: 'string',
default: '',
displayOptions: {
show: {
resource: [
'order',
],
operation: [
'get',
],
},
},
required: true,
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
operation: [
'get',
],
resource: [
'order',
],
},
},
default: {},
options: [
{
displayName: 'Fields',
name: 'fields',
type: 'string',
default: '',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
description: 'Fields the order will return, formatted as a string of comma-separated values. By default all the fields are returned.',
2020-04-23 17:56:53 -07:00
},
],
},
/* -------------------------------------------------------------------------- */
/* order:getAll */
/* -------------------------------------------------------------------------- */
2020-04-23 17:56:53 -07:00
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
resource: [
'order',
],
operation: [
'getAll',
],
},
},
default: false,
description: 'Whether to return all results or only up to a given limit',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
resource: [
'order',
],
operation: [
'getAll',
],
returnAll: [
false,
],
},
},
typeOptions: {
minValue: 1,
maxValue: 250,
},
default: 50,
description: 'Max number of results to return',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Options',
name: 'options',
type: 'collection',
placeholder: 'Add Field',
default: {},
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'order',
],
},
},
options: [
{
displayName: 'Attribution App ID',
name: 'attributionAppId',
type: 'string',
default: '',
description: 'Show orders attributed to a certain app, specified by the app ID. Set as current to show orders for the app currently consuming the API.',
},
{
displayName: 'Created At Min',
name: 'createdAtMin',
type: 'dateTime',
default: '',
description: 'Show orders created at or after date',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Created At Max',
name: 'createdAtMax',
type: 'dateTime',
default: '',
description: 'Show orders created at or before date',
},
{
displayName: 'Financial Status',
name: 'financialStatus',
type: 'options',
options: [
{
name: 'Any',
value: 'any',
description: 'Show orders of any financial status',
2020-04-23 17:56:53 -07:00
},
{
name: 'Authorized',
value: 'authorized',
description: 'Show only authorized orders',
},
{
name: 'Paid',
value: 'paid',
description: 'Show only paid orders',
},
{
name: 'Partially Paid',
value: 'partiallyPaid',
description: 'Show only partially paid orders',
},
{
name: 'Partially Refunded',
value: 'partiallyRefunded',
description: 'Show only partially refunded orders',
},
{
name: 'Pending',
value: 'pending',
description: 'Show only pending orders',
},
{
name: 'Refunded',
value: 'refunded',
description: 'Show only refunded orders',
},
{
name: 'Voided',
value: 'voided',
description: 'Show only voided orders',
},
{
name: 'Unpaid',
value: 'unpaid',
description: 'Show authorized and partially paid orders',
2020-04-23 17:56:53 -07:00
},
],
default: 'any',
description: 'Filter orders by their financial status',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Fulfillment Status',
name: 'fulfillmentStatus',
type: 'options',
options: [
{
name: 'Any',
value: 'any',
description: 'Show orders of any fulfillment status',
2020-04-23 17:56:53 -07:00
},
{
name: 'Partial',
value: 'partial',
description: 'Show partially shipped orders',
2020-04-23 17:56:53 -07:00
},
{
name: 'Shipped',
value: 'shipped',
description: 'Show orders that have been shipped. Returns orders with fulfillment_status of fulfilled.',
},
{
name: 'Unshipped',
value: 'unshipped',
description: 'Show orders that have not yet been shipped. Returns orders with fulfillment_status of null.',
},
{
name: 'Unfulfilled',
value: 'unfulfilled',
description: 'Returns orders with fulfillment_status of null or partial',
2020-04-23 17:56:53 -07:00
},
],
default: 'any',
description: 'Filter orders by their fulfillment status',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Fields',
name: 'fields',
type: 'string',
default: '',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
description: 'Fields the orders will return, formatted as a string of comma-separated values. By default all the fields are returned.',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'IDs',
name: 'ids',
type: 'string',
default: '',
description: 'Retrieve only orders specified by a comma-separated list of order IDs',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Processed At Max',
name: 'processedAtMax',
type: 'dateTime',
default: '',
description: 'Show orders imported at or before date',
},
{
displayName: 'Processed At Min',
name: 'processedAtMin',
type: 'dateTime',
default: '',
description: 'Show orders imported at or after date',
},
{
displayName: 'Status',
name: 'status',
type: 'options',
options: [
{
name: 'Any',
value: 'any',
description: 'Show orders of any status, including archived orders',
2020-04-23 17:56:53 -07:00
},
{
name: 'Cancelled',
value: 'Cancelled',
description: 'Show only canceled orders',
2020-04-23 17:56:53 -07:00
},
{
name: 'Closed',
value: 'closed',
description: 'Show only closed orders',
2020-04-23 17:56:53 -07:00
},
{
name: 'Open',
value: 'open',
description: 'Show only open orders',
2020-04-23 17:56:53 -07:00
},
],
default: 'open',
description: 'Filter orders by their status',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Since ID',
name: 'sinceId',
type: 'string',
default: '',
description: 'Show orders after the specified ID',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Updated At Max',
name: 'updatedAtMax',
type: 'dateTime',
default: '',
description: 'Show orders last updated at or after date',
},
{
displayName: 'Updated At Min',
name: 'updatedAtMin',
type: 'dateTime',
default: '',
description: 'Show orders last updated at or before date',
},
],
},
/* -------------------------------------------------------------------------- */
/* order:update */
/* -------------------------------------------------------------------------- */
2020-04-23 17:56:53 -07:00
{
displayName: 'Order ID',
name: 'orderId',
type: 'string',
default: '',
displayOptions: {
show: {
resource: [
'order',
],
operation: [
'update',
],
},
},
required: true,
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'order',
],
},
},
default: {},
options: [
{
displayName: 'Email',
name: 'email',
type: 'string',
default: '',
description: 'The customer\'s email address',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Location ID',
name: 'locationId',
type: 'options',
typeOptions: {
loadOptionsMethod: 'getLocations',
},
default: '',
description: 'The ID of the physical location where the order was processed',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Note',
name: 'note',
type: 'string',
typeOptions: {
alwaysOpenEditWindow: true,
},
default: '',
description: 'An optional note that a shop owner can attach to the order',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Shipping Address',
name: 'shippingAddressUi',
placeholder: 'Add Shipping',
type: 'fixedCollection',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
default: {},
2020-04-23 17:56:53 -07:00
typeOptions: {
multipleValues: false,
},
options: [
{
name: 'shippingAddressValues',
displayName: 'shipping Address',
values: [
{
displayName: 'First Name',
name: 'firstName',
type: 'string',
default: '',
},
{
displayName: 'Last Name',
name: 'lastName',
type: 'string',
default: '',
},
{
displayName: 'Company',
name: 'company',
type: 'string',
default: '',
},
{
displayName: 'Country',
name: 'country',
type: 'string',
default: '',
},
{
displayName: 'Address Line 1',
name: 'address1',
type: 'string',
default: '',
},
{
displayName: 'Address Line 2',
name: 'address2',
type: 'string',
default: '',
},
{
displayName: 'City',
name: 'city',
type: 'string',
default: '',
},
{
displayName: 'Province',
name: 'province',
type: 'string',
default: '',
},
{
displayName: 'Zip Code',
name: 'zip',
type: 'string',
default: '',
},
{
displayName: 'Phone',
name: 'phone',
type: 'string',
default: '',
},
],
},
],
},
{
displayName: 'Source Name',
name: 'sourceName',
type: 'string',
default: '',
refactor: Apply `eslint-plugin-n8n-nodes-base` autofixable rules (#3174) * :zap: Initial setup * :shirt: Update `.eslintignore` * :shirt: Autofix node-param-default-missing (#3173) * :fire: Remove duplicate key * :shirt: Add exceptions * :package: Update package-lock.json * :shirt: Apply `node-class-description-inputs-wrong-trigger-node` (#3176) * :shirt: Apply `node-class-description-inputs-wrong-regular-node` (#3177) * :shirt: Apply `node-class-description-outputs-wrong` (#3178) * :shirt: Apply `node-execute-block-double-assertion-for-items` (#3179) * :shirt: Apply `node-param-default-wrong-for-collection` (#3180) * :shirt: Apply node-param-default-wrong-for-boolean (#3181) * Autofixed default missing * Autofixed booleans, worked well * :zap: Fix params * :rewind: Undo exempted autofixes * :package: Update package-lock.json * :shirt: Apply node-class-description-missing-subtitle (#3182) * :zap: Fix missing comma * :shirt: Apply `node-param-default-wrong-for-fixed-collection` (#3184) * :shirt: Add exception for `node-class-description-missing-subtitle` * :shirt: Apply `node-param-default-wrong-for-multi-options` (#3185) * :shirt: Apply `node-param-collection-type-unsorted-items` (#3186) * Missing coma * :shirt: Apply `node-param-default-wrong-for-simplify` (#3187) * :shirt: Apply `node-param-description-comma-separated-hyphen` (#3190) * :shirt: Apply `node-param-description-empty-string` (#3189) * :shirt: Apply `node-param-description-excess-inner-whitespace` (#3191) * Rule looks good * Add whitespace rule in eslint config * :zao: fix * :shirt: Apply `node-param-description-identical-to-display-name` (#3193) * :shirt: Apply `node-param-description-missing-for-ignore-ssl-issues` (#3195) * :rewind: Revert ":zao: fix" This reverts commit ef8a76f3dfedffd1bdccf3178af8a8d90cf5a55c. * :shirt: Apply `node-param-description-missing-for-simplify` (#3196) * :shirt: Apply `node-param-description-missing-final-period` (#3194) * Rule working as intended * Add rule to eslint * :shirt: Apply node-param-description-missing-for-return-all (#3197) * :zap: Restore `lintfix` command Co-authored-by: agobrech <45268029+agobrech@users.noreply.github.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: agobrech <ael.gobrecht@gmail.com> Co-authored-by: Michael Kret <michael.k@radency.com>
2022-04-22 09:29:51 -07:00
description: 'Where the order originated. Can be set only during order creation, and is not writeable afterwards.',
2020-04-23 17:56:53 -07:00
},
{
displayName: 'Tags',
name: 'tags',
type: 'string',
default: '',
description: 'Tags attached to the order, formatted as a string of comma-separated values',
2020-04-23 17:56:53 -07:00
},
],
},
];