MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / runtimeFilterProperty

Function runtimeFilterProperty

src/api/TaskNotesAPI.ts:2976–3011  ·  view source on GitHub ↗
(
	id: string,
	internalProperty: FilterProperty,
	label: string,
	category: string,
	valueType: TaskNotesRuntimeFieldDefinition["valueType"],
	source: TaskNotesRuntimeFieldDefinition["source"],
	options: {
		aliases?: readonly string[];
		sortable?: boolean;
		groupable?: boolean;
		valueInputType?: string;
	} = {}
)

Source from the content-addressed store, hash-verified

2974};
2975
2976function runtimeFilterProperty(
2977 id: string,
2978 internalProperty: FilterProperty,
2979 label: string,
2980 category: string,
2981 valueType: TaskNotesRuntimeFieldDefinition["valueType"],
2982 source: TaskNotesRuntimeFieldDefinition["source"],
2983 options: {
2984 aliases?: readonly string[];
2985 sortable?: boolean;
2986 groupable?: boolean;
2987 valueInputType?: string;
2988 } = {}
2989): RuntimeFilterPropertyDefinition {
2990 const internalPropertyDefinition = FILTER_PROPERTIES.find(
2991 (property) => property.id === internalProperty
2992 );
2993 return {
2994 id,
2995 internalProperty,
2996 label,
2997 category,
2998 valueType,
2999 source,
3000 queryable: true,
3001 sortable: options.sortable ?? false,
3002 groupable: options.groupable ?? false,
3003 supportedOperators: runtimeOperatorsFromLegacy(
3004 internalPropertyDefinition?.supportedOperators ??
3005 operatorsForRuntimeValueType(valueType)
3006 ),
3007 aliases: options.aliases,
3008 valueInputType:
3009 options.valueInputType ?? internalPropertyDefinition?.valueInputType ?? "text",
3010 };
3011}
3012
3013function runtimeFilterPropertyForInternal(
3014 internalProperty: string

Callers 1

TaskNotesAPI.tsFile · 0.85

Calls 2

Tested by

no test coverage detected