mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 22:54:05 -08:00
b4f4ecc77e
* 🎉 Register node * 🎨 Add SVG icon * ⚡ Add preliminary node stub * ⚡ Add resource description stubs * 🎨 Fix SVG size and position * ⚡ Implement charge operations * ⚡ Implement customer operations * 🎨 Apply cosmetic changes * ⚡ Fix customer address fields * ⚡ Add stub and fields for invoice * ⚡ Add invoice item stubs * ⚡ Implement source operations * ⚡ Reduce scope per feedback * ⚡ Add continueOnFail functionality * 🎨 Prettify error thrown * 🔥 Remove unused resource * ⚡ Replace source in card with token * 🔨 Remove logging * 🔧 Fix shipping address in charge:create * 🔧 Load update fields for charge:update * ⚡ Implement token:create to ease testing * ⚡ Simplify card token fields * ⚡ Update description parameters * 🔧 Fix field adjusters * ⚡ Remove unused source options * 🔧 Fix shipping fields adjuster * 🔥 Remove PNG icon * 🔥 Remove logging * 🔨 Reorder address fields * 🐛 Fix shipping field in charge:update * 💄 Apply cosmetic change * ⚡ Small improvements * ⚡ Fix lintings in main file * ⚡ Lint all descriptions * ⚡ Add target="_blank" attribute * ⚡ Fix various lintings for charge * ⚡ Fix lintings for coupon * ⚡ Fix lintings for customer * ⚡ Fix lintings for source * ⚡ Fix lintings for token * ⚡ Reorder address fields * ⚡ Fix casing in credentials * 🔨 Place recipient name above address in shipping * ⚡ Remove references to string in descriptions * ⚡ Apply minor renamings * 🔥 Remove logging * 🔨 Simplify error handling * ⚡ Fix indentation * ⚡ Move cardFields to root level for Token creation Co-authored-by: ricardo <ricardoespinoza105@gmail.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
131 lines
2 KiB
TypeScript
131 lines
2 KiB
TypeScript
import {
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
export const tokenOperations = [
|
|
{
|
|
displayName: 'Operation',
|
|
name: 'operation',
|
|
type: 'options',
|
|
default: 'create',
|
|
description: 'Operation to perform',
|
|
options: [
|
|
{
|
|
name: 'Create',
|
|
value: 'create',
|
|
description: 'Create a token',
|
|
},
|
|
],
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'token',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
] as INodeProperties[];
|
|
|
|
export const tokenFields = [
|
|
// ----------------------------------
|
|
// token: create
|
|
// ----------------------------------
|
|
{
|
|
displayName: 'Type',
|
|
name: 'type',
|
|
type: 'options',
|
|
required: true,
|
|
default: 'cardToken',
|
|
description: 'Type of token to create',
|
|
options: [
|
|
{
|
|
name: 'Card Token',
|
|
value: 'cardToken',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
displayName: 'Card Number',
|
|
name: 'number',
|
|
type: 'string',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'token',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
type: [
|
|
'cardToken'
|
|
],
|
|
},
|
|
},
|
|
placeholder: '4242424242424242',
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'CVC',
|
|
name: 'cvc',
|
|
type: 'string',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'token',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
type: [
|
|
'cardToken'
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
placeholder: '314',
|
|
description: 'Security code printed on the back of the card',
|
|
},
|
|
{
|
|
displayName: 'Expiration Month',
|
|
description: 'Number of the month when the card will expire',
|
|
name: 'expirationMonth',
|
|
type: 'string',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'token',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
type: [
|
|
'cardToken'
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
placeholder: '10',
|
|
},
|
|
{
|
|
displayName: 'Expiration Year',
|
|
description: 'Year when the card will expire',
|
|
name: 'expirationYear',
|
|
type: 'string',
|
|
displayOptions: {
|
|
show: {
|
|
resource: [
|
|
'token',
|
|
],
|
|
operation: [
|
|
'create',
|
|
],
|
|
type: [
|
|
'cardToken'
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
placeholder: '2022',
|
|
},
|
|
] as INodeProperties[];
|