import type { Schema, FieldsParam, Entity, ListParams, CustomField, FieldType, CustomFieldDefaults, ProjectCustomField, DeepPartial } from "../../types"; import { ResourceApi } from "../common"; type CustomFieldSchema = Schema; type FieldTypeSchema = Schema; type CustomFieldDefaultsSchema = Schema; type ProjectCustomFieldSchema = Schema; type CustomFieldEntity = Entity; type FieldTypeEntity = Entity; type CustomFieldDefaultsEntity = Entity; type ProjectCustomFieldEntity = Entity; export declare class CustomFieldsApi extends ResourceApi { /** * Get all available custom fields in the system. * @param params - Optional parameters for response filtering. * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @param params.$top - Optional. Maximum number of entries to return. * @param params.$skip - Optional. Number of entries to skip before returning the first one. * @returns A promise that resolves to a list of CustomField entities. */ getCustomFields(params?: FieldsParam & ListParams): Promise[]>; /** * Create a new custom field in the system. * @param body - Required fields: name, fieldType. * @param params - Optional parameters for response filtering. * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns A promise that resolves to the created CustomField entity. */ createCustomField(body: { name: string; fieldType: FieldType; } & DeepPartial, params?: FieldsParam): Promise>; /** * Read the custom field with the specific ID. * @param fieldId - The database ID of the custom field. * @param params - Optional parameters for response filtering. * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns A promise that resolves to the requested CustomField entity. */ getCustomFieldById(fieldId: string, params?: FieldsParam): Promise>; /** * Update the custom field with the specific ID. * @param fieldId - The database ID of the custom field. * @param body - The fields to update in the custom field. * @param params - Optional parameters for response filtering. * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns A promise that resolves to the updated CustomField entity. */ updateCustomField(fieldId: string, body: DeepPartial, params?: FieldsParam): Promise>; /** * Delete the custom field with the specific ID. * @param fieldId - The database ID of the custom field. * @param params - Optional parameters for response filtering. * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns A promise that resolves to the deleted CustomField entity. */ deleteCustomField(fieldId: string, params?: FieldsParam): Promise>; /** * Get all available field types. * @param params - Optional parameters for response filtering. * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @param params.$top - Optional. Maximum number of entries to return. * @param params.$skip - Optional. Number of entries to skip before returning the first one. * @returns A promise that resolves to the list of FieldType entities. */ getFieldTypes(params?: FieldsParam & ListParams): Promise[]>; /** * Get default settings for the field. * @param fieldId - The database ID of the custom field. * @param params - Optional parameters for response filtering. * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns A promise that resolves to the CustomFieldDefaults entity. */ getCustomFieldDefaults(fieldId: string, params?: FieldsParam): Promise>; /** * Update default settings for the field. * @param fieldId - The database ID of the custom field. * @param body - The new default settings for the field. * @param params - Optional parameters for response filtering. * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns A promise that resolves to the updated CustomFieldDefaults entity. */ updateCustomFieldDefaults(fieldId: string, body: DeepPartial, params?: FieldsParam): Promise>; /** * Get all project related settings of this custom field. * This method lets you see in which projects this custom field is used. * @param fieldId - The database ID of the custom field. * @param params - Optional parameters for response filtering. * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @param params.$top - Optional. The maximum number of entries to return in the response. * @param params.$skip - Optional. The number of entities to skip before returning the first one. * @returns A promise that resolves to the list of ProjectCustomField entities. */ getCustomFieldInstances(fieldId: string, params?: FieldsParam & ListParams): Promise[]>; } export {};