{"version":3,"file":"index.mjs","sources":["../src/utils/common.ts","../src/utils/fetchHelpers.ts","../src/utils/queryBuilder.ts","../src/resources/common.ts","../src/resources/Activities.ts","../src/resources/Agiles.ts","../src/resources/Articles.ts","../src/resources/Commands.ts","../src/resources/Groups.ts","../src/resources/IssueLinkTypes.ts","../src/resources/Issues.ts","../src/resources/SavedQueries.ts","../src/resources/Search.ts","../src/resources/Tags.ts","../src/resources/Users.ts","../src/resources/WorkItems.ts","../src/resources/IssueComments.ts","../src/resources/IssueLinks.ts","../src/resources/IssueTags.ts","../src/resources/IssueTimeTracking.ts","../src/resources/IssueVcsChanges.ts","../src/resources/IssueAttachments.ts","../src/resources/admin/Projects.ts","../src/resources/admin/BuildBundles.ts","../src/resources/admin/EnumBundles.ts","../src/resources/admin/OwnedBundles.ts","../src/resources/admin/StateBundles.ts","../src/resources/admin/UserBundles.ts","../src/resources/admin/VersionBundles.ts","../src/resources/admin/Workflows.ts","../src/resources/admin/CustomFields.ts","../src/resources/admin/BackupFiles.ts","../src/resources/admin/GlobalSettings.ts","../src/resources/admin/TelemetryData.ts","../src/resources/admin/DatabaseBackupSettings.ts","../src/resources/admin/GlobalTimeTrackingSettings.ts","../src/youtrack.ts"],"sourcesContent":["export const isObject = (value: unknown): value is Record<string | number | symbol, unknown> => {\n  return value !== null && typeof value === \"object\"\n}\n\nexport const joinUrl = (_baseUrl: string, _url: string): string => {\n  let baseUrl = _baseUrl\n  let url = _url\n  // Ensure baseUrl does not end with a '/'\n  if (baseUrl.endsWith(\"/\")) {\n    baseUrl = baseUrl.slice(0, -1)\n  }\n\n  // Ensure url does not start with a '/'\n  if (url.startsWith(\"/\")) {\n    url = url.slice(1)\n  }\n\n  return `${baseUrl}/${url}`\n}\n","import type { FieldsSchema, QueryParamBuilder, Schema } from \"../types\"\nimport { isObject } from \"./common\"\n\nexport const encodeBody = (data?: string | object | FormData): string | FormData | undefined => {\n  if (data instanceof FormData) {\n    return data\n  }\n\n  if (typeof data === \"object\") {\n    return JSON.stringify(data)\n  }\n\n  return data\n}\n\n// Function to build the URI with path parameters\nexport const buildUri = (baseUri: string, pathParams: Record<string, string> = {}): string =>\n  Object.keys(pathParams).reduce(\n    (uri, param) => uri.replace(`:${param}`, encodeURIComponent(pathParams[param])),\n    baseUri,\n  ) // Replace path parameters in the URI\n\nexport const createParamsMap = (keys: string[] = [], values: Array<string | number> = []) => {\n  return keys.reduce(\n    (res, key, index) => {\n      res[key] = `${values[index]}`\n      return res\n    },\n    {} as Record<string, string>,\n  )\n}\n\nconst fieldsBuilder = (schema: FieldsSchema = []): string => {\n  const _fields = schema.map((field) =>\n    isObject(field)\n      ? Object.keys(field)\n          .map((key) => `${key}(${fieldsBuilder(field[key])})`)\n          .join(\",\")\n      : encodeURIComponent(field),\n  )\n  return _fields.length ? _fields.join(\",\") : \"\"\n}\n\nexport const fields: QueryParamBuilder<Schema<any> | undefined> = (schema = []) => {\n  const _fields = typeof schema === \"string\" ? schema : fieldsBuilder(schema)\n  return _fields ? `fields=${_fields}` : \"\"\n}\n\nexport const buildQueryParam = (key: string, value?: string | number | boolean | string[] | number[] | boolean[]) => {\n  if (Array.isArray(value)) {\n    return value.map((item) => `${encodeURIComponent(key)}=${encodeURIComponent(item)}`)\n  }\n  return typeof value !== \"undefined\" ? `${encodeURIComponent(key)}=${encodeURIComponent(value)}` : \"\"\n}\n\nexport const stringParam =\n  (key: string): QueryParamBuilder<string | undefined> =>\n  (value?) =>\n    buildQueryParam(key, value)\n\nexport const queryParams = <TKey extends string, T extends string | number | boolean | string[] | number[] | boolean[]>(\n  ...keys: TKey[]\n): Record<TKey, QueryParamBuilder<T | undefined>> => {\n  return keys.reduce(\n    (params, key) => {\n      params[key] = (value?) => buildQueryParam(key, value)\n      return params\n    },\n    {} as Record<TKey, QueryParamBuilder<T | undefined>>,\n  )\n}\n\nexport const customField: QueryParamBuilder<string | string[] | undefined> = (value) =>\n  buildQueryParam(\"customField\", value)\n","import type { FetchConfig, QueryParamBuilder } from \"../types\"\nimport { buildQueryParam } from \"./fetchHelpers\"\n\nexport type Builders<T extends Record<string, any>> = {\n  [K in keyof T]-?: QueryParamBuilder<T[K]> | \"string\" | \"number\" | \"boolean\"\n}\n\nexport class RequestBuilder<T extends Record<string, any>> {\n  private _args: string[] = []\n\n  constructor(\n    private baseUrl: string,\n    builders: Builders<T>,\n    params: T = {} as T,\n  ) {\n    Object.keys(params).forEach((key) => {\n      // Dynamically create setters for each key\n      if (key in builders) {\n        const value = builders[key]\n        const arg = typeof value !== \"function\" ? buildQueryParam(key, params[key]) : value(params[key])\n        if (arg) {\n          this._args.push(...(Array.isArray(arg) ? arg : [arg]))\n        }\n      }\n    })\n  }\n\n  // Method to build the query string\n  private build(options?: Omit<FetchConfig, \"url\">): FetchConfig {\n    const query = this._args.join(\"&\")\n    return {\n      ...options,\n      url: query ? `${this.baseUrl}?${query}` : this.baseUrl,\n    }\n  }\n\n  public get() {\n    return this.build()\n  }\n\n  public post<TBody extends object>(data: TBody) {\n    return this.build({ method: \"POST\", data })\n  }\n\n  public postFile(data: FormData) {\n    return this.build({ method: \"POST\", data, headers: { \"Content-Type\": \"multipart/form-data\" } })\n  }\n\n  public delete() {\n    return this.build({ method: \"DELETE\" })\n  }\n\n  public put() {\n    return this.build({ method: \"PUT\" })\n  }\n\n  public patch() {\n    return this.build({ method: \"PATCH\" })\n  }\n}\n","import type { YouTrack } from \"../youtrack\"\n\nexport class ResourceApi {\n  constructor(protected youtrack: YouTrack) {}\n}\n","import type {\n  ActivityCategory,\n  ActivityCursorPage,\n  ActivityItem,\n  Entity,\n  FieldsParam,\n  ListParams,\n  Schema,\n} from \"../types\"\nimport { fields, queryParams, RequestBuilder } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype ActivityItemSchema = Schema<ActivityItem>\ntype ActivityCursorPageSchema = Schema<ActivityCursorPage>\n\ntype ActivityItemEntity<TSchema extends ActivityItemSchema> = Entity<ActivityItem, TSchema>\ntype ActivityCursorPageEntity<TSchema extends ActivityCursorPageSchema> = Entity<ActivityCursorPage, TSchema>\n\ntype GetActivitiesParams = {\n  categories?: ActivityCategory[]\n  reverse?: boolean\n  start?: string\n  end?: string\n  author?: string\n  issueQuery?: string\n}\n\ntype GetActivitiesPageParams = GetActivitiesParams & {\n  cursor?: string\n  activityId?: string\n}\n\n/**\n * This resource provides access to the activities with the possibility to filter them by various parameters.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-activities.html\n */\nexport class ActivitiesApi extends ResourceApi {\n  /**\n   * Get the list of all available activities.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of ActivityItem attributes to include in the response. If not specified, only the entityID is returned.\n   * @param params.$skip - The number of entries to skip in the response. Useful for pagination.\n   * @param params.$top - The maximum number of entries to return. If not specified, the server limits the number of entries returned.\n   * @param params.categories - Mandatory. Filters returned activities by categories. Can be specified as a single category or a comma-separated list of categories. At least one category must be specified.\n   * @param params.reverse - Indicates whether the order of returned activities is from newest to oldest (true) or oldest to newest (false). Default is false.\n   * @param params.start - Timestamp in milliseconds indicating the start of the time interval. If not set, defaults to 0.\n   * @param params.end - Timestamp in milliseconds indicating the end of the time interval. If not set, defaults to Long.MAX_VALUE.\n   * @param params.author - Filters activities by author. Can be specified as the database ID, login, Hub ID, or \"me\" for the currently logged in user.\n   * @param params.issueQuery - Issue search query to filter activities related to specific issues.\n   * @returns A list of activities matching the specified criteria.\n   */\n  async getActivities<TSchema extends ActivityItemSchema>(\n    params?: ListParams & FieldsParam<TSchema> & GetActivitiesParams,\n  ): Promise<ActivityItemEntity<TSchema>[]> {\n    return this.youtrack.fetch<ActivityItemEntity<TSchema>[]>(\n      new RequestBuilder(\n        \"api/activities\",\n        {\n          fields,\n          ...queryParams(\"$skip\", \"$top\", \"reverse\", \"categories\", \"author\", \"start\", \"end\", \"issueQuery\"),\n        },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Get information about a specific activity item.\n   * @param itemId - The ID of the activity item to retrieve.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of ActivityItem attributes to include in the response. If not specified, only the entityID is returned.\n   * @returns The details of the specified activity item.\n   */\n  async getActivityById<TSchema extends ActivityItemSchema>(\n    itemId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ActivityItemEntity<TSchema>> {\n    return this.youtrack.fetch<ActivityItemEntity<TSchema>>(\n      new RequestBuilder(`api/activities/${itemId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Read a page of activities.\n   * @param params - Parameters for the request.\n   * @param params.fields - A comma-separated list of ActivityCursorPage attributes to include in the response. If not specified, only the entityID is returned.\n   * @param params.categories - Mandatory. Filters returned activities by one or more categories. At least one category must be specified.\n   * @param params.reverse - Indicates whether the order of returned activities is from newest to oldest (true) or oldest to newest (false). Default is false.\n   * @param params.start - Timestamp in milliseconds indicating the start of the time interval. Defaults to 0 if not provided.\n   * @param params.end - Timestamp in milliseconds indicating the end of the time interval. Defaults to Long.MAX_VALUE if not provided.\n   * @param params.author - Filters activities by author. Can be specified as the database ID, login, Hub ID, or \"me\" for the currently logged in user.\n   * @param params.issueQuery - Filters activities related to specific issues using a search query.\n   * @param params.cursor - Used for pagination. Indicates the position in the activity collection to start the next page. Cursors should be taken from previous responses.\n   * @param params.activityId - ID of an activity to be included in the middle of the page. Helps to start the page from a specific activity.\n   * @returns A page of activities with pagination support, including cursors for navigation.\n   */\n  async getActivitiesPage<TSchema extends ActivityCursorPageSchema>(\n    params?: GetActivitiesPageParams & FieldsParam<TSchema>,\n  ): Promise<ActivityCursorPageEntity<TSchema>> {\n    // Perform the fetch request\n    return this.youtrack.fetch<ActivityCursorPageEntity<TSchema>>(\n      new RequestBuilder(\n        \"api/activitiesPage\",\n        {\n          fields,\n          ...queryParams(\"categories\", \"reverse\", \"author\", \"start\", \"end\", \"issueQuery\", \"cursor\", \"activityId\"),\n        },\n        params,\n      ).get(),\n    )\n  }\n}\n","import type { Agile, Sprint, Entity, FieldsParam, ListParams, Schema, DeepPartial } from \"../types\"\nimport { RequestBuilder, fields } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype AgileSchema = Schema<Agile> | undefined\ntype SprintSchema = Schema<Sprint> | undefined\n\ntype AgileEntity<TSchema extends AgileSchema> = Entity<Agile, TSchema>\ntype SprintEntity<TSchema extends SprintSchema> = Entity<Sprint, TSchema>\n\nexport type AgileTemplateParam = {\n  template?: \"kanban\" | \"scrum\" | \"version\" | \"custom\" | \"personal\"\n}\n\n/**\n * This resource lets you work with agile boards in YouTrack.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-agiles.html\n */\nexport class AgilesApi extends ResourceApi {\n  /**\n   * Get the list of all available agile boards in the system.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of Agile attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @param params.$skip - Optional. Lets you set a number of returned entities to skip before returning the first one.\n   * @param params.$top - Optional. Lets you specify the maximum number of entries that are returned in the response. If you don't set the $top value, the server limits the maximum number of returned entries.\n   * @returns The list of all available agile boards\n   */\n  async getAgiles<TSchema extends AgileSchema = undefined>(\n    params?: ListParams & FieldsParam<TSchema>,\n  ): Promise<AgileEntity<TSchema>[]> {\n    return this.youtrack.fetch<AgileEntity<TSchema>[]>(\n      new RequestBuilder(\"api/agiles\", { fields, $skip: \"number\", $top: \"number\" }, params).get(),\n    )\n  }\n\n  /**\n   * Create a new agile board\n   * @param body - Body with required fields: name, projects (id - Ids of the project that need to be associated with the board).\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of Agile attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @param params.template - The name of the board template that should be used. Possible values: kanban, scrum, version, custom, personal.\n   * @returns The created agile board.\n   */\n  async createAgile<TSchema extends AgileSchema>(\n    body: Omit<Agile, \"id\">,\n    params?: AgileTemplateParam & FieldsParam<TSchema>,\n  ): Promise<AgileEntity<TSchema>[]> {\n    return this.youtrack.fetch<AgileEntity<TSchema>[]>(\n      new RequestBuilder(\"api/agiles\", { fields, template: \"string\" }, params).post(body),\n    )\n  }\n\n  /**\n   * Get settings of the specific agile board.\n   * @param agileId - The ID of the agile board.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of Agile attributes to include in the response. If not specified, only the entityId is returned.\n   * @returns The settings of the specified agile board.\n   */\n  async getAgileById<TSchema extends AgileSchema>(\n    agileId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<AgileEntity<TSchema>> {\n    return this.youtrack.fetch<AgileEntity<TSchema>>(\n      new RequestBuilder(`api/agiles/${agileId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update settings of the specific agile board.\n   * @param agileId - The Id of the agile board.\n   * @param body - The updated settings for the agile board, excluding the Id.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of Agile attributes to include in the response. If not specified, only the entityId is returned.\n   * @returns The updated settings of the specified agile board.\n   */\n  async updateAgile<TSchema extends AgileSchema>(\n    agileId: string,\n    body: DeepPartial<Agile>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<AgileEntity<TSchema>> {\n    return this.youtrack.fetch<AgileEntity<TSchema>>(\n      new RequestBuilder(`api/agiles/${agileId}`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Delete an agile board with the specific Id.\n   * @param agileId - The Id of the agile board.\n   * @param params - Optional parameters including fields.\n   * @param params.fields - A list of Agile attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The deleted agile board information.\n   */\n  async deleteAgile<TSchema extends AgileSchema>(\n    agileId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<AgileEntity<TSchema>> {\n    return this.youtrack.fetch<AgileEntity<TSchema>>(\n      new RequestBuilder(`api/agiles/${agileId}`, { fields }, params).delete(),\n    )\n  }\n  /**\n   * Get the list of all sprints of the agile board.\n   * @param agileID - The ID of the agile board.\n   * @param params - Optional parameters including fields, $skip, and $top for pagination.\n   * @param params.fields - A list of Agile attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$skip - The number of entries to skip in the response. Useful for pagination.\n   * @param params.$top - The maximum number of entries to return. If not specified, the server limits the number of entries returned.\n   * @returns The list of sprints for the specified agile board.\n   */\n  async getAgileSprints<TSchema extends SprintSchema>(\n    agileId: string,\n    params?: ListParams & FieldsParam<TSchema>,\n  ): Promise<SprintEntity<TSchema>[]> {\n    return this.youtrack.fetch<SprintEntity<TSchema>[]>(\n      new RequestBuilder(`api/agiles/${agileId}/sprints`, { fields, $skip: \"number\", $top: \"number\" }, params).get(),\n    )\n  }\n\n  /**\n   * Create a new sprint for the specified agile board.\n   * @param agileID - The ID of the agile board.\n   * @param body - The new sprint details including the required field: name.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - Optional. A list of Sprint attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Optional. Set this parameter to true if no notifications should be sent on changes made by this request.\n   * @returns The created sprint.\n   */\n  async createAgileSprint<TSchema extends SprintSchema>(\n    agileId: string,\n    body: { name: string } | DeepPartial<Sprint>, // Required field: name\n    params?: FieldsParam<TSchema> & { muteUpdateNotifications?: boolean },\n  ): Promise<SprintEntity<TSchema>> {\n    return this.youtrack.fetch<SprintEntity<TSchema>>(\n      new RequestBuilder(`api/agiles/${agileId}/sprints`, { fields, muteUpdateNotifications: \"boolean\" }, params).post(\n        body,\n      ),\n    )\n  }\n\n  /**\n   * Get settings of the specific sprint of the agile board.\n   * @param agileId - The Id of the agile board.\n   * @param sprintId - The Id of the sprint or \"current\" for the current sprint.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - Optional. A list of Sprint attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The settings of the specified sprint.\n   */\n  async getAgileSprintById<TSchema extends SprintSchema>(\n    agileId: string,\n    sprintId: string | \"current\",\n    params?: FieldsParam<TSchema>,\n  ): Promise<SprintEntity<TSchema>> {\n    return this.youtrack.fetch<SprintEntity<TSchema>>(\n      new RequestBuilder(`api/agiles/${agileId}/sprints/${sprintId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Delete the specific sprint from the agile board.\n   * @param agileId - The Id of the agile board.\n   * @param sprintId - The Id of the sprint to be deleted.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - Optional. A list of Sprint attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The deleted sprint information.\n   */\n  async deleteAgileSprint<TSchema extends SprintSchema>(\n    agileId: string,\n    sprintId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<SprintEntity<TSchema>> {\n    return this.youtrack.fetch<SprintEntity<TSchema>>(\n      new RequestBuilder(`api/agiles/${agileId}/sprints/${sprintId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Update the specific sprint of the agile board.\n   * @param agileId - The Id of the agile board.\n   * @param sprintId - The Id of the sprint or \"current\" for the current sprint.\n   * @param body - The updated sprint details excluding the Id.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of Sprint attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The updated sprint information.\n   */\n  async updateAgileSprint<TSchema extends SprintSchema>(\n    agileId: string,\n    sprintId: string | \"current\",\n    body: DeepPartial<Sprint>, // Body contains the updated sprint settings\n    params?: FieldsParam<TSchema>,\n  ): Promise<SprintEntity<TSchema>> {\n    return this.youtrack.fetch<SprintEntity<TSchema>>(\n      new RequestBuilder(`api/agiles/${agileId}/sprints/${sprintId}`, { fields }, params).post(body),\n    )\n  }\n}\n","import type {\n  Article,\n  ArticleAttachment,\n  ArticleComment,\n  DeepPartial,\n  Entity,\n  FieldsParam,\n  ListParams,\n  MuteUpdateNotificationsParam,\n  Reaction,\n  Schema,\n  Tag,\n} from \"../types\"\nimport { fields, queryParams, RequestBuilder } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype ArticleSchema = Schema<Article>\ntype ArticleCommentSchema = Schema<ArticleComment>\ntype ArticleAttachmentSchema = Schema<ArticleAttachment>\ntype ReactionSchema = Schema<Reaction>\ntype TagSchema = Schema<Tag>\n\ntype ArticleEntity<TSchema extends ArticleSchema> = Entity<Article, TSchema>\ntype ArticleCommentEntity<TSchema extends ArticleCommentSchema> = Entity<ArticleComment, TSchema>\ntype ArticleAttachmentEntity<TSchema extends ArticleAttachmentSchema> = Entity<ArticleAttachment, TSchema>\ntype ReactionEntity<TSchema extends ReactionSchema> = Entity<Reaction, TSchema>\ntype TagEntity<TSchema extends TagSchema> = Entity<Tag, TSchema>\n\n/**\n * This resource lets you access articles in the YouTrack knowledge base.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-articles.html\n */\nexport class ArticlesApi extends ResourceApi {\n  /**\n   * Gets all articles.\n   * @param params.fields - A list of Article attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Specifies the maximum number of entries that are returned in the response.\n   * @param params.$skip - Optional. Specifies the number of returned entities to skip before returning the first one.\n   * @returns The list of articles.\n   */\n  async getArticles<TSchema extends ArticleSchema>(\n    params?: ListParams & FieldsParam<TSchema>,\n  ): Promise<ArticleEntity<TSchema>[]> {\n    return this.youtrack.fetch<ArticleEntity<TSchema>[]>(\n      new RequestBuilder(\"api/articles\", { fields, ...queryParams(\"$top\", \"$skip\") }, params).get(),\n    )\n  }\n\n  /**\n   * Creates a new article.\n   * @param body - Required fields: id (the database ID of the article to be linked as a sub-article).\n   * @param params.fields - A list of Article attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.draftId - ID of a draft to publish as a new article. If no draftId is provided, the article is created from scratch. In this case, you must specify the project in the request payload.\n   * @param params.muteUpdateNotifications - Set to true if no notifications should be sent on changes made by this request.\n   * @returns The created article.\n   */\n  async createArticle<TSchema extends ArticleSchema>(\n    body: { id: string } | Partial<Article>,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam & { draftId?: string },\n  ): Promise<ArticleEntity<TSchema>> {\n    return this.youtrack.fetch<ArticleEntity<TSchema>>(\n      new RequestBuilder(\"api/articles\", { fields, ...queryParams(\"muteUpdateNotifications\", \"draftId\") }, params).post(\n        body,\n      ),\n    )\n  }\n\n  /**\n   * Reads an article with a specific ID.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param params.fields - A list of Article attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The requested article.\n   */\n  async getArticle<TSchema extends ArticleSchema>(\n    articleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ArticleEntity<TSchema>> {\n    return this.youtrack.fetch<ArticleEntity<TSchema>>(\n      new RequestBuilder(`api/articles/${articleId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Updates a single article.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param body - The updated article data.\n   * @param params.fields - A list of Article attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set this parameter to true if no notifications should be sent on changes made by this request. This doesn't mute notifications sent by any workflow rules. Using this parameter requires Apply Commands Silently permission in all projects affected by the request.\n   * @returns The updated article.\n   */\n  async updateArticle<TSchema extends ArticleSchema>(\n    articleId: string,\n    body: DeepPartial<Article>,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<ArticleEntity<TSchema>> {\n    return this.youtrack.fetch<ArticleEntity<TSchema>>(\n      new RequestBuilder(`api/articles/${articleId}`, { fields, muteUpdateNotifications: \"string\" }, params).post(body),\n    )\n  }\n\n  /**\n   * Deletes an article. Note that this operation cannot be undone.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param params.fields - A list of Article attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The deleted article.\n   */\n  async deleteArticle<TSchema extends ArticleSchema>(\n    articleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ArticleEntity<TSchema>> {\n    return this.youtrack.fetch<ArticleEntity<TSchema>>(\n      new RequestBuilder(`api/articles/${articleId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Gets a list of all attachments to a specific article.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param params.fields - A list of ArticleAttachment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Specifies the maximum number of entries that are returned in the response.\n   * @param params.$skip - Optional. Specifies the number of returned entities to skip before returning the first one.\n   * @returns The list of attachments for the specified article.\n   */\n  async getArticleAttachments<TSchema extends ArticleAttachmentSchema>(\n    articleId: string,\n    params?: ListParams & FieldsParam<TSchema>,\n  ): Promise<ArticleAttachmentEntity<TSchema>[]> {\n    return this.youtrack.fetch<ArticleAttachmentEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/articles/${articleId}/attachments`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Adds an attachment to the article.\n   * @param articleId - ID of the article to which the attachment will be added. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param body - A FormData object with attachment data.\n   * @param params.fields - A list of ArticleAttachment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set to true if no notifications should be sent on changes made by this request.\n   * @returns The added attachment.\n   */\n  async createArticleAttachment<TSchema extends ArticleAttachmentSchema>(\n    articleId: string,\n    body: FormData,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<ArticleAttachmentEntity<TSchema>> {\n    return this.youtrack.fetch<ArticleAttachmentEntity<TSchema>>(\n      new RequestBuilder(\n        `api/articles/${articleId}/attachments`,\n        { fields, muteUpdateNotifications: \"string\" },\n        params,\n      ).postFile(body),\n    )\n  }\n\n  /**\n   * Reads a specific attachment in the article.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param attachmentId - The database ID of the attachment.\n   * @param params.fields - A list of ArticleAttachment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The requested article attachment.\n   */\n  async getArticleAttachment<TSchema extends ArticleAttachmentSchema>(\n    articleId: string,\n    attachmentId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ArticleAttachmentEntity<TSchema>> {\n    return this.youtrack.fetch<ArticleAttachmentEntity<TSchema>>(\n      new RequestBuilder(`api/articles/${articleId}/attachments/${attachmentId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Updates a specific attachment in the article.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param attachmentId - The database ID of the attachment.\n   * @param body - The fields of the attachment to update.\n   * @param params.fields - A list of ArticleAttachment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The updated article attachment.\n   */\n  async updateArticleAttachment<TSchema extends ArticleAttachmentSchema>(\n    articleId: string,\n    attachmentId: string,\n    body: DeepPartial<ArticleAttachment>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ArticleAttachmentEntity<TSchema>> {\n    return this.youtrack.fetch<ArticleAttachmentEntity<TSchema>>(\n      new RequestBuilder(`api/articles/${articleId}/attachments/${attachmentId}`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Deletes a specific attachment from the article.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param attachmentId - The database ID of the attachment.\n   * @param params.fields - A list of ArticleAttachment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The deleted article attachment.\n   */\n  async deleteArticleAttachment<TSchema extends ArticleAttachmentSchema>(\n    articleId: string,\n    attachmentId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<void> {\n    return this.youtrack.fetch<void>(\n      new RequestBuilder(`api/articles/${articleId}/attachments/${attachmentId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Gets the list of sub-articles of the current article.\n   * @param articleId - ID of the parent article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param params.fields - A list of Article attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Specifies the maximum number of entries that are returned in the response.\n   * @param params.$skip - Optional. Specifies the number of returned entities to skip before returning the first one.\n   * @returns The list of sub-articles.\n   */\n  async getChildArticles<TSchema extends ArticleSchema>(\n    articleId: string,\n    params?: ListParams & FieldsParam<TSchema>,\n  ): Promise<ArticleEntity<TSchema>[]> {\n    return this.youtrack.fetch<ArticleEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/articles/${articleId}/childArticles`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Adds a new sub-article to the current article.\n   * @param articleId - ID of the parent article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param body - Contains the ID of the sub-article to be linked.\n   * @param params.fields - A list of Article attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Optional. Set to true to mute notifications sent on changes made by this request.\n   * @returns The updated parent article with the sub-article.\n   */\n  async addChildArticle<TSchema extends ArticleSchema>(\n    articleId: string,\n    body: { id: string } | Partial<Article>,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<ArticleEntity<TSchema>> {\n    return this.youtrack.fetch<ArticleEntity<TSchema>>(\n      new RequestBuilder(\n        `api/articles/${articleId}/childArticles`,\n        { fields, ...queryParams(\"muteUpdateNotifications\") },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Gets a specific sub-article of the current article.\n   * @param articleId - Id of the parent article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param subArticleId - Id of the sub-article to retrieve.\n   * @param params.fields - A list of Article attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The requested sub-article.\n   */\n  async getChildArticle<TSchema extends ArticleSchema>(\n    articleId: string,\n    subArticleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ArticleEntity<TSchema>> {\n    return this.youtrack.fetch<ArticleEntity<TSchema>>(\n      new RequestBuilder(`api/articles/${articleId}/childArticles/${subArticleId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Updates a specific sub-article.\n   * @param articleId - ID of the parent article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param subArticleId - ID of the sub-article to update.\n   * @param body - The updated sub-article content.\n   * @param params.fields - A list of Article attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set to true if no notifications should be sent on changes made by this request.\n   * @returns The updated sub-article.\n   */\n  async updateChildArticle<TSchema extends ArticleSchema>(\n    articleId: string,\n    subArticleId: string,\n    body: DeepPartial<Article>,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<ArticleEntity<TSchema>> {\n    return this.youtrack.fetch<ArticleEntity<TSchema>>(\n      new RequestBuilder(\n        `api/articles/${articleId}/childArticles/${subArticleId}`,\n        { fields, muteUpdateNotifications: \"boolean\" },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Removes the parent-child link between the specific sub-article and the current article.\n   * This operation does not delete the specified sub-article.\n   * @param articleId - ID of the parent article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param subArticleId - ID of the sub-article to unlink.\n   * @param params.fields - A list of Article attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The unlinked sub-article entity.\n   */\n  async removeChildArticleLink<TSchema extends ArticleSchema>(\n    articleId: string,\n    subArticleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ArticleEntity<TSchema>> {\n    return this.youtrack.fetch<ArticleEntity<TSchema>>(\n      new RequestBuilder(`api/articles/${articleId}/childArticles/${subArticleId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Gets all accessible comments to a specific article.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param params.fields - A list of ArticleComment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Specifies the maximum number of entries that are returned in the response.\n   * @param params.$skip - Optional. Specifies the number of returned entities to skip before returning the first one.\n   * @returns The list of article comments.\n   */\n  async getArticleComments<TSchema extends ArticleCommentSchema>(\n    articleId: string,\n    params?: ListParams & FieldsParam<TSchema>,\n  ): Promise<ArticleCommentEntity<TSchema>[]> {\n    return this.youtrack.fetch<ArticleCommentEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/articles/${articleId}/comments`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Adds a new comment to the article.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param body - Required fields: text.\n   * @param params.fields - A list of ArticleComment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.draftId - Optional. The ID of an existing draft that should be published.\n   * @param params.muteUpdateNotifications - Optional. Set this to true to suppress notifications on changes made by this request.\n   * @returns The added comment.\n   */\n  async createArticleComment<TSchema extends ArticleCommentSchema>(\n    articleId: string,\n    body: { text: string } | DeepPartial<ArticleComment>,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam & { draftId?: string },\n  ): Promise<ArticleCommentEntity<TSchema>> {\n    return this.youtrack.fetch<ArticleCommentEntity<TSchema>>(\n      new RequestBuilder(\n        `api/articles/${articleId}/comments`,\n        { fields, ...queryParams(\"draftId\", \"muteUpdateNotifications\") },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Reads a comment with a specific ID.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param commentId - The database ID of the comment.\n   * @param params.fields - A list of ArticleComment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The specified comment.\n   */\n  async getArticleComment<TSchema extends ArticleCommentSchema>(\n    articleId: string,\n    commentId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ArticleCommentEntity<TSchema>> {\n    return this.youtrack.fetch<ArticleCommentEntity<TSchema>>(\n      new RequestBuilder(`api/articles/${articleId}/comments/${commentId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Updates an existing comment to a specific article.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param commentId - The database ID of the comment.\n   * @param body - Comment parameters\n   * @param params.fields - A list of ArticleComment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set this parameter to true if no notifications should be sent on changes made by this request.\n   * @returns The updated comment.\n   */\n  async updateArticleComment<TSchema extends ArticleCommentSchema>(\n    articleId: string,\n    commentId: string,\n    body: { text: string } | DeepPartial<ArticleComment>,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<ArticleCommentEntity<TSchema>> {\n    return this.youtrack.fetch<ArticleCommentEntity<TSchema>>(\n      new RequestBuilder(\n        `api/articles/${articleId}/comments/${commentId}`,\n        { fields, muteUpdateNotifications: \"boolean\" },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Deletes an existing comment to a specific article.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param commentId - The database ID of the comment.\n   * @param params.fields - A list of ArticleComment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The deleted comment.\n   */\n  async deleteArticleComment<TSchema extends ArticleCommentSchema>(\n    articleId: string,\n    commentId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ArticleCommentEntity<TSchema>> {\n    return this.youtrack.fetch<ArticleCommentEntity<TSchema>>(\n      new RequestBuilder(`api/articles/${articleId}/comments/${commentId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Gets all accessible reactions to a specific article comment.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param commentId - The database ID of the comment.\n   * @param params.fields - A list of Reaction attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Specifies the maximum number of entries that are returned in the response.\n   * @param params.$skip - Optional. Specifies the number of returned entities to skip before returning the first one.\n   * @returns The list of reactions to the comment.\n   */\n  async getArticleCommentReactions<TSchema extends ReactionSchema>(\n    articleId: string,\n    commentId: string,\n    params?: ListParams & FieldsParam<TSchema>,\n  ): Promise<ReactionEntity<TSchema>[]> {\n    return this.youtrack.fetch<ReactionEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/articles/${articleId}/comments/${commentId}/reactions`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Adds a new reaction to a comment with a specific ID.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param commentId - The database ID of the comment.\n   * @param body - The reaction paramenters. Required fields: reaction.\n   * @param params.fields - A list of Reaction attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The added reaction.\n   */\n  async createCommentReaction<TSchema extends ReactionSchema>(\n    articleId: string,\n    commentId: string,\n    body: { reaction: string } | DeepPartial<Reaction>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ReactionEntity<TSchema>> {\n    return this.youtrack.fetch<ReactionEntity<TSchema>>(\n      new RequestBuilder(`api/articles/${articleId}/comments/${commentId}/reactions`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Gets a reaction with a specific ID.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param commentId - The database ID of the comment.\n   * @param reactionId - The database ID of the reaction.\n   * @param params.fields - A list of Reaction attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The specified reaction.\n   */\n  async getCommnetReaction<TSchema extends ReactionSchema>(\n    articleId: string,\n    commentId: string,\n    reactionId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ReactionEntity<TSchema>> {\n    return this.youtrack.fetch<ReactionEntity<TSchema>>(\n      new RequestBuilder(\n        `api/articles/${articleId}/comments/${commentId}/reactions/${reactionId}`,\n        { fields },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Removes a reaction from a comment. Only the author of the reaction can remove it.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param commentId - The database ID of the comment.\n   * @param reactionId - The database ID of the reaction.\n   * @param params.fields - A list of Reaction attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The result of the delete operation.\n   */\n  async removeCommnetReaction<TSchema extends ReactionSchema>(\n    articleId: string,\n    commentId: string,\n    reactionId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ReactionEntity<TSchema>> {\n    return this.youtrack.fetch<ReactionEntity<TSchema>>(\n      new RequestBuilder(\n        `api/articles/${articleId}/comments/${commentId}/reactions/${reactionId}`,\n        { fields },\n        params,\n      ).delete(),\n    )\n  }\n\n  /**\n   * Gets the article that is the parent for the current one.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param params.fields - A list of Article attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The parent article.\n   */\n  async getParentArticle<TSchema extends ArticleSchema>(\n    articleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ArticleEntity<TSchema>> {\n    return this.youtrack.fetch<ArticleEntity<TSchema>>(\n      new RequestBuilder(`api/articles/${articleId}/parentArticle`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Gets all tags added to the article that are visible to the current user.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param params.fields - A list of Tag attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Specifies the maximum number of entries that are returned in the response.\n   * @param params.$skip - Optional. Specifies the number of returned entities to skip before returning the first one.\n   * @returns The list of tags.\n   */\n  async getArticleTags<TSchema extends TagSchema>(\n    articleId: string,\n    params?: ListParams & FieldsParam<TSchema>,\n  ): Promise<TagEntity<TSchema>[]> {\n    return this.youtrack.fetch<TagEntity<TSchema>[]>(\n      new RequestBuilder(`api/articles/${articleId}/tags`, { fields, ...queryParams(\"$top\", \"$skip\") }, params).get(),\n    )\n  }\n\n  /**\n   * Tags the article with an existing tag.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param body - Tag parameters. Required fields: id - the database ID of the tag.\n   * @param params.fields - A list of Tag attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The tagged article with updated information.\n   */\n  async createArticleTag<TSchema extends TagSchema>(\n    articleId: string,\n    body: { id: string } | DeepPartial<Tag>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<TagEntity<TSchema>> {\n    return this.youtrack.fetch<TagEntity<TSchema>>(\n      new RequestBuilder(`api/articles/${articleId}/tags`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Reads a specific tag added to the article.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param tagId - The database ID of the tag.\n   * @param params.fields - A list of Tag attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The requested tag.\n   */\n  async getArticleTag<TSchema extends TagSchema>(\n    articleId: string,\n    tagId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<TagEntity<TSchema>> {\n    return this.youtrack.fetch<TagEntity<TSchema>>(\n      new RequestBuilder(`api/articles/${articleId}/tags/${tagId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Removes a specific tag from the article.\n   * @param articleId - ID of the article. You can specify either the database ID (for example, 226-0) or the article ID in the project (for example, NP-A-1).\n   * @param tagId - Database ID of the tag.\n   * @param params.fields - A list of Tag attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The response after removing the tag.\n   */\n  async removeArticleTag<TSchema extends TagSchema>(\n    articleId: string,\n    tagId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<TagEntity<TSchema>> {\n    return this.youtrack.fetch<TagEntity<TSchema>>(\n      new RequestBuilder(`api/articles/${articleId}/tags/${tagId}`, { fields }, params).delete(),\n    )\n  }\n}\n","import type { CommandList, DeepPartial, Entity, FieldsParam, MuteUpdateNotificationsParam, Schema } from \"../types\"\nimport { fields, RequestBuilder } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype CommandListSchema = Schema<CommandList>\ntype CommandListEntity<TSchema extends CommandListSchema> = Entity<CommandList, TSchema>\n\n/**\n * This resource lets you apply commands to issues.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-commands.html\n */\nexport class CommandsApi extends ResourceApi {\n  /**\n   * Applies a command to the specified issues.\n   * @param body - Required fields: query - the command to apply, issues (id or idReadable of at least one issue that the command will be applied to).\n   * @param params.fields - A list of CommandList attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set this parameter to true if no notifications should be sent on changes made by this request.\n   * @returns The result of the command application.\n   */\n  async applyCommandToIssues<TSchema extends CommandListSchema>(\n    body: DeepPartial<CommandList>,\n    params?: FieldsParam<TSchema> | MuteUpdateNotificationsParam,\n  ): Promise<CommandListEntity<TSchema>> {\n    return this.youtrack.fetch<CommandListEntity<TSchema>>(\n      new RequestBuilder(\"api/commands\", { fields, muteUpdateNotifications: \"string\" }, params).post(body),\n    )\n  }\n\n  /**\n   * Gets command suggestions for the specified query.\n   * @param body - Required fields: query - the command that you'll get suggestions for.\n   * @param params.fields - A list of CommandList attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A list of command suggestions based on the specified query.\n   */\n  async getCommandSuggestions<TSchema extends CommandListSchema>(\n    body: DeepPartial<CommandList>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<CommandListEntity<TSchema>> {\n    return this.youtrack.fetch<CommandListEntity<TSchema>>(\n      new RequestBuilder(\"api/commands/assist\", { fields }, params).post(body),\n    )\n  }\n}\n","import type { Entity, FieldsParam, ListParams, Schema, UserGroup } from \"../types\"\nimport { fields, queryParams, RequestBuilder } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype UserGroupSchema = Schema<UserGroup>\ntype UserGroupEntity<TSchema extends UserGroupSchema> = Entity<UserGroup, TSchema>\n\n/**\n * This resource lets you read the list of user groups and specific user group in YouTrack.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-groups.html\n */\nexport class GroupsApi extends ResourceApi {\n  /**\n   * Read the list of user groups in YouTrack.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of UserGroup attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Lets you specify the maximum number of entries that are returned in the response.\n   * @param params.$skip - Optional. Lets you set a number of returned entities to skip before returning the first one.\n   * @returns The list of user groups.\n   */\n  async getUserGroups<TSchema extends UserGroupSchema>(\n    params?: FieldsParam<TSchema> | ListParams,\n  ): Promise<UserGroupEntity<TSchema>> {\n    return this.youtrack.fetch<UserGroupEntity<TSchema>>(\n      new RequestBuilder(\"api/groups\", { fields, ...queryParams(\"$top\", \"$skip\") }, params).get(),\n    )\n  }\n\n  /**\n   * Read attributes of the specific user group.\n   * @param groupId - Database ID of the user group in YouTrack.\n   * @param params.fields - A list of UserGroup attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The user group with the specified ID.\n   */\n  async getUserGroupById<TSchema extends UserGroupSchema>(\n    groupId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<UserGroupEntity<TSchema>> {\n    return this.youtrack.fetch<UserGroupEntity<TSchema>>(\n      new RequestBuilder(`api/groups/${groupId}`, { fields }, params).get(),\n    )\n  }\n}\n","import type { DeepPartial, Entity, FieldsParam, IssueLinkType, ListParams, Schema } from \"../types\"\nimport { fields, queryParams, RequestBuilder } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype IssueLinkTypeSchema = Schema<IssueLinkType>\ntype IssueLinkTypeEntity<TSchema extends IssueLinkTypeSchema> = Entity<IssueLinkType, TSchema>\n\n/**\n * This resource provides operations with issue link types.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-issueLinkTypes.html\n */\nexport class IssueLinkTypesApi extends ResourceApi {\n  /**\n   * Gets the list of all available link types in the system.\n   * @param params.fields - A list of IssueLinkType attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.top - Optional. The maximum number of entries to return in the response. The server returns a maximum of 42 entries if not specified.\n   * @param params.skip - Optional. The number of entries to skip before returning the first one.\n   * @returns A list of available issue link types.\n   */\n  async getIssueLinkTypes<TSchema extends IssueLinkTypeSchema>(\n    params?: FieldsParam<TSchema> | ListParams,\n  ): Promise<IssueLinkTypeEntity<TSchema>> {\n    return this.youtrack.fetch<IssueLinkTypeEntity<TSchema>>(\n      new RequestBuilder(\"api/issueLinkTypes\", { fields, ...queryParams(\"$top\", \"$skip\") }, params).get(),\n    )\n  }\n\n  /**\n   * Creates a new issue link type.\n   * @param body - Required fields: name, targetToSource, sourceToTarget.\n   * @param params.fields - A list of IssueLinkType attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The created issue link type.\n   */\n  async createIssueLinkType<TSchema extends IssueLinkTypeSchema>(\n    body: { name: string; targetToSource: string; sourceToTarget: string } | DeepPartial<IssueLinkType>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueLinkTypeEntity<TSchema>> {\n    return this.youtrack.fetch<IssueLinkTypeEntity<TSchema>>(\n      new RequestBuilder(\"api/issueLinkTypes\", { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Gets the attributes of the specified issue link type.\n   * @param typeId - The Id of the issue link type.\n   * @param fields - A list of IssueLinkType attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The specified issue link type.\n   */\n  async getIssueLinkType<TSchema extends IssueLinkTypeSchema>(\n    typeId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueLinkTypeEntity<TSchema>> {\n    return this.youtrack.fetch<IssueLinkTypeEntity<TSchema>>(\n      new RequestBuilder(`api/issueLinkTypes/${typeId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Updates the specified issue link type.\n   * @param typeId - The ID of the issue link type to update.\n   * @param body - The attributes to update for the issue link type.\n   * @param params.fields - A list of IssueLinkType attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The updated issue link type.\n   */\n  async updateIssueLinkType<TSchema extends IssueLinkTypeSchema>(\n    typeId: string,\n    body: DeepPartial<IssueLinkType>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueLinkTypeEntity<TSchema>> {\n    return this.youtrack.fetch<IssueLinkTypeEntity<TSchema>>(\n      new RequestBuilder(`api/issueLinkTypes/${typeId}`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Deletes the link type and its usages.\n   * @param typeId - The Id of the issue link type to delete.\n   * @param params.fields - A list of IssueLinkType attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The response from the deletion operation.\n   */\n  async deleteIssueLinkType<TSchema extends IssueLinkTypeSchema>(\n    typeId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<void> {\n    return this.youtrack.fetch<void>(new RequestBuilder(`api/issueLinkTypes/${typeId}`, { fields }, params).delete())\n  }\n}\n","import type {\n  ActivityCursorPage,\n  ActivityItem,\n  CustomFieldsParam,\n  Entity,\n  FieldsParam,\n  ListParams,\n  MuteUpdateNotificationsParam,\n  Project,\n  QueryParam,\n  Schema,\n  Sprint,\n  Issue,\n  IssueCountResponse,\n  IssueCustomField,\n  DeepPartial,\n} from \"../types\"\nimport { fields, queryParams, RequestBuilder } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype IssueSchema = Schema<Issue>\ntype ActivityItemSchema = Schema<ActivityItem>\ntype IssueCountResponseSchema = Schema<IssueCountResponse>\ntype ActivityCursorPageSchema = Schema<ActivityCursorPage>\ntype IssueCustomFieldSchema = Schema<IssueCustomField>\ntype ProjectSchema = Schema<Project>\ntype SprintSchema = Schema<Sprint>\n\ntype IssueEntity<TSchema extends IssueSchema> = Entity<Issue, TSchema>\ntype ActivityItemEntity<TSchema extends ActivityItemSchema> = Entity<ActivityItem, TSchema>\ntype IssueCountResponseEntity<TSchema extends IssueCountResponseSchema> = Entity<IssueCountResponse, TSchema>\ntype ActivityCursorPageEntity<TSchema extends ActivityCursorPageSchema> = Entity<ActivityCursorPage, TSchema>\ntype IssueCustomFieldEntity<TSchema extends IssueCustomFieldSchema> = Entity<IssueCustomField, TSchema>\ntype ProjectEntity<TSchema extends ProjectSchema> = Entity<Project, TSchema>\ntype SprintEntity<TSchema extends SprintSchema> = Entity<Sprint, TSchema>\n\n/**\n * Resource that provides access to issues.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-issues.html\n */\nexport class IssuesApi extends ResourceApi {\n  /**\n   * Get all issues that match the specified query.\n   * @param fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Lets you specify the maximum number of entries that are returned in the response. If you don't set the $top value, the server limits the maximum number of returned entries.\n   * @param params.$skip - Optional. Lets you set a number of returned entities to skip before returning the first one.\n   * @param params.query - Issue search query. Read more about the search syntax here: Search Query Reference.\n   * @param params.customFields - The name of the custom field to show in the response. When you use this parameter and request the custom field data in the request URL, the response only shows the requested custom fields instead of all of them.\n   * @returns The list of issues that match the specified query.\n   */\n  async getIssues<TSchema extends IssueSchema>(\n    params?: FieldsParam<TSchema> | ListParams | CustomFieldsParam | QueryParam,\n  ): Promise<IssueEntity<TSchema>[]> {\n    return this.youtrack.fetch<IssueEntity<TSchema>[]>(\n      new RequestBuilder(\n        \"api/issues\",\n        { fields, ...queryParams(\"$top\", \"$skip\", \"query\", \"customFields\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Create a new issue.\n   * @param body.summary - The summary of the issue.\n   * @param body.project - The project identifier.\n   * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set to true if no notifications should be sent on changes made by this request.\n   * @param params.draftId - The ID of the issue draft to create issue from.\n   * @returns The created issue.\n   */\n  async createIssue<TSchema extends IssueSchema>(\n    body: { summary: string; project: { id: string } } & DeepPartial<Omit<Issue, \"project\">>,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam & { draftId?: string },\n  ): Promise<IssueEntity<TSchema>> {\n    return this.youtrack.fetch<IssueEntity<TSchema>>(\n      new RequestBuilder(\"api/issues\", { fields, ...queryParams(\"draftId\", \"muteUpdateNotifications\") }, params).post(\n        body,\n      ),\n    )\n  }\n\n  /**\n   * Read an issue with specific ID.\n   * @param issueId - The database ID or project ID of the issue.\n   * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The requested issue.\n   */\n  async getIssueById<TSchema extends IssueSchema>(\n    issueId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueEntity<TSchema>> {\n    return this.youtrack.fetch<IssueEntity<TSchema>>(\n      new RequestBuilder(`api/issues/${issueId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update a single issue.\n   * @param issueId - The database ID or project ID of the issue.\n   * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set to true if no notifications should be sent on changes made by this request.\n   * @returns The updated issue.\n   */\n  async updateIssue<TSchema extends IssueSchema>(\n    issueId: string,\n    body: DeepPartial<Issue>,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<IssueEntity<TSchema>> {\n    return this.youtrack.fetch<IssueEntity<TSchema>>(\n      new RequestBuilder(`api/issues/${issueId}`, { fields, muteUpdateNotifications: \"boolean\" }, params).post(body),\n    )\n  }\n\n  /**\n   * Delete the issue. Note that this operation cannot be undone.\n   * @param issueId - The database ID or project ID of the issue.\n   * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves when the issue is deleted.\n   */\n  async deleteIssue<TSchema extends IssueSchema>(\n    issueId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueEntity<TSchema>> {\n    return this.youtrack.fetch<IssueEntity<TSchema>>(\n      new RequestBuilder(`api/issues/${issueId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Get the number of issues found by a search.\n   * @param query - The search query to get the number of issues for.\n   * @param fields - A list of IssueCountResponse attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the count of issues.\n   */\n  async getIssueCount<TSchema extends IssueCountResponseSchema>(\n    body: { query: string },\n    params?: FieldsParam<TSchema>,\n  ): Promise<{ count: number } & IssueCountResponseEntity<TSchema>> {\n    const response = await this.youtrack.fetch<{ count: number } & IssueCountResponseEntity<TSchema>>(\n      new RequestBuilder(\"api/issuesGetter/count\", { fields }).post(body),\n    )\n    if (response.count === -1) {\n      // TODO: add pause\n      return this.getIssueCount(body, params)\n    }\n    return response\n  }\n\n  /**\n   * Get a list of all activities in the specific issue.\n   * @param issueId - The ID of the issue.\n   * @param params.fields - A list of ActivityItem attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.categories - Mandatory. Filters returned activities by categories. You must specify at least one category per request.\n   * @param params.reverse - Indicates whether the order of returning activities is from newest to oldest or the opposite. Default is false.\n   * @param params.start - The start of the time interval for the activity timestamp in milliseconds. If not set, defaults to 0.\n   * @param params.end - The end of the time interval for the activity timestamp in milliseconds. If not set, defaults to Long.MAX_VALUE.\n   * @param params.author - Filters activities by the author. Can be the database ID, login, Hub ID, or 'me' for the currently logged in user.\n   * @param params.$top - Optional. Specifies the maximum number of entries to return in the response. Default limits apply if not set.\n   * @param params.$skip - Optional. Lets you set a number of returned entities to skip before returning the first one.\n   * @returns A promise that resolves to a list of activities.\n   */\n  async getIssueActivities<TSchema extends ActivityItemSchema>(\n    issueId: string,\n    params?: FieldsParam<TSchema> &\n      ListParams & {\n        categories: string\n        reverse?: boolean\n        start?: string\n        end?: string\n        author?: string\n      },\n  ): Promise<ActivityItemEntity<TSchema>[]> {\n    return this.youtrack.fetch<ActivityItemEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/issues/${issueId}/activities`,\n        {\n          fields,\n          ...queryParams(\"$top\", \"$skip\", \"categories\", \"reverse\", \"start\", \"end\", \"author\"),\n        },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Get information about the specific activity in the specific issue.\n   * @param issueId - The Id of the issue.\n   * @param itemId - The database ID of the activity item.\n   * @param params.fields - A list of ActivityItem attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the activity item.\n   */\n  async getIssueActivity<TSchema extends ActivityItemSchema>(\n    issueId: string,\n    itemId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ActivityItemEntity<TSchema>> {\n    return this.youtrack.fetch<ActivityItemEntity<TSchema>>(\n      new RequestBuilder(`api/issues/${issueId}/activities/${itemId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Read a page of activities in the specific issue.\n   * @param issueId - The Id of the issue.\n   * @param params - Parameters for the request.\n   * @param params.fields - A list of ActivityCursorPage attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.categories - Mandatory. Filters returned activities by categories. You must specify at least one category per request.\n   * @param params.reverse - Indicates whether the order of returning activities is from newest to oldest (true) or oldest to newest (false). Defaults to false.\n   * @param params.start - The timestamp in milliseconds indicating the start of the time interval for the activity timestamp. Defaults to 0 if not set.\n   * @param params.end - The timestamp in milliseconds indicating the end of the time interval for the activity timestamp. Defaults to Long.MAX_VALUE if not set.\n   * @param params.author - Filters activities by the author. You can specify the database ID, login, Hub ID, or 'me' for the currently logged in user.\n   * @param params.cursor - For pagination. Use the cursor from the returned activity page to request the next page.\n   * @param params.activityId - ID of the activity to include in the page. This activity is centered on the page.\n   * @returns A promise that resolves to the page of activity items.\n   */\n  async getActivitiesPage<TSchema extends ActivityCursorPageSchema>(\n    issueId: string,\n    params?: FieldsParam<TSchema> & {\n      categories: string\n      reverse?: boolean\n      start?: string\n      end?: string\n      author?: string\n      cursor?: string\n      activityId?: string\n    },\n  ): Promise<ActivityCursorPageEntity<TSchema>> {\n    return this.youtrack.fetch<ActivityCursorPageEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/activitiesPage`,\n        { fields, ...queryParams(\"categories\", \"reverse\", \"start\", \"end\", \"author\", \"cursor\", \"activityId\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Get the list of available custom fields of the issue.\n   * @param issueId - The ID of the issue.\n   * @param params.fields - A list of IssueCustomField attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Specifies the maximum number of entries to return. The server returns a maximum of 42 entries if not specified.\n   * @param params.$skip - Optional. Specifies the number of entries to skip before returning the first one.\n   * @returns A promise that resolves to the list of custom fields.\n   */\n  async getIssueCustomFields<TSchema extends IssueCustomFieldSchema>(\n    issueId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<IssueCustomFieldEntity<TSchema>[]> {\n    return this.youtrack.fetch<IssueCustomFieldEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/issues/${issueId}/customFields`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Get a specific custom field in the issue.\n   * @param issueId - The ID of the issue.\n   * @param fieldId - The entity ID of the custom field in the issue.\n   * @param params.fields - A list of IssueCustomField attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the custom field.\n   */\n  async getIssueCustomFieldById<TSchema extends IssueCustomFieldSchema>(\n    issueId: string,\n    fieldId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueCustomFieldEntity<TSchema>> {\n    return this.youtrack.fetch<IssueCustomFieldEntity<TSchema>>(\n      new RequestBuilder(`api/issues/${issueId}/customFields/${fieldId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update a specific custom field in the issue.\n   * @param issueId - The ID of the issue.\n   * @param fieldId - The entity ID of the custom field in the issue.\n   * @param body - The new value to set for the custom field.\n   * @param params.fields - A list of IssueCustomField attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set to true to suppress notifications about changes made by this request.\n   * @returns A promise that resolves to the updated custom field.\n   */\n  async updateIssueCustomField<TSchema extends IssueCustomFieldSchema>(\n    issueId: string,\n    fieldId: string,\n    body: DeepPartial<IssueCustomField>,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<IssueCustomFieldEntity<TSchema>> {\n    return this.youtrack.fetch<IssueCustomFieldEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/customFields/${fieldId}`,\n        { fields, muteUpdateNotifications: \"boolean\" },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Get the project to which the issue belongs.\n   * @param issueId - The ID of the issue.\n   * @param params.fields - A list of Project attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the project.\n   */\n  async getIssueProject<TSchema extends ProjectSchema>(\n    issueId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ProjectEntity<TSchema>> {\n    return this.youtrack.fetch<ProjectEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/project`,\n        {\n          fields,\n        },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Change the project of the issue. That is, move the issue to another project.\n   * @param issueId - The ID of the issue to be moved.\n   * @param body - Required fields: id - the database ID of the project.\n   * @param params.fields - A list of Project attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set this to true if no notifications should be sent on changes made by this request. This doesn't mute notifications sent by any workflow rules. Requires Apply Commands Silently permission.\n   * @returns A promise that resolves to the updated project.\n   */\n  async changeIssueProject<TSchema extends ProjectSchema>(\n    issueId: string,\n    body: { id: string },\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<ProjectEntity<TSchema>> {\n    return this.youtrack.fetch<ProjectEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/project`,\n        {\n          fields,\n          muteUpdateNotifications: \"boolean\",\n        },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Get the list of sprints where the issue belongs.\n   * @param issueId - The ID of the issue for which to get the sprints.\n   * @param params.fields - A list of Sprint attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$skip - Optional. Set the number of returned entities to skip before returning the first one.\n   * @param params.$top - Optional. Specify the maximum number of entries to return in the response. If not set, the server limits the number of returned entries.\n   * @returns A promise that resolves to the list of sprints associated with the issue.\n   */\n  async getIssueSprints<TSchema extends SprintSchema>(\n    issueId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<SprintEntity<TSchema>[]> {\n    return this.youtrack.fetch<SprintEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/issues/${issueId}/sprints`,\n        {\n          fields,\n          ...queryParams(\"$skip\", \"$top\"),\n        },\n        params,\n      ).get(),\n    )\n  }\n}\n","import type { DeepPartial, Entity, FieldsParam, ListParams, SavedQuery, Schema } from \"../types\"\nimport { fields, queryParams, RequestBuilder } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype SavedQuerySchema = Schema<SavedQuery>\ntype SavedQueryEntity<TSchema extends SavedQuerySchema> = Entity<SavedQuery, TSchema>\n\n/**\n * This resource lets you access and work with saved searches in YouTrack.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-savedQueries.html\n */\nexport class SavedQueriesApi extends ResourceApi {\n  /**\n   * Get all saved searches that are visible to the current user.\n   * @param fields - A list of SavedQuery attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param top - Optional. Lets you specify the maximum number of entries that are returned in the response. If not set, the server limits the maximum number of returned entries.\n   * @param skip - Optional. Lets you set a number of returned entities to skip before returning the first one.\n   * @returns A list of saved queries visible to the current user.\n   */\n  async getSavedQueries<TSchema extends SavedQuerySchema>(\n    params?: ListParams & FieldsParam<TSchema>,\n  ): Promise<SavedQueryEntity<TSchema>[]> {\n    return this.youtrack.fetch<SavedQueryEntity<TSchema>[]>(\n      new RequestBuilder(\"api/savedQueries\", { fields, ...queryParams(\"$top\", \"$skip\") }, params).get(),\n    )\n  }\n\n  /**\n   * Create a new saved search.\n   * @param body - Required fields: name, query.\n   * @param fields - A list of SavedQuery attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The created saved search.\n   */\n  async createSavedQuery<TSchema extends SavedQuerySchema>(\n    body: { name: string; query: string } | DeepPartial<SavedQuery>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<SavedQueryEntity<TSchema>> {\n    return this.youtrack.fetch<SavedQueryEntity<TSchema>>(\n      new RequestBuilder(\"api/savedQueries\", { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Read settings of the saved search with the specified ID.\n   * @param queryId - Id of the saved search.\n   * @param fields - A list of SavedQuery attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The settings of the specified saved search.\n   */\n  async getSavedQueryById<TSchema extends SavedQuerySchema>(\n    queryId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<SavedQueryEntity<TSchema>> {\n    return this.youtrack.fetch<SavedQueryEntity<TSchema>>(\n      new RequestBuilder(`api/savedQueries/${queryId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update settings of the saved search with the specified ID.\n   * @param queryId - Id of the saved search.\n   * @param body - The fields to update. Provide the fields that need to be modified.\n   * @param fields - A list of SavedQuery attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The updated saved search.\n   */\n  async updateSavedQuery<TSchema extends SavedQuerySchema>(\n    queryId: string,\n    body: DeepPartial<SavedQuery>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<SavedQueryEntity<TSchema>> {\n    return this.youtrack.fetch<SavedQueryEntity<TSchema>>(\n      new RequestBuilder(`api/savedQueries/${queryId}`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Delete the saved search with the specified ID.\n   * @param queryId - Database ID of the saved search.\n   * @param params - A list of SavedQuery attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The deleted saved search.\n   */\n  async deleteSavedQuery<TSchema extends SavedQuerySchema>(\n    queryId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<SavedQueryEntity<TSchema>> {\n    return this.youtrack.fetch<SavedQueryEntity<TSchema>>(\n      new RequestBuilder(`api/savedQueries/${queryId}`, { fields }, params).delete(),\n    )\n  }\n}\n","import type { SearchSuggestions, Entity, FieldsParam, Schema, SearchSuggestionsMutable } from \"../types\"\nimport { fields, RequestBuilder } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype SearchSuggestionsSchema = Schema<SearchSuggestions>\ntype SearchSuggestionsEntity<TSchema extends SearchSuggestionsSchema> = Entity<SearchSuggestions, TSchema>\n\n/**\n * Lets you get suggestions for the currently entered search query.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-search-assist.html\n */\nexport class SearchApi extends ResourceApi {\n  /**\n   * Get search query suggestions for the currently entered search query.\n   * @param query - The current search query for which suggestions are requested.\n   * @param fields - A list of SearchSuggestions attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns Search query suggestions.\n   */\n  async getSearchSuggestions<TSchema extends SearchSuggestionsSchema>(\n    body: Partial<SearchSuggestionsMutable>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<SearchSuggestionsEntity<TSchema>> {\n    return this.youtrack.fetch<SearchSuggestionsEntity<TSchema>>(\n      new RequestBuilder(\"api/search/assist\", { fields }, params).post(body),\n    )\n  }\n}\n","import type {\n  Tag,\n  Entity,\n  FieldsParam,\n  Issue,\n  ListParams,\n  QueryParam,\n  Schema,\n  CustomFieldsParam,\n  DeepPartial,\n} from \"../types\"\nimport { fields, RequestBuilder, queryParams } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype TagSchema = Schema<Tag>\ntype IssueSchema = Schema<Issue>\n\ntype TagEntity<TSchema extends TagSchema> = Entity<Tag, TSchema>\ntype IssueEntity<TSchema extends IssueSchema> = Entity<Issue, TSchema>\n\n/**\n * This resource lets you access and work with tags in YouTrack.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-tags.html\n */\nexport class TagsApi extends ResourceApi {\n  /**\n   * Get all tags that are visible to the current user.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of Tag attributes to include in the response. If not specified, only the entityId is returned.\n   * @param params.$skip - The number of entries to skip in the response. Useful for pagination.\n   * @param params.$top - The maximum number of entries to return. If not specified, the server limits the number of entries returned.\n   * @param params.query - A search query to filter the list of tags by name. For more details on query syntax, see Query Syntax.\n   * @returns A list of tags visible to the current user that match the specified criteria.\n   */\n  async getTags<TSchema extends TagSchema>(\n    params?: ListParams & FieldsParam<TSchema> & QueryParam,\n  ): Promise<TagEntity<TSchema>[]> {\n    return this.youtrack.fetch<TagEntity<TSchema>[]>(\n      new RequestBuilder(\"api/tags\", { fields, $skip: \"number\", $top: \"number\", query: \"string\" }, params).get(),\n    )\n  }\n\n  /**\n   * Get settings of the tag with the specified Id.\n   * @param tagId - The Id of the tag to retrieve.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of Tag attributes to include in the response. If not specified, only the entityId is returned.\n   * @returns The details of the specified tag.\n   */\n  async getTagById<TSchema extends TagSchema>(\n    tagId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<TagEntity<TSchema>> {\n    return this.youtrack.fetch<TagEntity<TSchema>>(new RequestBuilder(`api/tags/${tagId}`, { fields }, params).get())\n  }\n\n  /**\n   * Create a new tag.\n   * @param body - The tag details to create. Must include the `name` field.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of Tag attributes to include in the response. If not specified, only the entityID is returned.\n   * @returns The newly created tag.\n   */\n  async createTag<TSchema extends TagSchema>(\n    body: DeepPartial<Tag>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<TagEntity<TSchema>> {\n    return this.youtrack.fetch<TagEntity<TSchema>>(new RequestBuilder(\"api/tags\", { fields }, params).post(body))\n  }\n\n  /**\n   * Update settings of the tag with the specified ID.\n   * @param tagId - The database Id of the tag to update.\n   * @param body - The updated tag details. Must include any fields that need to be modified.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of Tag attributes to include in the response. If not specified, only the entityId is returned.\n   * @returns The updated tag.\n   */\n  async updateTag<TSchema extends TagSchema>(\n    tagId: string,\n    body: DeepPartial<Tag>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<TagEntity<TSchema>> {\n    return this.youtrack.fetch<TagEntity<TSchema>>(\n      new RequestBuilder(`api/tags/${tagId}`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Delete a tag with the specified Id.\n   * @param tagId - The database Id of the tag to delete.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A comma-separated list of Tag attributes to include in the response. If not specified, only the entityId is returned.\n   * @returns The deleted tag.\n   */\n  async deleteTag<TSchema extends TagSchema>(\n    tagId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<TagEntity<TSchema>> {\n    return this.youtrack.fetch<TagEntity<TSchema>>(new RequestBuilder(`api/tags/${tagId}`, { fields }, params).delete())\n  }\n\n  /**\n   * Get all issues that the specific tag is added to.\n   * @param tagId - The database Id of the tag.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of Issue attributes to include in the response. If not specified, only the entityId is returned.\n   * @param params.$skip - The number of entries to skip in the response. Useful for pagination.\n   * @param params.$top - The maximum number of entries to return. If not specified, the server limits the number of entries returned.\n   * @param params.customFields - Specifies the custom fields to show in the response. Can be used multiple times to include multiple custom fields.\n   * @returns A list of issues that the specified tag is associated with.\n   */\n  async getIssuesByTag<TSchema extends IssueSchema>(\n    tagId: string,\n    params?: ListParams & FieldsParam<TSchema> & CustomFieldsParam,\n  ): Promise<IssueEntity<TSchema>[]> {\n    return this.youtrack.fetch<IssueEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/tags/${tagId}/issues`,\n        {\n          fields,\n          ...queryParams(\"$skip\", \"$top\", \"customFields\"),\n        },\n        params,\n      ).get(),\n    )\n  }\n}\n","import type {\n  User,\n  GeneralUserProfile,\n  NotificationsUserProfile,\n  TimeTrackingUserProfile,\n  SavedQuery,\n  Entity,\n  FieldsParam,\n  ListParams,\n  Schema,\n  Tag,\n  DeepPartial,\n} from \"../types\"\nimport { fields, queryParams, RequestBuilder } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype UserSchema = Schema<User>\ntype GeneralUserProfileSchema = Schema<GeneralUserProfile>\ntype NotificationsUserProfileSchema = Schema<NotificationsUserProfile>\ntype TimeTrackingUserProfileSchema = Schema<TimeTrackingUserProfile>\ntype SavedQuerySchema = Schema<SavedQuery>\ntype TagSchema = Schema<Tag>\n\ntype UserEntity<TSchema extends UserSchema> = Entity<User, TSchema>\ntype GeneralUserProfileEntity<TSchema extends GeneralUserProfileSchema> = Entity<GeneralUserProfile, TSchema>\ntype NotificationsUserProfileEntity<TSchema extends NotificationsUserProfileSchema> = Entity<\n  NotificationsUserProfile,\n  TSchema\n>\ntype TimeTrackingUserProfileEntity<TSchema extends TimeTrackingUserProfileSchema> = Entity<\n  TimeTrackingUserProfile,\n  TSchema\n>\ntype SavedQueryEntity<TSchema extends SavedQuerySchema> = Entity<SavedQuery, TSchema>\ntype TagEntity<TSchema extends TagSchema> = Entity<Tag, TSchema>\n\n/**\n * This resource lets you work with user settings in YouTrack.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-users.html\n */\nexport class UsersApi extends ResourceApi {\n  /**\n   * Read the list of users in YouTrack.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of User attributes to include in the response. If not specified, only the entityID is returned.\n   * @param params.$skip - The number of entries to skip in the response. Useful for pagination.\n   * @param params.$top - The maximum number of entries to return. If not specified, the server limits the number of entries returned (42 by default).\n   * @returns A list of users in YouTrack, with optional pagination.\n   */\n  async getUsers<TSchema extends UserSchema>(\n    params?: ListParams & FieldsParam<TSchema>,\n  ): Promise<UserEntity<TSchema>[]> {\n    return this.youtrack.fetch<UserEntity<TSchema>[]>(\n      new RequestBuilder(\n        \"api/users\",\n        {\n          fields,\n          ...queryParams(\"$skip\", \"$top\"),\n        },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Read the settings of the YouTrack profile of a specific user.\n   * @param userId - The Id of the user in YouTrack.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of User attributes to include in the response. If not specified, only the entityId is returned.\n   * @returns The settings of the specified user's YouTrack profile.\n   * @requires Read User Basic permission for basic information, or Read User permission for accessing all data.\n   */\n  async getUserProfile<TSchema extends UserSchema>(\n    userId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<UserEntity<TSchema>> {\n    return this.youtrack.fetch<UserEntity<TSchema>>(new RequestBuilder(`api/users/${userId}`, { fields }, params).get())\n  }\n\n  /**\n   * Get the general settings of the user's profile.\n   * Requires 'Read Self' permission to read own profile and 'Read User Full' to read another user's profile.\n   * @param userId - The Id of the user in YouTrack.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of GeneralUserProfile attributes to include in the response. If not specified, only the entityId is returned.\n   * @returns The general profile settings of the specified user.\n   */\n  async getUserGeneralProfile<TSchema extends GeneralUserProfileSchema>(\n    userId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<GeneralUserProfileEntity<TSchema>> {\n    return this.youtrack.fetch<GeneralUserProfileEntity<TSchema>>(\n      new RequestBuilder(`api/users/${userId}/profiles/general`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update the general settings of a user's profile.\n   * Requires 'Update Self' permission to update own profile and 'Update User' to update another user's profile.\n   * @param userId - The Id of the user in YouTrack.\n   * @param data - The data to update in the user's general profile.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of GeneralUserProfile attributes to include in the response. If not specified, only the entityId is returned.\n   * @returns The updated general profile settings of the specified user.\n   */\n  async updateUserGeneralProfile<TSchema extends GeneralUserProfileSchema>(\n    userID: string,\n    data: DeepPartial<GeneralUserProfile>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<GeneralUserProfileEntity<TSchema>> {\n    return this.youtrack.fetch<GeneralUserProfileEntity<TSchema>>(\n      new RequestBuilder(`api/users/${userID}/profiles/general`, { fields }, params).post(data),\n    )\n  }\n\n  /**\n   * Get the notification settings of a user's profile.\n   * Requires 'Read Self' permission to read own profile and 'Read User Full' to read another user's profile.\n   * @param userId - The Id of the user in YouTrack.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of NotificationsUserProfile attributes to include in the response. If not specified, only the entityId is returned.\n   * @returns The notification settings of the specified user's profile.\n   */\n  async getUserNotificationProfile<TSchema extends NotificationsUserProfileSchema>(\n    userId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<NotificationsUserProfileEntity<TSchema>> {\n    return this.youtrack.fetch<NotificationsUserProfileEntity<TSchema>>(\n      new RequestBuilder(`api/users/${userId}/profiles/notifications`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Change the notification settings of a user's profile.\n   * Requires 'Update Self' permission to update own profile and 'Update User' to update another user's profile.\n   * @param userId - The Id of the user in YouTrack.\n   * @param body - The updated notification settings for the user profile.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of NotificationsUserProfile attributes to include in the response. If not specified, only the entityId is returned.\n   * @returns The updated notification settings of the user's profile.\n   */\n  async updateUserNotificationProfile<TSchema extends NotificationsUserProfileSchema>(\n    userId: string,\n    body: DeepPartial<NotificationsUserProfile>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<NotificationsUserProfileEntity<TSchema>> {\n    return this.youtrack.fetch<NotificationsUserProfileEntity<TSchema>>(\n      new RequestBuilder(`api/users/${userId}/profiles/notifications`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Get the time tracking settings of a user's profile.\n   * Requires 'Read Self' permission to read own profile and 'Read User Full' to read another user's profile.\n   * @param userId - The ID of the user in YouTrack.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of TimeTrackingUserProfile attributes to include in the response. If not specified, only the entityId is returned.\n   * @returns The time tracking settings of the user's profile.\n   */\n  async getUserTimeTrackingProfile<TSchema extends TimeTrackingUserProfileSchema>(\n    userId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<TimeTrackingUserProfileEntity<TSchema>> {\n    return this.youtrack.fetch<TimeTrackingUserProfileEntity<TSchema>>(\n      new RequestBuilder(`api/users/${userId}/profiles/timetracking`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update the time tracking settings of a user's profile.\n   * Requires 'Update Self' permission to update own profile and 'Update User' permission to update another user's profile.\n   * @param userId - The Id of the user in YouTrack.\n   * @param data - The updated time tracking settings.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of TimeTrackingUserProfile attributes to include in the response. If not specified, only the entityId is returned.\n   * @returns The updated time tracking settings of the user's profile.\n   */\n  async updateUserTimeTrackingProfile<TSchema extends TimeTrackingUserProfileSchema>(\n    userId: string,\n    data: DeepPartial<TimeTrackingUserProfile>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<TimeTrackingUserProfileEntity<TSchema>> {\n    return this.youtrack.fetch<TimeTrackingUserProfileEntity<TSchema>>(\n      new RequestBuilder(`api/users/${userId}/profiles/timetracking`, { fields }, params).post(data),\n    )\n  }\n\n  /**\n   * Get the list of all saved searches (saved queries) that the specified user created.\n   * @param userId - The Id of the user in YouTrack.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of SavedQuery attributes to include in the response. If not specified, only the entityId is returned.\n   * @param params.$skip - The number of entities to skip before returning the first one.\n   * @param params.$top - The maximum number of entries returned in the response. Defaults to 42 if not set.\n   * @returns A list of saved queries created by the user.\n   */\n  async getUserSavedQueries<TSchema extends SavedQuerySchema>(\n    userId: string,\n    params?: ListParams & FieldsParam<TSchema>,\n  ): Promise<SavedQueryEntity<TSchema>[]> {\n    return this.youtrack.fetch<SavedQueryEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/users/${userId}/savedQueries`,\n        {\n          fields,\n          $skip: \"number\",\n          $top: \"number\",\n        },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Get the list of all tags that belong to the specified user.\n   * @param userId - The Id of the user in YouTrack.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of Tag attributes to include in the response. If not specified, only the entityId is returned.\n   * @param params.$skip - The number of entities to skip before returning the first one.\n   * @param params.$top - The maximum number of entries returned in the response. Defaults to 42 if not set.\n   * @returns A list of tags that belong to the user.\n   */\n  async getUserTags<TSchema extends TagSchema>(\n    userId: string,\n    params?: ListParams & FieldsParam<TSchema>,\n  ): Promise<TagEntity<TSchema>[]> {\n    return this.youtrack.fetch<TagEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/users/${userId}/tags`,\n        {\n          fields,\n          ...queryParams(\"$skip\", \"$top\"),\n        },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Read the profile settings of the currently logged-in user.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of attributes to include in the response. If not specified, only the entityId is returned.\n   * @returns The profile settings of the currently logged-in user.\n   */\n  async getCurrentUserProfile<TSchema extends UserSchema>(params?: FieldsParam<TSchema>): Promise<UserEntity<TSchema>> {\n    return this.youtrack.fetch<UserEntity<TSchema>>(new RequestBuilder(\"api/users/me\", { fields }, params).get())\n  }\n}\n","import type { Entity, FieldsParam, IssueWorkItem, ListParams, QueryParam, Schema } from \"../types\"\nimport { fields, queryParams, RequestBuilder } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype WorkItemSchema = Schema<IssueWorkItem>\ntype WorkItemEntity<TSchema extends WorkItemSchema> = Entity<IssueWorkItem, TSchema>\n\n/**\n * Resource that provides access to work items.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-workItems.html\n */\nexport class WorkItemsApi extends ResourceApi {\n  /**\n   * Get all work items that belong to issues that match a search query. If the query is not provided, all work items from all issues are returned.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of IssueWorkItem attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$skip - The number of entries to skip in the response. Useful for pagination.\n   * @param params.$top - The maximum number of entries to return. If not specified, the server limits the number of entries returned.\n   * @param params.query - Issue search query. For more information, refer to the Search Query Reference.\n   * @param params.startDate - The start date of the time interval where the work item dates belong (YYYY-MM-DD).\n   * @param params.endDate - The end date of the time interval where the work item dates belong (YYYY-MM-DD).\n   * @param params.start - A timestamp in milliseconds indicating the start of the interval where the work item dates belong.\n   * @param params.end - A timestamp in milliseconds indicating the end of the interval where the work item dates belong.\n   * @param params.createdStart - A timestamp in milliseconds indicating the start of the interval during which work items were created.\n   * @param params.createdEnd - A timestamp in milliseconds indicating the end of the interval during which work items were created.\n   * @param params.updatedStart - A timestamp in milliseconds indicating the start of the interval during which work items were updated.\n   * @param params.updatedEnd - A timestamp in milliseconds indicating the end of the interval during which work items were updated.\n   * @param params.author - Filter work items by their author. Can be a user ID, login, Hub ID, or \"me\" for the currently logged-in user. Use multiple parameters for multiple authors.\n   * @param params.creator - Filter work items by their creator. Can be a user ID, login, Hub ID, or \"me\" for the currently logged-in user. Use multiple parameters for multiple creators.\n   * @returns A list of work items that match the specified criteria.\n   */\n  async getWorkItems<TSchema extends WorkItemSchema>(\n    params?: FieldsParam<TSchema> &\n      ListParams &\n      QueryParam & {\n        startDate?: string\n        endDate?: string\n        start?: number\n        end?: number\n        createdStart?: number\n        createdEnd?: number\n        updatedStart?: number\n        updatedEnd?: number\n        author?: string\n        creator?: string\n      },\n  ): Promise<WorkItemEntity<TSchema>[]> {\n    return this.youtrack.fetch<WorkItemEntity<TSchema>[]>(\n      new RequestBuilder(\n        \"api/workItems\",\n        {\n          fields,\n          ...queryParams(\n            \"$skip\",\n            \"$top\",\n            \"query\",\n            \"startDate\",\n            \"endDate\",\n            \"author\",\n            \"creator\",\n            \"start\",\n            \"end\",\n            \"createdStart\",\n            \"createdEnd\",\n            \"updatedStart\",\n            \"updatedEnd\",\n          ),\n        },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Get a specific work item.\n   * @param itemId - The database Id of the work item.\n   * @param fields - A list of IssueWorkItem attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The specified work item.\n   */\n  async getWorkItem<TSchema extends WorkItemSchema>(\n    itemId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<WorkItemEntity<TSchema>> {\n    return this.youtrack.fetch<WorkItemEntity<TSchema>>(\n      new RequestBuilder(`api/workItems/${itemId}`, { fields }, params).get(),\n    )\n  }\n}\n","import type {\n  Entity,\n  FieldsParam,\n  ListParams,\n  MuteUpdateNotificationsParam,\n  Reaction,\n  Schema,\n  IssueComment,\n  DeepPartial,\n} from \"../types\"\nimport { fields, queryParams, RequestBuilder } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype IssueCommentSchema = Schema<IssueComment>\ntype ReactionSchema = Schema<Reaction>\n\ntype IssueCommentEntity<TSchema extends IssueCommentSchema> = Entity<IssueComment, TSchema>\ntype ReactionEntity<TSchema extends ReactionSchema> = Entity<Reaction, TSchema>\n\n/**\n * Resource that provides access to issues.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-issues.html\n */\nexport class IssueCommentsApi extends ResourceApi {\n  /**\n   * Get all accessible comments of the specific issue.\n   * @param issueId - The Id of the issue.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of IssueComment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - The maximum number of entries to return. Defaults are applied if not specified.\n   * @param params.$skip - The number of entries to skip before returning the first one.\n   * @returns A promise that resolves to a list of issue comments.\n   */\n  async getIssueComments<TSchema extends IssueCommentSchema>(\n    issueId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<IssueCommentEntity<TSchema>[]> {\n    return this.youtrack.fetch<IssueCommentEntity<TSchema>[]>(\n      new RequestBuilder(`api/issues/${issueId}/comments`, { fields, ...queryParams(\"$top\", \"$skip\") }, params).get(),\n    )\n  }\n\n  /**\n   * Add a new comment to an issue with a specific ID.\n   * @param issueId - The Id of the issue to which the comment will be added.\n   * @param body - The comment text to be added.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of IssueComment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.draftId - ID of an existing draft to publish. Optional.\n   * @param params.muteUpdateNotifications - Set to true if no notifications should be sent on changes made by this request.\n   * @returns A promise that resolves to the created comment.\n   */\n  async createIssueComment<TSchema extends IssueCommentSchema>(\n    issueId: string,\n    body: { text: string } & DeepPartial<IssueComment>,\n    params?: FieldsParam<TSchema> &\n      MuteUpdateNotificationsParam & {\n        draftId?: string\n      },\n  ): Promise<IssueCommentEntity<TSchema>> {\n    return this.youtrack.fetch<IssueCommentEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/comments`,\n        { fields, ...queryParams(\"draftId\", \"muteUpdateNotifications\") },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Read a comment with a specific ID.\n   * @param issueId - The Id of the issue that the comment belongs to.\n   * @param commentId - The database ID of the comment to be read.\n   * @param params - Optional parameters for the request.\n   * @param params.fields - A list of IssueComment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the comment.\n   */\n  async getIssueCommentById<TSchema extends IssueCommentSchema>(\n    issueId: string,\n    commentId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueCommentEntity<TSchema>> {\n    return this.youtrack.fetch<IssueCommentEntity<TSchema>>(\n      new RequestBuilder(`api/issues/${issueId}/comments/${commentId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update an existing comment of the specific issue.\n   * @param issueId - The ID of the issue that the comment belongs to.\n   * @param commentId - The database ID of the comment to be updated.\n   * @param body - The updated comment data.\n   * @param params.fields - Optional. A list of IssueComment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Optional. Set this parameter to true if no notifications should be sent on changes made by this request. This doesn't mute notifications sent by any workflow rules. Using this parameter requires Apply Commands Silently permission in all projects affected by the request.\n   * @returns A promise that resolves to the updated comment.\n   */\n  async updateIssueComment<TSchema extends IssueCommentSchema>(\n    issueId: string,\n    commentId: string,\n    body: DeepPartial<IssueComment>,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<IssueCommentEntity<TSchema>> {\n    return this.youtrack.fetch<IssueCommentEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/comments/${commentId}`,\n        { fields, muteUpdateNotifications: \"boolean\" },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Delete an existing comment of the specific issue.\n   * This request deletes a comment from the database completely.\n   * You can also remove a comment from an issue temporarily by updating the comment.\n   * @param issueId - The ID of the issue that the comment belongs to.\n   * @param commentId - The database ID of the comment to be deleted.\n   * @param params.fields - Optional. A list of IssueComment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves when the comment has been deleted.\n   */\n  async deleteIssueComment<TSchema extends IssueCommentSchema>(\n    issueId: string,\n    commentId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueCommentEntity<TSchema>> {\n    return this.youtrack.fetch<IssueCommentEntity<TSchema>>(\n      new RequestBuilder(`api/issues/${issueId}/comments/${commentId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Get a reaction with a specific ID.\n   * Requires permissions: Read Issue, Read Issue Comment.\n   * @param issueId - The ID of the issue that the comment belongs to.\n   * @param commentId - The database ID of the comment that the reaction belongs to.\n   * @param reactionId - The database ID of the reaction to retrieve.\n   * @param params.fields - Optional. A list of Reaction attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the reaction.\n   */\n  async getIssueCommnetReaction<TSchema extends ReactionSchema>(\n    issueId: string,\n    commentId: string,\n    reactionId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ReactionEntity<TSchema>> {\n    return this.youtrack.fetch<ReactionEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/comments/${commentId}/reactions/${reactionId}`,\n        { fields },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Remove a reaction from a comment. Only the author of the reaction can remove it.\n   * Requires permissions: Read Issue, Read Issue Comment.\n   * @param issueId - The ID of the issue that the comment belongs to.\n   * @param commentId - The database ID of the comment that the reaction belongs to.\n   * @param reactionId - The database ID of the reaction to remove.\n   * @param params.fields - Optional. A list of Reaction attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the deleted reaction.\n   */\n  async deleteIssueCommnetReaction<TSchema extends ReactionSchema>(\n    issueId: string,\n    commentId: string,\n    reactionId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ReactionEntity<TSchema>> {\n    return this.youtrack.fetch<ReactionEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/comments/${commentId}/reactions/${reactionId}`,\n        { fields },\n        params,\n      ).delete(),\n    )\n  }\n}\n","import type {\n  Entity,\n  FieldsParam,\n  ListParams,\n  MuteUpdateNotificationsParam,\n  Schema,\n  Issue,\n  IssueLink,\n  DeepPartial,\n} from \"../types\"\nimport { fields, queryParams, RequestBuilder } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype IssueSchema = Schema<Issue>\ntype IssueLinkSchema = Schema<IssueLink>\n\ntype IssueEntity<TSchema extends IssueSchema> = Entity<Issue, TSchema>\ntype IssueLinkEntity<TSchema extends IssueLinkSchema> = Entity<IssueLink, TSchema>\n\n/**\n * Resource that provides access to issues.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-issues.html\n */\nexport class IssueLinksApi extends ResourceApi {\n  /**\n   * Get the list of links for the issue.\n   * @param issueId - The ID of the issue to retrieve links for.\n   * @param params.fields - A list of IssueLink attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Specifies the maximum number of entries to return in the response.\n   * @param params.$skip - Optional. Specifies the number of entities to skip before returning the first one.\n   * @returns A promise that resolves to the list of issue links.\n   */\n  async getIssueLinks<TSchema extends IssueLinkSchema>(\n    issueId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<IssueLinkEntity<TSchema>[]> {\n    return this.youtrack.fetch<IssueLinkEntity<TSchema>[]>(\n      new RequestBuilder(`api/issues/${issueId}/links`, { fields, ...queryParams(\"$top\", \"$skip\") }, params).get(),\n    )\n  }\n\n  /**\n   * Get the data for a specific link of the issue.\n   * @param issueId - The ID of the issue.\n   * @param linkId - The database ID of the issue link.\n   * @param params.fields - A list of IssueLink attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the issue link data.\n   */\n  async getIssueLinkById<TSchema extends IssueLinkSchema>(\n    issueId: string,\n    linkId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueLinkEntity<TSchema>> {\n    return this.youtrack.fetch<IssueLinkEntity<TSchema>>(\n      new RequestBuilder(`api/issues/${issueId}/links/${linkId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Get all issues that are linked to the current one with this link type.\n   * @param issueId - The ID of the issue.\n   * @param linkId - The database ID of the link type.\n   * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.top - Optional. Specifies the maximum number of entries that are returned in the response.\n   * @param params.skip - Optional. Lets you set a number of returned entities to skip before returning the first one.\n   * @returns A promise that resolves to the list of linked issues.\n   */\n  async getLinkedIssues<TSchema extends IssueSchema>(\n    issueId: string,\n    linkId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<IssueEntity<TSchema>[]> {\n    return this.youtrack.fetch<IssueEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/issues/${issueId}/links/${linkId}/issues`,\n        {\n          fields,\n          ...queryParams(\"$skip\", \"$top\"),\n        },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Link the current issue to another issue.\n   * @param issueId - The ID of the current issue.\n   * @param linkId - The database ID of the link type (with direction markers if applicable).\n   * @param body - Required fields: id - the database ID of the issue you're linking to the current one.\n   * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set to true to avoid sending notifications for this update.\n   * @returns A promise that resolves to the updated issue.\n   */\n  async linkIssue<TSchema extends IssueSchema>(\n    issueId: string,\n    linkId: string,\n    body: { linkedIssueId: string } & DeepPartial<IssueLink>,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<IssueEntity<TSchema>> {\n    return this.youtrack.fetch<IssueEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/links/${linkId}/issues`,\n        {\n          fields,\n          muteUpdateNotifications: \"boolean\",\n        },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Delete the link between issues.\n   * @param issueId - The ID of the current issue.\n   * @param linkId - The database ID of the link type (with direction markers if applicable).\n   * @param linkedIssueId - The database ID of the issue to unlink from the current one.\n   * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the updated issue.\n   */\n  async unlinkIssue<TSchema extends IssueSchema>(\n    issueId: string,\n    linkId: string,\n    linkedIssueId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueEntity<TSchema>> {\n    return this.youtrack.fetch<IssueEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/links/${linkId}/issues/${linkedIssueId}`,\n        {\n          fields,\n        },\n        params,\n      ).delete(),\n    )\n  }\n}\n","import type { Entity, FieldsParam, ListParams, Schema, Tag } from \"../types\"\nimport { fields, queryParams, RequestBuilder } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype TagSchema = Schema<Tag>\ntype TagEntity<TSchema extends TagSchema> = Entity<Tag, TSchema>\n\n/**\n * Resource that provides access to issues.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-issues.html\n */\nexport class IssueTagsApi extends ResourceApi {\n  /**\n   * Get all tags added to the issue that are visible to the current user.\n   * @param issueId - The ID of the issue for which to get the tags.\n   * @param params.fields - A list of Tag attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$skip - Optional. Set the number of returned entities to skip before returning the first one.\n   * @param params.$top - Optional. Specify the maximum number of entries to return in the response. If not set, the server limits the number of returned entries.\n   * @returns A promise that resolves to the list of tags associated with the issue.\n   */\n  async getIssueTags<TSchema extends TagSchema>(\n    issueId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<TagEntity<TSchema>[]> {\n    return this.youtrack.fetch<TagEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/issues/${issueId}/tags`,\n        {\n          fields,\n          ...queryParams(\"$top\", \"$skip\"),\n        },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Tag the issue with an existing tag.\n   * @param issueId - The ID of the issue to tag.\n   * @param body - Required fields: id - the id of the tag to add to the issue.\n   * @param params.fields - A list of Tag attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the tagged issue with the specified tag.\n   */\n  async addTagToIssue<TSchema extends TagSchema>(\n    issueId: string,\n    body: { id: string },\n    params?: FieldsParam<TSchema>,\n  ): Promise<TagEntity<TSchema>> {\n    return this.youtrack.fetch<TagEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/tags`,\n        {\n          fields,\n        },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Read a specific tag added to the issue.\n   * @param issueId - The ID of the issue.\n   * @param tagId - The ID of the tag to retrieve.\n   * @param params.fields - A list of Tag attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the specified tag on the issue.\n   */\n  async getIssueTagById<TSchema extends TagSchema>(\n    issueId: string,\n    tagId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<TagEntity<TSchema>> {\n    return this.youtrack.fetch<TagEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/tags/${tagId}`,\n        {\n          fields,\n        },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Remove a specific tag from the issue.\n   * @param issueId - The ID of the issue.\n   * @param tagId - The ID of the tag to remove.\n   * @param params.fields - A list of Tag attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the response after removing the tag.\n   */\n  async deleteIssueTag<TSchema extends TagSchema>(\n    issueId: string,\n    tagId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<TagEntity<TSchema>> {\n    return this.youtrack.fetch<TagEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/tags/${tagId}`,\n        {\n          fields,\n        },\n        params,\n      ).delete(),\n    )\n  }\n}\n","import type {\n  Entity,\n  FieldsParam,\n  IssueWorkItem,\n  ListParams,\n  MuteUpdateNotificationsParam,\n  Schema,\n  IssueTimeTracking,\n  DeepPartial,\n  DurationValue,\n  AtLeastOne,\n} from \"../types\"\nimport { fields, queryParams, RequestBuilder } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype IssueTimeTrackingSchema = Schema<IssueTimeTracking>\ntype IssueWorkItemSchema = Schema<IssueWorkItem>\n\ntype IssueTimeTrackingEntity<TSchema extends IssueTimeTrackingSchema> = Entity<IssueTimeTracking, TSchema>\ntype IssueWorkItemEntity<TSchema extends IssueWorkItemSchema> = Entity<IssueWorkItem, TSchema>\n\n/**\n * Resource that provides access to issues.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-issues.html\n */\nexport class IssueTimeTrackingApi extends ResourceApi {\n  /**\n   * Get work items of an issue and time tracking status.\n   * @param issueId - The ID of the issue.\n   * @param params.fields - A list of IssueTimeTracking attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the time tracking data for the issue.\n   */\n  async getIssueTimeTracking<TSchema extends IssueTimeTrackingSchema>(\n    issueId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueTimeTrackingEntity<TSchema>> {\n    return this.youtrack.fetch<IssueTimeTrackingEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/timeTracking`,\n        {\n          fields,\n        },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Get the list of all work items of the specific issue.\n   * @param issueId - The ID of the issue.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of IssueWorkItem attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Specifies the maximum number of entries to return. If not provided, the server limits the number of entries.\n   * @param params.$skip - Optional. Specifies the number of entries to skip before returning the first one.\n   * @returns A promise that resolves to the list of work items for the issue.\n   */\n  async getIssueWorkItems<TSchema extends IssueWorkItemSchema>(\n    issueId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<IssueWorkItemEntity<TSchema>[]> {\n    return this.youtrack.fetch<IssueWorkItemEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/issues/${issueId}/timeTracking/workItems`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Add a new work item to the issue.\n   * @param issueId - The ID of the issue.\n   * @param body - The work item details including duration.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of IssueWorkItem attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set to true if no notifications should be sent on changes made by this request. This doesn't mute notifications sent by any workflow rules.\n   * @returns A promise that resolves to the added work item.\n   */\n  async createIssueWorkItem<TSchema extends IssueWorkItemSchema>(\n    issueId: string,\n    body: { duration: AtLeastOne<DurationValue> } & DeepPartial<Omit<IssueWorkItem, \"duration\">>,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<IssueWorkItemEntity<TSchema>> {\n    return this.youtrack.fetch<IssueWorkItemEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/timeTracking/workItems`,\n        {\n          fields,\n          muteUpdateNotifications: \"boolean\",\n        },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Get a specific work item of the issue.\n   * @param issueId - The ID of the issue.\n   * @param workItemId - The ID of the work item to retrieve.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of IssueWorkItem attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the specific work item.\n   */\n  async getIssueWorkItemById<TSchema extends IssueWorkItemSchema>(\n    issueId: string,\n    workItemId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueWorkItemEntity<TSchema>> {\n    return this.youtrack.fetch<IssueWorkItemEntity<TSchema>>(\n      new RequestBuilder(`api/issues/${issueId}/timeTracking/workItems/${workItemId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update a specific work item of the issue.\n   * @param issueId - The ID of the issue.\n   * @param workItemId - The ID of the work item to update.\n   * @param body - The update payload for the work item.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of IssueWorkItem attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set this to true if no notifications should be sent on changes made by this request. This doesn't mute notifications sent by any workflow rules.\n   * @returns A promise that resolves to the updated work item.\n   */\n  async updateWorkItem<TSchema extends IssueWorkItemSchema>(\n    issueId: string,\n    workItemId: string,\n    body: DeepPartial<Omit<IssueWorkItem, \"duration\">> & { duration?: AtLeastOne<DurationValue> },\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<IssueWorkItemEntity<TSchema>> {\n    return this.youtrack.fetch<IssueWorkItemEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/timeTracking/workItems/${workItemId}`,\n        { fields, muteUpdateNotifications: \"boolean\" },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Delete the specific work item in the issue.\n   * @param issueId - The ID of the issue.\n   * @param workItemId - The ID of the work item to delete.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of IssueWorkItem attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the response of the deletion request.\n   */\n  async deleteIssueWorkItem<TSchema extends IssueWorkItemSchema>(\n    issueId: string,\n    workItemId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueWorkItemEntity<TSchema>> {\n    return this.youtrack.fetch<IssueWorkItemEntity<TSchema>>(\n      new RequestBuilder(`api/issues/${issueId}/timeTracking/workItems/${workItemId}`, { fields }, params).delete(),\n    )\n  }\n}\n","import type { Entity, FieldsParam, ListParams, MuteUpdateNotificationsParam, Schema, VcsChange } from \"../types\"\nimport { fields, queryParams, RequestBuilder } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype VcsChangeSchema = Schema<VcsChange>\ntype VcsChangeEntity<TSchema extends VcsChangeSchema> = Entity<VcsChange, TSchema>\n\n/**\n * Resource that provides access to issues.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-issues.html\n */\nexport class IssueVcsChangesApi extends ResourceApi {\n  /**\n   * Get all accessible VCS changes linked to the specific issue.\n   * @param issueId - The ID of the issue.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of VcsChange attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Lets you specify the maximum number of entries that are returned in the response.\n   * @param params.$skip - Optional. Lets you set a number of returned entities to skip before returning the first one.\n   * @returns A promise that resolves to the list of VCS changes linked to the issue.\n   */\n  async getIssueVcsChanges<TSchema extends VcsChangeSchema>(\n    issueId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<VcsChangeEntity<TSchema>[]> {\n    return this.youtrack.fetch<VcsChangeEntity<TSchema>[]>(\n      new RequestBuilder(`api/issues/${issueId}/vcsChanges`, { fields, ...queryParams(\"$top\", \"$skip\") }, params).get(),\n    )\n  }\n\n  /**\n   * Link a new VCS change to an issue with a specific ID.\n   * @param issueId - The ID of the issue.\n   * @param vcsChange - The VCS change details.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of VcsChange attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set to true if no notifications should be sent on issue changes caused by this request. Requires Apply Commands Silently permission.\n   * @returns A promise that resolves to the linked VCS change.\n   */\n  async linkIssueVcsChange<TSchema extends VcsChangeSchema>(\n    issueId: string,\n    body: {\n      version: string // Required. The version of the VCS change.\n      state: string // Required. The state of the VCS change.\n    },\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<VcsChangeEntity<TSchema>> {\n    return this.youtrack.fetch<VcsChangeEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/vcsChanges`,\n        { fields, muteUpdateNotifications: \"boolean\" },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Read a VCS change with a specific ID.\n   * @param issueId - The ID of the issue.\n   * @param changeId - The database ID of the VCS change.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of VcsChange attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the requested VCS change.\n   */\n  async getIssueVcsChangeById<TSchema extends VcsChangeSchema>(\n    issueId: string,\n    changeId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<VcsChangeEntity<TSchema>> {\n    return this.youtrack.fetch<VcsChangeEntity<TSchema>>(\n      new RequestBuilder(`api/issues/${issueId}/vcsChanges/${changeId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update the state of an existing VCS change in a specific issue.\n   * @param issueId - The ID of the issue.\n   * @param changeId - The database ID of the VCS change.\n   * @param body - Object containing the updated state of the VCS change.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of VcsChange attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set to true to suppress update notifications. This doesn't mute notifications sent by workflow rules.\n   * @returns A promise that resolves to the updated VCS change.\n   */\n  async updateIssueVcsChange<TSchema extends VcsChangeSchema>(\n    issueId: string,\n    changeId: string,\n    body: { state: string },\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<VcsChangeEntity<TSchema>> {\n    return this.youtrack.fetch<VcsChangeEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/vcsChanges/${changeId}`,\n        { fields, muteUpdateNotifications: \"boolean\" },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Detach a specific VCS change from a specific issue.\n   * @param issueId - The ID of the issue.\n   * @param changeId - The database ID of the VCS change.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of VcsChange attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves once the VCS change is detached.\n   */\n  async detachIssueVcsChange<TSchema extends VcsChangeSchema>(\n    issueId: string,\n    changeId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<VcsChangeEntity<TSchema>> {\n    return this.youtrack.fetch<VcsChangeEntity<TSchema>>(\n      new RequestBuilder(`api/issues/${issueId}/vcsChanges/${changeId}`, { fields }, params).delete(),\n    )\n  }\n}\n","import type {\n  Entity,\n  FieldsParam,\n  ListParams,\n  MuteUpdateNotificationsParam,\n  Schema,\n  IssueAttachment,\n  DeepPartial,\n} from \"../types\"\nimport { fields, queryParams, RequestBuilder } from \"../utils\"\nimport { ResourceApi } from \"./common\"\n\ntype IssueAttachmentSchema = Schema<IssueAttachment>\ntype IssueAttachmentEntity<TSchema extends IssueAttachmentSchema> = Entity<IssueAttachment, TSchema>\n\n/**\n * Resource that provides access to issues.\n * https://www.jetbrains.com/help/youtrack/devportal/resource-api-issues.html\n */\nexport class IssueAttechmentsApi extends ResourceApi {\n  /**\n   * Get a list of all attachments of the specific issue.\n   * @param issueId - The Id of the issue.\n   * @param params - Parameters for the request.\n   * @param params.fields - A list of IssueAttachment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Specifies the maximum number of entries to be returned. Defaults to the server limit if not set.\n   * @param params.$skip - Optional. Specifies the number of entities to skip before returning the first one.\n   * @returns A promise that resolves to the list of issue attachments.\n   */\n  async getIssueAttachments<TSchema extends IssueAttachmentSchema>(\n    issueId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<IssueAttachmentEntity<TSchema>[]> {\n    return this.youtrack.fetch<IssueAttachmentEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/issues/${issueId}/attachments`,\n        { fields, ...queryParams(\"$skip\", \"$top\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Add an attachment to the issue.\n   * @param issueId - The Id of the issue.\n   * @param attachment - The attachment data to be added.\n   * @param params - Parameters for the request.\n   * @param params.fields - A list of IssueAttachment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set to true if no notifications should be sent on changes made by this request.\n   * @returns A promise that resolves to the added issue attachment.\n   */\n  async createIssueAttachment<TSchema extends IssueAttachmentSchema>(\n    issueId: string,\n    body: FormData,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<IssueAttachmentEntity<TSchema>> {\n    return this.youtrack.fetch<IssueAttachmentEntity<TSchema>>(\n      new RequestBuilder(\n        `api/issues/${issueId}/attachments`,\n        { fields, muteUpdateNotifications: \"boolean\" },\n        params,\n      ).postFile(body),\n    )\n  }\n\n  /**\n   * Read a specific attachment of the issue.\n   * @param issueId - The Id of the issue.\n   * @param attachmentId - The database ID of the attachment.\n   * @param params - Parameters for the request.\n   * @param params.fields - A list of IssueAttachment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the issue attachment.\n   */\n  async getIssueAttachmentById<TSchema extends IssueAttachmentSchema>(\n    issueId: string,\n    attachmentId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueAttachmentEntity<TSchema>> {\n    return this.youtrack.fetch<IssueAttachmentEntity<TSchema>>(\n      new RequestBuilder(`api/issues/${issueId}/attachments/${attachmentId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update a specific attachment.\n   * @param issueId - The Id of the issue.\n   * @param attachmentId - The database ID of the attachment.\n   * @param params - Parameters for the request.\n   * @param params.fields - A list of IssueAttachment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the updated issue attachment.\n   */\n  async updateIssueAttachment<TSchema extends IssueAttachmentSchema>(\n    issueId: string,\n    attachmentId: string,\n    body: DeepPartial<IssueAttachment>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueAttachmentEntity<TSchema>> {\n    return this.youtrack.fetch<IssueAttachmentEntity<TSchema>>(\n      new RequestBuilder(`api/issues/${issueId}/attachments/${attachmentId}`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Delete a specific attachment.\n   * @param issueId - The Id of the issue.\n   * @param attachmentId - The database ID of the attachment.\n   * @param params - Parameters for the request.\n   * @param params.fields - A list of IssueAttachment attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves when the attachment is deleted.\n   */\n  async deleteIssueAttachment<TSchema extends IssueAttachmentSchema>(\n    issueId: string,\n    attachmentId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueAttachmentEntity<TSchema>> {\n    return this.youtrack.fetch<IssueAttachmentEntity<TSchema>>(\n      new RequestBuilder(`api/issues/${issueId}/attachments/${attachmentId}`, { fields }, params).delete(),\n    )\n  }\n}\n","import type {\n  Schema,\n  FieldsParam,\n  Entity,\n  ListParams,\n  Project,\n  Article,\n  ProjectCustomField,\n  Issue,\n  CustomFieldsParam,\n  MuteUpdateNotificationsParam,\n  ProjectTimeTrackingSettings,\n  WorkItemType,\n  DeepPartial,\n} from \"../../types\"\nimport { fields, queryParams, RequestBuilder } from \"../../utils\"\nimport { ResourceApi } from \"../common\"\n\ntype ProjectSchema = Schema<Project>\ntype ArticleSchema = Schema<Article>\ntype ProjectCustomFieldSchema = Schema<ProjectCustomField>\ntype IssueSchema = Schema<Issue>\ntype ProjectTimeTrackingSettingsSchema = Schema<ProjectTimeTrackingSettings>\ntype WorkItemTypeSchema = Schema<WorkItemType>\n\ntype ProjectEntity<TSchema extends ProjectSchema> = Entity<Project, TSchema>\ntype ArticleEntity<TSchema extends ArticleSchema> = Entity<Article, TSchema>\ntype ProjectCustomFieldEntity<TSchema extends ProjectCustomFieldSchema> = Entity<ProjectCustomField, TSchema>\ntype IssueEntity<TSchema extends IssueSchema> = Entity<Issue, TSchema>\ntype ProjectTimeTrackingSettingsEntity<TSchema extends ProjectTimeTrackingSettingsSchema> = Entity<\n  ProjectTimeTrackingSettings,\n  TSchema\n>\ntype WorkItemTypeEntity<TSchema extends WorkItemTypeSchema> = Entity<WorkItemType, TSchema>\n\nexport class ProjectsApi extends ResourceApi {\n  /**\n   * Get a list of all available projects in the system.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. The maximum number of entries to return in the response.\n   * @param params.$skip - Optional. The number of entities to skip before returning the first one.\n   * @returns A promise that resolves to the list of Project entities.\n   */\n  async getProjects<TSchema extends ProjectSchema>(\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<ProjectEntity<TSchema>[]> {\n    return this.youtrack.fetch<ProjectEntity<TSchema>[]>(\n      new RequestBuilder(\"api/admin/projects\", { fields, ...queryParams(\"$top\", \"$skip\") }, params).get(),\n    )\n  }\n\n  /**\n   * Create a project in YouTrack.\n   * @param body - Required fields: name, shortName, leader (id of the project owner user).\n   * @param params - Optional parameters for response filtering and template selection.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.template - Optional. Specify the template to use for the new project (e.g., 'scrum', 'kanban'). If not specified, the default settings will be used.\n   * @returns A promise that resolves to the created Project entity.\n   */\n  async createProject<TSchema extends ProjectSchema>(\n    body: { name: string; shortName: string; leader: { id: string } } & DeepPartial<Omit<Project, \"leader\">>,\n    params?: FieldsParam<TSchema> & { template?: string },\n  ): Promise<ProjectEntity<TSchema>> {\n    return this.youtrack.fetch<ProjectEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/projects\", { fields, template: \"string\" }, params).post(body),\n    )\n  }\n\n  /**\n   * Get the settings of a specific project.\n   * @param projectId - The ID of the project (can be the database entity ID or the short name).\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the requested Project entity.\n   */\n  async getProjectById<TSchema extends ProjectSchema>(\n    projectId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ProjectEntity<TSchema>> {\n    return this.youtrack.fetch<ProjectEntity<TSchema>>(\n      new RequestBuilder(`api/admin/projects/${projectId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update settings of a project with a specific ID.\n   * @param projectId - The ID of the project (can be the database entity ID or the short name).\n   * @param body - The fields to update in the project.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the updated Project entity.\n   */\n  async updateProject<TSchema extends ProjectSchema>(\n    projectId: string,\n    body: DeepPartial<Project>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ProjectEntity<TSchema>> {\n    return this.youtrack.fetch<ProjectEntity<TSchema>>(\n      new RequestBuilder(`api/admin/projects/${projectId}`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Delete a project with specific ID.\n   * @param projectId - The ID of the project (can be the database entity ID or the short name).\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves when the project is deleted.\n   */\n  async deleteProject<TSchema extends ProjectSchema>(\n    projectId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ProjectEntity<TSchema>> {\n    return this.youtrack.fetch<ProjectEntity<TSchema>>(\n      new RequestBuilder(`api/admin/projects/${projectId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Get the list of articles that belong to the project.\n   * @param projectId - The ID of the project (can be the database entity ID or the short name).\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of Article attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Maximum number of entries to return.\n   * @param params.$skip - Optional. Number of returned entities to skip before returning the first one.\n   * @returns A promise that resolves to a list of Article entities.\n   */\n  async getProjectArticles<TSchema extends ArticleSchema>(\n    projectId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<ArticleEntity<TSchema>[]> {\n    return this.youtrack.fetch<ArticleEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/admin/projects/${projectId}/articles`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Read the list of custom fields that are attached to a specific project.\n   * @param projectId - The ID of the project (can be the database entity ID or the short name).\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of ProjectCustomField attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Maximum number of entries to return.\n   * @param params.$skip - Optional. Number of returned entities to skip before returning the first one.\n   * @returns A promise that resolves to a list of ProjectCustomField entities.\n   */\n  async getProjectCustomFields<TSchema extends ProjectCustomFieldSchema>(\n    projectId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<ProjectCustomFieldEntity<TSchema>[]> {\n    return this.youtrack.fetch<ProjectCustomFieldEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/admin/projects/${projectId}/customFields`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Attach the custom field to the project.\n   * @param projectId - The ID of the project (can be the database entity ID or the short name).\n   * @param body - The custom field to attach, including its ID and type.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of ProjectCustomField attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the attached ProjectCustomField entity.\n   */\n  async addCustomFieldToProject<TSchema extends ProjectCustomFieldSchema>(\n    projectId: string,\n    body: { field: { id: string } } & DeepPartial<Omit<ProjectCustomField, \"field\">>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ProjectCustomFieldEntity<TSchema>> {\n    return this.youtrack.fetch<ProjectCustomFieldEntity<TSchema>>(\n      new RequestBuilder(`api/admin/projects/${projectId}/customFields`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Get the settings of the specific custom field in the project.\n   * @param projectId - The ID of the project (can be the database entity ID or the short name).\n   * @param fieldId - The database ID of the project custom field.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of ProjectCustomField attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the requested ProjectCustomField entity.\n   */\n  async getProjectCustomFieldById<TSchema extends ProjectCustomFieldSchema>(\n    projectId: string,\n    fieldId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ProjectCustomFieldEntity<TSchema>> {\n    return this.youtrack.fetch<ProjectCustomFieldEntity<TSchema>>(\n      new RequestBuilder(`api/admin/projects/${projectId}/customFields/${fieldId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Change the settings of the specific custom field in the project.\n   * @param projectId - The ID of the project (can be the database entity ID or the short name).\n   * @param fieldId - The database ID of the project custom field.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of ProjectCustomField attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param body - The new settings for the project custom field.\n   * @returns A promise that resolves to the updated ProjectCustomField entity.\n   */\n  async updateProjectCustomField<TSchema extends ProjectCustomFieldSchema>(\n    projectId: string,\n    fieldId: string,\n    body: DeepPartial<ProjectCustomField>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ProjectCustomFieldEntity<TSchema>> {\n    return this.youtrack.fetch<ProjectCustomFieldEntity<TSchema>>(\n      new RequestBuilder(`api/admin/projects/${projectId}/customFields/${fieldId}`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Remove the specific custom field from the project.\n   * @param projectId - The ID of the project (can be the database entity ID or the short name).\n   * @param fieldId - The database ID of the project custom field.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of ProjectCustomField attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the result of the deletion.\n   */\n  async removeProjectCustomField<TSchema extends ProjectCustomFieldSchema>(\n    projectId: string,\n    fieldId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ProjectCustomFieldEntity<TSchema>> {\n    return this.youtrack.fetch<ProjectCustomFieldEntity<TSchema>>(\n      new RequestBuilder(`api/admin/projects/${projectId}/customFields/${fieldId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Get a list of all available issues in the specific project.\n   * The default issue sorting is by updated desc.\n   * If $top is not provided, the number of returned issues is limited to the Max issues to export value in the Global Settings.\n   * @param projectId - The ID of the project (can be the database entity ID or the short name).\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$skip - Optional. Lets you set a number of returned entities to skip before returning the first one.\n   * @param params.$top - Optional. Lets you specify the maximum number of entries that are returned in the response.\n   * @param params.customFields - The name of the custom field(s) to show in the response. Use this parameter multiple times to show more than one custom field.\n   * @returns A promise that resolves to a list of issues in the specified project.\n   */\n  async getProjectIssues<TSchema extends IssueSchema>(\n    projectId: string,\n    params?: FieldsParam<TSchema> | ListParams | CustomFieldsParam,\n  ): Promise<IssueEntity<TSchema>[]> {\n    return this.youtrack.fetch<IssueEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/admin/projects/${projectId}/issues`,\n        { fields, ...queryParams(\"$top\", \"$skip\", \"customFields\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Create a new issue in the specified project.\n   * Required fields: summary.\n   * @param projectId - The ID of the project (can be the database entity ID or the short name).\n   * @param body - The body of the issue, must include a summary.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @param params.muteUpdateNotifications - Set to true to mute notifications for this request. Requires Apply Commands Silently permission.\n   * @returns A promise that resolves to the created issue.\n   */\n  async createProjectIssue<TSchema extends IssueSchema>(\n    projectId: string,\n    body: { summary: string } & DeepPartial<Issue>,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<IssueEntity<TSchema>> {\n    return this.youtrack.fetch<IssueEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/projects/${projectId}/issues`,\n        { fields, muteUpdateNotifications: \"boolean\" },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Read a specific issue in the project.\n   * @param projectId - The database ID or project ID of the project.\n   * @param issueId - The database ID or project ID of the issue.\n   * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The requested issue.\n   */\n  async getProjectIssueById<TSchema extends IssueSchema>(\n    projectId: string,\n    issueId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueEntity<TSchema>> {\n    return this.youtrack.fetch<IssueEntity<TSchema>>(\n      new RequestBuilder(`api/admin/projects/${projectId}/issues/${issueId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update a single issue.\n   * @param issueId - The database ID or project ID of the issue.\n   * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set to true if no notifications should be sent on changes made by this request.\n   * @returns The updated issue.\n   */\n  async updateProjectIssue<TSchema extends IssueSchema>(\n    projectId: string,\n    issueId: string,\n    body: DeepPartial<Issue>,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<IssueEntity<TSchema>> {\n    return this.youtrack.fetch<IssueEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/projects/${projectId}/issues/${issueId}`,\n        { fields, muteUpdateNotifications: \"boolean\" },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Delete the issue. Note that this operation cannot be undone.\n   * @param issueId - The database ID or project ID of the issue.\n   * @param params.fields - A list of Issue attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves when the issue is deleted.\n   */\n  async deleteProjectIssue<TSchema extends IssueSchema>(\n    projectId: string,\n    issueId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<IssueEntity<TSchema>> {\n    return this.youtrack.fetch<IssueEntity<TSchema>>(\n      new RequestBuilder(`api/admin/projects/${projectId}/issues/${issueId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Read the time tracking settings of the project.\n   * @param projectId - The ID of the project (can be the database entity ID or the short name).\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of ProjectTimeTrackingSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the time tracking settings of the project.\n   */\n  async getProjectTimeTrackingSettings<TSchema extends ProjectTimeTrackingSettingsSchema>(\n    projectId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ProjectTimeTrackingSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<ProjectTimeTrackingSettingsEntity<TSchema>>(\n      new RequestBuilder(`api/admin/projects/${projectId}/timeTrackingSettings`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update the time tracking settings of the project.\n   * @param projectId - The ID of the project (can be the database entity ID or the short name).\n   * @param body - The new time tracking settings to apply.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of ProjectTimeTrackingSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the updated time tracking settings of the project.\n   */\n  async updateProjectTimeTrackingSettings<TSchema extends ProjectTimeTrackingSettingsSchema>(\n    projectId: string,\n    body: DeepPartial<ProjectTimeTrackingSettings>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<ProjectTimeTrackingSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<ProjectTimeTrackingSettingsEntity<TSchema>>(\n      new RequestBuilder(`api/admin/projects/${projectId}/timeTrackingSettings`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Get the list of all work items of the specific project.\n   * @param issueId - The ID of the project.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of WorkItemType attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Specifies the maximum number of entries to return. If not provided, the server limits the number of entries.\n   * @param params.$skip - Optional. Specifies the number of entries to skip before returning the first one.\n   * @returns A promise that resolves to the list of work items for the project.\n   */\n  async getProjectWorkItemTypes<TSchema extends WorkItemTypeSchema>(\n    projectId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<WorkItemTypeEntity<TSchema>[]> {\n    return this.youtrack.fetch<WorkItemTypeEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/admin/projects/${projectId}/timeTrackingSettings/workItemTypes`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Add a new work item to the project.\n   * @param projectId - The ID of the project.\n   * @param body - The work item details including duration.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of WorkItemType attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.muteUpdateNotifications - Set to true if no notifications should be sent on changes made by this request. This doesn't mute notifications sent by any workflow rules.\n   * @returns A promise that resolves to the added work item.\n   */\n  async addProjectWorkItemType<TSchema extends WorkItemTypeSchema>(\n    projectId: string,\n    body: { duration: number } & DeepPartial<WorkItemType>,\n    params?: FieldsParam<TSchema> & MuteUpdateNotificationsParam,\n  ): Promise<WorkItemTypeEntity<TSchema>> {\n    return this.youtrack.fetch<WorkItemTypeEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/projects/${projectId}/timeTrackingSettings/workItems`,\n        {\n          fields,\n          muteUpdateNotifications: \"boolean\",\n        },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Get a specific work item of the project.\n   * @param projectId - The ID of the project.\n   * @param workItemId - The ID of the work item to retrieve.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of WorkItemType attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the specific work item.\n   */\n  async getProjectWorkItemTypeById<TSchema extends WorkItemTypeSchema>(\n    projectId: string,\n    workItemId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<WorkItemTypeEntity<TSchema>> {\n    return this.youtrack.fetch<WorkItemTypeEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/projects/${projectId}/timeTrackingSettings/workItems/${workItemId}`,\n        { fields },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Delete the specific work item in the project.\n   * @param projectId - The ID of the project.\n   * @param workItemId - The ID of the work item to delete.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of WorkItemType attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the response of the deletion request.\n   */\n  async deleteProjectWorkItemType<TSchema extends WorkItemTypeSchema>(\n    projectId: string,\n    workItemId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<WorkItemTypeEntity<TSchema>> {\n    return this.youtrack.fetch<WorkItemTypeEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/projects/${projectId}/timeTrackingSettings/workItems/${workItemId}`,\n        { fields },\n        params,\n      ).delete(),\n    )\n  }\n}\n","import type { Schema, BuildBundle, FieldsParam, Entity, ListParams, BuildBundleElement, DeepPartial } from \"../../types\"\nimport { fields, queryParams, RequestBuilder } from \"../../utils\"\nimport { ResourceApi } from \"../common\"\n\ntype BuildBundleSchema = Schema<BuildBundle>\ntype BuildBundleElementSchema = Schema<BuildBundleElement>\n\ntype BuildBundleEntity<TSchema extends BuildBundleSchema> = Entity<BuildBundle, TSchema>\ntype BuildBundleElementEntity<TSchema extends BuildBundleElementSchema> = Entity<BuildBundleElement, TSchema>\n\nexport class BuildBundlesApi extends ResourceApi {\n  /**\n   * Get all available sets of builds in the system.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of BuildBundle attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$skip - Optional. The number of returned entities to skip before returning the first one.\n   * @param params.$top - Optional. The maximum number of entries that are returned in the response.\n   * @returns A promise that resolves to the list of BuildBundle entities.\n   */\n  async getBuildBundles<TSchema extends BuildBundleSchema>(\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<BuildBundleEntity<TSchema>[]> {\n    return this.youtrack.fetch<BuildBundleEntity<TSchema>[]>(\n      new RequestBuilder(\n        \"api/admin/customFieldSettings/bundles/build\",\n        { fields, ...queryParams(\"$skip\", \"$top\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Create a new set of builds.\n   * Requires permissions: Update Project or Low-level Admin Write.\n   * @param body - The details of the new BuildBundle to create.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of BuildBundle attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the created BuildBundle entity.\n   */\n  async createBuildBundle<TSchema extends BuildBundleSchema>(\n    body: DeepPartial<BuildBundle>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<BuildBundleEntity<TSchema>> {\n    return this.youtrack.fetch<BuildBundleEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/customFieldSettings/bundles/build\", { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Read a set of builds with the specific ID.\n   * Requires read or update access to one of the fields where the bundle is used. If the bundle is not used in any field, Update Project permission is required in at least one project.\n   * @param bundleId - The database ID of the build bundle.\n   * @param params - Optional parameters.\n   * @param params.fields - A list of BuildBundle attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the requested BuildBundle entity.\n   */\n  async getBuildBundleById<TSchema extends BuildBundleSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<BuildBundleEntity<TSchema>> {\n    return this.youtrack.fetch<BuildBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/build/${bundleId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update the specific set of builds.\n   * Requires Update Project permission in all projects where the bundle is used. If the bundle is not used in any field, Update Project permission is required in at least one project.\n   * @param bundleId - The database ID of the build bundle.\n   * @param body - The udpdated build bundle.\n   * @param fields - Optional. A list of BuildBundle attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the updated BuildBundle entity.\n   */\n  async updateBuildBundle<TSchema extends BuildBundleSchema>(\n    bundleId: string,\n    body: DeepPartial<BuildBundle>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<BuildBundleEntity<TSchema>> {\n    return this.youtrack.fetch<BuildBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/build/${bundleId}`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Delete a specific set of builds.\n   * Requires Update Project permission in all projects where the bundle is used. If the bundle is not used in any field, Update Project permission is required in at least one project.\n   * @param bundleId - The database ID of the build bundle to delete.\n   * @param fields - Optional. A list of BuildBundle attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the deleted BuildBundle entity.\n   */\n  async deleteBuildBundle<TSchema extends BuildBundleSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<BuildBundleEntity<TSchema>> {\n    return this.youtrack.fetch<BuildBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/build/${bundleId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Get the list of all build values in the specific build bundle.\n   * @param bundleId - The database ID of the build bundle.\n   * @param params - Optional parameters for fields, $skip, and $top.\n   * @returns A promise that resolves to a list of BuildBundleElement entities.\n   */\n  async getBuildBundleValues<TSchema extends BuildBundleElementSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<BuildBundleElementEntity<TSchema>[]> {\n    return this.youtrack.fetch<BuildBundleElementEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/build/${bundleId}/values`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Add a new build to the specific build bundle.\n   * @param bundleId - The database ID of the build bundle.\n   * @param body - The build details, including the required name.\n   * @param params - Optional fields to include in the response.\n   * @returns A promise that resolves to the newly added BuildBundleElement entity.\n   */\n  async addBuildToBundle<TSchema extends BuildBundleElementSchema>(\n    bundleId: string,\n    body: { name: string } & DeepPartial<BuildBundleElement>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<BuildBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<BuildBundleElementEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/build/${bundleId}/values`, { fields }, params).post(\n        body,\n      ),\n    )\n  }\n\n  /**\n   * Get a specific build from the build bundle.\n   * @param bundleId - The database ID of the build bundle.\n   * @param elementId - The database ID of the build value.\n   * @param params - Optional fields to include in the response.\n   * @returns A promise that resolves to the specified BuildBundleElement entity.\n   */\n  async getBuildFromBundle<TSchema extends BuildBundleElementSchema>(\n    bundleId: string,\n    elementId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<BuildBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<BuildBundleElementEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/build/${bundleId}/values/${elementId}`,\n        { fields },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Update a specific build in the bundle.\n   * @param bundleId - The database ID of the build bundle.\n   * @param elementId - The database ID of the build value.\n   * @param body - The updated build details.\n   * @param params - Optional fields to include in the response.\n   * @returns A promise that resolves to the updated BuildBundleElement entity.\n   */\n  async updateBuildInBundle<TSchema extends BuildBundleElementSchema>(\n    bundleId: string,\n    elementId: string,\n    body: DeepPartial<BuildBundleElement>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<BuildBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<BuildBundleElementEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/build/${bundleId}/values/${elementId}`,\n        { fields },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Remove a specific build from the bundle.\n   * @param bundleId - The database ID of the build bundle.\n   * @param elementId - The database ID of the build value to remove.\n   * @param params - Optional fields to include in the response.\n   * @returns A promise that resolves to the removed BuildBundleElement entity.\n   */\n  async removeBuildFromBundle<TSchema extends BuildBundleElementSchema>(\n    bundleId: string,\n    elementId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<BuildBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<BuildBundleElementEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/build/${bundleId}/values/${elementId}`,\n        { fields },\n        params,\n      ).delete(),\n    )\n  }\n}\n","import type { Schema, FieldsParam, Entity, ListParams, EnumBundle, EnumBundleElement, DeepPartial } from \"../../types\"\nimport { fields, queryParams, RequestBuilder } from \"../../utils\"\nimport { ResourceApi } from \"../common\"\n\ntype EnumBundleSchema = Schema<EnumBundle>\ntype EnumBundleElementSchema = Schema<EnumBundleElement>\n\ntype EnumBundleEntity<TSchema extends EnumBundleSchema> = Entity<EnumBundle, TSchema>\ntype EnumBundleElementEntity<TSchema extends EnumBundleElementSchema> = Entity<EnumBundleElement, TSchema>\n\nexport class EnumBundlesApi extends ResourceApi {\n  /**\n   * Get a list of all available sets of values of the enum type.\n   * @param params - Optional fields for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$skip - Optional. The number of returned entities to skip before returning the first one.\n   * @param params.$top - Optional. The maximum number of entries that are returned in the response.\n   * @returns A promise that resolves to an array of EnumBundle entities.\n   */\n  async getEnumBundles<TSchema extends EnumBundleSchema>(\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<EnumBundleEntity<TSchema>[]> {\n    return this.youtrack.fetch<EnumBundleEntity<TSchema>[]>(\n      new RequestBuilder(\n        \"api/admin/customFieldSettings/bundles/enum\",\n        { fields, ...queryParams(\"$skip\", \"$top\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Create a new set of values of the enum type.\n   * @param body - Required fields for the new enum bundle.\n   * @param params - Optional fields for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the created EnumBundle entity.\n   */\n  async createEnumBundle<TSchema extends EnumBundleSchema>(\n    body: { name: string } | DeepPartial<EnumBundle>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<EnumBundleEntity<TSchema>> {\n    return this.youtrack.fetch<EnumBundleEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/customFieldSettings/bundles/enum\", { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Get a specific set of values of the enum type.\n   * @param bundleId - The database Id of the enum bundle.\n   * @param params - Optional fields for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the requested EnumBundle entity.\n   */\n  async getEnumBundle<TSchema extends EnumBundleSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<EnumBundleEntity<TSchema>> {\n    return this.youtrack.fetch<EnumBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/enum/${bundleId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update a specific set of values of the enum type.\n   * @param bundleID - The database ID of the enum bundle.\n   * @param body - The updated values for the enum bundle.\n   * @param params - Optional fields for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the updated EnumBundle entity.\n   */\n  async updateEnumBundle<TSchema extends EnumBundleSchema>(\n    bundleID: string,\n    body: DeepPartial<EnumBundle>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<EnumBundleEntity<TSchema>> {\n    return this.youtrack.fetch<EnumBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/enum/${bundleID}`, { fields }, params).post(body),\n    )\n  }\n  /**\n   * Delete a specific set of values of the enum type.\n   * @param bundleId - The database ID of the enum bundle to delete.\n   * @param params - Optional fields for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the deleted EnumBundle entity.\n   */\n  async deleteEnumBundle<TSchema extends EnumBundleSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<EnumBundleEntity<TSchema>> {\n    return this.youtrack.fetch<EnumBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/enum/${bundleId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Get the list of all enumerated values in the specific bundle.\n   * @param bundleId - The database ID of the enum bundle.\n   * @param params - Optional parameters for response filtering and pagination.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$skip - Optional. The number of returned entities to skip before returning the first one.\n   * @param params.$top - Optional. The maximum number of entries that are returned in the response.\n   * @returns A promise that resolves to a list of EnumBundleElement entities.\n   */\n  async getEnumBundleValues<TSchema extends EnumBundleElementSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<EnumBundleElementEntity<TSchema>[]> {\n    return this.youtrack.fetch<EnumBundleElementEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/enum/${bundleId}/values`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Add a new enumerated value to the bundle.\n   * @param bundleId - The database ID of the enum bundle.\n   * @param body - The enumerated value to add, must include a name.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the newly created EnumBundleElement entity.\n   */\n  async addEnumBundleValue<TSchema extends EnumBundleElementSchema>(\n    bundleId: string,\n    body: { name: string } & DeepPartial<EnumBundleElement>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<EnumBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<EnumBundleElementEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/enum/${bundleId}/values`, { fields }, params).post(\n        body,\n      ),\n    )\n  }\n\n  /**\n   * Get a specific enumerated value from the bundle.\n   * @param bundleId - The database ID of the enum bundle.\n   * @param elementId - The database ID of the enumerated value.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the requested EnumBundleElement entity.\n   */\n  async getEnumBundleValueById<TSchema extends EnumBundleElementSchema>(\n    bundleId: string,\n    elementId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<EnumBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<EnumBundleElementEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/enum/${bundleId}/values/${elementId}`,\n        { fields },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Update a specific enumerated value in the bundle.\n   * @param bundleId - The database ID of the enum bundle.\n   * @param elementId - The database ID of the enumerated value.\n   * @param body - The updated values for the enumerated value.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the updated EnumBundleElement entity.\n   */\n  async updateEnumBundleValue<TSchema extends EnumBundleElementSchema>(\n    bundleId: string,\n    elementId: string,\n    body: { name: string } & DeepPartial<EnumBundleElement>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<EnumBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<EnumBundleElementEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/enum/${bundleId}/values/${elementId}`,\n        { fields },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Remove a specific enumerated value from the bundle.\n   * @param bundleId - The database ID of the enum bundle.\n   * @param elementId - The database ID of the enumerated value.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the removed EnumBundleElement entity.\n   */\n  async deleteEnumBundleValue<TSchema extends EnumBundleElementSchema>(\n    bundleId: string,\n    elementId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<EnumBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<EnumBundleElementEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/enum/${bundleId}/values/${elementId}`,\n        { fields },\n        params,\n      ).delete(),\n    )\n  }\n}\n","import type { Schema, OwnedBundle, FieldsParam, Entity, ListParams, OwnedBundleElement, DeepPartial } from \"../../types\"\nimport { fields, queryParams, RequestBuilder } from \"../../utils\"\nimport { ResourceApi } from \"../common\"\n\ntype OwnedBundleSchema = Schema<OwnedBundle>\ntype OwnedBundleElementSchema = Schema<OwnedBundleElement>\n\ntype OwnedBundleEntity<TSchema extends OwnedBundleSchema> = Entity<OwnedBundle, TSchema>\ntype OwnedBundleElementEntity<TSchema extends OwnedBundleElementSchema> = Entity<OwnedBundleElement, TSchema>\n\nexport class OwnedBundlesApi extends ResourceApi {\n  /**\n   * Get the list of all available owned bundles in the system.\n   * @param params - Optional parameters for response filtering and pagination.\n   * @param params.fields - A list of OwnedBundle attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @param params.$top - Maximum number of entries to return in the response.\n   * @param params.$skip - Number of entries to skip before returning the first one.\n   * @returns A promise that resolves to the list of owned bundles.\n   */\n  async getOwnedBundles<TSchema extends OwnedBundleSchema>(\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<OwnedBundleEntity<TSchema>[]> {\n    return this.youtrack.fetch<OwnedBundleEntity<TSchema>[]>(\n      new RequestBuilder(\n        \"api/admin/customFieldSettings/bundles/owned\",\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Create a new owned bundle in the system.\n   * @param body - The details of the new owned bundle.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of OwnedBundle attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the created owned bundle.\n   */\n  async createOwnedBundle<TSchema extends OwnedBundleSchema>(\n    body: DeepPartial<OwnedBundle>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<OwnedBundleEntity<TSchema>> {\n    return this.youtrack.fetch<OwnedBundleEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/customFieldSettings/bundles/owned\", { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Get attributes of a owned bundle with a specific ID.\n   * @param bundleId - The database ID of the bundle.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of OwnedBundle attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the owned bundle with the specified ID.\n   */\n  async getOwnedBundleById<TSchema extends OwnedBundleSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<OwnedBundleEntity<TSchema>> {\n    return this.youtrack.fetch<OwnedBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/owned/${bundleId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update a owned bundle with a specific ID.\n   * @param bundleId - The database ID of the bundle.\n   * @param body - The updated owned bundle data.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of OwnedBundle attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the updated owned bundle.\n   */\n  async updateOwnedBundle<TSchema extends OwnedBundleSchema>(\n    bundleId: string,\n    body: DeepPartial<OwnedBundle>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<OwnedBundleEntity<TSchema>> {\n    return this.youtrack.fetch<OwnedBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/owned/${bundleId}`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Delete a owned bundle with the specific ID.\n   * @param bundleId - The database ID of the owned bundle.\n   * @param params - Optional parameters for response filtering and pagination.\n   * @param params.fields - A list of OwnedBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves when the owned bundle is deleted.\n   */\n  async deleteOwnedBundle<TSchema extends OwnedBundleSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<OwnedBundleEntity<TSchema>> {\n    return this.youtrack.fetch<OwnedBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/owned/${bundleId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Get the list of all owned values in a specific owned bundle.\n   * @param bundleId - The database ID of the owned bundle.\n   * @param params - Optional parameters for response filtering and pagination.\n   * @param params.fields - A list of OwnedBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @param params.$top - Maximum number of entries to return in the response.\n   * @param params.$skip - Number of entries to skip before returning the first one.\n   * @returns A promise that resolves to the list of owned values in the bundle.\n   */\n  async getOwnedBundleValues<TSchema extends OwnedBundleElementSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<OwnedBundleElementEntity<TSchema>[]> {\n    return this.youtrack.fetch<OwnedBundleElementEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/owned/${bundleId}/values`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Add a new owned to the bundle.\n   * @param bundleId - The database ID of the owned bundle.\n   * @param body - The details of the new owned (required: name).\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of OwnedBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the added owned element.\n   */\n  async addOwnedToBundle<TSchema extends OwnedBundleElementSchema>(\n    bundleId: string,\n    body: { name: string } & DeepPartial<OwnedBundleElement>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<OwnedBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<OwnedBundleElementEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/owned/${bundleId}/values`, { fields }, params).post(\n        body,\n      ),\n    )\n  }\n\n  /**\n   * Update a specific owned value in the bundle.\n   * @param bundleId - The database ID of the owned bundle.\n   * @param elementId - The database ID of the owned value.\n   * @param body - The updated owned value data.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of OwnedBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the updated owned element.\n   */\n  async updateOwnedBundleValue<TSchema extends OwnedBundleElementSchema>(\n    bundleId: string,\n    elementId: string,\n    body: DeepPartial<OwnedBundleElement>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<OwnedBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<OwnedBundleElementEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/owned/${bundleId}/values/${elementId}`,\n        { fields },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Remove a specific owned from the bundle.\n   * @param bundleId - The database ID of the owned bundle.\n   * @param elementId - The database ID of the owned value.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of OwnedBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves when the owned value is removed.\n   */\n  async removeOwnedFromBundle<TSchema extends OwnedBundleElementSchema>(\n    bundleId: string,\n    elementId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<OwnedBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<OwnedBundleElementEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/owned/${bundleId}/values/${elementId}`,\n        { fields },\n        params,\n      ).delete(),\n    )\n  }\n}\n","import type { Schema, StateBundle, FieldsParam, Entity, ListParams, StateBundleElement, DeepPartial } from \"../../types\"\nimport { fields, queryParams, RequestBuilder } from \"../../utils\"\nimport { ResourceApi } from \"../common\"\n\ntype StateBundleSchema = Schema<StateBundle>\ntype StateBundleElementSchema = Schema<StateBundleElement>\n\ntype StateBundleEntity<TSchema extends StateBundleSchema> = Entity<StateBundle, TSchema>\ntype StateBundleElementEntity<TSchema extends StateBundleElementSchema> = Entity<StateBundleElement, TSchema>\n\nexport class StateBundlesApi extends ResourceApi {\n  /**\n   * Get the list of all available state bundles in the system.\n   * @param params - Optional parameters for response filtering and pagination.\n   * @param params.fields - A list of StateBundle attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @param params.$top - Maximum number of entries to return in the response.\n   * @param params.$skip - Number of entries to skip before returning the first one.\n   * @returns A promise that resolves to the list of state bundles.\n   */\n  async getStateBundles<TSchema extends StateBundleSchema>(\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<StateBundleEntity<TSchema>[]> {\n    return this.youtrack.fetch<StateBundleEntity<TSchema>[]>(\n      new RequestBuilder(\n        \"api/admin/customFieldSettings/bundles/state\",\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Create a new state bundle in the system.\n   * @param body - The details of the new state bundle.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of StateBundle attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the created state bundle.\n   */\n  async createStateBundle<TSchema extends StateBundleSchema>(\n    body: DeepPartial<StateBundle>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<StateBundleEntity<TSchema>> {\n    return this.youtrack.fetch<StateBundleEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/customFieldSettings/bundles/state\", { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Get attributes of a state bundle with a specific ID.\n   * @param bundleId - The database ID of the bundle.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of StateBundle attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the state bundle with the specified ID.\n   */\n  async getStateBundleById<TSchema extends StateBundleSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<StateBundleEntity<TSchema>> {\n    return this.youtrack.fetch<StateBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/state/${bundleId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update a state bundle with a specific ID.\n   * @param bundleId - The database ID of the bundle.\n   * @param body - The updated state bundle data.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of StateBundle attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the updated state bundle.\n   */\n  async updateStateBundle<TSchema extends StateBundleSchema>(\n    bundleId: string,\n    body: DeepPartial<StateBundle>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<StateBundleEntity<TSchema>> {\n    return this.youtrack.fetch<StateBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/state/${bundleId}`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Delete a state bundle with the specific ID.\n   * @param bundleId - The database ID of the state bundle.\n   * @param params - Optional parameters for response filtering and pagination.\n   * @param params.fields - A list of StateBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves when the state bundle is deleted.\n   */\n  async deleteStateBundle<TSchema extends StateBundleSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<StateBundleEntity<TSchema>> {\n    return this.youtrack.fetch<StateBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/state/${bundleId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Get the list of all state values in a specific state bundle.\n   * @param bundleId - The database ID of the state bundle.\n   * @param params - Optional parameters for response filtering and pagination.\n   * @param params.fields - A list of StateBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @param params.$top - Maximum number of entries to return in the response.\n   * @param params.$skip - Number of entries to skip before returning the first one.\n   * @returns A promise that resolves to the list of state values in the bundle.\n   */\n  async getStateBundleValues<TSchema extends StateBundleElementSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<StateBundleElementEntity<TSchema>[]> {\n    return this.youtrack.fetch<StateBundleElementEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/state/${bundleId}/values`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Add a new state to the bundle.\n   * @param bundleId - The database ID of the state bundle.\n   * @param body - The details of the new state (required: name).\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of StateBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the added state element.\n   */\n  async addStateToBundle<TSchema extends StateBundleElementSchema>(\n    bundleId: string,\n    body: { name: string } & DeepPartial<StateBundleElement>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<StateBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<StateBundleElementEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/state/${bundleId}/values`, { fields }, params).post(\n        body,\n      ),\n    )\n  }\n\n  /**\n   * Update a specific state value in the bundle.\n   * @param bundleId - The database ID of the state bundle.\n   * @param elementId - The database ID of the state value.\n   * @param body - The updated state value data.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of StateBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the updated state element.\n   */\n  async updateStateBundleValue<TSchema extends StateBundleElementSchema>(\n    bundleId: string,\n    elementId: string,\n    body: DeepPartial<StateBundleElement>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<StateBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<StateBundleElementEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/state/${bundleId}/values/${elementId}`,\n        { fields },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Remove a specific state from the bundle.\n   * @param bundleId - The database ID of the state bundle.\n   * @param elementId - The database ID of the state value.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of StateBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves when the state value is removed.\n   */\n  async removeStateFromBundle<TSchema extends StateBundleElementSchema>(\n    bundleId: string,\n    elementId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<StateBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<StateBundleElementEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/state/${bundleId}/values/${elementId}`,\n        { fields },\n        params,\n      ).delete(),\n    )\n  }\n}\n","import type { Schema, UserBundle, FieldsParam, Entity, ListParams, User, UserGroup, DeepPartial } from \"../../types\"\nimport { fields, queryParams, RequestBuilder } from \"../../utils\"\nimport { ResourceApi } from \"../common\"\n\ntype UserBundleSchema = Schema<UserBundle>\ntype UserSchema = Schema<User>\ntype UserGroupSchema = Schema<UserGroup>\n\ntype UserBundleEntity<TSchema extends UserBundleSchema> = Entity<UserBundle, TSchema>\ntype UserEntity<TSchema extends UserSchema> = Entity<User, TSchema>\ntype UserGroupEntity<TSchema extends UserGroupSchema> = Entity<UserGroup, TSchema>\n\nexport class UserBundlesApi extends ResourceApi {\n  /**\n   * Get the list of all available user bundles in the system.\n   * @param params - Optional parameters for response filtering and pagination.\n   * @param params.fields - A list of UserBundle attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @param params.$top - Maximum number of entries to return in the response.\n   * @param params.$skip - Number of entries to skip before returning the first one.\n   * @returns A promise that resolves to the list of user bundles.\n   */\n  async getUserBundles<TSchema extends UserBundleSchema>(\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<UserBundleEntity<TSchema>[]> {\n    return this.youtrack.fetch<UserBundleEntity<TSchema>[]>(\n      new RequestBuilder(\n        \"api/admin/customFieldSettings/bundles/user\",\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Create a new user bundle in the system.\n   * @param body - The details of the new user bundle.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of UserBundle attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the created user bundle.\n   */\n  async createUserBundle<TSchema extends UserBundleSchema>(\n    body: DeepPartial<UserBundle>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<UserBundleEntity<TSchema>> {\n    return this.youtrack.fetch<UserBundleEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/customFieldSettings/bundles/user\", { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Get attributes of a user bundle with a specific ID.\n   * @param bundleId - The database ID of the bundle.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of UserBundle attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the user bundle with the specified ID.\n   */\n  async getUserBundleById<TSchema extends UserBundleSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<UserBundleEntity<TSchema>> {\n    return this.youtrack.fetch<UserBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/user/${bundleId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update a user bundle with a specific ID.\n   * @param bundleId - The database ID of the bundle.\n   * @param body - The updated user bundle data.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of UserBundle attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the updated user bundle.\n   */\n  async updateUserBundle<TSchema extends UserBundleSchema>(\n    bundleId: string,\n    body: DeepPartial<UserBundle>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<UserBundleEntity<TSchema>> {\n    return this.youtrack.fetch<UserBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/user/${bundleId}`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Delete a user bundle with the specific ID.\n   * @param bundleId - The database ID of the user bundle.\n   * @param params - Optional parameters for response filtering and pagination.\n   * @param params.fields - A list of UserBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves when the user bundle is deleted.\n   */\n  async deleteUserBundle<TSchema extends UserBundleSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<UserBundleEntity<TSchema>> {\n    return this.youtrack.fetch<UserBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/user/${bundleId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Get the list of all users that the user bundle contains.\n   * @param bundleId - The database ID of the user bundle.\n   * @param params - Optional parameters for response filtering and pagination.\n   * @param params.fields - A list of User attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @param params.$top - Maximum number of entries to return in the response.\n   * @param params.$skip - Number of entries to skip before returning the first one.\n   * @returns A promise that resolves to the list of users in the bundle.\n   */\n  async getUserBundleAggregatedUsers<TSchema extends UserSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<UserEntity<TSchema>[]> {\n    return this.youtrack.fetch<UserEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/user/${bundleId}/aggregatedUsers`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Get the list of all groups that are added to a specific user bundle.\n   * @param bundleId - The database ID of the user bundle.\n   * @param params - Optional parameters for response filtering and pagination.\n   * @param params.fields - A list of UserGroup attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @param params.$top - Maximum number of entries to return in the response.\n   * @param params.$skip - Number of entries to skip before returning the first one.\n   * @returns A promise that resolves to the list of groups in the bundle.\n   */\n  async getUserBundleUserGroups<TSchema extends UserGroupSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<UserGroupEntity<TSchema>[]> {\n    return this.youtrack.fetch<UserGroupEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/user/${bundleId}/groups`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Add an existing group to the bundle.\n   * @param bundleId - The database ID of the user bundle.\n   * @param body - The ID of the group to add to the bundle.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of UserGroup attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the added group.\n   */\n  async addUserGroupToUserBundle<TSchema extends UserGroupSchema>(\n    bundleId: string,\n    body: { id: string },\n    params?: FieldsParam<TSchema>,\n  ): Promise<UserGroupEntity<TSchema>> {\n    return this.youtrack.fetch<UserGroupEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/user/${bundleId}/groups`, { fields }, params).post(\n        body,\n      ),\n    )\n  }\n\n  /**\n   * Get a specific user group that belongs to the user bundle.\n   * @param bundleId - The database ID of the user bundle.\n   * @param groupId - The database ID of the user group.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of UserGroup attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the group with the specified ID.\n   */\n  async getUserGroupInBundleById<TSchema extends UserGroupSchema>(\n    bundleId: string,\n    groupId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<UserGroupEntity<TSchema>> {\n    return this.youtrack.fetch<UserGroupEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/user/${bundleId}/groups/${groupId}`,\n        { fields },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Remove a specific group from the bundle.\n   * @param bundleId - The database ID of the user bundle.\n   * @param groupId - The database ID of the user group to remove.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of UserGroup attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves when the group is removed from the bundle.\n   */\n  async deleteUserGroupFromUserBundle<TSchema extends UserGroupSchema>(\n    bundleId: string,\n    groupId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<UserGroupEntity<TSchema>> {\n    return this.youtrack.fetch<UserGroupEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/user/${bundleId}/groups/${groupId}`,\n        { fields },\n        params,\n      ).delete(),\n    )\n  }\n\n  /**\n   * Get the list of all individual user accounts added to a specific user bundle.\n   * @param bundleId - The database ID of the user bundle.\n   * @param params - Optional parameters for response filtering and pagination.\n   * @param params.fields - A list of User attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @param params.$top - Maximum number of entries to return in the response.\n   * @param params.$skip - Number of entries to skip before returning the first one.\n   * @returns A promise that resolves to the list of users in the bundle.\n   */\n  async getUserBundleIndividualUsers<TSchema extends UserSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<UserEntity<TSchema>[]> {\n    return this.youtrack.fetch<UserEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/user/${bundleId}/individuals`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Add an existing user to the bundle.\n   * @param bundleId - The database ID of the user bundle.\n   * @param body - The ID of the user to add to the bundle.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of User attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the added user.\n   */\n  async addIndividualUserToUserBundle<TSchema extends UserSchema>(\n    bundleId: string,\n    body: { id: string },\n    params?: FieldsParam<TSchema>,\n  ): Promise<UserEntity<TSchema>> {\n    return this.youtrack.fetch<UserEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/user/${bundleId}/individuals`, { fields }, params).post(\n        body,\n      ),\n    )\n  }\n\n  /**\n   * Get a specific user from the bundle.\n   * @param bundleId - The database ID of the user bundle.\n   * @param userId - The database ID of the user.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of User attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the user with the specified ID.\n   */\n  async getIndividualUserInBundleById<TSchema extends UserSchema>(\n    bundleId: string,\n    userId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<UserEntity<TSchema>> {\n    return this.youtrack.fetch<UserEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/user/${bundleId}/individuals/${userId}`,\n        { fields },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Remove a specific user from the bundle.\n   * @param bundleId - The database ID of the user bundle.\n   * @param userId - The database ID of the user to remove.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of User attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves when the user is removed from the bundle.\n   */\n  async removeIndividualUserFromUserBundle<TSchema extends UserSchema>(\n    bundleId: string,\n    userId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<UserEntity<TSchema>> {\n    return this.youtrack.fetch<UserEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/user/${bundleId}/individuals/${userId}`,\n        { fields },\n        params,\n      ).delete(),\n    )\n  }\n}\n","import type {\n  Schema,\n  VersionBundle,\n  FieldsParam,\n  Entity,\n  ListParams,\n  VersionBundleElement,\n  DeepPartial,\n} from \"../../types\"\nimport { fields, queryParams, RequestBuilder } from \"../../utils\"\nimport { ResourceApi } from \"../common\"\n\ntype VersionBundleSchema = Schema<VersionBundle>\ntype VersionBundleElementSchema = Schema<VersionBundleElement>\n\ntype VersionBundleEntity<TSchema extends VersionBundleSchema> = Entity<VersionBundle, TSchema>\ntype VersionBundleElementEntity<TSchema extends VersionBundleElementSchema> = Entity<VersionBundleElement, TSchema>\n\nexport class VersionBundlesApi extends ResourceApi {\n  /**\n   * Get the list of all available version bundles in the system.\n   * @param params - Optional parameters for response filtering and pagination.\n   * @param params.fields - A list of VersionBundle attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @param params.$top - Maximum number of entries to return in the response.\n   * @param params.$skip - Number of entries to skip before returning the first one.\n   * @returns A promise that resolves to the list of version bundles.\n   */\n  async getVersionBundles<TSchema extends VersionBundleSchema>(\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<VersionBundleEntity<TSchema>[]> {\n    return this.youtrack.fetch<VersionBundleEntity<TSchema>[]>(\n      new RequestBuilder(\n        \"api/admin/customFieldSettings/bundles/version\",\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Create a new version bundle in the system.\n   * @param body - The details of the new version bundle.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of VersionBundle attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the created version bundle.\n   */\n  async createVersionBundle<TSchema extends VersionBundleSchema>(\n    body: DeepPartial<VersionBundle>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<VersionBundleEntity<TSchema>> {\n    return this.youtrack.fetch<VersionBundleEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/customFieldSettings/bundles/version\", { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Get attributes of a version bundle with a specific ID.\n   * @param bundleId - The database ID of the bundle.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of VersionBundle attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the version bundle with the specified ID.\n   */\n  async getVersionBundleById<TSchema extends VersionBundleSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<VersionBundleEntity<TSchema>> {\n    return this.youtrack.fetch<VersionBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/version/${bundleId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update a version bundle with a specific ID.\n   * @param bundleId - The database ID of the bundle.\n   * @param body - The updated version bundle data.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of VersionBundle attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the updated version bundle.\n   */\n  async updateVersionBundle<TSchema extends VersionBundleSchema>(\n    bundleId: string,\n    body: DeepPartial<VersionBundle>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<VersionBundleEntity<TSchema>> {\n    return this.youtrack.fetch<VersionBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/version/${bundleId}`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Delete a version bundle with the specific ID.\n   * @param bundleId - The database ID of the version bundle.\n   * @param params - Optional parameters for response filtering and pagination.\n   * @param params.fields - A list of VersionBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves when the version bundle is deleted.\n   */\n  async deleteVersionBundle<TSchema extends VersionBundleSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<VersionBundleEntity<TSchema>> {\n    return this.youtrack.fetch<VersionBundleEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/version/${bundleId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Get the list of all version values in a specific version bundle.\n   * @param bundleId - The database ID of the version bundle.\n   * @param params - Optional parameters for response filtering and pagination.\n   * @param params.fields - A list of VersionBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @param params.$top - Maximum number of entries to return in the response.\n   * @param params.$skip - Number of entries to skip before returning the first one.\n   * @returns A promise that resolves to the list of version values in the bundle.\n   */\n  async getVersionBundleValues<TSchema extends VersionBundleElementSchema>(\n    bundleId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<VersionBundleElementEntity<TSchema>[]> {\n    return this.youtrack.fetch<VersionBundleElementEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/version/${bundleId}/values`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Add a new version to the bundle.\n   * @param bundleId - The database ID of the version bundle.\n   * @param body - The details of the new version (required: name).\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of VersionBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the added version element.\n   */\n  async addVersionToBundle<TSchema extends VersionBundleElementSchema>(\n    bundleId: string,\n    body: { name: string } & DeepPartial<VersionBundleElement>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<VersionBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<VersionBundleElementEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/bundles/version/${bundleId}/values`, { fields }, params).post(\n        body,\n      ),\n    )\n  }\n\n  /**\n   * Update a specific version value in the bundle.\n   * @param bundleId - The database ID of the version bundle.\n   * @param elementId - The database ID of the version value.\n   * @param body - The updated version value data.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of VersionBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the updated version element.\n   */\n  async updateVersionBundleValue<TSchema extends VersionBundleElementSchema>(\n    bundleId: string,\n    elementId: string,\n    body: DeepPartial<VersionBundleElement>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<VersionBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<VersionBundleElementEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/version/${bundleId}/values/${elementId}`,\n        { fields },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Remove a specific version from the bundle.\n   * @param bundleId - The database ID of the version bundle.\n   * @param elementId - The database ID of the version value.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of VersionBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves when the version value is removed.\n   */\n  async removeVersionFromBundle<TSchema extends VersionBundleElementSchema>(\n    bundleId: string,\n    elementId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<VersionBundleElementEntity<TSchema>> {\n    return this.youtrack.fetch<VersionBundleElementEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/bundles/version/${bundleId}/values/${elementId}`,\n        { fields },\n        params,\n      ).delete(),\n    )\n  }\n}\n","import type { Schema, FieldsParam, Entity, ListParams, Workflow, WorkflowLog, WorkflowRule } from \"../../types\"\nimport { fields, queryParams, RequestBuilder } from \"../../utils\"\nimport { ResourceApi } from \"../common\"\n\ntype WorkflowSchema = Schema<Workflow>\ntype WorkflowLogSchema = Schema<WorkflowLog>\ntype WorkflowRuleSchema = Schema<WorkflowRule>\ntype WorkflowEntity<TSchema extends WorkflowSchema> = Entity<Workflow, TSchema>\ntype WorkflowLogEntity<TSchema extends WorkflowLogSchema> = Entity<WorkflowLog, TSchema>\ntype WorkflowRuleEntity<TSchema extends WorkflowRuleSchema> = Entity<WorkflowRule, TSchema>\n\nexport class WorkflowsApi extends ResourceApi {\n  /**\n   * Get a list of all workflows in the system.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Maximum number of entries to return. Use -1 for all entries.\n   * @param params.$skip - Optional. Number of entries to skip before returning the first one.\n   * @param params.query - Optional. Filter workflows by language (e.g., \"language:JS,mps\").\n   * @returns A promise that resolves to a list of Workflow entities.\n   */\n  async getWorkflows<TSchema extends WorkflowSchema>(\n    params?: FieldsParam<TSchema> & ListParams & { query?: string },\n  ): Promise<WorkflowEntity<TSchema>[]> {\n    return this.youtrack.fetch<WorkflowEntity<TSchema>[]>(\n      new RequestBuilder(\n        \"api/admin/workflows\",\n        {\n          fields,\n          ...queryParams(\"$top\", \"$skip\"),\n          query: \"string\",\n        },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Get workflow by id.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to a Workflow entity.\n   */\n  async getWorkflowById<TSchema extends WorkflowSchema>(\n    workflowId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<WorkflowEntity<TSchema>> {\n    return this.youtrack.fetch<WorkflowEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/workflows/${workflowId}`,\n        {\n          fields,\n        },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Download a workflow as a zip file.\n   * @param workflowName - The name of the workflow to download.\n   * @returns A promise that resolves to a Blob containing the workflow zip file.\n   */\n  async downloadWorkflow(workflowName: string): Promise<Blob> {\n    // Remove @ prefix if present, but don't encode the whole name\n    const cleanWorkflowName = workflowName.replace(/^@/, \"\")\n\n    return this.youtrack.fetch<Blob>({\n      url: `api/admin/workflows/${cleanWorkflowName}`,\n      method: \"GET\",\n      headers: { Accept: \"application/zip\" },\n    })\n  }\n\n  /**\n   * Upload a workflow from a zip file.\n   * @param workflowName - The name of the workflow (used for the filename).\n   * @param file - The zip file containing the workflow data.\n   * @returns A promise that resolves when the workflow is successfully uploaded.\n   */\n  async uploadWorkflow(workflowName: string, file: File | Blob): Promise<void> {\n    const formData = new FormData()\n    formData.append(\"file\", file, `${workflowName}.zip`)\n\n    return this.youtrack.fetch<void>(new RequestBuilder(\"api/admin/workflows/import\", {}, {}).postFile(formData))\n  }\n\n  /**\n   * Get workflow rule execution logs.\n   * @param workflowId - The ID of the workflow.\n   * @param ruleId - The ID of the workflow rule.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of WorkflowLog attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Maximum number of log entries to return. Use -1 for all entries.\n   * @param params.query - Optional. Timestamp to filter logs from (logs newer than this timestamp).\n   * @returns A promise that resolves to a list of WorkflowLog entities.\n   */\n  async getWorkflowLogs<TSchema extends WorkflowLogSchema>(\n    workflowId: string,\n    ruleId: string,\n    params?: FieldsParam<TSchema> & { $top?: number; query?: string },\n  ): Promise<WorkflowLogEntity<TSchema>[]> {\n    return this.youtrack.fetch<WorkflowLogEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/admin/workflows/${workflowId}/rules/${ruleId}/logs`,\n        {\n          fields,\n          $top: \"number\",\n          query: \"string\",\n        },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Get a specific workflow rule by workflow ID and rule ID.\n   * @param workflowId - The ID of the workflow containing the rule.\n   * @param ruleId - The ID of the rule to retrieve.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of WorkflowRule attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Maximum number of entries to return. Use -1 for all entries.\n   * @param params.query - Optional. Filter query (e.g., \"language:JS,visual,mps\").\n   * @returns A promise that resolves to a WorkflowRule entity.\n   */\n  async getWorkflowRule<TSchema extends WorkflowRuleSchema>(\n    workflowId: string,\n    ruleId: string,\n    params?: FieldsParam<TSchema> & { $top?: number; query?: string },\n  ): Promise<WorkflowRuleEntity<TSchema>> {\n    return this.youtrack.fetch<WorkflowRuleEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/workflows/${workflowId}/rules/${ruleId}`,\n        {\n          fields,\n          $top: \"number\",\n          query: \"string\",\n        },\n        params,\n      ).get(),\n    )\n  }\n}\n","import type {\n  Schema,\n  FieldsParam,\n  Entity,\n  ListParams,\n  CustomField,\n  FieldType,\n  CustomFieldDefaults,\n  ProjectCustomField,\n  DeepPartial,\n} from \"../../types\"\nimport { fields, queryParams, RequestBuilder } from \"../../utils\"\nimport { ResourceApi } from \"../common\"\n\ntype CustomFieldSchema = Schema<CustomField>\ntype FieldTypeSchema = Schema<FieldType>\ntype CustomFieldDefaultsSchema = Schema<CustomFieldDefaults>\ntype ProjectCustomFieldSchema = Schema<ProjectCustomField>\n\ntype CustomFieldEntity<TSchema extends CustomFieldSchema> = Entity<CustomField, TSchema>\ntype FieldTypeEntity<TSchema extends FieldTypeSchema> = Entity<FieldType, TSchema>\ntype CustomFieldDefaultsEntity<TSchema extends CustomFieldDefaultsSchema> = Entity<CustomFieldDefaults, TSchema>\ntype ProjectCustomFieldEntity<TSchema extends ProjectCustomFieldSchema> = Entity<ProjectCustomField, TSchema>\n\nexport class CustomFieldsApi extends ResourceApi {\n  /**\n   * Get all available custom fields in the system.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Maximum number of entries to return.\n   * @param params.$skip - Optional. Number of entries to skip before returning the first one.\n   * @returns A promise that resolves to a list of CustomField entities.\n   */\n  async getCustomFields<TSchema extends CustomFieldSchema>(\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<CustomFieldEntity<TSchema>[]> {\n    return this.youtrack.fetch<CustomFieldEntity<TSchema>[]>(\n      new RequestBuilder(\n        \"api/admin/customFieldSettings/customFields\",\n        { fields, ...queryParams(\"$skip\", \"$top\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Create a new custom field in the system.\n   * @param body - Required fields: name, fieldType.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the created CustomField entity.\n   */\n  async createCustomField<TSchema extends CustomFieldSchema>(\n    body: {\n      name: string\n      fieldType: FieldType\n    } & DeepPartial<CustomField>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<CustomFieldEntity<TSchema>> {\n    return this.youtrack.fetch<CustomFieldEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/customFieldSettings/customFields\", { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Read the custom field with the specific ID.\n   * @param fieldId - The database ID of the custom field.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the requested CustomField entity.\n   */\n  async getCustomFieldById<TSchema extends CustomFieldSchema>(\n    fieldId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<CustomFieldEntity<TSchema>> {\n    return this.youtrack.fetch<CustomFieldEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/customFields/${fieldId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update the custom field with the specific ID.\n   * @param fieldId - The database ID of the custom field.\n   * @param body - The fields to update in the custom field.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the updated CustomField entity.\n   */\n  async updateCustomField<TSchema extends CustomFieldSchema>(\n    fieldId: string,\n    body: DeepPartial<CustomField>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<CustomFieldEntity<TSchema>> {\n    return this.youtrack.fetch<CustomFieldEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/customFields/${fieldId}`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Delete the custom field with the specific ID.\n   * @param fieldId - The database ID of the custom field.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the deleted CustomField entity.\n   */\n  async deleteCustomField<TSchema extends CustomFieldSchema>(\n    fieldId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<CustomFieldEntity<TSchema>> {\n    return this.youtrack.fetch<CustomFieldEntity<TSchema>>(\n      new RequestBuilder(`api/admin/customFieldSettings/customFields/${fieldId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Get all available field types.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. Maximum number of entries to return.\n   * @param params.$skip - Optional. Number of entries to skip before returning the first one.\n   * @returns A promise that resolves to the list of FieldType entities.\n   */\n  async getFieldTypes<TSchema extends FieldTypeSchema>(\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<FieldTypeEntity<TSchema>[]> {\n    return this.youtrack.fetch<FieldTypeEntity<TSchema>[]>(\n      new RequestBuilder(\n        \"api/admin/customFieldSettings/types\",\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Get default settings for the field.\n   * @param fieldId - The database ID of the custom field.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the CustomFieldDefaults entity.\n   */\n  async getCustomFieldDefaults<TSchema extends CustomFieldDefaultsSchema>(\n    fieldId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<CustomFieldDefaultsEntity<TSchema>> {\n    return this.youtrack.fetch<CustomFieldDefaultsEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/customFields/${fieldId}/fieldDefaults`,\n        { fields },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Update default settings for the field.\n   * @param fieldId - The database ID of the custom field.\n   * @param body - The new default settings for the field.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns A promise that resolves to the updated CustomFieldDefaults entity.\n   */\n  async updateCustomFieldDefaults<TSchema extends CustomFieldDefaultsSchema>(\n    fieldId: string,\n    body: DeepPartial<CustomFieldDefaults>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<CustomFieldDefaultsEntity<TSchema>> {\n    return this.youtrack.fetch<CustomFieldDefaultsEntity<TSchema>>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/customFields/${fieldId}/fieldDefaults`,\n        { fields },\n        params,\n      ).post(body),\n    )\n  }\n\n  /**\n   * Get all project related settings of this custom field.\n   * This method lets you see in which projects this custom field is used.\n   * @param fieldId - The database ID of the custom field.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$top - Optional. The maximum number of entries to return in the response.\n   * @param params.$skip - Optional. The number of entities to skip before returning the first one.\n   * @returns A promise that resolves to the list of ProjectCustomField entities.\n   */\n  async getCustomFieldInstances<TSchema extends ProjectCustomFieldSchema>(\n    fieldId: string,\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<ProjectCustomFieldEntity<TSchema>[]> {\n    return this.youtrack.fetch<ProjectCustomFieldEntity<TSchema>[]>(\n      new RequestBuilder(\n        `api/admin/customFieldSettings/customFields/${fieldId}/instances`,\n        { fields, ...queryParams(\"$top\", \"$skip\") },\n        params,\n      ).get(),\n    )\n  }\n}\n","import type { Schema, FieldsParam, Entity, BackupFile } from \"../../types\"\nimport { fields, RequestBuilder } from \"../../utils\"\nimport { ResourceApi } from \"../common\"\n\ntype BackupFileSchema = Schema<BackupFile>\ntype BackupFileEntity<TSchema extends BackupFileSchema> = Entity<BackupFile, TSchema>\n\nexport class BackupFilesApi extends ResourceApi {\n  /**\n   * Get data on the specific backup file.\n   * @param fileId - The name of the backup file.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of BackupFile attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the details of the specified backup file.\n   */\n  async getBackupFileData<TSchema extends BackupFileSchema>(\n    fileId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<BackupFileEntity<TSchema>> {\n    return this.youtrack.fetch<BackupFileEntity<TSchema>>(\n      new RequestBuilder(`api/admin/databaseBackup/backups/${fileId}`, { fields }, params).get(),\n    )\n  }\n}\n","import type {\n  Schema,\n  FieldsParam,\n  Entity,\n  GlobalSettings,\n  AppearanceSettings,\n  License,\n  LocaleSettings,\n  NotificationSettings,\n  RestCorsSettings,\n  SystemSettings,\n  DeepPartial,\n} from \"../../types\"\nimport { fields, RequestBuilder } from \"../../utils\"\nimport { ResourceApi } from \"../common\"\n\ntype GlobalSettingsSchema = Schema<GlobalSettings>\ntype AppearanceSettingsSchema = Schema<AppearanceSettings>\ntype LicenseSchema = Schema<License>\ntype LocaleSettingsSchema = Schema<LocaleSettings>\ntype NotificationSettingsSchema = Schema<NotificationSettings>\ntype RestCorsSettingsSchema = Schema<RestCorsSettings>\ntype SystemSettingsSchema = Schema<SystemSettings>\n\ntype GlobalSettingsEntity<TSchema extends GlobalSettingsSchema> = Entity<GlobalSettings, TSchema>\ntype AppearanceSettingsEntity<TSchema extends AppearanceSettingsSchema> = Entity<AppearanceSettings, TSchema>\ntype LicenseEntity<TSchema extends LicenseSchema> = Entity<License, TSchema>\ntype LocaleSettingsEntity<TSchema extends LocaleSettingsSchema> = Entity<LocaleSettings, TSchema>\ntype NotificationSettingsEntity<TSchema extends NotificationSettingsSchema> = Entity<NotificationSettings, TSchema>\ntype RestCorsSettingsEntity<TSchema extends RestCorsSettingsSchema> = Entity<RestCorsSettings, TSchema>\ntype SystemSettingsEntity<TSchema extends SystemSettingsSchema> = Entity<SystemSettings, TSchema>\n\nexport class GlobalSettingsApi extends ResourceApi {\n  /**\n   * Get the global settings.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of GlobalSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the global settings.\n   */\n  async getGlobalSettings<TSchema extends GlobalSettingsSchema>(\n    params?: FieldsParam<TSchema>,\n  ): Promise<GlobalSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<GlobalSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/globalSettings\", { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update the global settings.\n   * @param body - The updated settings.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of GlobalSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the updated global settings.\n   */\n  async updateGlobalSettings<TSchema extends GlobalSettingsSchema>(\n    body: DeepPartial<GlobalSettings>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<GlobalSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<GlobalSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/globalSettings\", { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Read the visual settings of the YouTrack service.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of AppearanceSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the visual settings of the service.\n   */\n  async getAppearanceSettings<TSchema extends AppearanceSettingsSchema>(\n    params?: FieldsParam<TSchema>,\n  ): Promise<AppearanceSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<AppearanceSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/globalSettings/appearanceSettings\", { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Change the visual settings of the YouTrack service.\n   * @param body - The updated appearance settings.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of AppearanceSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the updated visual settings.\n   */\n  async updateAppearanceSettings<TSchema extends AppearanceSettingsSchema>(\n    body: DeepPartial<AppearanceSettings>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<AppearanceSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<AppearanceSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/globalSettings/appearanceSettings\", { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Read the license of the YouTrack service.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of License attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the current license settings.\n   */\n  async getLicense<TSchema extends LicenseSchema>(params?: FieldsParam<TSchema>): Promise<LicenseEntity<TSchema>> {\n    return this.youtrack.fetch<LicenseEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/globalSettings/license\", { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Change the license of the YouTrack service.\n   * @param body - The updated license settings.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of License attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the updated license settings.\n   */\n  async updateLicense<TSchema extends LicenseSchema>(\n    body: DeepPartial<License>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<LicenseEntity<TSchema>> {\n    return this.youtrack.fetch<LicenseEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/globalSettings/license\", { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Read the current system language of the YouTrack service.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of LocaleSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the current locale settings.\n   */\n  async getLocaleSettings<TSchema extends LocaleSettingsSchema>(\n    params?: FieldsParam<TSchema>,\n  ): Promise<LocaleSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<LocaleSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/globalSettings/localeSettings\", { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Change the system language of the YouTrack service.\n   * @param body - The updated locale settings (including the target locale).\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of LocaleSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the updated locale settings.\n   */\n  async updateLocaleSettings<TSchema extends LocaleSettingsSchema>(\n    body: DeepPartial<LocaleSettings>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<LocaleSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<LocaleSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/globalSettings/localeSettings\", { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Read the notification settings of the YouTrack service.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of NotificationSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the current notification settings.\n   */\n  async getNotificationSettings<TSchema extends NotificationSettingsSchema>(\n    params?: FieldsParam<TSchema>,\n  ): Promise<NotificationSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<NotificationSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/globalSettings/notificationSettings\", { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Change the notification settings of the YouTrack service.\n   * @param body - The updated notification settings.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of NotificationSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the updated notification settings.\n   */\n  async updateNotificationSettings<TSchema extends NotificationSettingsSchema>(\n    body: DeepPartial<NotificationSettings>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<NotificationSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<NotificationSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/globalSettings/notificationSettings\", { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Read the Resource Sharing (CORS) settings of the YouTrack service.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of RestCorsSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the current RestCors settings.\n   */\n  async getRestSettings<TSchema extends RestCorsSettingsSchema>(\n    params?: FieldsParam<TSchema>,\n  ): Promise<RestCorsSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<RestCorsSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/globalSettings/restSettings\", { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Change the Resource Sharing (CORS) settings of the YouTrack service.\n   * @param body - The updated CORS settings.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of RestCorsSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the updated RestCors settings.\n   */\n  async updateRestSettings<TSchema extends RestCorsSettingsSchema>(\n    body: DeepPartial<RestCorsSettings>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<RestCorsSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<RestCorsSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/globalSettings/restSettings\", { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Read the System settings of the YouTrack service.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of SystemSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the current System settings.\n   */\n  async getSystemSettings<TSchema extends SystemSettingsSchema>(\n    params?: FieldsParam<TSchema>,\n  ): Promise<SystemSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<SystemSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/globalSettings/systemSettings\", { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Change the System settings of the YouTrack service.\n   * @param body - The updated system settings.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of SystemSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the updated System settings.\n   */\n  async updateSystemSettings<TSchema extends SystemSettingsSchema>(\n    body: DeepPartial<SystemSettings>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<SystemSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<SystemSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/globalSettings/systemSettings\", { fields }, params).post(body),\n    )\n  }\n}\n","import type { Schema, FieldsParam, Entity, Telemetry } from \"../../types\"\nimport { fields, RequestBuilder } from \"../../utils\"\nimport { ResourceApi } from \"../common\"\n\ntype TelemetrySchema = Schema<Telemetry>\ntype TelemetryEntity<TSchema extends TelemetrySchema> = Entity<Telemetry, TSchema>\n\nexport class TelemetryDataApi extends ResourceApi {\n  /**\n   * Read available telemetry data of the YouTrack service.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of Telemetry attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the telemetry data of the YouTrack service.\n   */\n  async getTelemetryData<TSchema extends TelemetrySchema>(\n    params?: FieldsParam<TSchema>,\n  ): Promise<TelemetryEntity<TSchema>> {\n    return this.youtrack.fetch<TelemetryEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/telemetry\", { fields }, params).get(),\n    )\n  }\n}\n","import type { Schema, FieldsParam, Entity, DatabaseBackupSettings, BackupStatus, DeepPartial } from \"../../types\"\nimport { fields, RequestBuilder } from \"../../utils\"\nimport { ResourceApi } from \"../common\"\n\ntype DatabaseBackupSettingsSchema = Schema<DatabaseBackupSettings>\ntype BackupStatusSchema = Schema<BackupStatus>\n\ntype DatabaseBackupSettingsEntity<TSchema extends DatabaseBackupSettingsSchema> = Entity<\n  DatabaseBackupSettings,\n  TSchema\n>\ntype BackupStatusEntity<TSchema extends BackupStatusSchema> = Entity<BackupStatus, TSchema>\n\nexport class DatabaseBackupSettingsApi extends ResourceApi {\n  /**\n   * Read the database backup settings.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of DatabaseBackupSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the current database backup settings.\n   */\n  async getDatabaseBackupSettings<TSchema extends DatabaseBackupSettingsSchema>(\n    params?: FieldsParam<TSchema>,\n  ): Promise<DatabaseBackupSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<DatabaseBackupSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/databaseBackup/settings\", { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update the database backup settings.\n   * @param body - The updated database backup settings.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of DatabaseBackupSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the updated database backup settings.\n   */\n  async updateDatabaseBackupSettings<TSchema extends DatabaseBackupSettingsSchema>(\n    body: DeepPartial<DatabaseBackupSettings>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<DatabaseBackupSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<DatabaseBackupSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/databaseBackup/settings\", { fields: fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Read the status of the backup process.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of BackupStatus attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the current backup status.\n   */\n  async getBackupStatus<TSchema extends BackupStatusSchema>(\n    params?: FieldsParam<TSchema>,\n  ): Promise<BackupStatusEntity<TSchema>> {\n    return this.youtrack.fetch<BackupStatusEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/databaseBackup/settings/backupStatus\", { fields }, params).get(),\n    )\n  }\n}\n","import type {\n  Schema,\n  FieldsParam,\n  Entity,\n  GlobalTimeTrackingSettings,\n  ListParams,\n  WorkItemType,\n  WorkTimeSettings,\n  DeepPartial,\n} from \"../../types\"\nimport { fields, queryParams, RequestBuilder } from \"../../utils\"\nimport { ResourceApi } from \"../common\"\n\ntype TimeTrackingSettingsSchema = Schema<GlobalTimeTrackingSettings>\ntype WorkItemTypeSchema = Schema<WorkItemType>\ntype WorkTimeSettingsSchema = Schema<WorkTimeSettings>\n\ntype TimeTrackingSettingsEntity<TSchema extends TimeTrackingSettingsSchema> = Entity<\n  GlobalTimeTrackingSettings,\n  TSchema\n>\ntype WorkItemTypeEntity<TSchema extends WorkItemTypeSchema> = Entity<WorkItemType, TSchema>\ntype WorkTimeSettingsEntity<TSchema extends WorkTimeSettingsSchema> = Entity<WorkTimeSettings, TSchema>\n\nexport class GlobalTimeTrackingSettingsApi extends ResourceApi {\n  /**\n   * Read the global time tracking settings of the service.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of GlobalTimeTrackingSettings attributes that should be returned in the response. If no field is specified, only the entityID is returned.\n   * @returns A promise that resolves to the global time tracking settings of the service.\n   */\n  async getGlobalTimeTrackingSettings<TSchema extends TimeTrackingSettingsSchema>(\n    params?: FieldsParam<TSchema>,\n  ): Promise<TimeTrackingSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<TimeTrackingSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/timeTrackingSettings\", { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Read the list of currently available work item types.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of WorkItemType attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @param params.$skip - Optional. Number of returned entities to skip before returning the first one.\n   * @param params.$top - Optional. Maximum number of entries that are returned in the response.\n   * @returns The list of work item types.\n   */\n  async getWorkItemTypes<TSchema extends WorkItemTypeSchema>(\n    params?: FieldsParam<TSchema> & ListParams,\n  ): Promise<Array<WorkItemTypeEntity<TSchema>>> {\n    return this.youtrack.fetch<Array<WorkItemTypeEntity<TSchema>>>(\n      new RequestBuilder(\n        \"api/admin/timeTrackingSettings/workItemTypes\",\n        { fields, ...queryParams(\"$skip\", \"$top\") },\n        params,\n      ).get(),\n    )\n  }\n\n  /**\n   * Create a new work item type.\n   * @param body - Required fields: name.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of WorkItemType attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The created work item type.\n   * @requires permissions Low-level Admin Write or Update Project.\n   */\n  async createWorkItemType<TSchema extends WorkItemTypeSchema>(\n    body: { name: string } | DeepPartial<WorkItemType>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<WorkItemTypeEntity<TSchema>> {\n    return this.youtrack.fetch<WorkItemTypeEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/timeTrackingSettings/workItemTypes\", { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Read a work item type with a specific ID.\n   * @param typeId - Database ID of the work item type.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of WorkItemType attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The requested work item type.\n   * @requires permissions Read Work Item.\n   */\n  async getWorkItemTypeById<TSchema extends WorkItemTypeSchema>(\n    typeId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<WorkItemTypeEntity<TSchema>> {\n    return this.youtrack.fetch<WorkItemTypeEntity<TSchema>>(\n      new RequestBuilder(`api/admin/timeTrackingSettings/workItemTypes/${typeId}`, { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update a work item type with a specific ID.\n   * @param typeId - Database ID of the work item type.\n   * @param body - The properties to update in the work item type as JSON.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of WorkItemType attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The updated work item type.\n   * @requires permissions Low-level Admin Write.\n   */\n  async updateWorkItemType<TSchema extends WorkItemTypeSchema>(\n    typeId: string,\n    body: DeepPartial<WorkItemType>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<WorkItemTypeEntity<TSchema>> {\n    return this.youtrack.fetch<WorkItemTypeEntity<TSchema>>(\n      new RequestBuilder(`api/admin/timeTrackingSettings/workItemTypes/${typeId}`, { fields }, params).post(body),\n    )\n  }\n\n  /**\n   * Delete a work item type with a specific ID.\n   * @param typeId - Database ID of the work item type.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of WorkItemType attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The result of the deletion.\n   * @requires permissions Low-level Admin Write.\n   */\n  async deleteWorkItemType<TSchema extends WorkItemTypeSchema>(\n    typeId: string,\n    params?: FieldsParam<TSchema>,\n  ): Promise<WorkItemTypeEntity<TSchema>> {\n    return this.youtrack.fetch<WorkItemTypeEntity<TSchema>>(\n      new RequestBuilder(`api/admin/timeTrackingSettings/workItemTypes/${typeId}`, { fields }, params).delete(),\n    )\n  }\n\n  /**\n   * Read the system work time settings.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of WorkTimeSettings attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The current work time settings.\n   * @requires permissions Read Work Item.\n   */\n  async getWorkTimeSettings<TSchema extends WorkTimeSettingsSchema>(\n    params?: FieldsParam<TSchema>,\n  ): Promise<WorkTimeSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<WorkTimeSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/timeTrackingSettings/workTimeSettings\", { fields }, params).get(),\n    )\n  }\n\n  /**\n   * Update the work time settings.\n   * @param body - Properties to update in the work time settings.\n   * @param params - Optional parameters for response filtering.\n   * @param params.fields - A list of WorkTimeSettings attributes that should be returned in the response. If no field is specified, only the entityId is returned.\n   * @returns The updated work time settings.\n   * @requires permissions Low-level Admin Write.\n   */\n  async updateWorkTimeSettings<TSchema extends WorkTimeSettingsSchema>(\n    body: DeepPartial<WorkTimeSettings>,\n    params?: FieldsParam<TSchema>,\n  ): Promise<WorkTimeSettingsEntity<TSchema>> {\n    return this.youtrack.fetch<WorkTimeSettingsEntity<TSchema>>(\n      new RequestBuilder(\"api/admin/timeTrackingSettings/workTimeSettings\", { fields }, params).post(body),\n    )\n  }\n}\n","import type { Axios } from \"axios\"\n\nimport type { FetchConfig, FetchFunc } from \"./types\"\nimport { encodeBody, joinUrl } from \"./utils\"\nimport * as ResourceApi from \"./resources\"\n\nexport interface RequestParams<RawBody extends boolean = true | false> extends Omit<RequestInit, 'body' | 'headers'> {\n  body?: RawBody extends true ? BodyInit | null : unknown;\n  query?: Record<string, unknown> | undefined;\n  headers?: HeadersInit | Record<string, null | undefined>;\n  sendRawBody?: RawBody;\n}\n\nexport class YouTrack {\n  public Agiles: ResourceApi.AgilesApi\n  public Activities: ResourceApi.ActivitiesApi\n  public Articles: ResourceApi.ArticlesApi\n  public Commands: ResourceApi.CommandsApi\n  public Groups: ResourceApi.GroupsApi\n  public IssueLinkTypes: ResourceApi.IssueLinkTypesApi\n  public Issues: ResourceApi.IssuesApi\n  public IssueComments: ResourceApi.IssueCommentsApi\n  public IssueLinks: ResourceApi.IssueLinksApi\n  public IssueTags: ResourceApi.IssueTagsApi\n  public IssueTimeTracking: ResourceApi.IssueTimeTrackingApi\n  public IssueVcsChanges: ResourceApi.IssueVcsChangesApi\n  public IssueAttachments: ResourceApi.IssueAttechmentsApi\n  public SavedQueries: ResourceApi.SavedQueriesApi\n  public Search: ResourceApi.SearchApi\n  public Tags: ResourceApi.TagsApi\n  public Users: ResourceApi.UsersApi\n  public WorkItems: ResourceApi.WorkItemsApi\n  public Admin: {\n    Projects: ResourceApi.ProjectsApi\n    BuildBundles: ResourceApi.BuildBundlesApi\n    EnumBundles: ResourceApi.EnumBundlesApi\n    OwnedBundles: ResourceApi.OwnedBundlesApi\n    StateBundles: ResourceApi.StateBundlesApi\n    UserBundles: ResourceApi.UserBundlesApi\n    VersionBundles: ResourceApi.VersionBundlesApi\n    CustomFields: ResourceApi.CustomFieldsApi\n    BackupFiles: ResourceApi.BackupFilesApi\n    DatabaseBackupSettings: ResourceApi.DatabaseBackupSettingsApi\n    GlobalSettings: ResourceApi.GlobalSettingsApi\n    TelemetryData: ResourceApi.TelemetryDataApi\n    GlobalTimeTrackingSettings: ResourceApi.GlobalTimeTrackingSettingsApi\n    Workflows: ResourceApi.WorkflowsApi\n  }\n\n  static client(baseUrl: string, token: string) {\n    return new YouTrack(baseUrl, async ({ url, headers, data, ...rest }: FetchConfig) => {\n      const response = await fetch(joinUrl(baseUrl, url), {\n        headers: {\n          Authorization: `Bearer ${token}`,\n          Accept: \"application/json\",\n          \"Content-Type\": \"application/json\",\n          ...headers,\n        },\n        ...(data ? { body: encodeBody(data) } : {}),\n        ...rest,\n      })\n\n      if (!response.ok) {\n        throw new Error(`Error: ${response.status} ${response.statusText}`)\n      }\n\n      if (response.headers.get(\"content-type\")?.startsWith(\"application/json\")) {\n        return response.json()\n      }\n\n      return response.blob()\n    })\n  }\n\n  static axiosClient(axios: Axios, baseUrl: string, token: string) {\n    return new YouTrack(baseUrl, async ({ url, headers, ...rest }: FetchConfig) => {\n      const params = {\n        url: joinUrl(baseUrl, url),\n        headers: {\n          Authorization: `Bearer ${token}`,\n          Accept: \"application/json;charset=utf-8\",\n          \"Content-Type\": \"application/json\",\n          ...headers,\n        },\n        ...rest,\n      }\n      const response = await axios.request(params)\n\n      if (response.headers[\"content-type\"]?.startsWith(\"application/json\")) {\n        return typeof response.data === \"string\" && response.data !== \"\" ? JSON.parse(response.data) : response.data\n      }\n      return response.data\n    })\n  }\n\n  static widget(api: {\n    fetchYouTrack: <T = unknown>(relativeURL: string, requestParams?: RequestParams) => Promise<T>;\n  }) {\n    return new YouTrack(\"\", (config) => {\n      const { url, data, ...rest } = config\n      // TODO: handle Blob data\n      return api.fetchYouTrack(url.slice(4), {\n        ...(data ? { body: data } : {}),\n        ...rest,\n      })\n    })\n  }\n\n  constructor(\n    public baseUrl: string,\n    public fetch: FetchFunc,\n  ) {\n    this.Agiles = new ResourceApi.AgilesApi(this)\n    this.Activities = new ResourceApi.ActivitiesApi(this)\n    this.Articles = new ResourceApi.ArticlesApi(this)\n    this.Commands = new ResourceApi.CommandsApi(this)\n    this.Groups = new ResourceApi.GroupsApi(this)\n    this.IssueLinkTypes = new ResourceApi.IssueLinkTypesApi(this)\n    this.Issues = new ResourceApi.IssuesApi(this)\n    this.IssueComments = new ResourceApi.IssueCommentsApi(this)\n    this.IssueLinks = new ResourceApi.IssueLinksApi(this)\n    this.IssueTags = new ResourceApi.IssueTagsApi(this)\n    this.IssueTimeTracking = new ResourceApi.IssueTimeTrackingApi(this)\n    this.IssueVcsChanges = new ResourceApi.IssueVcsChangesApi(this)\n    this.IssueAttachments = new ResourceApi.IssueAttechmentsApi(this)\n    this.SavedQueries = new ResourceApi.SavedQueriesApi(this)\n    this.Search = new ResourceApi.SearchApi(this)\n    this.Tags = new ResourceApi.TagsApi(this)\n    this.Users = new ResourceApi.UsersApi(this)\n    this.WorkItems = new ResourceApi.WorkItemsApi(this)\n    this.Admin = {\n      Projects: new ResourceApi.ProjectsApi(this),\n      BuildBundles: new ResourceApi.BuildBundlesApi(this),\n      EnumBundles: new ResourceApi.EnumBundlesApi(this),\n      OwnedBundles: new ResourceApi.OwnedBundlesApi(this),\n      StateBundles: new ResourceApi.StateBundlesApi(this),\n      UserBundles: new ResourceApi.UserBundlesApi(this),\n      VersionBundles: new ResourceApi.VersionBundlesApi(this),\n      CustomFields: new ResourceApi.CustomFieldsApi(this),\n      BackupFiles: new ResourceApi.BackupFilesApi(this),\n      DatabaseBackupSettings: new ResourceApi.DatabaseBackupSettingsApi(this),\n      GlobalSettings: new ResourceApi.GlobalSettingsApi(this),\n      TelemetryData: new ResourceApi.TelemetryDataApi(this),\n      GlobalTimeTrackingSettings: new ResourceApi.GlobalTimeTrackingSettingsApi(this),\n      Workflows: new ResourceApi.WorkflowsApi(this),\n    }\n  }\n}\n"],"names":["isObject","value","joinUrl","_baseUrl","_url","baseUrl","url","endsWith","slice","startsWith","encodeBody","data","FormData","JSON","stringify","buildUri","baseUri","pathParams","Object","keys","reduce","uri","param","replace","encodeURIComponent","createParamsMap","values","res","key","index","fieldsBuilder","schema","_fields","map","field","join","length","fields","buildQueryParam","Array","isArray","item","stringParam","queryParams","params","customField","RequestBuilder","constructor","builders","defineProperty","this","forEach","arg","_args","push","build","options","query","get","post","method","postFile","headers","delete","put","patch","ResourceApi","youtrack","ActivitiesApi","getActivities","fetch","getActivityById","itemId","getActivitiesPage","AgilesApi","getAgiles","$skip","$top","createAgile","body","template","getAgileById","agileId","updateAgile","deleteAgile","getAgileSprints","createAgileSprint","muteUpdateNotifications","getAgileSprintById","sprintId","deleteAgileSprint","updateAgileSprint","ArticlesApi","getArticles","createArticle","getArticle","articleId","updateArticle","deleteArticle","getArticleAttachments","createArticleAttachment","getArticleAttachment","attachmentId","updateArticleAttachment","deleteArticleAttachment","getChildArticles","addChildArticle","getChildArticle","subArticleId","updateChildArticle","removeChildArticleLink","getArticleComments","createArticleComment","getArticleComment","commentId","updateArticleComment","deleteArticleComment","getArticleCommentReactions","createCommentReaction","getCommnetReaction","reactionId","removeCommnetReaction","getParentArticle","getArticleTags","createArticleTag","getArticleTag","tagId","removeArticleTag","CommandsApi","applyCommandToIssues","getCommandSuggestions","GroupsApi","getUserGroups","getUserGroupById","groupId","IssueLinkTypesApi","getIssueLinkTypes","createIssueLinkType","getIssueLinkType","typeId","updateIssueLinkType","deleteIssueLinkType","IssuesApi","getIssues","createIssue","getIssueById","issueId","updateIssue","deleteIssue","getIssueCount","response","count","getIssueActivities","getIssueActivity","getIssueCustomFields","getIssueCustomFieldById","fieldId","updateIssueCustomField","getIssueProject","changeIssueProject","getIssueSprints","SavedQueriesApi","getSavedQueries","createSavedQuery","getSavedQueryById","queryId","updateSavedQuery","deleteSavedQuery","SearchApi","getSearchSuggestions","TagsApi","getTags","getTagById","createTag","updateTag","deleteTag","getIssuesByTag","UsersApi","getUsers","getUserProfile","userId","getUserGeneralProfile","updateUserGeneralProfile","userID","getUserNotificationProfile","updateUserNotificationProfile","getUserTimeTrackingProfile","updateUserTimeTrackingProfile","getUserSavedQueries","getUserTags","getCurrentUserProfile","WorkItemsApi","getWorkItems","getWorkItem","IssueCommentsApi","getIssueComments","createIssueComment","getIssueCommentById","updateIssueComment","deleteIssueComment","getIssueCommnetReaction","deleteIssueCommnetReaction","IssueLinksApi","getIssueLinks","getIssueLinkById","linkId","getLinkedIssues","linkIssue","unlinkIssue","linkedIssueId","IssueTagsApi","getIssueTags","addTagToIssue","getIssueTagById","deleteIssueTag","IssueTimeTrackingApi","getIssueTimeTracking","getIssueWorkItems","createIssueWorkItem","getIssueWorkItemById","workItemId","updateWorkItem","deleteIssueWorkItem","IssueVcsChangesApi","getIssueVcsChanges","linkIssueVcsChange","getIssueVcsChangeById","changeId","updateIssueVcsChange","detachIssueVcsChange","IssueAttechmentsApi","getIssueAttachments","createIssueAttachment","getIssueAttachmentById","updateIssueAttachment","deleteIssueAttachment","ProjectsApi","getProjects","createProject","getProjectById","projectId","updateProject","deleteProject","getProjectArticles","getProjectCustomFields","addCustomFieldToProject","getProjectCustomFieldById","updateProjectCustomField","removeProjectCustomField","getProjectIssues","createProjectIssue","getProjectIssueById","updateProjectIssue","deleteProjectIssue","getProjectTimeTrackingSettings","updateProjectTimeTrackingSettings","getProjectWorkItemTypes","addProjectWorkItemType","getProjectWorkItemTypeById","deleteProjectWorkItemType","BuildBundlesApi","getBuildBundles","createBuildBundle","getBuildBundleById","bundleId","updateBuildBundle","deleteBuildBundle","getBuildBundleValues","addBuildToBundle","getBuildFromBundle","elementId","updateBuildInBundle","removeBuildFromBundle","EnumBundlesApi","getEnumBundles","createEnumBundle","getEnumBundle","updateEnumBundle","bundleID","deleteEnumBundle","getEnumBundleValues","addEnumBundleValue","getEnumBundleValueById","updateEnumBundleValue","deleteEnumBundleValue","OwnedBundlesApi","getOwnedBundles","createOwnedBundle","getOwnedBundleById","updateOwnedBundle","deleteOwnedBundle","getOwnedBundleValues","addOwnedToBundle","updateOwnedBundleValue","removeOwnedFromBundle","StateBundlesApi","getStateBundles","createStateBundle","getStateBundleById","updateStateBundle","deleteStateBundle","getStateBundleValues","addStateToBundle","updateStateBundleValue","removeStateFromBundle","UserBundlesApi","getUserBundles","createUserBundle","getUserBundleById","updateUserBundle","deleteUserBundle","getUserBundleAggregatedUsers","getUserBundleUserGroups","addUserGroupToUserBundle","getUserGroupInBundleById","deleteUserGroupFromUserBundle","getUserBundleIndividualUsers","addIndividualUserToUserBundle","getIndividualUserInBundleById","removeIndividualUserFromUserBundle","VersionBundlesApi","getVersionBundles","createVersionBundle","getVersionBundleById","updateVersionBundle","deleteVersionBundle","getVersionBundleValues","addVersionToBundle","updateVersionBundleValue","removeVersionFromBundle","WorkflowsApi","getWorkflows","getWorkflowById","workflowId","downloadWorkflow","workflowName","cleanWorkflowName","Accept","uploadWorkflow","file","formData","append","getWorkflowLogs","ruleId","getWorkflowRule","CustomFieldsApi","getCustomFields","createCustomField","getCustomFieldById","updateCustomField","deleteCustomField","getFieldTypes","getCustomFieldDefaults","updateCustomFieldDefaults","getCustomFieldInstances","BackupFilesApi","getBackupFileData","fileId","GlobalSettingsApi","getGlobalSettings","updateGlobalSettings","getAppearanceSettings","updateAppearanceSettings","getLicense","updateLicense","getLocaleSettings","updateLocaleSettings","getNotificationSettings","updateNotificationSettings","getRestSettings","updateRestSettings","getSystemSettings","updateSystemSettings","TelemetryDataApi","getTelemetryData","DatabaseBackupSettingsApi","getDatabaseBackupSettings","updateDatabaseBackupSettings","getBackupStatus","GlobalTimeTrackingSettingsApi","getGlobalTimeTrackingSettings","getWorkItemTypes","createWorkItemType","getWorkItemTypeById","updateWorkItemType","deleteWorkItemType","getWorkTimeSettings","updateWorkTimeSettings","YouTrack","client","token","async","rest","Authorization","ok","Error","status","statusText","json","blob","axiosClient","axios","request","parse","widget","api","config","fetchYouTrack","Agiles","Activities","Articles","Commands","Groups","IssueLinkTypes","Issues","IssueComments","IssueLinks","IssueTags","IssueTimeTracking","IssueVcsChanges","IssueAttachments","SavedQueries","Search","Tags","Users","WorkItems","Admin","Projects","BuildBundles","EnumBundles","OwnedBundles","StateBundles","UserBundles","VersionBundles","CustomFields","BackupFiles","DatabaseBackupSettings","GlobalSettings","TelemetryData","GlobalTimeTrackingSettings","Workflows"],"mappings":";;;;;AAAaA,MAAAA,EAAYC,GACN,OAAVA,GAAmC,iBAAVA,EAGrBC,EAAUA,CAACC,EAAkBC,KACxC,IAAIC,EAAUF,EACVG,EAAMF,EAWV,OATIC,EAAQE,SAAS,OACnBF,EAAUA,EAAQG,MAAM,GAAI,IAI1BF,EAAIG,WAAW,OACjBH,EAAMA,EAAIE,MAAM,IAGX,GAAGH,KAAWC,GAAK,ECdfI,EAAcC,GACrBA,aAAgBC,SACXD,EAGW,iBAATA,EACFE,KAAKC,UAAUH,GAGjBA,EAIII,EAAWA,CAACC,EAAiBC,EAAqC,KAC7EC,OAAOC,KAAKF,GAAYG,QACtB,CAACC,EAAKC,IAAUD,EAAIE,QAAQ,IAAID,IAASE,mBAAmBP,EAAWK,MACvEN,GAGSS,EAAkBA,CAACN,EAAiB,GAAIO,EAAiC,KAC7EP,EAAKC,QACV,CAACO,EAAKC,EAAKC,KACTF,EAAIC,GAAO,GAAGF,EAAOG,KACdF,IAET,CAA4B,GAI1BG,EAAgBA,CAACC,EAAuB,MAC5C,MAAMC,EAAUD,EAAOE,KAAKC,GAC1BlC,EAASkC,GACLhB,OAAOC,KAAKe,GACTD,KAAKL,GAAQ,GAAGA,KAAOE,EAAcI,EAAMN,SAC3CO,KAAK,KACRX,mBAAmBU,KAEzB,OAAOF,EAAQI,OAASJ,EAAQG,KAAK,KAAO,EAAE,EAGnCE,EAAqDA,CAACN,EAAS,MAC1E,MAAMC,EA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