pull:初次提交

This commit is contained in:
Yep_Q
2025-09-08 04:48:28 +08:00
parent 5c0619656d
commit f64f498365
11751 changed files with 1953723 additions and 0 deletions

View File

@@ -0,0 +1 @@
export * as loadOptions from './loadOptions';

View File

@@ -0,0 +1,35 @@
import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
import { NodeOperationError } from 'n8n-workflow';
import { apiRequestAllItems } from '../transport';
// Get all the available channels
export async function getCustomers(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const endpoint = 'customers';
const responseData = await apiRequestAllItems.call(this, 'GET', endpoint, {});
if (responseData === undefined) {
throw new NodeOperationError(this.getNode(), 'No data got returned');
}
const returnData: INodePropertyOptions[] = [];
for (const data of responseData) {
returnData.push({
name: data.fullname as string,
value: data.id as number,
});
}
returnData.sort((a, b) => {
if (a.name < b.name) {
return -1;
}
if (a.name > b.name) {
return 1;
}
return 0;
});
return returnData;
}

View File

@@ -0,0 +1,47 @@
import type { INodeProperties } from 'n8n-workflow';
export const addressFixedCollection: INodeProperties = {
displayName: 'Address',
name: 'address',
placeholder: 'Add Address Fields',
type: 'fixedCollection',
default: {},
options: [
{
displayName: 'Address Fields',
name: 'addressFields',
values: [
{
displayName: 'Line 1',
name: 'address',
type: 'string',
default: '',
},
{
displayName: 'Line 2',
name: 'address2',
type: 'string',
default: '',
},
{
displayName: 'City',
name: 'city',
type: 'string',
default: '',
},
{
displayName: 'State',
name: 'state',
type: 'string',
default: '',
},
{
displayName: 'ZIP',
name: 'zip',
type: 'string',
default: '',
},
],
},
],
};