- Add Strike API credentials configuration - Implement Strike node with 9 resources (Account, Balance, Currency Exchange, Deposit, Invoice, Payment, Payment Method, Payout, Rates) - Add comprehensive operation descriptions for all resources - Include CLAUDE.MD documentation - Set up build configuration with TypeScript, ESLint, and Prettier 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
212 lines
4.0 KiB
TypeScript
212 lines
4.0 KiB
TypeScript
import type { INodeProperties } from 'n8n-workflow';
|
|
|
|
export const payoutOperations: INodeProperties[] = [
|
|
{
|
|
displayName: 'Operation',
|
|
name: 'operation',
|
|
type: 'options',
|
|
noDataExpression: true,
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['payout'],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
name: 'Create',
|
|
value: 'create',
|
|
description: 'Create a payout',
|
|
action: 'Create a payout',
|
|
},
|
|
{
|
|
name: 'Get',
|
|
value: 'get',
|
|
description: 'Get a payout by ID',
|
|
action: 'Get a payout',
|
|
},
|
|
{
|
|
name: 'Get Many',
|
|
value: 'getAll',
|
|
description: 'Get many payouts',
|
|
action: 'Get many payouts',
|
|
},
|
|
{
|
|
name: 'Initiate',
|
|
value: 'initiate',
|
|
description: 'Initiate a payout',
|
|
action: 'Initiate a payout',
|
|
},
|
|
],
|
|
default: 'getAll',
|
|
},
|
|
];
|
|
|
|
export const payoutFields: INodeProperties[] = [
|
|
// ----------------------------------
|
|
// payout:create
|
|
// ----------------------------------
|
|
{
|
|
displayName: 'Payment Method ID',
|
|
name: 'paymentMethodId',
|
|
type: 'string',
|
|
required: true,
|
|
default: '',
|
|
description: 'The ID of the payment method to payout to',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['payout'],
|
|
operation: ['create'],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
displayName: 'Amount',
|
|
name: 'amount',
|
|
type: 'number',
|
|
typeOptions: {
|
|
numberPrecision: 2,
|
|
},
|
|
required: true,
|
|
default: 0,
|
|
description: 'Amount to payout',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['payout'],
|
|
operation: ['create'],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
displayName: 'Currency',
|
|
name: 'currency',
|
|
type: 'options',
|
|
options: [
|
|
{ name: 'USD', value: 'USD' },
|
|
{ name: 'EUR', value: 'EUR' },
|
|
{ name: 'GBP', value: 'GBP' },
|
|
],
|
|
default: 'USD',
|
|
description: 'Currency of the payout',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['payout'],
|
|
operation: ['create'],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
displayName: 'Additional Fields',
|
|
name: 'additionalFields',
|
|
type: 'collection',
|
|
placeholder: 'Add Field',
|
|
default: {},
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['payout'],
|
|
operation: ['create'],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
displayName: 'Fee Policy',
|
|
name: 'feePolicy',
|
|
type: 'options',
|
|
options: [
|
|
{ name: 'Inclusive', value: 'INCLUSIVE' },
|
|
{ name: 'Exclusive', value: 'EXCLUSIVE' },
|
|
],
|
|
default: 'EXCLUSIVE',
|
|
description: 'Whether fee is included in or added to the amount',
|
|
},
|
|
{
|
|
displayName: 'Originator ID',
|
|
name: 'originatorId',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'ID of the payout originator',
|
|
},
|
|
],
|
|
},
|
|
|
|
// ----------------------------------
|
|
// payout:get
|
|
// ----------------------------------
|
|
{
|
|
displayName: 'Payout ID',
|
|
name: 'payoutId',
|
|
type: 'string',
|
|
required: true,
|
|
default: '',
|
|
description: 'The ID of the payout to retrieve',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['payout'],
|
|
operation: ['get', 'initiate'],
|
|
},
|
|
},
|
|
},
|
|
|
|
// ----------------------------------
|
|
// payout:getAll
|
|
// ----------------------------------
|
|
{
|
|
displayName: 'Return All',
|
|
name: 'returnAll',
|
|
type: 'boolean',
|
|
default: false,
|
|
description: 'Whether to return all results or only up to a given limit',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['payout'],
|
|
operation: ['getAll'],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
displayName: 'Limit',
|
|
name: 'limit',
|
|
type: 'number',
|
|
typeOptions: {
|
|
minValue: 1,
|
|
},
|
|
default: 50,
|
|
description: 'Max number of results to return',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['payout'],
|
|
operation: ['getAll'],
|
|
returnAll: [false],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
displayName: 'Filters',
|
|
name: 'filters',
|
|
type: 'collection',
|
|
placeholder: 'Add Filter',
|
|
default: {},
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['payout'],
|
|
operation: ['getAll'],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
displayName: 'Filter (OData)',
|
|
name: 'filter',
|
|
type: 'string',
|
|
default: '',
|
|
description: 'OData filter expression',
|
|
},
|
|
{
|
|
displayName: 'Order By',
|
|
name: 'orderBy',
|
|
type: 'string',
|
|
default: 'created desc',
|
|
description: 'OData orderby expression',
|
|
},
|
|
],
|
|
},
|
|
];
|