Initial commit: n8n Strike API node
- 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>
This commit is contained in:
199
nodes/Strike/descriptions/DepositDescription.ts
Normal file
199
nodes/Strike/descriptions/DepositDescription.ts
Normal file
@ -0,0 +1,199 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const depositOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['deposit'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
description: 'Initiate a deposit',
|
||||
action: 'Create a deposit',
|
||||
},
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
description: 'Get a deposit by ID',
|
||||
action: 'Get a deposit',
|
||||
},
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
description: 'Get many deposits',
|
||||
action: 'Get many deposits',
|
||||
},
|
||||
{
|
||||
name: 'Estimate Fee',
|
||||
value: 'estimateFee',
|
||||
description: 'Estimate deposit fees',
|
||||
action: 'Estimate deposit fee',
|
||||
},
|
||||
],
|
||||
default: 'getAll',
|
||||
},
|
||||
];
|
||||
|
||||
export const depositFields: INodeProperties[] = [
|
||||
// ----------------------------------
|
||||
// deposit:create
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Payment Method ID',
|
||||
name: 'paymentMethodId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
description: 'The ID of the payment method to deposit from',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['deposit'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Amount',
|
||||
name: 'amount',
|
||||
type: 'number',
|
||||
typeOptions: {
|
||||
numberPrecision: 2,
|
||||
},
|
||||
required: true,
|
||||
default: 0,
|
||||
description: 'Amount to deposit',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['deposit'],
|
||||
operation: ['create', 'estimateFee'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
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 deposit',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['deposit'],
|
||||
operation: ['create', 'estimateFee'],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// ----------------------------------
|
||||
// deposit:get
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Deposit ID',
|
||||
name: 'depositId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
description: 'The ID of the deposit to retrieve',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['deposit'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// ----------------------------------
|
||||
// deposit: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: ['deposit'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
},
|
||||
default: 50,
|
||||
description: 'Max number of results to return',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['deposit'],
|
||||
operation: ['getAll'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Filters',
|
||||
name: 'filters',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Filter',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['deposit'],
|
||||
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',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// ----------------------------------
|
||||
// deposit:estimateFee
|
||||
// ----------------------------------
|
||||
{
|
||||
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',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['deposit'],
|
||||
operation: ['estimateFee'],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user