UNPKG

n8n-nodes-smartsuite

Version:
376 lines 8.29 kB
"use strict"; // src/nodes/SmartSuite/helpers/getFilterOptions.ts Object.defineProperty(exports, "__esModule", { value: true }); exports.filterOptionsByFieldType = void 0; exports.getFilterOptionsForFieldType = getFilterOptionsForFieldType; /** * A lookup table of valid comparison operators for each SmartSuite field type, * sourced directly from your "Field Type–Operators Across" spreadsheet. */ exports.filterOptionsByFieldType = { textfield: [ 'is', 'is_not', 'is_empty', 'is_not_empty', 'contains', 'not_contains', ], addressfield: [ 'is', 'is_not', 'is_empty', 'is_not_empty', 'contains', 'not_contains', ], checklistfield: [ 'is_empty', 'is_not_empty', ], colorpickerfield: [ 'is', 'is_not', 'is_empty', 'is_not_empty', 'contains', 'not_contains', ], emailfield: [ 'is', 'is_not', 'is_empty', 'is_not_empty', 'contains', 'not_contains', ], fullnamefield: [ 'is', 'is_not', 'is_empty', 'is_not_empty', 'contains', 'not_contains', ], ipaddressfield: [ 'is', 'is_not', 'is_empty', 'is_not_empty', 'contains', 'not_contains', ], linkfield: [ 'is', 'is_not', 'is_empty', 'is_not_empty', 'contains', 'not_contains', ], phonefield: [ 'is', 'is_not', 'is_empty', 'is_not_empty', 'contains', 'not_contains', ], recordtitlefield: [ 'is', 'is_not', 'is_empty', 'is_not_empty', 'contains', 'not_contains', ], richtextareafield: [ 'is_empty', 'is_not_empty', ], socialnetworkfield: [ 'is', 'is_not', 'is_empty', 'is_not_empty', 'contains', 'not_contains', ], textareafield: [ 'is', 'is_not', 'is_empty', 'is_not_empty', 'contains', 'not_contains', ], currencyfield: [ 'is_empty', 'is_not_empty', 'is_equal_to', 'is_not_equal_to', 'is_greater_than', 'is_less_than', 'is_equal_or_greater_than', 'is_equal_or_less_than', ], numberfield: [ 'is_empty', 'is_not_empty', 'is_equal_to', 'is_not_equal_to', 'is_greater_than', 'is_less_than', 'is_equal_or_greater_than', 'is_equal_or_less_than', ], numbersliderfield: [ 'is_empty', 'is_not_empty', 'is_equal_to', 'is_not_equal_to', 'is_greater_than', 'is_less_than', 'is_equal_or_greater_than', 'is_equal_or_less_than', ], percentcompletefield: [ 'is_empty', 'is_not_empty', 'is_equal_to', 'is_not_equal_to', 'is_greater_than', 'is_less_than', 'is_equal_or_greater_than', 'is_equal_or_less_than', ], percentfield: [ 'is_empty', 'is_not_empty', 'is_equal_to', 'is_not_equal_to', 'is_greater_than', 'is_less_than', 'is_equal_or_greater_than', 'is_equal_or_less_than', ], ratingfield: [ 'is_empty', 'is_not_empty', 'is_equal_to', 'is_not_equal_to', 'is_greater_than', 'is_less_than', 'is_equal_or_greater_than', 'is_equal_or_less_than', ], votefield: [ 'is_empty', 'is_not_empty', 'is_equal_to', 'is_not_equal_to', 'is_greater_than', 'is_less_than', 'is_equal_or_greater_than', 'is_equal_or_less_than', ], countfield: [ 'is_empty', 'is_not_empty', 'is_equal_to', 'is_not_equal_to', 'is_greater_than', 'is_less_than', 'is_equal_or_greater_than', 'is_equal_or_less_than', ], singleselectfield: [ 'is', 'is_not', 'is_empty', 'is_not_empty', 'is_any_of', 'is_none_of', ], multipleselectfield: [ 'is_empty', 'is_not_empty', 'has_any_of', 'has_all_of', 'is_exactly', 'has_none_of', ], statusfield: [ 'is', 'is_not', 'is_empty', 'is_not_empty', 'is_any_of', 'is_none_of', ], tagsfield: [ 'is_empty', 'is_not_empty', 'has_any_of', 'has_all_of', 'is_exactly', 'has_none_of', ], yesnofield: [ 'is', ], datefield: [ 'is', 'is_not', 'is_empty', 'is_not_empty', 'is_before', 'is_on_or_before', 'is_on_or_after', ], daterangefield: [ 'is', 'is_not', 'is_empty', 'is_not_empty', 'is_before', 'is_on_or_before', 'is_on_or_after', ], duedatefield: [ 'is', 'is_not', 'is_empty', 'is_not_empty', 'is_before', 'is_on_or_before', 'is_on_or_after', 'is_overdue', 'is_not_overdue', ], durationfield: [ 'is_empty', 'is_not_empty', 'is_equal_to', 'is_not_equal_to', 'is_greater_than', 'is_less_than', 'is_equal_or_greater_than', 'is_equal_or_less_than', ], timefield: [ 'is_empty', 'is_not_empty', 'is_equal_to', 'is_not_equal_to', 'is_greater_than', 'is_less_than', 'is_equal_or_greater_than', 'is_equal_or_less_than', ], timetrackingfield: [ 'is_empty', 'is_not_empty', 'is_equal_to', 'is_not_equal_to', 'is_greater_than', 'is_less_than', 'is_equal_or_greater_than', 'is_equal_or_less_than', ], rollupfield: [ 'is_empty', 'is_not_empty', 'is_equal_to', 'is_not_equal_to', 'is_greater_than', 'is_less_than', 'is_equal_or_greater_than', 'is_equal_or_less_than', ], filefield: [ 'is_empty', 'is_not_empty', 'file_name_contains', 'file_type_is', ], signaturefield: [ 'is_empty', 'is_not_empty', ], recordidfield: [ 'is', 'is_not', 'contains', 'not_contains', ], firstcreatedfield: [ 'is', 'is_not', 'contains', 'is_before', 'is_on_or_before', 'is_on_or_after', ], lastupdatedfield: [ 'is', 'is_not', 'contains', 'is_before', 'is_on_or_before', 'is_on_or_after', ], commentscountfield: [ 'is_empty', 'is_not_empty', 'is_equal_to', 'is_not_equal_to', 'is_greater_than', 'is_less_than', 'is_equal_or_greater_than', 'is_equal_or_less_than', ], linkedrecordfield: [ 'is_empty', 'is_not_empty', 'contains', 'not_contains', 'has_any_of', 'has_all_of', 'is_exactly', 'has_none_of', ], userfield: [ 'is_empty', 'is_not_empty', 'has_any_of', 'has_all_of', 'is_exactly', 'has_none_of', ], autonumberfield: [ 'is_equal_to', 'is_not_equal_to', 'is_greater_than', 'is_less_than', 'is_equal_or_greater_than', 'is_equal_or_less_than', ], subitemsfield: [ 'is_equal_to', 'is_not_equal_to', 'is_greater_than', 'is_less_than', 'is_equal_or_greater_than', 'is_equal_or_less_than', ], }; /** * Returns the list of valid filter comparison operators * for a given SmartSuite field type. * If the type is unknown, returns an empty array. */ function getFilterOptionsForFieldType(fieldType) { return exports.filterOptionsByFieldType[fieldType] ?? []; } //# sourceMappingURL=getFilterOptions.js.map