UNPKG

@luka-cat-mimi/n8n-nodes-feishu-project

Version:
113 lines 3.47 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.paginationOptions = exports.timeoutOnlyOptions = exports.commonOptions = exports.timeoutOption = exports.batchingOption = void 0; exports.batchingOption = { displayName: 'Batching', name: 'batching', placeholder: 'Add Batching', type: 'fixedCollection', typeOptions: { multipleValues: false, }, default: { batch: {}, }, options: [ { displayName: 'Batching', name: 'batch', values: [ { displayName: 'Items per Batch', name: 'batchSize', type: 'number', typeOptions: { minValue: 1, }, default: 50, description: '每批并发请求数量。添加此选项后启用并发模式。0 将被视为 1。', }, { displayName: 'Batch Interval (Ms)', name: 'batchInterval', type: 'number', typeOptions: { minValue: 0, }, default: 1000, description: '每批请求之间的时间(毫秒)。0 表示禁用。', }, ], }, ], }; exports.timeoutOption = { displayName: 'Timeout', name: 'timeout', type: 'number', typeOptions: { minValue: 0, }, default: 0, description: '等待服务器发送响应头(并开始响应体)的时间(毫秒),超过此时间将中止请求。0 表示不限制超时。', }; exports.commonOptions = { displayName: 'Options', name: 'options', type: 'collection', placeholder: 'Add option', default: {}, options: [exports.batchingOption, exports.timeoutOption], }; exports.timeoutOnlyOptions = { displayName: 'Options', name: 'options', type: 'collection', placeholder: 'Add option', default: {}, options: [exports.timeoutOption], }; exports.paginationOptions = { returnAll: { displayName: 'Return All', name: 'returnAll', type: 'boolean', default: false, description: 'Whether to return all results or only up to a given limit', }, limit: (maxValue = 100) => ({ displayName: 'Limit', name: 'limit', type: 'number', default: 50, typeOptions: { minValue: 1, maxValue, }, displayOptions: { show: { returnAll: [false], }, }, description: 'Max number of results to return', }), pageToken: { displayName: '分页标记', name: 'page_token', type: 'string', default: '', description: '分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会返回新的 page_token。', }, pageSize: (defaultValue = 20, maxValue = 100) => ({ displayName: '每页数量', name: 'page_size', type: 'number', default: defaultValue, typeOptions: { minValue: 1, maxValue, }, description: `一次请求返回的最大数量。最小值为 1,最大值为 ${maxValue}。`, }), }; //# sourceMappingURL=sharedOptions.js.map