mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 14:44:05 -08:00
341 lines
6.9 KiB
TypeScript
341 lines
6.9 KiB
TypeScript
|
import { INodeProperties } from "n8n-workflow";
|
||
|
|
||
|
export const payoutOpeations = [
|
||
|
{
|
||
|
displayName: 'Operation',
|
||
|
name: 'operation',
|
||
|
type: 'options',
|
||
|
displayOptions: {
|
||
|
show: {
|
||
|
resource: [
|
||
|
'payout',
|
||
|
],
|
||
|
},
|
||
|
},
|
||
|
options: [
|
||
|
{
|
||
|
name: 'Create',
|
||
|
value: 'create',
|
||
|
description: 'Create a batch payout',
|
||
|
},
|
||
|
{
|
||
|
name: 'Get',
|
||
|
value: 'get',
|
||
|
description: 'Show payout batch details',
|
||
|
},
|
||
|
],
|
||
|
default: 'create',
|
||
|
description: 'The operation to perform.',
|
||
|
},
|
||
|
] as INodeProperties[];
|
||
|
|
||
|
export const payoutFields = [
|
||
|
|
||
|
/* -------------------------------------------------------------------------- */
|
||
|
/* payout:create */
|
||
|
/* -------------------------------------------------------------------------- */
|
||
|
|
||
|
{
|
||
|
displayName: 'Sender Batch ID',
|
||
|
name: 'senderBatchId',
|
||
|
type: 'string',
|
||
|
required: true,
|
||
|
displayOptions: {
|
||
|
show: {
|
||
|
resource: [
|
||
|
'payout',
|
||
|
],
|
||
|
operation: [
|
||
|
'create',
|
||
|
],
|
||
|
},
|
||
|
},
|
||
|
default: '',
|
||
|
description: 'A sender-specified ID number. Tracks the payout in an accounting system.',
|
||
|
},
|
||
|
{
|
||
|
displayName: 'JSON Parameters',
|
||
|
name: 'jsonParameters',
|
||
|
type: 'boolean',
|
||
|
default: false,
|
||
|
description: '',
|
||
|
displayOptions: {
|
||
|
show: {
|
||
|
resource: [
|
||
|
'payout'
|
||
|
],
|
||
|
operation: [
|
||
|
'create',
|
||
|
]
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Items',
|
||
|
name: 'itemsUi',
|
||
|
placeholder: 'Add Item',
|
||
|
type: 'fixedCollection',
|
||
|
displayOptions: {
|
||
|
show: {
|
||
|
resource: [
|
||
|
'payout',
|
||
|
],
|
||
|
operation: [
|
||
|
'create',
|
||
|
],
|
||
|
jsonParameters: [
|
||
|
false
|
||
|
]
|
||
|
},
|
||
|
},
|
||
|
typeOptions: {
|
||
|
multipleValues: true,
|
||
|
},
|
||
|
default: {},
|
||
|
options: [
|
||
|
{
|
||
|
name: 'itemsValues',
|
||
|
displayName: 'Item',
|
||
|
values: [
|
||
|
{
|
||
|
displayName: 'Recipient Type',
|
||
|
name: 'recipientType',
|
||
|
type: 'options',
|
||
|
options: [
|
||
|
{
|
||
|
name: 'Phone',
|
||
|
value: 'phone',
|
||
|
description: 'The unencrypted phone number',
|
||
|
},
|
||
|
{
|
||
|
name: 'Email',
|
||
|
value: 'email',
|
||
|
description: 'The unencrypted email. Value is a string of up to 127 single-byte characters.',
|
||
|
},
|
||
|
{
|
||
|
name: 'PayPal ID',
|
||
|
value: 'paypalId',
|
||
|
description: 'The encrypted PayPal account number.',
|
||
|
},
|
||
|
],
|
||
|
default: 'email',
|
||
|
description: 'The ID type that identifies the recipient of the payment.',
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Receiver Value',
|
||
|
name: 'receiverValue',
|
||
|
type: 'string',
|
||
|
required: true,
|
||
|
default: '',
|
||
|
description: 'The receiver of the payment. Corresponds to the recipient_type value in the request. Max value of up to 127 single-byte characters.',
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Currency',
|
||
|
name: 'currency',
|
||
|
type: 'options',
|
||
|
options: [
|
||
|
{
|
||
|
name: 'Australian dollar',
|
||
|
value: 'AUD'
|
||
|
},
|
||
|
{
|
||
|
name: 'Brazilian real',
|
||
|
value: 'BRL'
|
||
|
},
|
||
|
{
|
||
|
name: 'Canadian dollar',
|
||
|
value: 'CAD'
|
||
|
},
|
||
|
{
|
||
|
name: 'Czech koruna',
|
||
|
value: 'CZK'
|
||
|
},
|
||
|
{
|
||
|
name: 'Danish krone',
|
||
|
value: 'DKK'
|
||
|
},
|
||
|
{
|
||
|
name: 'Euro',
|
||
|
value: 'EUR'
|
||
|
},
|
||
|
{
|
||
|
name: 'United States dollar',
|
||
|
value: 'USD'
|
||
|
}
|
||
|
],
|
||
|
default: 'USD',
|
||
|
description: 'Currency',
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Amount',
|
||
|
name: 'amount',
|
||
|
type: 'string',
|
||
|
required: true,
|
||
|
default: '',
|
||
|
description: 'The value, which might be',
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Note',
|
||
|
name: 'note',
|
||
|
type: 'string',
|
||
|
required: false,
|
||
|
default: '',
|
||
|
description: 'The sender-specified note for notifications. Supports up to 4000 ASCII characters and 1000 non-ASCII characters.',
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Sender Item ID',
|
||
|
name: 'senderItemId',
|
||
|
type: 'string',
|
||
|
default: '',
|
||
|
description: 'The sender-specified ID number. Tracks the payout in an accounting system.',
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Recipient Wallet',
|
||
|
name: 'recipientWallet',
|
||
|
type: 'options',
|
||
|
options: [
|
||
|
{
|
||
|
name: 'PayPal',
|
||
|
value: 'paypal',
|
||
|
description: 'PayPal Wallet',
|
||
|
},
|
||
|
{
|
||
|
name: 'Venmo',
|
||
|
value: 'venmo',
|
||
|
description: 'Venmo Wallet',
|
||
|
},
|
||
|
],
|
||
|
default: 'paypal',
|
||
|
description: 'The recipient wallet',
|
||
|
},
|
||
|
]
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Items',
|
||
|
name: 'itemsJson',
|
||
|
type: 'json',
|
||
|
typeOptions: {
|
||
|
alwaysOpenEditWindow: true,
|
||
|
},
|
||
|
description: 'An array of individual payout items.',
|
||
|
displayOptions: {
|
||
|
show: {
|
||
|
resource: [
|
||
|
'payout'
|
||
|
],
|
||
|
operation: [
|
||
|
'create',
|
||
|
],
|
||
|
jsonParameters: [
|
||
|
true,
|
||
|
]
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Additional Fields',
|
||
|
name: 'additionalFields',
|
||
|
type: 'collection',
|
||
|
placeholder: 'Add Field',
|
||
|
default: {},
|
||
|
displayOptions: {
|
||
|
show: {
|
||
|
resource: [
|
||
|
'payout',
|
||
|
],
|
||
|
operation: [
|
||
|
'create',
|
||
|
],
|
||
|
},
|
||
|
},
|
||
|
options: [
|
||
|
{
|
||
|
displayName: 'Email Subject',
|
||
|
name: 'emailSubject',
|
||
|
type: 'string',
|
||
|
default: '',
|
||
|
description: 'The subject line for the email that PayPal sends when payment for a payout item completes. The subject line is the same for all recipients. Value is an alphanumeric string of up to 255 single-byte characters.',
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Email Message',
|
||
|
name: 'emailMessage',
|
||
|
type: 'string',
|
||
|
default: '',
|
||
|
description: 'The email message that PayPal sends when the payout item completes. The message is the same for all recipients.',
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Note',
|
||
|
name: 'note',
|
||
|
type: 'string',
|
||
|
default: '',
|
||
|
description: 'The payouts and item-level notes are concatenated in the email. The maximum combined length of the notes is 1000 characters.',
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
|
||
|
/* -------------------------------------------------------------------------- */
|
||
|
/* payout:get */
|
||
|
/* -------------------------------------------------------------------------- */
|
||
|
|
||
|
{
|
||
|
displayName: 'Payout Batch Id',
|
||
|
name: 'payoutBatchId',
|
||
|
type: 'string',
|
||
|
required: true,
|
||
|
displayOptions: {
|
||
|
show: {
|
||
|
resource: [
|
||
|
'payout',
|
||
|
],
|
||
|
operation: [
|
||
|
'get',
|
||
|
],
|
||
|
},
|
||
|
},
|
||
|
description: 'The ID of the payout for which to show details.',
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Return All',
|
||
|
name: 'returnAll',
|
||
|
type: 'boolean',
|
||
|
required: false,
|
||
|
displayOptions: {
|
||
|
show: {
|
||
|
resource: [
|
||
|
'payout',
|
||
|
],
|
||
|
operation: [
|
||
|
'get',
|
||
|
],
|
||
|
},
|
||
|
},
|
||
|
description: 'If all results should be returned or only up to a given limit.',
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Limit',
|
||
|
name: 'limit',
|
||
|
type: 'number',
|
||
|
typeOptions: {
|
||
|
maxValue: 1000,
|
||
|
minValue: 1
|
||
|
},
|
||
|
default: 100,
|
||
|
displayOptions: {
|
||
|
show: {
|
||
|
resource: [
|
||
|
'payout',
|
||
|
],
|
||
|
operation: [
|
||
|
'get',
|
||
|
],
|
||
|
returnAll: [
|
||
|
false,
|
||
|
],
|
||
|
},
|
||
|
},
|
||
|
description: 'If all results should be returned or only up to a given limit.',
|
||
|
},
|
||
|
] as INodeProperties[];
|