UNPKG

@larksuiteoapi/lark-mcp

Version:
656 lines 139 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.taskV2TasklistRemoveMembers = exports.taskV2TasklistPatch = exports.taskV2TasklistList = exports.taskV2TasklistGet = exports.taskV2TasklistDelete = exports.taskV2TasklistCreate = exports.taskV2TasklistAddMembers = exports.taskV2TasklistActivitySubscriptionPatch = exports.taskV2TasklistActivitySubscriptionList = exports.taskV2TasklistActivitySubscriptionGet = exports.taskV2TasklistActivitySubscriptionDelete = exports.taskV2TasklistActivitySubscriptionCreate = exports.taskV2TaskTasklists = exports.taskV2TaskSubtaskList = exports.taskV2TaskSubtaskCreate = exports.taskV2TaskRemoveTasklist = exports.taskV2TaskRemoveReminders = exports.taskV2TaskRemoveMembers = exports.taskV2TaskRemoveDependencies = exports.taskV2TaskPatch = exports.taskV2TaskList = exports.taskV2TaskGet = exports.taskV2TaskDelete = exports.taskV2TaskCreate = exports.taskV2TaskAddTasklist = exports.taskV2TaskAddReminders = exports.taskV2TaskAddMembers = exports.taskV2TaskAddDependencies = exports.taskV2SectionTasks = exports.taskV2SectionPatch = exports.taskV2SectionList = exports.taskV2SectionGet = exports.taskV2SectionDelete = exports.taskV2SectionCreate = exports.taskV2CustomFieldRemove = exports.taskV2CustomFieldPatch = exports.taskV2CustomFieldOptionPatch = exports.taskV2CustomFieldOptionCreate = exports.taskV2CustomFieldList = exports.taskV2CustomFieldGet = exports.taskV2CustomFieldCreate = exports.taskV2CustomFieldAdd = exports.taskV2CommentPatch = exports.taskV2CommentList = exports.taskV2CommentGet = exports.taskV2CommentDelete = exports.taskV2CommentCreate = exports.taskV2AttachmentList = exports.taskV2AttachmentGet = exports.taskV2AttachmentDelete = void 0; exports.taskV2Tools = exports.taskV2TasklistTasks = void 0; const zod_1 = require("zod"); exports.taskV2AttachmentDelete = { project: 'task', name: 'task.v2.attachment.delete', sdkName: 'task.v2.attachment.delete', path: '/open-apis/task/v2/attachments/:attachment_guid', httpMethod: 'DELETE', description: '[Feishu/Lark]-Tasks-Attachment-Delete Attachment-Providing an attachment GUID, delete the attachment. After deletion, the attachment cannot be recovered', accessTokens: ['tenant', 'user'], schema: { path: zod_1.z.object({ attachment_guid: zod_1.z .string() .describe('GUID of attachment to delete, which can be created by API, or fetched byAPI') .optional(), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2AttachmentGet = { project: 'task', name: 'task.v2.attachment.get', sdkName: 'task.v2.attachment.get', path: '/open-apis/task/v2/attachments/:attachment_guid', httpMethod: 'GET', description: '[Feishu/Lark]-Tasks-Attachment-Get Attachment-Providing an attachment GUID, get the detail of the attachment, including GUID, name, size, uploaded time, temporary downloadable url, etc', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ user_id_type: zod_1.z.string().describe('User ID type').optional() }), path: zod_1.z.object({ attachment_guid: zod_1.z .string() .describe('Attachment GUID, which can be created by API, or fetched byAPI'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2AttachmentList = { project: 'task', name: 'task.v2.attachment.list', sdkName: 'task.v2.attachment.list', path: '/open-apis/task/v2/attachments', httpMethod: 'GET', description: '[Feishu/Lark]-Tasks-Attachment-List Attachment-List all attachments of a resource. The returned attachments supports paging and are sorted by upload time.Each attachment will return a temporary url available for download.Url is available for up to 3 minutes and can only be used for up to 3 times. If the limit is exceeded, you need to obtain a new temporary url through this api', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ page_size: zod_1.z.number().describe('paging size').optional(), page_token: zod_1.z .string() .describe('Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups') .optional(), resource_type: zod_1.z .string() .describe('The resource type to which the attachment belongs. Currently only "task" is supported') .optional(), resource_id: zod_1.z .string() .describe('The id of the attachment home resource, used with resource_type. For example, if you want to get the attachment of the task, you need to set resource_type as task, resource_id as the task GUID. To get task GUID, you can refer to '), user_id_type: zod_1.z.string().describe('User ID type').optional(), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2CommentCreate = { project: 'task', name: 'task.v2.comment.create', sdkName: 'task.v2.comment.create', path: '/open-apis/task/v2/comments', httpMethod: 'POST', description: '[Feishu/Lark]-Tasks-Comment-Create Comment-Create a comment for a task, or reply to a comment for that task.To create a reply comment, you need to set the reply_to_comment_id field at creation time. The comment being replied to and the new comment must belong to the same task', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ content: zod_1.z.string().describe('Comment content. Empty is not allowed. Supports up to 3000 utf8 characters'), reply_to_comment_id: zod_1.z .string() .describe('Reply to the comment ID of the comment. If not filled in it means creating a non-reply comment') .optional(), resource_type: zod_1.z .string() .describe('The resource type to which the comment belongs, currently only supports task "task", the default is "task"') .optional(), resource_id: zod_1.z .string() .describe('The resource ID of the comment attribution. When the attributed resource type is "task", the GUID of the task should be filled in here') .optional(), }), params: zod_1.z.object({ user_id_type: zod_1.z.string().describe('User ID type').optional() }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2CommentDelete = { project: 'task', name: 'task.v2.comment.delete', sdkName: 'task.v2.comment.delete', path: '/open-apis/task/v2/comments/:comment_id', httpMethod: 'DELETE', description: '[Feishu/Lark]-Tasks-Comment-Delete Comment-Delete a comment.After a comment is deleted, nothing can be done and it cannot be restored', accessTokens: ['tenant', 'user'], schema: { path: zod_1.z.object({ comment_id: zod_1.z.string().describe('Comment id to delete') }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2CommentGet = { project: 'task', name: 'task.v2.comment.get', sdkName: 'task.v2.comment.get', path: '/open-apis/task/v2/comments/:comment_id', httpMethod: 'GET', description: '[Feishu/Lark]-Tasks-Comment-Get Comment-Given the ID of a comment, return the details of the comment, including information such as content, creator, creation time and update time', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ user_id_type: zod_1.z.string().describe('User ID type').optional() }), path: zod_1.z.object({ comment_id: zod_1.z.string().describe('Comment ID to get comment details') }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2CommentList = { project: 'task', name: 'task.v2.comment.list', sdkName: 'task.v2.comment.list', path: '/open-apis/task/v2/comments', httpMethod: 'GET', description: '[Feishu/Lark]-Tasks-Comment-List Comments-Given a resource, returns a list of comments for that resource.Pagination is supported. Comments can return data in positive order (asc, oldest to newest) or reverse order (desc, oldest to newest) of creation time', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ page_size: zod_1.z.number().describe('Page size, default is 50').optional(), page_token: zod_1.z .string() .describe('Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups') .optional(), resource_type: zod_1.z .string() .describe('To get the resource type of the comment list, only "task" is currently supported, and the default is "task"') .optional(), resource_id: zod_1.z .string() .describe('To get the resource ID of the comment. For example, to get the comment list of the task, the globally unique ID of the task should be filled in here'), direction: zod_1.z .enum(['asc', 'desc']) .describe('Returns how the data is sorted. "Asc" means return from oldest to newest order; "desc" means return from newest to oldest order. Default is "asc". Options:asc(Comments posted in ascending order),desc(Comments posted in descending order)') .optional(), user_id_type: zod_1.z.string().describe('User ID type').optional(), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2CommentPatch = { project: 'task', name: 'task.v2.comment.patch', sdkName: 'task.v2.comment.patch', path: '/open-apis/task/v2/comments/:comment_id', httpMethod: 'PATCH', description: '[Feishu/Lark]-Tasks-Comment-Patch Comment-Update a comment.When updating, fill in the field names of all comments to be modified in the \'update_fields \'field, and fill in the new value of the field to be modified in the\'comment\' field. For update api specification, please refer to the "About Resource Update" section in .Currently only the "conent" field for updating comments is supported', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ comment: zod_1.z .object({ content: zod_1.z .string() .describe('Comment content to update. When updating, empty content is not allowed. Supports up to 3000 utf8 characters') .optional(), }) .describe('Comment data to update'), update_fields: zod_1.z .array(zod_1.z.string()) .describe('Fields to update, support< Md-enum >< md-enum-item key = "content" > Comment content </md-enum-item ></Md-enum >'), }), params: zod_1.z.object({ user_id_type: zod_1.z.string().describe('User ID type').optional() }), path: zod_1.z.object({ comment_id: zod_1.z.string().describe('Comment ID to update') }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2CustomFieldAdd = { project: 'task', name: 'task.v2.customField.add', sdkName: 'task.v2.customField.add', path: '/open-apis/task/v2/custom_fields/:custom_field_guid/add', httpMethod: 'POST', description: '[Feishu/Lark]-Tasks-Custom Field-Add Custom Field To Resource-Add custom fields to a resource. Currently resource types support tasklist. A custom field can be added to multiple tasklists. After adding, the tasklist can display the value of the custom fields of the task, by which functions such as filtering and grouping based on the field are available.If the settings of the custom field are updated, all fields added by the field can receive the update and display it accordingly', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ resource_type: zod_1.z .string() .describe('The resource type to add custom fields to a resource. Currently only tasklist is supported'), resource_id: zod_1.z.string().describe('The resource id to add a custom field to, currently only tasklist_guid'), }), path: zod_1.z.object({ custom_field_guid: zod_1.z .string() .describe('custom field GUID, which can be created by, or queried by'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2CustomFieldCreate = { project: 'task', name: 'task.v2.customField.create', sdkName: 'task.v2.customField.create', path: '/open-apis/task/v2/custom_fields', httpMethod: 'POST', description: '[Feishu/Lark]-Tasks-Custom Field-Create Custom Field-Create a custom field and add it to a resource (currently resources only support "tasklist"). To create a custom field, you must provide the field name, type and corresponding field settings.Currently task custom fields support several types: number, member, datetime, single_select and multi_select. Use "number_setting", "member_setting", "datetime_setting", "single_select_setting", "multi_select_setting", "text_setting" to set their setting correspondingly.For example, to create a custom field of number type and add it to the tasklist with guid "ec5ed63d-a4a9-44de-a935-7ba243471c0a", you can invoke list this:```POST /task/v2/custom_fields{ "name": "price", "type": "number", "resource_type": "tasklist", "resource_id": "ec5ed63d-a4a9-44de-a935-7ba243471c0a", "number_setting": { "format": "usd", "decimal_count": 2, "separator": "thousand" }}```which means to create a custom field named as "price" with 2 decimal palces. When displayed on the app UI, it is in USD format and displays the thousand separator.Similarly, to create a single_select custom field, you may invoke api like this:```POST /task/v2/custom_fields{ "name": "priority", "type": "single_select", "resource_type": "tasklist", "resource_id": "ec5ed63d-a4a9-44de-a935-7ba243471c0a", "single_select_setting": { "options": [ { "name": "high", "color_index": 1 }, { "name": "mid", "color_index": 11 }, { "name": "low", "color_index": 16 } ] }}```which means creating a "priority" single select custom field with 3 options: high, mid, low,with color set to each of them', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ resource_type: zod_1.z.string().describe('Customize the resource type to which the field belongs, support "tasklist"'), resource_id: zod_1.z .string() .describe('The resource ID to which the custom field belongs, the GUID of the list must be filled in when the resource_type is "tasklist"'), name: zod_1.z.string().describe('Field name, up to 50 characters'), type: zod_1.z .enum(['number', 'datetime', 'member', 'single_select', 'multi_select', 'text']) .describe('custom field type Options:number(number),datetime(datetime),member(member),single_select(single select),multi_select(multiple select),text(text)'), number_setting: zod_1.z .object({ format: zod_1.z .enum(['normal', 'percentage', 'cny', 'usd', 'custom']) .describe('number format in which number value are displayed in the app format.Note that this setting only affects the display format of field values, and does not affect the format of field values input/output in openapi. Options:normal(regular number),percentage(percentage format),cny(RMB format),usd(USD format),custom(custom symbol)') .optional(), custom_symbol: zod_1.z .string() .describe('When\'format \'is set to "custom", set the specific custom symbol characters, supporting up to 4 characters.Note that this setting only affects the display format of field values, and does not affect the format of field values input/output in openapi') .optional(), custom_symbol_position: zod_1.z .enum(['left', 'right']) .describe('When\'format \'is set to "custom", the display position of the custom symbol relative to the number is defined. Note that this setting only affects the display format of field values, and does not affect the format of field values input/output in openapi. Options:left(letf Custom symbols are displayed to the left of the numbers),right(Custom symbols are displayed to the right of the number)') .optional(), separator: zod_1.z .enum(['none', 'thousand']) .describe('number separator in the integer part.Note that this setting only affects the display format of field values, and does not affect the format of field values input/output in openapi. Options:none(no separator),thousand(thousand separator)') .optional(), decimal_count: zod_1.z .number() .describe('The number of decimal places reserved for the value of a custom field. Extra digits will be rounded.Default is 0') .optional(), }) .describe('number field setting') .optional(), member_setting: zod_1.z .object({ multi: zod_1.z.boolean().describe('Whether to support multiple selection.Defaults to false').optional() }) .describe('member field setting') .optional(), datetime_setting: zod_1.z .object({ format: zod_1.z .string() .describe('Date time format, supported<md-enum><md-enum-item key= "yyyy-mm-dd"> Year, month and day separated by dashes, e.g. 2023-08-24</md-enum-item><md-enum-item key= "yyyy/mm/dd"> Year, month and day separated by slashes, e.g. 2023/08/04 </md-enum-item><md-enum-item key = "mm/dd/yyyy">months, days and years separated by slashes, e.g. 08/24/2023</md-enum-item><md-enum-item key = "dd/mm/yyyy">Day, month and year separated by slashes, e.g. 24/08/2023</md-enum-item></md-enum>Default is "yyyy-mm-dd".Note that this setting only affects the display format of field values, and does not affect the format of field values input/output in openapi') .optional(), }) .describe('datetime setting') .optional(), single_select_setting: zod_1.z .object({ options: zod_1.z .array(zod_1.z.object({ name: zod_1.z.string().describe('Option name, cannot be empty, supports up to 50 characters'), color_index: zod_1.z .number() .describe('The color index value of the option, ranging from 0 to 54. If not filled in, it will automatically randomly select one of the unused color index values') .optional(), is_hidden: zod_1.z .boolean() .describe('Whether the option is hidden. The hidden option is not visible in the interface, and the field value can no longer be set to this option through openapi') .optional(), })) .describe('single select options') .optional(), }) .describe('single select setting') .optional(), multi_select_setting: zod_1.z .object({ options: zod_1.z .array(zod_1.z.object({ name: zod_1.z.string().describe('Option name, cannot be empty, up to 50 characters'), color_index: zod_1.z .number() .describe('The color index value of the option, which can be a number from 0 to 54. If not filled in, one will be randomly selected') .optional(), is_hidden: zod_1.z .boolean() .describe('Whether the option is hidden. The hidden option is not visible in the App interface, and the field value cannot be set to this option through oapi') .optional(), })) .describe('multi select options') .optional(), }) .describe('multiple select setting') .optional(), text_setting: zod_1.z .object({}) .describe('text field setting (currently text_setting has no settable items)') .optional(), }), params: zod_1.z.object({ user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional() }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2CustomFieldGet = { project: 'task', name: 'task.v2.customField.get', sdkName: 'task.v2.customField.get', path: '/open-apis/task/v2/custom_fields/:custom_field_guid', httpMethod: 'GET', description: '[Feishu/Lark]-Tasks-Custom Field-Get Custom Field-By specifying a custom field GUID, get its detailed information', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional() }), path: zod_1.z.object({ custom_field_guid: zod_1.z .string() .describe('custom field GUID, which can be created by, or queried by'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2CustomFieldList = { project: 'task', name: 'task.v2.customField.list', sdkName: 'task.v2.customField.list', path: '/open-apis/task/v2/custom_fields', httpMethod: 'GET', description: '[Feishu/Lark]-Tasks-Custom Field-List Custom Field-Get a list of custom fields accessible to the calling identity. If the resource_type and resource_id parameters are not provided, all custom fields accessible to the calling identity are returned.If resource_type and resource_id are provided, the custom fields under that resource are returned. Currently resource_type only supports "tasklist", in which case resource_id should be a tasklist GUID.This API supports paging', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ page_size: zod_1.z.number().describe('paging size').optional(), page_token: zod_1.z .string() .describe('Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups') .optional(), user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional(), resource_type: zod_1.z .string() .describe('Resource types, such as provide custom fields that indicate that only specific resources are queried. Currently only "tasklist" is supported') .optional(), resource_id: zod_1.z.string().describe('To query the attribution resource_id of a custom field').optional(), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2CustomFieldOptionCreate = { project: 'task', name: 'task.v2.customFieldOption.create', sdkName: 'task.v2.customFieldOption.create', path: '/open-apis/task/v2/custom_fields/:custom_field_guid/options', httpMethod: 'POST', description: '[Feishu/Lark]-Tasks-Custom Field Option-Create Custom Field Option-Add a custom option to single/multi select fields. A single/multi select field supports up to 100 options.If the newly added option is visible(is_hidden=false) , its name cannot be duplicated with the name of a visible option', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ name: zod_1.z.string().describe('option name, up to 50 characters'), color_index: zod_1.z .number() .describe('Color index value, supports a number from 0 to 54. If not filled in, one will be randomly selected') .optional(), insert_before: zod_1.z.string().describe('option_guid to put before an option').optional(), insert_after: zod_1.z.string().describe('option_guid to put after an option').optional(), is_hidden: zod_1.z.boolean().describe('Whether to hide').optional(), }), path: zod_1.z.object({ custom_field_guid: zod_1.z.string().describe('custom field GUID to create option') }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2CustomFieldOptionPatch = { project: 'task', name: 'task.v2.customFieldOption.patch', sdkName: 'task.v2.customFieldOption.patch', path: '/open-apis/task/v2/custom_fields/:custom_field_guid/options/:option_guid', httpMethod: 'PATCH', description: "[Feishu/Lark]-Tasks-Custom Field Option-Patch Custom Field Option-Update the a custom field option by specifying the field GUID and option GUID. The field to be updated must be of a single or multi-select type, and the option to be updated must belong to that custom field.When updating, fill in the `update_fields` field, and fill in the new values of the field to be updated in the `option` field. Fields supported by update_fields include:* 'name': option name* 'color_index': Color index value of option* 'is_hidden': whether to hide from the interface* 'insert_before': Put the current option in the option_guid before an option in the same field.* 'insert_after': The option_guid that puts the current option after an option in the same field", accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ option: zod_1.z .object({ name: zod_1.z.string().describe('Option name, up to 50 characters').optional(), color_index: zod_1.z.number().describe('Color index value, supports a number from 0 to 54').optional(), insert_before: zod_1.z.string().describe('option_guid to put before an option').optional(), insert_after: zod_1.z.string().describe('option_guid to put after an option').optional(), is_hidden: zod_1.z.boolean().describe('Whether to hide').optional(), }) .describe('The option data to update') .optional(), update_fields: zod_1.z .array(zod_1.z.string()) .describe("Field name to update, support* 'name': option name* 'color_index': color index value of option* 'is_hidden': whether to hide from the interface* 'insert_before': put the current option before an option in the same field.* 'insert_after': put the current option after an option in the same field") .optional(), }), path: zod_1.z.object({ custom_field_guid: zod_1.z.string().describe('custom field GUID whose option is to update'), option_guid: zod_1.z.string().describe('option GUID to be udpate'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2CustomFieldPatch = { project: 'task', name: 'task.v2.customField.patch', sdkName: 'task.v2.customField.patch', path: '/open-apis/task/v2/custom_fields/:custom_field_guid', httpMethod: 'PATCH', description: '[Feishu/Lark]-Tasks-Custom Field-Patch Custom Field-Update the name and settings of a custom field. When updating, fill in all the task field names to be updated in the `update_fields`, and fill in the new value in the `custom_field`. Custom field type is not allowed to change. Only their settings can be modified according to the type.`update_fields` supports:* `name`: custom field name* `number_setting`: number type setting (if and only if the custom field type to update is number)* `member_setting`: member setting (if and only if the custom field type to update is member)* `datetime_setting`: datetime type setting (if and only if the custom field type to update is datetime)* `single_select_setting`: single select setting (if and only if the custom field type to update is single select)* `multi_select_setting`: multi_select type setting (if and only if the custom field type to be updated is multi_select)* `text_setting`: text type setting (currently nothing can be set)When updating a setting, if you do not fill in a field, it means that the original setting is not changed. For example, for a number, the original settings are:```json"number_setting": { "format": "normal", "decimal_count": 2, "separator": "none", "custom_symbol": "€", "custom_symbol_position": "right"}```Invoke the API with the following parameters:```PATCH /task/v2/custom_fields/:custom_field_guid{ "custom_field": { "number_setting": { "decimal_count": 4 } }, "update_fields": ["number_setting"]}```indicates that only the number of decimal places is changed from 2 to 4, and the rest of the settings \'format\', \'separator \',\' custom_symbol\', etc. are unchanged.For custom fields of single/multi_select type, the setting is a list of options. When updated, the usage is just like configure the options in App UI. Instead of passing in all the options for the field, the user only needs to provide the options that eventually want the UI to be visible (is_hidden = false). Options in the original field that do not appear in the input will be set to is_hidden = true and placed after all visible options.For an updated option, if `option_guid` is provided, it will be taken as option updating (in this case guid must exist in the current field, otherwise a 400 error will be returned); if GUID not provided, it will be regarded as creating a new option (the new option option_guid will be returned in reponse).For example, a single_select field originally had 3 options A, B, C, D. Where C is hidden. The user can update the options like this:```PATCH /task/v2/custom_fields/:custom_field_guid{ "custom_field": { "single_select_setting": { "options": [ { "name": "E", "color_index": 25 }, { "guid": "<option_guid of A>" "name": "A2" }, { "guid": "<option_guid of C>", }, ] } }, "update_fields": ["single_select_setting"]}```After calling, you finally get a new list of options E, A, C, B, D, where:* option E is created and its color_index is set to 25.* option A is updated and its name is changed to "A2". But its color_index remains the same because it is not set;* overall order of options follows the user\'s input order, that is, E, A, C, just as the direct input, and their is_hidden are set to false. Note, C was originally is_hidden = true, it will also be set to is_hidden = false.* options B and D have their is_hidden set to true because the user did not input them, and are placed after all options input in the request.If you simply want to modify the order of options visible to the user, such as changing from the original options A, B, C to C, B, A, you can invoke the API like this:```PATCH /task/v2/custom_fields/:custom_field_guid{ "custom_field": { "single_select_setting": { "options": [ { "guid": "<option_guid_of_C>" }, { "guid": "<option_guid of B>" }, { "guid": "<option_guid of A>", }, ] } }, "update_fields": ["single_select_setting"]}```If you want to directly mark all options in the field as invisible, you can invoke the API like this:```PATCH /task/v2/custom_fields/:custom_field_guid{ "custom_field": { "single_select_setting": { "options": [] } }, "update_fields": ["single_select_setting"]}```The option to update the single/multi_select field must meet the "visible option name cannot be duplicated" constraint. Otherwise, an error will be returned. Developers need to ensure that the option names entered contain on duplicated items.If you want to update only one single option, or want to set the is_hidden of an option separately, this API cannot do that. But you can use the API to do it', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ custom_field: zod_1.z .object({ name: zod_1.z.string().describe('field name, up to 50 characters').optional(), number_setting: zod_1.z .object({ format: zod_1.z .enum(['normal', 'percentage', 'cny', 'usd', 'custom']) .describe('number display format Options:normal(regular number),percentage(percentage format),cny(RMB format),usd(USD format),custom(custom symbol format)') .optional(), custom_symbol: zod_1.z .string() .describe('Custom symbol charaters, supporting up to 4 characters. Only takes effect when `format` is set to "custom"') .optional(), custom_symbol_position: zod_1.z .enum(['left', 'right']) .describe('Customize where symbols are displayed. Options:left(letf Custom symbols are placed to the left of the numbers),right(Custom symbols are placed to the right of the number)') .optional(), separator: zod_1.z .enum(['none', 'thousand']) .describe('separator in the integer part Options:none(no separator),thousand(thousand separator)') .optional(), decimal_count: zod_1.z .number() .describe('The number of decimal places. If the entered number value has more decimal places than this setting, the extra digits will be rounded and discarded. If\'format \'is "percentage", it means the number of decimal places after becoming a percentage') .optional(), }) .describe('field number setting') .optional(), member_setting: zod_1.z .object({ multi: zod_1.z.boolean().describe('Whether to support multiple selection').optional() }) .describe('member field setting') .optional(), datetime_setting: zod_1.z .object({ format: zod_1.z .string() .describe('Datetime display format, which supports:<md-enum><md-enum-item key ="yyyy-mm-dd">Year, month and day separated by dashes, e.g. 2023-08-24 </md-enum-item><md-enum-item key="yyyy/mm/dd">Year, month and day separated by slashes, e.g. 2023/08/04</md-enum-item><md-enum-item key="mm/dd/yyyy">Months, days and years separated by slashes, e.g. 08/24/2023</md-enum-item><md-enum-item key="dd/mm/yyyy">Day, month and year separated by slashes, e.g. 24/08/2023</md-enum-item></md-enum>') .optional(), }) .describe('datetime field setting') .optional(), single_select_setting: zod_1.z .object({ options: zod_1.z .array(zod_1.z.object({ guid: zod_1.z .string() .describe('GUID of the option. If filled in means updating the existing option; if not filled in means creating a new option') .optional(), name: zod_1.z.string().describe('Option name, maximum 50 characters').optional(), color_index: zod_1.z .number() .describe('The color index value of the option, which can be a number from 0 to 54') .optional(), })) .describe('single_select options') .optional(), }) .describe('single_select setting') .optional(), multi_select_setting: zod_1.z .object({ options: zod_1.z .array(zod_1.z.object({ guid: zod_1.z .string() .describe('GUID of the option. If filled in means updating the existing option; if not filled in means creating a new option') .optional(), name: zod_1.z.string().describe('Option name, maximum 50 characters').optional(), color_index: zod_1.z .number() .describe('The color index value of the option, which can be a number from 0 to 54') .optional(), })) .describe('mult_select options') .optional(), }) .describe('mult_select setting') .optional(), text_setting: zod_1.z.object({}).describe('text field setting').optional(), }) .describe('custom field data to update') .optional(), update_fields: zod_1.z .array(zod_1.z.string()) .describe('The custom field type to modify supports:* `name`: custom field name.* `number_setting`: number setting (if and only if the custom field type to update is numeric)* `member_setting`: people type setting (if and only if the custom field type to update is member)* `datetime_setting`: Date type setting (if and only if the custom field type to update is date)* `single_select_setting`: single select setting (if and only if the custom field type to update is single_select)* `multi_select_setting`: multi select type setting (if and only if the custom field type to be updated is multi_select)* `text_setting`: text type setting (currently nothing can be set)') .optional(), }), params: zod_1.z.object({ user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id']).describe('User ID type').optional() }), path: zod_1.z.object({ custom_field_guid: zod_1.z .string() .describe('custom field GUID, which can be created by, or queried by'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2CustomFieldRemove = { project: 'task', name: 'task.v2.customField.remove', sdkName: 'task.v2.customField.remove', path: '/open-apis/task/v2/custom_fields/:custom_field_guid/remove', httpMethod: 'POST', description: '[Feishu/Lark]-Tasks-Custom Field-Remove Custom Field From Resource-Remove a custom field from the resource. After removal, the resource will no longer be able to use the field. Currently, only resource type "tasklist" is supported.If you try to remove a custom field that does not exist in the resource, the api will return a success.Note that custom fields are authorized through tasklist. If a custom field is removed from all associated tasklists, it means that any calling identity can no longer access the that custom field', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ resource_type: zod_1.z .string() .describe("The resource type to remove a custom field from a resource, currently only 'tasklist' is supported"), resource_id: zod_1.z .string() .describe('To remove the resource id of a custom field from a resource, when "tasklist" is resource_type, fill in the tasklist GUID'), }), path: zod_1.z.object({ custom_field_guid: zod_1.z .string() .describe('custom field GUID, which can be created by, or queried by'), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2SectionCreate = { project: 'task', name: 'task.v2.section.create', sdkName: 'task.v2.section.create', path: '/open-apis/task/v2/sections', httpMethod: 'POST', description: '[Feishu/Lark]-Tasks-Section-Create Section-Create a section for a tasklist or "Owned Tasks". You may provide a name and optional locating parameters. If no locating parameters are specified, the new section will be placed at the end of the sections of the specified resource.When creating a section in the tasklist, you need to set `resourse_type` to "tasklist" and `resource_id` to the tasklist guid.When creating section for "Owned Tasks", you need to set `resource_type` to "my_tasks", and leave `resource_id` unset. The calling identity can only create sections in "Owned Tasks" of itself', accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ name: zod_1.z.string().describe('Section name. Empty is not allowed. Supports up to 100 utf8 characters'), resource_type: zod_1.z .string() .describe('Resource type of new creation, supporting "tasklist" or "my_tasks" (Owned Tasks)'), resource_id: zod_1.z .string() .describe('Specify the resource id to which the section belongs. When `resource_type` is "tasklist", the tasklist GUID needs to be spedified here; when `resource_type` is "my_tasks", no need to fill in') .optional(), insert_before: zod_1.z .string() .describe('The section_guid before which the new created section will be put.When neither `insert_before` nor `insert_after` is set, the new section is placed after all existing sections.If both `insert_before` and `insert_after` are set, the api will report an error') .optional(), insert_after: zod_1.z .string() .describe('The section_guid after which the new created section will be put.When neither `insert_before` nor `insert_after` is set, the new section is placed after all existing sections.If both `insert_before` and `insert_after` are set, the api will report an error') .optional(), }), params: zod_1.z.object({ user_id_type: zod_1.z.string().describe('User ID type').optional() }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2SectionDelete = { project: 'task', name: 'task.v2.section.delete', sdkName: 'task.v2.section.delete', path: '/open-apis/task/v2/sections/:section_guid', httpMethod: 'DELETE', description: '[Feishu/Lark]-Tasks-Section-Delete Section-Delete a section. The tasks in the deleted section will be moved to the default section of the resource to which the deleted section belongs.Default section cannot be deleted', accessTokens: ['tenant', 'user'], schema: { path: zod_1.z.object({ section_guid: zod_1.z.string().describe('section GUID to delete') }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2SectionGet = { project: 'task', name: 'task.v2.section.get', sdkName: 'task.v2.section.get', path: '/open-apis/task/v2/sections/:section_guid', httpMethod: 'GET', description: '[Feishu/Lark]-Tasks-Section-Get Section-Gets the details of a section, including name, creator, etc. If the section belongs to a tasklist, the summary of the tasklist is also returned', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ user_id_type: zod_1.z.string().describe('User ID type').optional() }), path: zod_1.z.object({ section_guid: zod_1.z.string().describe('Section GUID to get') }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2SectionList = { project: 'task', name: 'task.v2.section.list', sdkName: 'task.v2.section.list', path: '/open-apis/task/v2/sections', httpMethod: 'GET', description: '[Feishu/Lark]-Tasks-Section-List Section-Get a list of section. Paging is supported. The returned results are sorted in the order in which the sections are placed on the UI', accessTokens: ['tenant', 'user'], schema: { params: zod_1.z.object({ page_size: zod_1.z.number().describe('paging size').optional(), page_token: zod_1.z .string() .describe('Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups') .optional(), resource_type: zod_1.z .string() .describe('The resource type to which the section belongs. Supports "my_tasks" (Owned Tasks) and "tasklist". When using tasklist, you need to provide the tasklist GUID by setting `resource_id`'), resource_id: zod_1.z .string() .describe('If "resource_type" is "tasklist", you need to fill in the taslist GUID of which sections is going to list') .optional(), user_id_type: zod_1.z.string().describe('User ID type').optional(), }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2SectionPatch = { project: 'task', name: 'task.v2.section.patch', sdkName: 'task.v2.section.patch', path: '/open-apis/task/v2/sections/:section_guid', httpMethod: 'PATCH', description: "[Feishu/Lark]-Tasks-Section-Patch Section-Update a section. you can update section's name and postion.When updating, fill in all the field names to be modified in the 'update_fields 'field, and fill in the new value of the field to be modified in the'section' field. For details of the calling convention, see the \"Updates to Resources\" part in [Function Overview](/ssl: ttdoc/uAjLw4CM/ukTMukTMukTM/task-v2/overview).Section fields that currently support updates include:* 'name' - section name;* 'insert_before' - section guid before which the current section will be put.* 'insert_after' -section guid after which the current section will be put.`insert_before` and `insert_after`, if filled in, must be a valid section_guid of the same resource. Note that `insert_before` and `insert_after` cannot be set at the same time", accessTokens: ['tenant', 'user'], schema: { data: zod_1.z.object({ section: zod_1.z .object({ name: zod_1.z .string() .describe('Section name. When updating, empty is not allowed. Supports up to 100 utf8 characters') .optional(), insert_before: zod_1.z.string().describe('The section_guid before which current section will be put').optional(), insert_after: zod_1.z.string().describe('The section_guid after which current section will be put').optional(), }) .describe('The section data to update'), update_fields: zod_1.z .array(zod_1.z.string()) .describe("The field name to be updated. Currently supports:* `name`: section name;* `insert_before` - The section_guid before which current section will be put.* 'insert_after' - The section_guid after which current section will be put"), }), params: zod_1.z.object({ user_id_type: zod_1.z.string().describe('User ID type').optional() }), path: zod_1.z.object({ section_guid: zod_1.z.string().describe('section GUID to update') }), useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(), }, }; exports.taskV2SectionTasks = { project: 'task', name: 'task.v2.section.tasks', sdkName: 'task.v2.section.tasks', path: '/open-apis/task/v2/sections/:section_guid/