{"version":3,"file":"main.mjs","names":["record","dataRecord","Jwt","JwtModel","TeamUserBillingDetails","BillingDetailsModel"],"sources":["../src/models/base_model.ts","../src/models/branch.ts","../src/lokalise/pkg.ts","../src/models/api_error.ts","../src/http_client/base.ts","../src/models/paginated_result.ts","../src/models/cursor_paginated_result.ts","../src/models/v1/cursor_paginated_result.ts","../src/collections/base_collection.ts","../src/collections/branches.ts","../src/models/comment.ts","../src/collections/comments.ts","../src/models/contributor.ts","../src/collections/contributors.ts","../src/models/file.ts","../src/models/queued_process.ts","../src/utils/logger.ts","../src/collections/files.ts","../src/models/glossary_term.ts","../src/collections/glossary_terms.ts","../src/models/jwt.ts","../src/collections/jwt.ts","../src/models/key.ts","../src/collections/keys.ts","../src/models/language.ts","../src/collections/languages.ts","../src/models/order.ts","../src/collections/orders.ts","../src/models/payment_card.ts","../src/collections/payment_cards.ts","../src/models/permission_template.ts","../src/collections/permission_templates.ts","../src/models/project.ts","../src/collections/projects.ts","../src/collections/queued_processes.ts","../src/models/screenshot.ts","../src/collections/screenshots.ts","../src/models/segment.ts","../src/collections/segments.ts","../src/models/snapshot.ts","../src/collections/snapshots.ts","../src/models/task.ts","../src/collections/tasks.ts","../src/models/team_user_billing_details.ts","../src/collections/team_user_billing_details.ts","../src/models/team_user.ts","../src/collections/team_users.ts","../src/models/team.ts","../src/collections/teams.ts","../src/models/translation_provider.ts","../src/collections/translation_providers.ts","../src/models/translation_status.ts","../src/collections/translation_statuses.ts","../src/models/translation.ts","../src/collections/translations.ts","../src/models/user_group.ts","../src/collections/user_groups.ts","../src/models/v1/audit_event.ts","../src/collections/v1/audit_logs.ts","../src/models/webhook.ts","../src/collections/webhooks.ts","../src/lokalise/base_client.ts","../src/lokalise/lokalise_api.ts","../src/lokalise/lokalise_api_oauth.ts","../src/models/ota/ota_bundle.ts","../src/ota_collections/ota_collection.ts","../src/ota_collections/ota_bundle_management.ts","../src/ota_collections/ota_bundle_publishing.ts","../src/models/ota/ota_bundle_archive.ts","../src/ota_collections/ota_bundles.ts","../src/models/ota/ota_freeze_period.ts","../src/ota_collections/ota_freeze_periods.ts","../src/models/ota/ota_sdk_token.ts","../src/ota_collections/ota_sdk_tokens.ts","../src/models/ota/ota_statistics.ts","../src/ota_collections/ota_usage_statistics.ts","../src/lokalise/lokalise_api_ota.ts","../src/lokalise/lokalise_api_v1.ts","../src/lokalise/lokalise_ota_bundles.ts","../src/oauth2/auth_request.ts","../src/oauth2/lokalise_auth.ts","../src/models/auth_error.ts"],"sourcesContent":["export abstract class BaseModel<\n\tT extends Record<string, unknown> = Record<string, unknown>,\n> {\n\tconstructor(params: Partial<T>) {\n\t\tObject.assign(this, params);\n\t}\n}\n","import type { Branch as BranchInterface } from \"../interfaces/branch.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class Branch extends BaseModel implements BranchInterface {\n\tdeclare branch_id: number;\n\tdeclare name: string;\n\tdeclare created_at: string;\n\tdeclare created_at_timestamp: number;\n\tdeclare created_by: number;\n\tdeclare created_by_email: string;\n}\n","import { readFile } from \"node:fs/promises\";\n\n/**\n * Returns the relative path to the package.json file.\n * Adjust this if your directory structure changes.\n */\nfunction pkgPath(): string {\n\treturn \"../../package.json\";\n}\n\n/**\n * Attempts to read and parse the local package.json file to retrieve the version.\n * If the file cannot be read or parsed, returns \"unknown\".\n *\n * @returns {Promise<string>} The package version string or \"unknown\" if unavailable.\n */\nexport async function getVersion(): Promise<string> {\n\ttry {\n\t\tconst data = await readFile(new URL(pkgPath(), import.meta.url));\n\t\tconst pkg = JSON.parse(data.toString()) as { version?: string };\n\t\treturn String(pkg.version);\n\t} catch {\n\t\treturn \"unknown\";\n\t}\n}\n","import type { IApiError } from \"../interfaces/api_error.js\";\n\n/**\n * Represents an API error with a specific code and optional details.\n */\nexport class ApiError extends Error implements IApiError {\n\t/**\n\t * The error code representing the type of API error.\n\t */\n\tcode: number;\n\n\t/**\n\t * Additional details about the error (optional).\n\t */\n\tdetails?: Record<string, string | number | boolean>;\n\n\t/**\n\t * Creates an instance of ApiError.\n\t *\n\t * @param {string} message - The error message.\n\t * @param {number} code - The error code.\n\t * @param {Record<string, string | number | boolean>} [details] - Additional details about the error.\n\t */\n\tconstructor(\n\t\tmessage: string,\n\t\tcode: number,\n\t\tdetails?: Record<string, string | number | boolean>,\n\t) {\n\t\tsuper(message);\n\t\tthis.code = code;\n\t\tif (details) {\n\t\t\tthis.details = details;\n\t\t}\n\t}\n\n\t/**\n\t * Returns a string representation of the error, including code and details.\n\t *\n\t * @returns The formatted error message.\n\t */\n\toverride toString(): string {\n\t\tlet baseMessage = `LokaliseError: ${this.message}`;\n\t\tbaseMessage += ` (Code: ${this.code})`;\n\n\t\tif (this.details) {\n\t\t\tconst formattedDetails = Object.entries(this.details)\n\t\t\t\t.map(([key, value]) => `${key}: ${value}`)\n\t\t\t\t.join(\", \");\n\n\t\t\tbaseMessage += ` | Details: ${formattedDetails}`;\n\t\t}\n\t\treturn baseMessage;\n\t}\n}\n","import type { ClientData } from \"../interfaces/client_data.js\";\nimport { getVersion } from \"../lokalise/pkg.js\";\nimport { ApiError } from \"../models/api_error.js\";\nimport type { HttpMethod } from \"../types/http_method.js\";\n\nexport type ApiResponse = {\n\tjson: Record<string, unknown>;\n\theaders: Headers;\n};\n\n/**\n * Represents a single API request to the Lokalise API.\n * Handles URL construction, request initiation, response processing, and error handling.\n */\nexport class ApiRequest {\n\t/**\n\t * The default base URL for the Lokalise API.\n\t */\n\tprotected static readonly urlRoot = \"https://api.lokalise.com/api2/\";\n\n\t/**\n\t * The resolved response from the API request.\n\t */\n\tpublic response?: ApiResponse;\n\n\t/**\n\t * Query and path parameters used to construct the request URL.\n\t * This object is modified during URL construction, removing parameters used in path segments.\n\t */\n\tpublic params: Record<string, unknown> = {};\n\n\t/**\n\t * Constructs a new ApiRequest instance.\n\t * @param params - Query and/or path parameters.\n\t */\n\tconstructor(params: Record<string, unknown>) {\n\t\t// Copy params to avoid modifying the original object\n\t\tthis.params = { ...params };\n\t}\n\n\tpublic static async create(\n\t\turi: string,\n\t\tmethod: HttpMethod,\n\t\tbody: object | object[] | null,\n\t\tparams: Record<string, unknown>,\n\t\tclientData: ClientData,\n\t): Promise<ApiRequest & { response: ApiResponse }>;\n\n\t/**\n\t * Static async factory method to create an ApiRequest instance with a fully resolved response.\n\t * @param uri - The endpoint URI (versioned path expected).\n\t * @param method - The HTTP method (GET, POST, PUT, DELETE, etc).\n\t * @param body - The request payload, if applicable.\n\t * @param params - Query and/or path parameters.\n\t * @param clientData - Authentication and configuration data for the request.\n\t * @returns A promise that resolves to a fully constructed ApiRequest instance with the `response` set.\n\t */\n\tpublic static async create(\n\t\turi: string,\n\t\tmethod: HttpMethod,\n\t\tbody: object | object[] | null,\n\t\tparams: Record<string, unknown>,\n\t\tclientData: ClientData,\n\t): Promise<ApiRequest> {\n\t\tconst apiRequest = new ApiRequest(params);\n\t\tapiRequest.response = await apiRequest.createPromise(\n\t\t\turi,\n\t\t\tmethod,\n\t\t\tbody,\n\t\t\tclientData,\n\t\t);\n\t\treturn apiRequest;\n\t}\n\n\t/**\n\t * Creates the request promise by composing the URL, building headers, and executing the fetch.\n\t * @param uri - The endpoint URI.\n\t * @param method - The HTTP method.\n\t * @param body - The request payload.\n\t * @param clientData - Client configuration and auth data.\n\t * @returns A promise resolving to an ApiResponse or rejecting with an ApiError.\n\t */\n\tprotected async createPromise(\n\t\turi: string,\n\t\tmethod: HttpMethod,\n\t\tbody: object | object[] | null,\n\t\tclientData: ClientData,\n\t): Promise<ApiResponse> {\n\t\tconst url = this.composeURI(`/${clientData.version}/${uri}`);\n\t\tconst prefixUrl = clientData.host ?? ApiRequest.urlRoot;\n\t\tconst headers = await this.buildHeaders(clientData, method, body);\n\n\t\tconst options: RequestInit = {\n\t\t\tmethod,\n\t\t\theaders,\n\t\t\t...(method !== \"GET\" && body ? { body: JSON.stringify(body) } : {}),\n\t\t};\n\n\t\tconst target = new URL(url, prefixUrl);\n\t\tconst stringifiedParams: Record<string, string> = Object.fromEntries(\n\t\t\tObject.entries(this.params)\n\t\t\t\t.filter(([, value]) => value !== undefined && value !== null)\n\t\t\t\t.map(([key, value]) => [key, String(value)]),\n\t\t);\n\t\ttarget.search = new URLSearchParams(stringifiedParams).toString();\n\n\t\treturn this.fetchAndHandleResponse(\n\t\t\ttarget,\n\t\t\toptions,\n\t\t\tclientData.requestTimeout,\n\t\t);\n\t}\n\n\t/**\n\t * Executes the fetch request and handles network-level errors.\n\t * Applies a request timeout if specified.\n\t * @param target - The fully constructed request URL.\n\t * @param options - The fetch request options.\n\t * @param requestTimeout - Optional timeout in milliseconds.\n\t * @returns A promise resolving to an ApiResponse or rejecting with an ApiError.\n\t */\n\tprotected async fetchAndHandleResponse(\n\t\ttarget: URL,\n\t\toptions: RequestInit,\n\t\trequestTimeout = 0,\n\t): Promise<ApiResponse> {\n\t\tconst signal =\n\t\t\trequestTimeout > 0 ? AbortSignal.timeout(requestTimeout) : undefined;\n\n\t\ttry {\n\t\t\tconst response = await fetch(target, {\n\t\t\t\t...options,\n\t\t\t\t...(signal ? { signal } : {}),\n\t\t\t});\n\n\t\t\treturn this.processResponse(response);\n\t\t} catch (err) {\n\t\t\tif (err instanceof Error) {\n\t\t\t\tif (err.name === \"TimeoutError\") {\n\t\t\t\t\treturn Promise.reject(\n\t\t\t\t\t\tnew ApiError(`Request timed out after ${requestTimeout}ms`, 408, {\n\t\t\t\t\t\t\treason: \"timeout\",\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn Promise.reject(\n\t\t\t\t\tnew ApiError(err.message, 500, { reason: \"network or fetch error\" }),\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn Promise.reject(\n\t\t\t\tnew ApiError(\"An unknown error occurred\", 500, {\n\t\t\t\t\treason: String(err),\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Processes the fetch response.\n\t * Attempts to parse JSON unless the status is 204 (No Content).\n\t * @param response - The raw fetch Response object.\n\t * @returns A promise resolving to an ApiResponse if successful, or rejecting with ApiError otherwise.\n\t */\n\tprotected async processResponse(response: Response): Promise<ApiResponse> {\n\t\tlet responseJSON: unknown = null;\n\n\t\ttry {\n\t\t\tif (response.status !== 204) {\n\t\t\t\tresponseJSON = await response.json();\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treturn Promise.reject(\n\t\t\t\tnew ApiError((error as Error).message, response.status, {\n\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\treason: \"JSON parsing error\",\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\n\t\tif (response.ok) {\n\t\t\treturn {\n\t\t\t\tjson: responseJSON as Record<string, unknown>,\n\t\t\t\theaders: response.headers,\n\t\t\t};\n\t\t}\n\n\t\treturn Promise.reject(this.getErrorFromResp(responseJSON));\n\t}\n\n\t/**\n\t * Derives an ApiError instance from the response JSON, which may follow various patterns.\n\t * @param respJson - The parsed JSON response from the server.\n\t * @returns An ApiError representing the server error.\n\t */\n\tprotected getErrorFromResp(respJson: unknown): ApiError {\n\t\tif (!respJson || typeof respJson !== \"object\") {\n\t\t\treturn new ApiError(\"An unknown error occurred\", 500, {\n\t\t\t\treason: \"unexpected response format\",\n\t\t\t});\n\t\t}\n\n\t\tconst errorObj = respJson as Record<string, unknown>;\n\n\t\t// Top-level error format: { message: string, statusCode: number, error: string }\n\t\tif (\n\t\t\ttypeof errorObj.message === \"string\" &&\n\t\t\ttypeof errorObj.statusCode === \"number\" &&\n\t\t\ttypeof errorObj.error === \"string\"\n\t\t) {\n\t\t\treturn new ApiError(errorObj.message, errorObj.statusCode, {\n\t\t\t\treason: errorObj.error,\n\t\t\t});\n\t\t}\n\n\t\t// Nested error object: { error: { message, code, details } }\n\t\tif (errorObj.error && typeof errorObj.error === \"object\") {\n\t\t\tconst {\n\t\t\t\tmessage = \"Unknown error\",\n\t\t\t\tcode = 500,\n\t\t\t\tdetails,\n\t\t\t} = errorObj.error as Record<string, unknown>;\n\t\t\tconst safeDetails: Record<string, string | number | boolean> =\n\t\t\t\ttypeof details === \"object\" && details !== null\n\t\t\t\t\t? (details as Record<string, string | number | boolean>)\n\t\t\t\t\t: { reason: \"server error without details\" };\n\n\t\t\treturn new ApiError(\n\t\t\t\tString(message),\n\t\t\t\ttypeof code === \"number\" ? code : 500,\n\t\t\t\tsafeDetails,\n\t\t\t);\n\t\t}\n\n\t\t// Alternative top-level fields: { message: string, code?: number, errorCode?: number, details?: any }\n\t\tif (\n\t\t\ttypeof errorObj.message === \"string\" &&\n\t\t\t(typeof errorObj.code === \"number\" ||\n\t\t\t\ttypeof errorObj.errorCode === \"number\")\n\t\t) {\n\t\t\tconst statusCode =\n\t\t\t\ttypeof errorObj.code === \"number\" ? errorObj.code : errorObj.errorCode;\n\t\t\tconst rawDetails = errorObj.details;\n\t\t\tconst safeDetails: Record<string, string | number | boolean> =\n\t\t\t\ttypeof rawDetails === \"object\" && rawDetails !== null\n\t\t\t\t\t? (rawDetails as Record<string, string | number | boolean>)\n\t\t\t\t\t: { reason: \"server error without details\" };\n\t\t\treturn new ApiError(errorObj.message, statusCode as number, safeDetails);\n\t\t}\n\n\t\t// Fallback if no known error format matches\n\t\treturn new ApiError(\"An unknown error occurred\", 500, {\n\t\t\treason: \"unhandled error format\",\n\t\t\tdata: JSON.stringify(respJson),\n\t\t});\n\t}\n\n\t/**\n\t * Builds the request headers, including authentication, compression, and JSON headers as needed.\n\t * @param clientData - Client configuration and auth data.\n\t * @param method - The HTTP method.\n\t * @param body - The request payload.\n\t * @returns A promise resolving to the constructed Headers.\n\t */\n\tprotected async buildHeaders(\n\t\tclientData: ClientData,\n\t\tmethod: HttpMethod,\n\t\tbody: object | object[] | null,\n\t): Promise<Headers> {\n\t\tconst userAgent =\n\t\t\tclientData.userAgent?.trim() || `node-lokalise-api/${await getVersion()}`;\n\t\tconst headers = new Headers({\n\t\t\tAccept: \"application/json\",\n\t\t\t\"User-Agent\": userAgent,\n\t\t});\n\n\t\t// Auth header can be either just the token or \"<tokenType> <token>\"\n\t\theaders.append(\n\t\t\tclientData.authHeader,\n\t\t\tclientData.tokenType.length > 0\n\t\t\t\t? `${clientData.tokenType} ${clientData.token}`\n\t\t\t\t: clientData.token,\n\t\t);\n\n\t\tif (clientData.enableCompression) {\n\t\t\theaders.append(\"Accept-Encoding\", \"gzip,deflate\");\n\t\t}\n\n\t\tif (method !== \"GET\" && body) {\n\t\t\theaders.append(\"Content-Type\", \"application/json\");\n\t\t}\n\n\t\treturn headers;\n\t}\n\n\t/**\n\t * Composes the final URI by replacing placeholders of the form `/{!:{paramName}}`\n\t * with the corresponding parameter values.\n\t * @param rawUri - The raw URI template.\n\t * @returns The final composed URI string.\n\t * @throws Error if a required parameter is missing.\n\t */\n\tprotected composeURI(rawUri: string): string {\n\t\tconst regexp = /\\{(!?):(\\w+)\\}/g;\n\t\tconst uri = rawUri.replace(regexp, this.mapUriParams());\n\t\treturn uri.endsWith(\"/\") ? uri.slice(0, -1) : uri;\n\t}\n\n\t/**\n\t * Returns a function that maps URI parameters from placeholders.\n\t * @returns A function used as a replacement callback in `composeURI`.\n\t * @throws Error if a required parameter is missing.\n\t */\n\tprotected mapUriParams(): (\n\t\tsubstring: string,\n\t\tisMandatory: string,\n\t\tparamName: string,\n\t) => string {\n\t\treturn (\n\t\t\t_substring: string,\n\t\t\tisMandatory: string,\n\t\t\tparamName: string,\n\t\t): string => {\n\t\t\tif (this.params[paramName] != null) {\n\t\t\t\tconst paramValue = String(this.params[paramName]);\n\t\t\t\t// Remove the parameter so it doesn't appear as a query parameter\n\t\t\t\tdelete this.params[paramName];\n\t\t\t\treturn paramValue;\n\t\t\t}\n\t\t\tif (isMandatory === \"!\") {\n\t\t\t\tthrow new Error(`Missing required parameter: ${paramName}`);\n\t\t\t}\n\t\t\treturn \"\";\n\t\t};\n\t}\n}\n","import type { PaginatedResult as PaginatedResultInterface } from \"../interfaces/paginated_result.js\";\n\nexport class PaginatedResult<T> implements PaginatedResultInterface {\n\ttotalResults: number;\n\ttotalPages: number;\n\tresultsPerPage: number;\n\tcurrentPage: number;\n\tresponseTooBig: boolean;\n\titems: T[];\n\n\tconstructor(items: T[], headers: Headers) {\n\t\tthis.totalResults = this.safeParseInt(\n\t\t\theaders.get(\"x-pagination-total-count\"),\n\t\t);\n\t\tthis.totalPages = this.safeParseInt(headers.get(\"x-pagination-page-count\"));\n\t\tthis.resultsPerPage = this.safeParseInt(headers.get(\"x-pagination-limit\"));\n\t\tthis.currentPage = this.safeParseInt(headers.get(\"x-pagination-page\"));\n\t\tthis.responseTooBig = headers.has(\"x-response-too-big\");\n\t\tthis.items = items;\n\t}\n\n\thasNextPage(): boolean {\n\t\treturn this.currentPage > 0 && this.currentPage < this.totalPages;\n\t}\n\n\thasPrevPage(): boolean {\n\t\treturn this.currentPage > 1;\n\t}\n\n\tisLastPage(): boolean {\n\t\treturn !this.hasNextPage();\n\t}\n\n\tisFirstPage(): boolean {\n\t\treturn !this.hasPrevPage();\n\t}\n\n\tnextPage(): number {\n\t\tif (this.isLastPage()) {\n\t\t\treturn this.currentPage;\n\t\t}\n\t\treturn this.currentPage + 1;\n\t}\n\n\tprevPage(): number {\n\t\tif (this.isFirstPage()) {\n\t\t\treturn this.currentPage;\n\t\t}\n\t\treturn this.currentPage - 1;\n\t}\n\n\tprivate safeParseInt(str: string | null): number {\n\t\tif (!str || Number.isNaN(Number(str))) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn Number.parseInt(str, 10);\n\t}\n}\n","import type { CursorPaginatedResult as CursorPaginatedResultInterface } from \"../interfaces/cursor_paginated_result.js\";\nimport { PaginatedResult } from \"./paginated_result.js\";\n\nexport class CursorPaginatedResult<T>\n\textends PaginatedResult<T>\n\timplements CursorPaginatedResultInterface\n{\n\tnextCursor: string | null;\n\n\tconstructor(items: T[], headers: Headers) {\n\t\tsuper(items, headers);\n\n\t\tthis.nextCursor = headers.get(\"x-pagination-next-cursor\");\n\t}\n\n\thasNextCursor(): boolean {\n\t\treturn this.nextCursor !== null;\n\t}\n}\n","import type { CursorPaginatedResponseV1 } from \"../../interfaces/v1/cursor_paginated_response.js\";\r\n\r\nimport type { CursorPaginatedResultV1 as ICursorPaginatedResultV1 } from \"../../interfaces/v1/cursor_paginated_result.js\";\r\n\r\nexport class CursorPaginatedResultV1<T> implements ICursorPaginatedResultV1<T> {\r\n\treadonly next_cursor: string | null;\r\n\treadonly has_more: boolean;\r\n\treadonly items: T[];\r\n\r\n\tconstructor(response: CursorPaginatedResponseV1<T>) {\r\n\t\tthis.items = response.data;\r\n\t\tthis.next_cursor = response.next_cursor;\r\n\t\tthis.has_more = response.has_more;\r\n\t}\r\n}\r\n","import { ApiRequest, type ApiResponse } from \"../http_client/base.js\";\r\nimport type { BulkResult } from \"../interfaces/bulk_result.js\";\r\nimport type { ClientData } from \"../interfaces/client_data.js\";\r\nimport { CursorPaginatedResult } from \"../models/cursor_paginated_result.js\";\r\nimport { PaginatedResult } from \"../models/paginated_result.js\";\r\nimport { CursorPaginatedResultV1 } from \"../models/v1/cursor_paginated_result.js\";\r\nimport type { HttpMethod } from \"../types/http_method.js\";\r\n\r\ntype ResolveHandler<T> = (json: Record<string, unknown>, headers: Headers) => T;\r\ntype ApiRequestWithResponse = ApiRequest & { response: ApiResponse };\r\n\r\n/**\r\n * An abstract base class that provides generic CRUD (Create, Read, Update, Delete) operations\r\n * and handling for pagination, cursor pagination, and bulk operations. Other \"collection\" classes\r\n * should extend this class and provide specific implementations for resource endpoints.\r\n *\r\n * Expected usage:\r\n * - Subclasses define `rootElementName` and/or `rootElementNameSingular` to indicate the JSON fields\r\n *   that contain the desired data.\r\n * - `elementClass` and optionally `secondaryElementClass` should be overridden to map raw JSON\r\n *   objects to strongly typed model instances.\r\n * - `endpoint` and `prefixURI` should be set as static properties in subclasses to specify resource paths.\r\n */\r\nexport abstract class BaseCollection<ElementType, SecondaryType = ElementType> {\r\n\t/**\r\n\t * Client data containing authentication and configuration details.\r\n\t * Provided by a `BaseClient` or similar client instance.\r\n\t */\r\n\treadonly clientData: ClientData;\r\n\r\n\t/**\r\n\t * Static endpoint property that subclasses can define to indicate the API endpoint\r\n\t * for this collection. If not set, ensure `prefixURI` or `uri` parameters are passed.\r\n\t */\r\n\tprotected static endpoint: string | null;\r\n\r\n\t/**\r\n\t * Static prefixURI property that subclasses can define to indicate a base path.\r\n\t * If `uri` is not passed explicitly, this prefix is used to construct the request URL.\r\n\t */\r\n\tprotected static prefixURI: string | null;\r\n\r\n\t/**\r\n\t * Constructs a new BaseCollection instance.\r\n\t * @param clientData - Client data for making authenticated requests.\r\n\t */\r\n\tconstructor(clientData: ClientData) {\r\n\t\tthis.clientData = clientData;\r\n\t}\r\n\r\n\t/**\r\n\t * Abstract getter that must be implemented by subclasses.\r\n\t * Should return a class constructor that maps a JSON object to an `ElementType` instance.\r\n\t */\r\n\tprotected abstract get elementClass(): new (\r\n\t\tjson: Record<string, unknown>,\r\n\t) => ElementType;\r\n\r\n\t/**\r\n\t * Getter that must be overridden by subclasses to return the root element name\r\n\t * for array-based JSON responses.\r\n\t * @throws Error if not defined by the subclass.\r\n\t */\r\n\tprotected get rootElementName(): string {\r\n\t\tthrow new Error(\r\n\t\t\t\"rootElementName is not defined. Subclasses must override `rootElementName`.\",\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Getter that may be overridden by subclasses to return the root element name\r\n\t * for single-item JSON responses.\r\n\t * @throws Error if not defined by the subclass.\r\n\t */\r\n\tprotected get rootElementNameSingular(): string | null {\r\n\t\tthrow new Error(\r\n\t\t\t\"rootElementNameSingular is not defined. Subclasses must override `rootElementNameSingular`.\",\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Getter that may be overridden by subclasses if a secondary model type is returned.\r\n\t * By default, this throws an error. If needed, override it in the subclass.\r\n\t */\r\n\tprotected get secondaryElementClass(): new (\r\n\t\tjson: Record<string, unknown>,\r\n\t) => SecondaryType {\r\n\t\tthrow new Error(\r\n\t\t\t\"Secondary elements are not supported by this collection. Override `secondaryElementClass` if needed.\",\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Getter that must be overridden if `secondaryElementClass` is used.\r\n\t * Returns the JSON property name for the secondary element.\r\n\t * @throws Error if not defined by the subclass that uses secondary elements.\r\n\t */\r\n\tprotected get secondaryElementNameSingular(): string {\r\n\t\tthrow new Error(\r\n\t\t\t\"secondaryElementNameSingular is not defined. Subclasses must override this if secondary elements are used.\",\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Perform a GET request that expects a list of items.\r\n\t * @param params Optional query or request parameters.\r\n\t * @returns A promise resolving to either a paginated result or an array of ElementType.\r\n\t */\r\n\tprotected doList(\r\n\t\tparams: Record<string, unknown>,\r\n\t): Promise<PaginatedResult<ElementType> | ElementType[]> {\r\n\t\treturn this.createPromise(\"GET\", params, this.populateArrayFromJson, null);\r\n\t}\r\n\r\n\t/**\r\n\t * Perform a GET request that expects a cursor-paginated list of items.\r\n\t * @param params Optional query or request parameters.\r\n\t * @returns A promise resolving to a CursorPaginatedResult of ElementType.\r\n\t */\r\n\tprotected doListCursor(\r\n\t\tparams: Record<string, unknown>,\r\n\t): Promise<CursorPaginatedResult<ElementType>> {\r\n\t\treturn this.createPromise(\r\n\t\t\t\"GET\",\r\n\t\t\tparams,\r\n\t\t\tthis.populateArrayFromJsonCursor,\r\n\t\t\tnull,\r\n\t\t);\r\n\t}\r\n\r\n\tprotected doListCursorV1(\r\n\t\tparams: Record<string, unknown>,\r\n\t): Promise<CursorPaginatedResultV1<ElementType>> {\r\n\t\treturn this.createPromise<CursorPaginatedResultV1<ElementType>>(\r\n\t\t\t\"GET\",\r\n\t\t\tparams,\r\n\t\t\tthis.populateArrayFromJsonCursorV1,\r\n\t\t\tnull,\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Perform a GET request to retrieve a single item by its ID.\r\n\t * @param id The ID of the item to retrieve.\r\n\t * @param params Optional query or request parameters.\r\n\t * @returns A promise resolving to a single ElementType instance.\r\n\t */\r\n\tprotected doGet(\r\n\t\tid: string | number,\r\n\t\tparams: Record<string, unknown> = {},\r\n\t): Promise<ElementType> {\r\n\t\treturn this.createPromise(\r\n\t\t\t\"GET\",\r\n\t\t\t{ ...params, id },\r\n\t\t\tthis.populateObjectFromJsonRoot,\r\n\t\t\tnull,\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Perform a DELETE request to remove a single item by its ID.\r\n\t * @param id The ID of the item to delete.\r\n\t * @param params Optional query or request parameters.\r\n\t * @returns A promise resolving to JSON representing the deletion result.\r\n\t */\r\n\tprotected doDelete<T = Record<string, unknown> | Record<string, unknown>[]>(\r\n\t\tid: string | number,\r\n\t\tparams: Record<string, unknown> = {},\r\n\t): Promise<T> {\r\n\t\treturn this.createPromise(\r\n\t\t\t\"DELETE\",\r\n\t\t\t{ ...params, id },\r\n\t\t\tthis.returnBareJSON,\r\n\t\t\tnull,\r\n\t\t) as Promise<T>;\r\n\t}\r\n\r\n\t/**\r\n\t * Perform a POST request to create a new resource.\r\n\t * @param body The object or array of objects to send in the request body.\r\n\t * @param params Optional query or request parameters.\r\n\t * @param resolveFn Optional custom resolve handler to parse the response.\r\n\t * @returns A promise resolving to an ElementType or SecondaryType instance.\r\n\t */\r\n\tprotected doCreate(\r\n\t\tbody: object | object[] | null,\r\n\t\tparams: Record<string, unknown> = {},\r\n\t\tresolveFn = this.populateObjectFromJson,\r\n\t): Promise<ElementType | SecondaryType> {\r\n\t\treturn this.createPromise(\"POST\", params, resolveFn, body);\r\n\t}\r\n\r\n\t/**\r\n\t * Perform a POST request to create multiple resources at once.\r\n\t * @param body The object or array of objects to send in the request body.\r\n\t * @param params Optional query or request parameters.\r\n\t * @param resolveFn Optional custom resolve handler to parse the response array.\r\n\t * @returns A promise resolving to an array of ElementType.\r\n\t */\r\n\tprotected doCreateArray(\r\n\t\tbody: object | object[] | null,\r\n\t\tparams: Record<string, unknown>,\r\n\t\tresolveFn: ResolveHandler<ElementType[]> = this.populateArray,\r\n\t): Promise<ElementType[]> {\r\n\t\treturn this.createPromise(\"POST\", params, resolveFn, body);\r\n\t}\r\n\r\n\t/**\r\n\t * Perform an UPDATE (PUT/PATCH) request to modify an existing resource by its ID.\r\n\t * @param id The ID of the item to update.\r\n\t * @param body The updated fields to send in the request body.\r\n\t * @param params Optional query or request parameters.\r\n\t * @param resolveFn Optional custom resolve handler to parse the response object.\r\n\t * @param method The HTTP method to use, typically PUT or PATCH.\r\n\t * @returns A promise resolving to the updated ElementType instance.\r\n\t */\r\n\tprotected doUpdate(\r\n\t\tid: string | number,\r\n\t\tbody: Record<string, unknown> | null,\r\n\t\tparams: Record<string, unknown>,\r\n\t\tresolveFn = this.populateObjectFromJsonRoot,\r\n\t\tmethod: HttpMethod = \"PUT\",\r\n\t): Promise<ElementType> {\r\n\t\treturn this.createPromise(method, { ...params, id }, resolveFn, body);\r\n\t}\r\n\r\n\t/**\r\n\t * Parse a JSON response that contains a single item under a known root element name.\r\n\t * @param json The raw JSON object returned by the API.\r\n\t * @param headers The response headers.\r\n\t * @returns The parsed ElementType instance.\r\n\t * @throws Error if the expected root element name is missing.\r\n\t */\r\n\tprotected populateObjectFromJsonRoot(\r\n\t\tjson: Record<string, unknown>,\r\n\t\theaders: Headers,\r\n\t): ElementType {\r\n\t\tlet jsonData: Record<string, unknown> = json;\r\n\r\n\t\tconst rootElementName = this.rootElementNameSingular;\r\n\t\tif (rootElementName) {\r\n\t\t\tconst picked = jsonData[rootElementName];\r\n\r\n\t\t\tif (!this.isRecord(picked)) {\r\n\t\t\t\tthrow new Error(`Missing property '${rootElementName}' in JSON object`);\r\n\t\t\t}\r\n\r\n\t\t\tjsonData = picked;\r\n\t\t}\r\n\r\n\t\treturn this.populateObjectFromJson(jsonData, headers) as ElementType;\r\n\t}\r\n\r\n\t/**\r\n\t * Parse a JSON response that contains a secondary item under a known secondary root element name.\r\n\t * @param json The raw JSON object returned by the API.\r\n\t * @param headers The response headers.\r\n\t * @returns The parsed SecondaryType instance.\r\n\t * @throws Error if the expected secondary element name is missing.\r\n\t */\r\n\tprotected populateSecondaryObjectFromJsonRoot(\r\n\t\tjson: Record<string, unknown>,\r\n\t\theaders: Headers,\r\n\t): SecondaryType {\r\n\t\tconst root = this.secondaryElementNameSingular;\r\n\t\tconst record = json as Record<string, unknown>;\r\n\r\n\t\tconst itemJson = record[root];\r\n\t\tif (typeof itemJson !== \"object\" || itemJson === null) {\r\n\t\t\tthrow new Error(\r\n\t\t\t\t`Missing expected secondary property '${root}' in JSON response.`,\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn this.populateObjectFromJson(\r\n\t\t\titemJson as Record<string, unknown>,\r\n\t\t\theaders,\r\n\t\t\ttrue,\r\n\t\t) as SecondaryType;\r\n\t}\r\n\r\n\t/**\r\n\t * Parse a JSON response that contains a secondary item.\r\n\t * @param json The raw JSON object returned by the API.\r\n\t * @param headers The response headers.\r\n\t * @returns The parsed SecondaryType instance.\r\n\t */\r\n\tprotected populateSecondaryObjectFromJson(\r\n\t\tjson: Record<string, unknown>,\r\n\t\theaders: Headers,\r\n\t): SecondaryType {\r\n\t\treturn this.populateObjectFromJson(json, headers, true) as SecondaryType;\r\n\t}\r\n\r\n\t/**\r\n\t * Parse a JSON response that contains an array of items along with bulk result details.\r\n\t * @param json The raw JSON object returned by the API.\r\n\t * @param headers The response headers.\r\n\t * @returns A BulkResult object containing items and potential errors.\r\n\t * @throws Error if the expected root element is missing or not an array.\r\n\t */\r\n\tprotected populateArrayFromJsonBulk(\r\n\t\tjson: Record<string, unknown>,\r\n\t\theaders: Headers,\r\n\t): BulkResult<ElementType> {\r\n\t\tconst root = this.rootElementName;\r\n\t\tconst jsonArray = json[root];\r\n\r\n\t\tif (!Array.isArray(jsonArray)) {\r\n\t\t\tthrow new Error(\r\n\t\t\t\t`Expected an array under '${root}' but received: ${typeof jsonArray}`,\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tconst items: ElementType[] = jsonArray.map(\r\n\t\t\t(obj) => this.populateObjectFromJson(obj, headers) as ElementType,\r\n\t\t);\r\n\r\n\t\tconst errors = Array.isArray(json.errors)\r\n\t\t\t? (json.errors as BulkResult[\"errors\"])\r\n\t\t\t: [];\r\n\r\n\t\treturn {\r\n\t\t\terrors,\r\n\t\t\titems,\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Parse a JSON response that contains an array of items.\r\n\t * If pagination headers are detected, returns a PaginatedResult.\r\n\t * Otherwise, returns a plain array of ElementType.\r\n\t * @param json The raw JSON object returned by the API.\r\n\t * @param headers The response headers.\r\n\t */\r\n\tprotected populateArrayFromJson(\r\n\t\tjson: Record<string, unknown>,\r\n\t\theaders: Headers,\r\n\t): PaginatedResult<ElementType> | ElementType[] {\r\n\t\tconst array = this.populateArray(json, headers);\r\n\t\treturn this.isPaginated(headers)\r\n\t\t\t? new PaginatedResult<ElementType>(array, headers)\r\n\t\t\t: array;\r\n\t}\r\n\r\n\t/**\r\n\t * Parse a JSON response that contains an array of items.\r\n\t * This method returns a plain array and does not consider pagination.\r\n\t * @param json The raw JSON object returned by the API.\r\n\t * @param headers The response headers.\r\n\t */\r\n\tprotected populateArray(\r\n\t\tjson: Record<string, unknown>,\r\n\t\theaders: Headers,\r\n\t): ElementType[] {\r\n\t\tconst root = this.rootElementName;\r\n\t\tconst jsonArray = json[root];\r\n\r\n\t\tif (!Array.isArray(jsonArray)) {\r\n\t\t\tthrow new Error(\r\n\t\t\t\t`Expected an array under '${root}' but received: ${typeof jsonArray}`,\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn jsonArray.map(\r\n\t\t\t(obj: Record<string, unknown>) =>\r\n\t\t\t\tthis.populateObjectFromJson(obj, headers) as ElementType,\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Parse a JSON response that contains a cursor-paginated array of items.\r\n\t * @param json The raw JSON object returned by the API.\r\n\t * @param headers The response headers.\r\n\t */\r\n\tprotected populateArrayFromJsonCursor(\r\n\t\tjson: Record<string, unknown>,\r\n\t\theaders: Headers,\r\n\t): CursorPaginatedResult<ElementType> {\r\n\t\tconst root = this.rootElementName;\r\n\t\tconst jsonArray = json[root];\r\n\r\n\t\tif (!Array.isArray(jsonArray)) {\r\n\t\t\tthrow new Error(\r\n\t\t\t\t`Expected an array under '${root}' for cursor pagination but received: ${typeof jsonArray}`,\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tconst items = jsonArray.map(\r\n\t\t\t(obj: Record<string, unknown>) =>\r\n\t\t\t\tthis.populateObjectFromJson(obj, headers) as ElementType,\r\n\t\t);\r\n\r\n\t\treturn new CursorPaginatedResult<ElementType>(items, headers);\r\n\t}\r\n\r\n\t/**\r\n\t * Parse a JSON response that contains a cursor-paginated array of items.\r\n\t * @param json The raw JSON object returned by the API.\r\n\t */\r\n\tprotected populateArrayFromJsonCursorV1(\r\n\t\tjson: Record<string, unknown>,\r\n\t\theaders: Headers,\r\n\t): CursorPaginatedResultV1<ElementType> {\r\n\t\tconst data = json.data;\r\n\r\n\t\tif (!Array.isArray(data)) {\r\n\t\t\tthrow new Error(\r\n\t\t\t\t`Expected 'data' to be an array for cursor pagination but received: ${typeof data}`,\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tconst nextCursor =\r\n\t\t\ttypeof json.next_cursor === \"string\" ? json.next_cursor : null;\r\n\r\n\t\tconst hasMore = typeof json.has_more === \"boolean\" ? json.has_more : false;\r\n\r\n\t\tconst items = data.map((obj, index) => {\r\n\t\t\tif (!this.isRecord(obj)) {\r\n\t\t\t\tthrow new Error(\r\n\t\t\t\t\t`Expected item at index ${index} in 'data' to be an object`,\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\treturn this.populateObjectFromJson(obj, headers) as ElementType;\r\n\t\t});\r\n\r\n\t\treturn new CursorPaginatedResultV1({\r\n\t\t\tdata: items,\r\n\t\t\tnext_cursor: nextCursor,\r\n\t\t\thas_more: hasMore,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Parse a JSON object into either an ElementType or a SecondaryType instance.\r\n\t * @param json The raw JSON object returned by the API.\r\n\t * @param _headers The response headers (if needed).\r\n\t * @param secondary If true, use the secondaryElementClass instead of elementClass.\r\n\t */\r\n\tprotected populateObjectFromJson(\r\n\t\tjson: Record<string, unknown>,\r\n\t\t_headers: Headers = new Headers(),\r\n\t\tsecondary = false,\r\n\t): ElementType | SecondaryType {\r\n\t\tconst cls = secondary ? this.secondaryElementClass : this.elementClass;\r\n\t\treturn new cls(json);\r\n\t}\r\n\r\n\t/**\r\n\t * Return the raw JSON as-is.\r\n\t * @param json The raw JSON object or array returned by the API.\r\n\t * @param _headers The response headers (if needed).\r\n\t */\r\n\tprotected returnBareJSON<T>(json: unknown, _headers: Headers): T {\r\n\t\treturn json as T;\r\n\t}\r\n\r\n\t/**\r\n\t * Convert a single object into an array if it's not already an array.\r\n\t * @param raw_body The raw request body.\r\n\t */\r\n\tprotected objToArray(\r\n\t\traw_body: Record<string, unknown> | Record<string, unknown>[],\r\n\t): Record<string, unknown>[] {\r\n\t\treturn Array.isArray(raw_body) ? raw_body : [raw_body];\r\n\t}\r\n\r\n\t/**\r\n\t * Create a Promise that sends an HTTP request and resolves with a parsed response.\r\n\t * @param method The HTTP method (GET, POST, PUT, DELETE, etc.).\r\n\t * @param params Query or request parameters.\r\n\t * @param resolveFn A function to resolve and parse the JSON response.\r\n\t * @param body The request body, if applicable.\r\n\t * @param uri An explicit URI to use for the request. If not provided, prefixURI is used.\r\n\t */\r\n\tprotected async createPromise<T>(\r\n\t\tmethod: HttpMethod,\r\n\t\tparams: Record<string, unknown>,\r\n\t\tresolveFn: ResolveHandler<T>,\r\n\t\tbody: object | object[] | null,\r\n\t\turi: string | null = null,\r\n\t): Promise<T> {\r\n\t\tconst request = await this.prepareRequest(method, body, params, uri);\r\n\t\treturn resolveFn.call(\r\n\t\t\tthis,\r\n\t\t\trequest.response.json,\r\n\t\t\trequest.response.headers,\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Prepare the API request by creating a new ApiRequest instance using the static async factory method.\r\n\t * @param method The HTTP method.\r\n\t * @param body The request body.\r\n\t * @param params The request parameters.\r\n\t * @param uri An explicit URI for the request or null.\r\n\t */\r\n\tprotected async prepareRequest(\r\n\t\tmethod: HttpMethod,\r\n\t\tbody: object | object[] | null,\r\n\t\tparams: Record<string, unknown>,\r\n\t\turi: string | null,\r\n\t): Promise<ApiRequestWithResponse> {\r\n\t\treturn await ApiRequest.create(\r\n\t\t\tthis.getUri(uri),\r\n\t\t\tmethod,\r\n\t\t\tbody,\r\n\t\t\tparams,\r\n\t\t\tthis.clientData,\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Determine the URI for the request. If uri is not provided, use prefixURI.\r\n\t * @param uri An explicit URI or null.\r\n\t * @throws Error if no URI or prefixURI is provided.\r\n\t */\r\n\tprotected getUri(uri: string | null): string {\r\n\t\tconst childClass = this.constructor as typeof BaseCollection;\r\n\t\tconst resolvedUri = uri ?? childClass.prefixURI;\r\n\t\tif (!resolvedUri) {\r\n\t\t\tthrow new Error(\r\n\t\t\t\t\"No URI or prefixURI provided. Ensure the subclass defines a static prefixURI or pass a URI explicitly.\",\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn resolvedUri;\r\n\t}\r\n\r\n\tprotected isResponseTooBig(headers: Headers): boolean {\r\n\t\treturn headers.has(\"x-response-too-big\");\r\n\t}\r\n\r\n\t/**\r\n\t * Determine if the response headers indicate pagination.\r\n\t * @param headers The response headers.\r\n\t */\r\n\tprivate isPaginated(headers: Headers): boolean {\r\n\t\treturn (\r\n\t\t\theaders.has(\"x-pagination-total-count\") &&\r\n\t\t\theaders.has(\"x-pagination-page\")\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Runtime type guard for narrowing `unknown` to `Record<string, unknown>`.\r\n\t *\r\n\t * @param value The value to test.\r\n\t */\r\n\tprivate isRecord(value: unknown): value is Record<string, unknown> {\r\n\t\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\r\n\t}\r\n}\r\n","import type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { Branch } from \"../models/branch.js\";\nimport type {\n\tBranchDeleted,\n\tBranchMerged,\n\tBranchParams,\n\tMergeBranchParams,\n} from \"../types/branches.js\";\nimport type {\n\tProjectOnly,\n\tProjectWithPagination,\n} from \"../types/common_get_params.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class Branches extends BaseCollection<Branch> {\n\tprotected static override prefixURI =\n\t\t\"projects/{!:project_id}/branches/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => Branch {\n\t\treturn Branch;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"branches\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"branch\";\n\t}\n\n\tlist(\n\t\trequest_params: ProjectWithPagination,\n\t): Promise<PaginatedResult<Branch>> {\n\t\treturn this.doList(request_params) as Promise<PaginatedResult<Branch>>;\n\t}\n\n\tcreate(\n\t\tbranch_params: BranchParams,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Branch> {\n\t\treturn this.doCreate(\n\t\t\tbranch_params,\n\t\t\trequest_params,\n\t\t\tthis.populateObjectFromJsonRoot,\n\t\t);\n\t}\n\n\tget(\n\t\tbranch_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Branch> {\n\t\treturn this.doGet(branch_id, request_params);\n\t}\n\n\tupdate(\n\t\tbranch_id: string | number,\n\t\tbranch_params: BranchParams,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Branch> {\n\t\treturn this.doUpdate(branch_id, branch_params, request_params);\n\t}\n\n\tdelete(\n\t\tbranch_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<BranchDeleted> {\n\t\treturn this.doDelete<BranchDeleted>(branch_id, request_params);\n\t}\n\n\tmerge(\n\t\tbranch_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t\tbody: MergeBranchParams = {},\n\t): Promise<BranchMerged> {\n\t\tconst params = {\n\t\t\t...request_params,\n\t\t\t...{ id: branch_id },\n\t\t};\n\n\t\treturn this.createPromise<BranchMerged>(\n\t\t\t\"POST\",\n\t\t\tparams,\n\t\t\tthis.returnBareJSON<BranchMerged>,\n\t\t\tbody,\n\t\t\t\"projects/{!:project_id}/branches/{:id}/merge\",\n\t\t);\n\t}\n}\n","import type { Comment as CommentInterface } from \"../interfaces/comment.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class Comment extends BaseModel implements CommentInterface {\n\tdeclare comment_id: number;\n\tdeclare key_id: number;\n\tdeclare comment: string;\n\tdeclare added_by: number;\n\tdeclare added_by_email: string;\n\tdeclare added_at: string;\n\tdeclare added_at_timestamp: number;\n}\n","import type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { Comment } from \"../models/comment.js\";\nimport type {\n\tCommentData,\n\tCommentDeleted,\n\tKeyProjectPagination,\n\tProjectAndKey,\n} from \"../types/comments.js\";\nimport type { ProjectWithPagination } from \"../types/common_get_params.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class Comments extends BaseCollection<Comment> {\n\tprotected static override prefixURI =\n\t\t\"projects/{!:project_id}/keys/{!:key_id}/comments/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => Comment {\n\t\treturn Comment;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"comments\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"comment\";\n\t}\n\n\tlist(\n\t\trequest_params: KeyProjectPagination,\n\t): Promise<PaginatedResult<Comment>> {\n\t\treturn this.doList(request_params) as Promise<PaginatedResult<Comment>>;\n\t}\n\n\tcreate(\n\t\tcomment_params: CommentData | CommentData[],\n\t\trequest_params: ProjectAndKey,\n\t): Promise<Comment[]> {\n\t\tconst body = { comments: this.objToArray(comment_params) };\n\n\t\treturn this.doCreateArray(body, request_params);\n\t}\n\n\tget(\n\t\tcomment_id: string | number,\n\t\trequest_params: ProjectAndKey,\n\t): Promise<Comment> {\n\t\treturn this.doGet(comment_id, request_params);\n\t}\n\n\tdelete(\n\t\tcomment_id: string | number,\n\t\trequest_params: ProjectAndKey,\n\t): Promise<CommentDeleted> {\n\t\treturn this.doDelete(comment_id, request_params);\n\t}\n\n\tlist_project_comments(\n\t\tparams: ProjectWithPagination,\n\t): Promise<PaginatedResult<Comment>> {\n\t\treturn this.createPromise(\n\t\t\t\"GET\",\n\t\t\tparams,\n\t\t\tthis.populateArrayFromJson,\n\t\t\tnull,\n\t\t\t\"projects/{!:project_id}/comments\",\n\t\t) as Promise<PaginatedResult<Comment>>;\n\t}\n}\n","import type { Contributor as ContributorInterface } from \"../interfaces/contributor.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class Contributor extends BaseModel implements ContributorInterface {\n\tdeclare user_id: number;\n\tdeclare email: string;\n\tdeclare fullname: string;\n\tdeclare created_at: string;\n\tdeclare created_at_timestamp: number;\n\tdeclare is_admin: boolean; //deprecated\n\tdeclare is_reviewer: boolean; //deprecated\n\tdeclare languages: Array<{\n\t\tlang_id: number;\n\t\tlang_iso: string;\n\t\tlang_name: string;\n\t\tis_writable: boolean;\n\t}>;\n\tdeclare admin_rights: string[];\n\tdeclare role_id: number;\n\tdeclare uuid?: string;\n}\n","import type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { Contributor } from \"../models/contributor.js\";\nimport type {\n\tProjectOnly,\n\tProjectWithPagination,\n} from \"../types/common_get_params.js\";\nimport type {\n\tContributorCreateData,\n\tContributorDeleted,\n\tContributorUpdateData,\n} from \"../types/contributors.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class Contributors extends BaseCollection<Contributor> {\n\tprotected static override prefixURI =\n\t\t\"projects/{!:project_id}/contributors/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => Contributor {\n\t\treturn Contributor;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"contributors\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"contributor\";\n\t}\n\n\tlist(\n\t\trequest_params: ProjectWithPagination,\n\t): Promise<PaginatedResult<Contributor>> {\n\t\treturn this.doList(request_params) as Promise<PaginatedResult<Contributor>>;\n\t}\n\n\tcreate(\n\t\tcontributor_params: ContributorCreateData | ContributorCreateData[],\n\t\trequest_params: ProjectOnly,\n\t): Promise<Contributor[]> {\n\t\tconst body = { contributors: this.objToArray(contributor_params) };\n\n\t\treturn this.doCreateArray(body, request_params);\n\t}\n\n\tget(\n\t\tcontributor_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Contributor> {\n\t\treturn this.doGet(contributor_id, request_params);\n\t}\n\n\tme(request_params: ProjectOnly): Promise<Contributor> {\n\t\treturn this.doGet(\"me\", request_params);\n\t}\n\n\tupdate(\n\t\tcontributor_id: string | number,\n\t\tcontributor_params: ContributorUpdateData,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Contributor> {\n\t\treturn this.doUpdate(contributor_id, contributor_params, request_params);\n\t}\n\n\tdelete(\n\t\tcontributor_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<ContributorDeleted> {\n\t\treturn this.doDelete(contributor_id, request_params);\n\t}\n}\n","import type { File as FileInterface } from \"../interfaces/file.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class File extends BaseModel implements FileInterface {\n\tdeclare file_id: number;\n\tdeclare filename: string;\n\tdeclare key_count: number;\n}\n","import type { QueuedProcess as QueuedProcessInterface } from \"../interfaces/queued_process.js\";\nimport type { QueuedProcessDetails } from \"../types/queued_process_details.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class QueuedProcess extends BaseModel implements QueuedProcessInterface {\n\tdeclare process_id: string;\n\tdeclare type: string;\n\tdeclare status: string;\n\tdeclare message: string;\n\tdeclare created_by: number;\n\tdeclare created_by_email: string;\n\tdeclare created_at: string;\n\tdeclare created_at_timestamp: number;\n\tdeclare details: QueuedProcessDetails;\n}\n","/**\n * Emits a warning to the console unless `silent` is true.\n *\n * @param silent - If true, suppresses the log output.\n * @param args - The items to log, passed to `console.warn`.\n */\nexport function warn(silent: boolean, ...args: unknown[]): void {\n\tif (silent) return;\n\n\tconsole.warn(...args);\n}\n","import type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { File } from \"../models/file.js\";\nimport { QueuedProcess } from \"../models/queued_process.js\";\nimport type { ProjectOnly } from \"../types/common_get_params.js\";\nimport type {\n\tDownloadBundle,\n\tDownloadFileParams,\n\tFileDeleted,\n\tListFileParams,\n\tUploadFileFromFssParams,\n\tUploadFileParams,\n} from \"../types/files.js\";\nimport { warn } from \"../utils/logger.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class Files extends BaseCollection<File, QueuedProcess> {\n\tprotected static override prefixURI = \"projects/{!:project_id}/files/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => File {\n\t\treturn File;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"files\";\n\t}\n\n\tprotected override get secondaryElementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => QueuedProcess {\n\t\treturn QueuedProcess;\n\t}\n\n\tprotected override get secondaryElementNameSingular(): string {\n\t\treturn \"process\";\n\t}\n\n\tprotected override returnBareJSON<T>(\n\t\tjson: Record<string, unknown> | Record<string, unknown>[],\n\t\theaders: Headers,\n\t): T {\n\t\tif (this.isResponseTooBig(headers)) {\n\t\t\twarn(\n\t\t\t\tthis.clientData.silent,\n\t\t\t\t\"\\x1b[33m\\x1b[1mWarning:\\x1b[0m Project too big for sync export. Please use our async export lokaliseApi.files().async_download() method.\",\n\t\t\t);\n\t\t}\n\t\treturn {\n\t\t\t...super.returnBareJSON<T>(json, headers),\n\t\t\tresponseTooBig: this.isResponseTooBig(headers),\n\t\t};\n\t}\n\n\tlist(request_params: ListFileParams): Promise<PaginatedResult<File>> {\n\t\treturn this.doList(request_params) as Promise<PaginatedResult<File>>;\n\t}\n\n\tupload(project_id: string, upload: UploadFileParams): Promise<QueuedProcess> {\n\t\treturn this.createPromise(\n\t\t\t\"POST\",\n\t\t\t{ project_id },\n\t\t\tthis.populateSecondaryObjectFromJsonRoot,\n\t\t\tupload,\n\t\t\t\"projects/{!:project_id}/files/upload\",\n\t\t);\n\t}\n\n\tuploadFromFss(\n\t\tproject_id: string,\n\t\tupload: UploadFileFromFssParams,\n\t): Promise<QueuedProcess> {\n\t\treturn this.createPromise(\n\t\t\t\"POST\",\n\t\t\t{ project_id },\n\t\t\tthis.populateSecondaryObjectFromJsonRoot,\n\t\t\tupload,\n\t\t\t\"projects/{!:project_id}/files/upload-from-fss\",\n\t\t);\n\t}\n\n\tdownload(\n\t\tproject_id: string,\n\t\tdownload: DownloadFileParams,\n\t): Promise<DownloadBundle> {\n\t\treturn this.createPromise(\n\t\t\t\"POST\",\n\t\t\t{ project_id },\n\t\t\tthis.returnBareJSON<DownloadBundle>,\n\t\t\tdownload,\n\t\t\t\"projects/{!:project_id}/files/download\",\n\t\t);\n\t}\n\n\tasync_download(\n\t\tproject_id: string,\n\t\tdownload: DownloadFileParams,\n\t): Promise<QueuedProcess> {\n\t\treturn this.createPromise(\n\t\t\t\"POST\",\n\t\t\t{ project_id },\n\t\t\tthis.populateSecondaryObjectFromJson,\n\t\t\tdownload,\n\t\t\t\"projects/{!:project_id}/files/async-download\",\n\t\t);\n\t}\n\n\tdelete(\n\t\tfile_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<FileDeleted> {\n\t\treturn this.doDelete(file_id, request_params);\n\t}\n}\n","import type { GlossaryTerm as GlossaryTermInterface } from \"../interfaces/glossary_term.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class GlossaryTerm extends BaseModel implements GlossaryTermInterface {\n\tdeclare id: number;\n\tdeclare projectId: string;\n\tdeclare term: string;\n\tdeclare description: string;\n\tdeclare caseSensitive: boolean;\n\tdeclare translatable: boolean;\n\tdeclare forbidden: boolean;\n\tdeclare translations: Array<{\n\t\tlangId: number;\n\t\tlangName: string;\n\t\tlangIso: string;\n\t\ttranslation: string;\n\t\tdescription: string;\n\t}>;\n\tdeclare tags: string[];\n\tdeclare createdAt: string;\n\tdeclare updatedAt: string | null;\n}\n","import type { BulkResult } from \"../interfaces/bulk_result.js\";\nimport type { CursorPaginatedResult } from \"../interfaces/cursor_paginated_result.js\";\nimport { GlossaryTerm } from \"../models/glossary_term.js\";\nimport type { ProjectOnly } from \"../types/common_get_params.js\";\nimport type {\n\tCreateTermsParams,\n\tListTermsParams,\n\tTermsDeleted,\n\tUpdateTermsParams,\n} from \"../types/glossary_terms.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class GlossaryTerms extends BaseCollection<GlossaryTerm> {\n\tprotected static override prefixURI =\n\t\t\"projects/{!:project_id}/glossary-terms/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => GlossaryTerm {\n\t\treturn GlossaryTerm;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"data\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"data\";\n\t}\n\n\tget(\n\t\tterm_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<GlossaryTerm> {\n\t\treturn this.doGet(term_id, request_params);\n\t}\n\n\tlist(\n\t\trequest_params: ListTermsParams,\n\t): Promise<CursorPaginatedResult<GlossaryTerm>> {\n\t\treturn this.doListCursor(request_params);\n\t}\n\n\tcreate(\n\t\tterm_params: CreateTermsParams,\n\t\trequest_params: ProjectOnly,\n\t): Promise<BulkResult<GlossaryTerm>> {\n\t\treturn this.createPromise(\n\t\t\t\"POST\",\n\t\t\trequest_params,\n\t\t\tthis.populateArrayFromJsonBulk,\n\t\t\tterm_params,\n\t\t);\n\t}\n\n\tupdate(\n\t\tterm_params: UpdateTermsParams,\n\t\trequest_params: ProjectOnly,\n\t): Promise<BulkResult<GlossaryTerm>> {\n\t\treturn this.createPromise(\n\t\t\t\"PUT\",\n\t\t\trequest_params,\n\t\t\tthis.populateArrayFromJsonBulk,\n\t\t\tterm_params,\n\t\t\t\"projects/{!:project_id}/glossary-terms\",\n\t\t);\n\t}\n\n\tdelete(\n\t\tterm_ids: number[],\n\t\trequest_params: ProjectOnly,\n\t): Promise<TermsDeleted> {\n\t\tconst keys = { terms: term_ids };\n\n\t\treturn this.createPromise<TermsDeleted>(\n\t\t\t\"DELETE\",\n\t\t\trequest_params,\n\t\t\tthis.populateFromBulkDelete,\n\t\t\tkeys,\n\t\t\t\"projects/{!:project_id}/glossary-terms\",\n\t\t);\n\t}\n\n\tprivate populateFromBulkDelete(\n\t\tjson: Record<string, unknown>,\n\t\t_headers: Headers,\n\t): TermsDeleted {\n\t\tconst dataRecord = json as Record<string, Record<string, unknown>>;\n\t\tconst jsonData = dataRecord.data;\n\n\t\treturn jsonData as TermsDeleted;\n\t}\n}\n","import type { Jwt as JwtInterface } from \"../interfaces/jwt.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class Jwt extends BaseModel implements JwtInterface {\n\tdeclare jwt: string;\n}\n","import { Jwt as JwtModel } from \"../models/jwt.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class Jwt extends BaseCollection<JwtModel> {\n\tprotected static override prefixURI = \"projects/{!:project_id}/tokens\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => JwtModel {\n\t\treturn JwtModel;\n\t}\n\n\tcreate(project_id: string, body = { service: \"ota\" }): Promise<JwtModel> {\n\t\tconst request_params = { project_id: project_id };\n\t\treturn this.doCreate(body, request_params, this.populateObjectFromJson);\n\t}\n}\n","import type { Comment } from \"../interfaces/comment.js\";\nimport type { Key as KeyInterface } from \"../interfaces/key.js\";\nimport type { Screenshot } from \"../interfaces/screenshot.js\";\nimport type { Translation } from \"../interfaces/translation.js\";\nimport type { Filenames, Filenames as Keynames } from \"../types/filenames.js\";\nimport type { SupportedPlatforms } from \"../types/supported_platforms.js\";\nimport { BaseModel } from \"./base_model.js\";\n\ntype KeyComment = Omit<Comment, \"key_id\">;\n\nexport class Key extends BaseModel implements KeyInterface {\n\tdeclare key_id: number;\n\tdeclare created_at: string;\n\tdeclare created_at_timestamp: number;\n\tdeclare key_name: Keynames;\n\tdeclare filenames: Filenames;\n\tdeclare description: string;\n\tdeclare platforms: SupportedPlatforms[];\n\tdeclare tags: string[];\n\tdeclare comments: KeyComment[];\n\tdeclare screenshots: Screenshot[];\n\tdeclare translations: Translation[];\n\tdeclare is_plural: boolean;\n\tdeclare plural_name: string;\n\tdeclare is_hidden: boolean;\n\tdeclare is_archived: boolean;\n\tdeclare context: string;\n\tdeclare base_words: number;\n\tdeclare char_limit: number;\n\tdeclare custom_attributes: string;\n\tdeclare modified_at: string;\n\tdeclare modified_at_timestamp: number;\n\tdeclare translations_modified_at: string;\n\tdeclare translations_modified_at_timestamp: number;\n}\n","import type { BulkResult } from \"../interfaces/bulk_result.js\";\nimport type { CursorPaginatedResult } from \"../interfaces/cursor_paginated_result.js\";\nimport { Key } from \"../models/key.js\";\nimport type { ProjectOnly } from \"../types/common_get_params.js\";\nimport type {\n\tBulkUpdateKeyParams,\n\tCreateKeyParams,\n\tGetKeyParams,\n\tKeyDeleted,\n\tKeyParamsWithPagination,\n\tKeysBulkDeleted,\n\tUpdateKeyData,\n} from \"../types/keys.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class Keys extends BaseCollection<Key> {\n\tprotected static override prefixURI = \"projects/{!:project_id}/keys/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => Key {\n\t\treturn Key;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"keys\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"key\";\n\t}\n\n\tlist(\n\t\trequest_params: KeyParamsWithPagination,\n\t): Promise<CursorPaginatedResult<Key>> {\n\t\treturn this.doListCursor(request_params);\n\t}\n\n\tcreate(\n\t\tkey_params: CreateKeyParams,\n\t\trequest_params: ProjectOnly,\n\t): Promise<BulkResult<Key>> {\n\t\treturn this.createPromise(\n\t\t\t\"POST\",\n\t\t\trequest_params,\n\t\t\tthis.populateArrayFromJsonBulk,\n\t\t\tkey_params,\n\t\t);\n\t}\n\n\tget(key_id: string | number, request_params: GetKeyParams): Promise<Key> {\n\t\treturn this.doGet(key_id, request_params);\n\t}\n\n\tupdate(\n\t\tkey_id: string | number,\n\t\tkey_params: UpdateKeyData,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Key> {\n\t\treturn this.doUpdate(key_id, key_params, request_params);\n\t}\n\n\tdelete(\n\t\tkey_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<KeyDeleted> {\n\t\treturn this.doDelete(key_id, request_params);\n\t}\n\n\tbulk_update(\n\t\tkey_params: BulkUpdateKeyParams,\n\t\trequest_params: ProjectOnly,\n\t): Promise<BulkResult<Key>> {\n\t\treturn this.createPromise(\n\t\t\t\"PUT\",\n\t\t\trequest_params,\n\t\t\tthis.populateArrayFromJsonBulk,\n\t\t\tkey_params,\n\t\t\t\"projects/{!:project_id}/keys\",\n\t\t);\n\t}\n\n\tbulk_delete(\n\t\tkey_ids: number[] | string[],\n\t\trequest_params: ProjectOnly,\n\t): Promise<KeysBulkDeleted> {\n\t\tconst keys = { keys: key_ids };\n\n\t\treturn this.createPromise(\n\t\t\t\"DELETE\",\n\t\t\trequest_params,\n\t\t\tthis.returnBareJSON<KeysBulkDeleted>,\n\t\t\tkeys,\n\t\t\t\"projects/{!:project_id}/keys\",\n\t\t);\n\t}\n}\n","import type { Language as LanguageInterface } from \"../interfaces/language.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class Language extends BaseModel implements LanguageInterface {\n\tdeclare lang_id: number;\n\tdeclare lang_iso: string;\n\tdeclare lang_name: string;\n\tdeclare is_rtl: boolean;\n\tdeclare plural_forms: string[];\n\tdeclare project_language_uuid?: string;\n}\n","import type { BulkResult } from \"../interfaces/bulk_result.js\";\nimport type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { Language } from \"../models/language.js\";\nimport type {\n\tPaginationParams,\n\tProjectOnly,\n\tProjectWithPagination,\n} from \"../types/common_get_params.js\";\nimport type {\n\tCreateLanguageParams,\n\tLanguageDeleted,\n\tUpdateLanguageParams,\n} from \"../types/languages.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class Languages extends BaseCollection<Language> {\n\tprotected static override prefixURI =\n\t\t\"projects/{!:project_id}/languages/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => Language {\n\t\treturn Language;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"languages\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"language\";\n\t}\n\n\tsystem_languages(\n\t\tparams: PaginationParams = {},\n\t): Promise<PaginatedResult<Language>> {\n\t\treturn this.createPromise(\n\t\t\t\"GET\",\n\t\t\tparams,\n\t\t\tthis.populateArrayFromJson,\n\t\t\tnull,\n\t\t\t\"system/languages\",\n\t\t) as Promise<PaginatedResult<Language>>;\n\t}\n\n\tlist(\n\t\trequest_params: ProjectWithPagination,\n\t): Promise<PaginatedResult<Language>> {\n\t\treturn this.doList(request_params) as Promise<PaginatedResult<Language>>;\n\t}\n\n\tcreate(\n\t\traw_body: CreateLanguageParams | CreateLanguageParams[],\n\t\trequest_params: ProjectOnly,\n\t): Promise<BulkResult<Language>> {\n\t\tconst body = { languages: this.objToArray(raw_body) };\n\n\t\treturn this.createPromise(\n\t\t\t\"POST\",\n\t\t\trequest_params,\n\t\t\tthis.populateArrayFromJsonBulk,\n\t\t\tbody,\n\t\t);\n\t}\n\n\tget(\n\t\tlang_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Language> {\n\t\treturn this.doGet(lang_id, request_params);\n\t}\n\n\tupdate(\n\t\tlang_id: string | number,\n\t\tlang_params: UpdateLanguageParams,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Language> {\n\t\treturn this.doUpdate(lang_id, lang_params, request_params);\n\t}\n\n\tdelete(\n\t\tlang_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<LanguageDeleted> {\n\t\treturn super.doDelete(lang_id, request_params);\n\t}\n}\n","import type { Order as OrderInterface } from \"../interfaces/order.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class Order extends BaseModel implements OrderInterface {\n\tdeclare order_id: string;\n\tdeclare project_id: string;\n\tdeclare branch: string;\n\tdeclare card_id: number | string;\n\tdeclare status: string;\n\tdeclare created_at: string;\n\tdeclare created_at_timestamp: number;\n\tdeclare created_by: number;\n\tdeclare created_by_email: string;\n\tdeclare source_language_iso: string;\n\tdeclare target_language_isos: string[];\n\tdeclare keys: number[] | string[];\n\tdeclare source_words: Record<string, unknown>;\n\tdeclare provider_slug: string;\n\tdeclare translation_style: string;\n\tdeclare translation_tier: number;\n\tdeclare translation_tier_name: string;\n\tdeclare briefing: string;\n\tdeclare total: number;\n\tdeclare payment_method: string | null;\n\tdeclare is_saved_to_translation_memory: boolean;\n\tdeclare dry_run: boolean;\n}\n","import type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { Order } from \"../models/order.js\";\nimport type { TeamOnly } from \"../types/common_get_params.js\";\nimport type { CreateOrderParams } from \"../types/orders.js\";\nimport type { TeamWithPagination } from \"../types/teams.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class Orders extends BaseCollection<Order> {\n\tprotected static override prefixURI = \"teams/{!:team_id}/orders/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => Order {\n\t\treturn Order;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"orders\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn null;\n\t}\n\n\tlist(request_params: TeamWithPagination): Promise<PaginatedResult<Order>> {\n\t\treturn this.doList(request_params) as Promise<PaginatedResult<Order>>;\n\t}\n\n\tcreate(\n\t\torder_params: CreateOrderParams,\n\t\trequest_params: TeamOnly,\n\t): Promise<Order> {\n\t\treturn this.doCreate(\n\t\t\torder_params,\n\t\t\trequest_params,\n\t\t\tthis.populateObjectFromJsonRoot,\n\t\t);\n\t}\n\n\tget(order_id: string | number, request_params: TeamOnly): Promise<Order> {\n\t\treturn this.doGet(order_id, request_params);\n\t}\n}\n","import type { PaymentCard as PaymentCardInterface } from \"../interfaces/payment_card.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class PaymentCard extends BaseModel implements PaymentCardInterface {\n\tdeclare card_id: number;\n\tdeclare last4: string;\n\tdeclare brand: string;\n\tdeclare created_at: string;\n\tdeclare created_at_timestamp: number;\n}\n","import type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { PaymentCard } from \"../models/payment_card.js\";\nimport type { CardDeleted, CreateCardParams } from \"../types/cards.js\";\nimport type { PaginationParams } from \"../types/common_get_params.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class PaymentCards extends BaseCollection<PaymentCard> {\n\tprotected static override prefixURI = \"payment_cards/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => PaymentCard {\n\t\treturn PaymentCard;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"payment_cards\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"payment_card\";\n\t}\n\n\tlist(\n\t\trequest_params: PaginationParams = {},\n\t): Promise<PaginatedResult<PaymentCard>> {\n\t\treturn this.doList(request_params) as Promise<PaginatedResult<PaymentCard>>;\n\t}\n\n\tcreate(card_params: CreateCardParams): Promise<PaymentCard> {\n\t\treturn this.doCreate(card_params);\n\t}\n\n\tget(card_id: string | number): Promise<PaymentCard> {\n\t\treturn this.doGet(card_id);\n\t}\n\n\tdelete(card_id: string | number): Promise<CardDeleted> {\n\t\treturn this.doDelete(card_id);\n\t}\n}\n","import type { PermissionTemplate as PermissionTemplateInterface } from \"../interfaces/permission_template.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class PermissionTemplate\n\textends BaseModel\n\timplements PermissionTemplateInterface\n{\n\tdeclare id: number;\n\tdeclare role: string;\n\tdeclare permissions: string[];\n\tdeclare description: string;\n\tdeclare tag: string;\n\tdeclare tagColor: string;\n\tdeclare tagInfo: string | null;\n\tdeclare doesEnableAllReadOnlyLanguages: boolean;\n}\n","import type { PaginatedResult } from \"../interfaces/index.js\";\nimport { PermissionTemplate } from \"../models/permission_template.js\";\nimport type { TeamOnly } from \"../types/index.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class PermissionTemplates extends BaseCollection<PermissionTemplate> {\n\tprotected static override prefixURI = \"teams/{!:team_id}/roles\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => PermissionTemplate {\n\t\treturn PermissionTemplate;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"roles\";\n\t}\n\n\tlist(request_params: TeamOnly): Promise<PaginatedResult<PermissionTemplate>> {\n\t\treturn this.doList(request_params) as Promise<\n\t\t\tPaginatedResult<PermissionTemplate>\n\t\t>;\n\t}\n}\n","import type { Project as ProjectInterface } from \"../interfaces/project.js\";\nimport type { ProjectSettings } from \"../interfaces/project_settings.js\";\nimport type { ProjectStatistics } from \"../interfaces/project_statistics.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class Project extends BaseModel implements ProjectInterface {\n\tdeclare project_id: string;\n\tdeclare project_type: string;\n\tdeclare uuid?: string;\n\tdeclare name: string;\n\tdeclare description: string;\n\tdeclare created_at: string;\n\tdeclare created_at_timestamp: number;\n\tdeclare created_by: number;\n\tdeclare created_by_email: string;\n\tdeclare team_id: number;\n\tdeclare team_uuid: string;\n\tdeclare base_language_id: number;\n\tdeclare base_language_iso: string;\n\tdeclare settings: ProjectSettings;\n\tdeclare statistics: ProjectStatistics;\n}\n","import type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { Project } from \"../models/project.js\";\nimport type {\n\tCreateProjectParams,\n\tProjectDeleted,\n\tProjectEmptied,\n\tProjectListParams,\n\tUpdateProjectParams,\n} from \"../types/projects.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class Projects extends BaseCollection<Project> {\n\tprotected static override prefixURI = \"projects/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => Project {\n\t\treturn Project;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"projects\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn null;\n\t}\n\n\tlist(\n\t\trequest_params: ProjectListParams = {},\n\t): Promise<PaginatedResult<Project>> {\n\t\treturn this.doList(request_params) as Promise<PaginatedResult<Project>>;\n\t}\n\n\tcreate(project_params: CreateProjectParams): Promise<Project> {\n\t\treturn this.doCreate(project_params);\n\t}\n\n\tget(project_id: string): Promise<Project> {\n\t\treturn this.doGet(project_id);\n\t}\n\n\tupdate(\n\t\tproject_id: string,\n\t\tproject_params: UpdateProjectParams,\n\t): Promise<Project> {\n\t\treturn this.doUpdate(\n\t\t\tproject_id,\n\t\t\tproject_params,\n\t\t\t{},\n\t\t\tthis.populateObjectFromJson,\n\t\t);\n\t}\n\n\tdelete(project_id: string): Promise<ProjectDeleted> {\n\t\treturn this.doDelete(project_id);\n\t}\n\n\tempty(project_id: string): Promise<ProjectEmptied> {\n\t\treturn this.createPromise(\n\t\t\t\"PUT\",\n\t\t\t{ project_id: project_id },\n\t\t\tthis.returnBareJSON<ProjectEmptied>,\n\t\t\tnull,\n\t\t\t\"projects/{!:project_id}/empty\",\n\t\t);\n\t}\n}\n","import type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { QueuedProcess } from \"../models/queued_process.js\";\nimport type {\n\tProjectOnly,\n\tProjectWithPagination,\n} from \"../types/common_get_params.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class QueuedProcesses extends BaseCollection<QueuedProcess> {\n\tprotected static override prefixURI =\n\t\t\"projects/{!:project_id}/processes/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => QueuedProcess {\n\t\treturn QueuedProcess;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"processes\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"process\";\n\t}\n\n\tlist(\n\t\trequest_params: ProjectWithPagination,\n\t): Promise<PaginatedResult<QueuedProcess>> {\n\t\treturn this.doList(request_params) as Promise<\n\t\t\tPaginatedResult<QueuedProcess>\n\t\t>;\n\t}\n\n\tget(\n\t\tprocess_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<QueuedProcess> {\n\t\treturn this.doGet(process_id, request_params);\n\t}\n}\n","import type { Screenshot as ScreenshotInterface } from \"../interfaces/screenshot.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class Screenshot extends BaseModel implements ScreenshotInterface {\n\tdeclare screenshot_id: number;\n\tdeclare key_ids: number[];\n\tdeclare keys: Array<{\n\t\tkey_id: number;\n\t\tcoordinates: {\n\t\t\tleft: number;\n\t\t\ttop: number;\n\t\t\twidth: number;\n\t\t\theight: number;\n\t\t};\n\t}>;\n\tdeclare url: string;\n\tdeclare title: string;\n\tdeclare description: string;\n\tdeclare screenshot_tags: string[];\n\tdeclare width: number;\n\tdeclare height: number;\n\tdeclare created_at: string;\n\tdeclare created_at_timestamp: number;\n}\n","import type { BulkResult } from \"../interfaces/bulk_result.js\";\nimport type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { Screenshot } from \"../models/screenshot.js\";\nimport type {\n\tProjectOnly,\n\tProjectWithPagination,\n} from \"../types/common_get_params.js\";\nimport type {\n\tCreateScreenshotParams,\n\tScreenshotDeleted,\n\tUpdateScreenshotParams,\n} from \"../types/screenshots.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class Screenshots extends BaseCollection<Screenshot> {\n\tprotected static override prefixURI =\n\t\t\"projects/{!:project_id}/screenshots/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => Screenshot {\n\t\treturn Screenshot;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"screenshots\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"screenshot\";\n\t}\n\n\tlist(\n\t\trequest_params: ProjectWithPagination,\n\t): Promise<PaginatedResult<Screenshot>> {\n\t\treturn this.doList(request_params) as Promise<PaginatedResult<Screenshot>>;\n\t}\n\n\tcreate(\n\t\traw_body: CreateScreenshotParams | CreateScreenshotParams[],\n\t\trequest_params: ProjectOnly,\n\t): Promise<BulkResult<Screenshot>> {\n\t\tconst body = { screenshots: this.objToArray(raw_body) };\n\n\t\treturn this.createPromise(\n\t\t\t\"POST\",\n\t\t\trequest_params,\n\t\t\tthis.populateArrayFromJsonBulk,\n\t\t\tbody,\n\t\t);\n\t}\n\n\tget(\n\t\tscrenshot_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Screenshot> {\n\t\treturn this.doGet(screnshot_id, request_params);\n\t}\n\n\tupdate(\n\t\tscreenshot_id: string | number,\n\t\tscreenshot_params: UpdateScreenshotParams,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Screenshot> {\n\t\treturn this.doUpdate(screenshot_id, screenshot_params, request_params);\n\t}\n\n\tdelete(\n\t\tscreenshot_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<ScreenshotDeleted> {\n\t\treturn this.doDelete(screenshot_id, request_params);\n\t}\n}\n","import type { Segment as SegmentInterface } from \"../interfaces/segment.js\";\nimport { BaseModel } from \"./base_model.js\";\nimport type { TranslationStatus } from \"./translation_status.js\";\n\nexport class Segment extends BaseModel implements SegmentInterface {\n\tdeclare segment_number: number;\n\tdeclare language_iso: string;\n\tdeclare modified_at: string;\n\tdeclare modified_at_timestamp: number;\n\tdeclare modified_by: number;\n\tdeclare modified_by_email: string;\n\tdeclare value: string;\n\tdeclare is_fuzzy: boolean;\n\tdeclare is_reviewed: boolean;\n\tdeclare reviewed_by: number;\n\tdeclare words: number;\n\tdeclare custom_translation_statuses: TranslationStatus[];\n}\n","import { Segment } from \"../models/segment.js\";\nimport type {\n\tGetSegmentParams,\n\tListSegmentParams,\n\tUpdateSegmentBodyParams,\n\tUpdateSegmentReqParams,\n} from \"../types/segments.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class Segments extends BaseCollection<Segment> {\n\tprotected static override prefixURI =\n\t\t\"projects/{!:project_id}/keys/{!:key_id}/segments/{!:language_iso}/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => Segment {\n\t\treturn Segment;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"segments\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"segment\";\n\t}\n\n\tlist(request_params: ListSegmentParams): Promise<Segment[]> {\n\t\treturn this.doList(request_params) as Promise<Segment[]>;\n\t}\n\n\tget(\n\t\tsegment_number: string | number,\n\t\trequest_params: GetSegmentParams,\n\t): Promise<Segment> {\n\t\treturn this.doGet(segment_number, request_params);\n\t}\n\n\tupdate(\n\t\tsegment_number: string | number,\n\t\tsegment_params: UpdateSegmentBodyParams,\n\t\trequest_params: UpdateSegmentReqParams,\n\t): Promise<Segment> {\n\t\treturn this.doUpdate(segment_number, segment_params, request_params);\n\t}\n}\n","import type { Snapshot as SnapshotInterface } from \"../interfaces/snapshot.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class Snapshot extends BaseModel implements SnapshotInterface {\n\tdeclare snapshot_id: number;\n\tdeclare title: string;\n\tdeclare created_at: string;\n\tdeclare created_at_timestamp: number;\n\tdeclare created_by: number;\n\tdeclare created_by_email: string;\n}\n","import type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport type { Project } from \"../models/project.js\";\nimport { Snapshot } from \"../models/snapshot.js\";\nimport type {\n\tProjectOnly,\n\tProjectWithPagination,\n} from \"../types/common_get_params.js\";\nimport type {\n\tCreateSnapshotParams,\n\tSnapshotDeleted,\n} from \"../types/snapshots.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class Snapshots extends BaseCollection<Snapshot> {\n\tprotected static override prefixURI =\n\t\t\"projects/{!:project_id}/snapshots/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => Snapshot {\n\t\treturn Snapshot;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"snapshots\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"snapshot\";\n\t}\n\n\tlist(\n\t\trequest_params: ProjectWithPagination,\n\t): Promise<PaginatedResult<Snapshot>> {\n\t\treturn this.doList(request_params) as Promise<PaginatedResult<Snapshot>>;\n\t}\n\n\tcreate(\n\t\tsnapshot_params: CreateSnapshotParams,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Snapshot> {\n\t\treturn this.doCreate(\n\t\t\tsnapshot_params,\n\t\t\trequest_params,\n\t\t\tthis.populateObjectFromJsonRoot,\n\t\t);\n\t}\n\n\trestore(\n\t\tsnapshot_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Project> {\n\t\tconst params = {\n\t\t\t...request_params,\n\t\t\t...{ id: snapshot_id },\n\t\t};\n\n\t\treturn this.createPromise(\"POST\", params, this.returnBareJSON<Project>, {});\n\t}\n\n\tdelete(\n\t\tsnapshot_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<SnapshotDeleted> {\n\t\treturn this.doDelete(snapshot_id, request_params);\n\t}\n}\n","import type { Task as TaskInterface } from \"../interfaces/task.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class Task extends BaseModel implements TaskInterface {\n\tdeclare task_id: number;\n\tdeclare title: string;\n\tdeclare description: string;\n\tdeclare status: string;\n\tdeclare progress: number;\n\tdeclare due_date: string;\n\tdeclare due_date_timestamp: number;\n\tdeclare keys_count: number;\n\tdeclare words_count: number;\n\tdeclare created_at: string;\n\tdeclare created_at_timestamp: number;\n\tdeclare created_by: number;\n\tdeclare created_by_email: string;\n\tdeclare can_be_parent: boolean;\n\tdeclare task_type: string;\n\tdeclare parent_task_id: number;\n\tdeclare closing_tags: string[];\n\tdeclare do_lock_translations: boolean;\n\tdeclare languages: Array<{\n\t\tlanguage_iso: string;\n\t\tusers: Array<{\n\t\t\tuser_id: string | number;\n\t\t\temail: string;\n\t\t\tfullname: string;\n\t\t}>;\n\t\tgroups: Array<{\n\t\t\tid: string | number;\n\t\t\tname: string;\n\t\t}>;\n\t\tkeys: string[] | number[];\n\t\tstatus: string;\n\t\tprogress: number;\n\t\tinitial_tm_leverage: {\n\t\t\t\"0%+\": number;\n\t\t\t\"60%+\": number;\n\t\t\t\"75%+\": number;\n\t\t\t\"95%+\": number;\n\t\t\t\"100%\": number;\n\t\t};\n\t\ttm_leverage: {\n\t\t\tstatus: string;\n\t\t\tvalue: {\n\t\t\t\t\"0%+\": number;\n\t\t\t\t\"50%+\": number;\n\t\t\t\t\"75%+\": number;\n\t\t\t\t\"85%+\": number;\n\t\t\t\t\"95%+\": number;\n\t\t\t\t\"100%\": number;\n\t\t\t};\n\t\t};\n\t\tkeys_count: number;\n\t\twords_count: number;\n\t\tcompleted_at: string;\n\t\tcompleted_at_timestamp: number;\n\t\tcompleted_by: number;\n\t\tcompleted_by_email: string;\n\t}>;\n\tdeclare source_language_iso: string;\n\tdeclare auto_close_languages: boolean;\n\tdeclare auto_close_task: boolean;\n\tdeclare auto_close_items: boolean;\n\tdeclare completed_at: string;\n\tdeclare completed_at_timestamp: number;\n\tdeclare completed_by: number;\n\tdeclare completed_by_email: string;\n\tdeclare custom_translation_status_ids: number[];\n}\n","import type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { Task } from \"../models/task.js\";\nimport type { ProjectOnly } from \"../types/common_get_params.js\";\nimport type {\n\tCreateTaskParams,\n\tListTaskParams,\n\tTaskDeleted,\n\tUpdateTaskParams,\n} from \"../types/tasks.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class Tasks extends BaseCollection<Task> {\n\tprotected static override prefixURI = \"projects/{!:project_id}/tasks/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => Task {\n\t\treturn Task;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"tasks\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"task\";\n\t}\n\n\tlist(request_params: ListTaskParams): Promise<PaginatedResult<Task>> {\n\t\treturn this.doList(request_params) as Promise<PaginatedResult<Task>>;\n\t}\n\n\tcreate(\n\t\ttask_params: CreateTaskParams,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Task> {\n\t\treturn this.doCreate(\n\t\t\ttask_params,\n\t\t\trequest_params,\n\t\t\tthis.populateObjectFromJsonRoot,\n\t\t);\n\t}\n\n\tget(task_id: string | number, request_params: ProjectOnly): Promise<Task> {\n\t\treturn this.doGet(task_id, request_params);\n\t}\n\n\tupdate(\n\t\ttask_id: string | number,\n\t\ttask_params: UpdateTaskParams,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Task> {\n\t\treturn this.doUpdate(task_id, task_params, request_params);\n\t}\n\n\tdelete(\n\t\ttask_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<TaskDeleted> {\n\t\treturn this.doDelete(task_id, request_params);\n\t}\n}\n","import type { TeamUserBillingDetails as TeamUserBillingDetailsInterface } from \"../interfaces/team_user_billing_details.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class TeamUserBillingDetails\n\textends BaseModel\n\timplements TeamUserBillingDetailsInterface\n{\n\tdeclare billing_email: string;\n\tdeclare country_code: string;\n\tdeclare zip: string;\n\tdeclare state_code: string;\n\tdeclare address1: string;\n\tdeclare address2: string;\n\tdeclare city: string;\n\tdeclare phone: string;\n\tdeclare company: string;\n\tdeclare vatnumber: string;\n}\n","import { TeamUserBillingDetails as BillingDetailsModel } from \"../models/team_user_billing_details.js\";\nimport type { BillingDetailsParams } from \"../types/billing_details.js\";\nimport type { TeamOnly } from \"../types/common_get_params.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class TeamUserBillingDetails extends BaseCollection<BillingDetailsModel> {\n\tprotected static override prefixURI = \"teams/{!:team_id}/billing_details\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => BillingDetailsModel {\n\t\treturn BillingDetailsModel;\n\t}\n\n\tget(team_id: string | number): Promise<BillingDetailsModel> {\n\t\tconst params = { team_id: team_id };\n\t\treturn this.createPromise(\"GET\", params, this.populateObjectFromJson, null);\n\t}\n\n\tcreate(\n\t\tbilling_details_params: BillingDetailsParams,\n\t\trequest_params: TeamOnly,\n\t): Promise<BillingDetailsModel> {\n\t\treturn this.doCreate(billing_details_params, request_params);\n\t}\n\n\tupdate(\n\t\tteam_id: string | number,\n\t\tbilling_details_params: BillingDetailsParams,\n\t): Promise<BillingDetailsModel> {\n\t\tconst params = { team_id: team_id };\n\t\treturn this.createPromise(\n\t\t\t\"PUT\",\n\t\t\tparams,\n\t\t\tthis.populateObjectFromJson,\n\t\t\tbilling_details_params,\n\t\t);\n\t}\n}\n","import type { TeamUser as TeamUserInterface } from \"../interfaces/team_user.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class TeamUser extends BaseModel implements TeamUserInterface {\n\tdeclare user_id: number;\n\tdeclare email: string;\n\tdeclare fullname: string;\n\tdeclare created_at: string;\n\tdeclare created_at_timestamp: number;\n\tdeclare role: string;\n\tdeclare uuid?: string;\n}\n","import type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { TeamUser } from \"../models/team_user.js\";\nimport type { TeamOnly } from \"../types/common_get_params.js\";\nimport type { TeamUserDeleted, TeamUserParams } from \"../types/team_users.js\";\nimport type { TeamWithPagination } from \"../types/teams.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class TeamUsers extends BaseCollection<TeamUser> {\n\tprotected static override prefixURI = \"teams/{!:team_id}/users/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => TeamUser {\n\t\treturn TeamUser;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"team_users\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"team_user\";\n\t}\n\n\tlist(request_params: TeamWithPagination): Promise<PaginatedResult<TeamUser>> {\n\t\treturn this.doList(request_params) as Promise<PaginatedResult<TeamUser>>;\n\t}\n\n\tget(\n\t\tteam_user_id: string | number,\n\t\trequest_params: TeamOnly,\n\t): Promise<TeamUser> {\n\t\treturn this.doGet(team_user_id, request_params);\n\t}\n\n\tupdate(\n\t\tteam_user_id: string | number,\n\t\tteam_user_params: TeamUserParams,\n\t\trequest_params: TeamOnly,\n\t): Promise<TeamUser> {\n\t\treturn this.doUpdate(team_user_id, team_user_params, request_params);\n\t}\n\n\tdelete(\n\t\tteam_user_id: string | number,\n\t\trequest_params: TeamOnly,\n\t): Promise<TeamUserDeleted> {\n\t\treturn this.doDelete(team_user_id, request_params);\n\t}\n}\n","import type { Team as TeamInterface } from \"../interfaces/team.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class Team extends BaseModel implements TeamInterface {\n\tdeclare team_id: number;\n\tdeclare name: string;\n\tdeclare created_at: string;\n\tdeclare created_at_timestamp: number;\n\tdeclare plan: string;\n\tdeclare quota_usage: {\n\t\tusers: number;\n\t\tkeys: number;\n\t\tprojects: number;\n\t\tmau: number;\n\t\tai_words: number;\n\t};\n\tdeclare quota_allowed: {\n\t\tusers: number;\n\t\tkeys: number;\n\t\tprojects: number;\n\t\tmau: number;\n\t\tai_words: number;\n\t};\n}\n","import type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { Team } from \"../models/team.js\";\nimport type { PaginationParams } from \"../types/common_get_params.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class Teams extends BaseCollection<Team> {\n\tprotected static override prefixURI = \"teams/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => Team {\n\t\treturn Team;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"teams\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"team\";\n\t}\n\n\tlist(request_params: PaginationParams = {}): Promise<PaginatedResult<Team>> {\n\t\treturn this.doList(request_params) as Promise<PaginatedResult<Team>>;\n\t}\n\n\tget(id: number | string): Promise<Team> {\n\t\treturn this.doGet(id);\n\t}\n}\n","import type { TranslationProvider as TranslationProviderInterface } from \"../interfaces/translation_provider.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class TranslationProvider\n\textends BaseModel\n\timplements TranslationProviderInterface\n{\n\tdeclare provider_id: number;\n\tdeclare name: string;\n\tdeclare slug: string;\n\tdeclare price_pair_min: number;\n\tdeclare website_url: string;\n\tdeclare description: string;\n\tdeclare tiers: Array<{\n\t\ttier_id: number;\n\t\ttitle: string;\n\t}>;\n\tdeclare pairs: Array<{\n\t\ttier_id: number;\n\t\tfrom_lang_iso: string;\n\t\tfrom_lang_name: string;\n\t\tto_lang_iso: string;\n\t\tto_lang_name: string;\n\t\tprice_per_word: number;\n\t}>;\n}\n","import type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { TranslationProvider } from \"../models/translation_provider.js\";\nimport type { TeamOnly } from \"../types/common_get_params.js\";\nimport type { TeamWithPagination } from \"../types/teams.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class TranslationProviders extends BaseCollection<TranslationProvider> {\n\tprotected static override prefixURI =\n\t\t\"teams/{!:team_id}/translation_providers/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => TranslationProvider {\n\t\treturn TranslationProvider;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"translation_providers\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn null;\n\t}\n\n\tlist(\n\t\trequest_params: TeamWithPagination,\n\t): Promise<PaginatedResult<TranslationProvider>> {\n\t\treturn this.doList(request_params) as Promise<\n\t\t\tPaginatedResult<TranslationProvider>\n\t\t>;\n\t}\n\n\tget(\n\t\tprovider_id: string | number,\n\t\trequest_params: TeamOnly,\n\t): Promise<TranslationProvider> {\n\t\treturn this.doGet(provider_id, request_params);\n\t}\n}\n","import type { TranslationStatus as TranslationStatusInterface } from \"../interfaces/translation_status.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class TranslationStatus\n\textends BaseModel\n\timplements TranslationStatusInterface\n{\n\tdeclare status_id: number;\n\tdeclare title: string;\n\tdeclare color: string;\n}\n","import type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { TranslationStatus } from \"../models/translation_status.js\";\nimport type {\n\tProjectOnly,\n\tProjectWithPagination,\n} from \"../types/common_get_params.js\";\nimport type {\n\tCreateTranslationStatusParams,\n\tTranslationStatusColors,\n\tTranslationStatusDeleted,\n\tUpdateTranslationStatusParams,\n} from \"../types/translation_statuses.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class TranslationStatuses extends BaseCollection<TranslationStatus> {\n\tprotected static override prefixURI =\n\t\t\"projects/{!:project_id}/custom_translation_statuses/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => TranslationStatus {\n\t\treturn TranslationStatus;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"custom_translation_statuses\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"custom_translation_status\";\n\t}\n\n\tlist(\n\t\trequest_params: ProjectWithPagination,\n\t): Promise<PaginatedResult<TranslationStatus>> {\n\t\treturn this.doList(request_params) as Promise<\n\t\t\tPaginatedResult<TranslationStatus>\n\t\t>;\n\t}\n\n\tcreate(\n\t\ttranslation_status_params: CreateTranslationStatusParams,\n\t\trequest_params: ProjectOnly,\n\t): Promise<TranslationStatus> {\n\t\treturn this.doCreate(\n\t\t\ttranslation_status_params,\n\t\t\trequest_params,\n\t\t\tthis.populateObjectFromJsonRoot,\n\t\t);\n\t}\n\n\tget(\n\t\ttranslation_status_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<TranslationStatus> {\n\t\treturn this.doGet(translation_status_id, request_params);\n\t}\n\n\tupdate(\n\t\ttranslation_status_id: string | number,\n\t\ttranslation_status_params: UpdateTranslationStatusParams,\n\t\trequest_params: ProjectOnly,\n\t): Promise<TranslationStatus> {\n\t\treturn this.doUpdate(\n\t\t\ttranslation_status_id,\n\t\t\ttranslation_status_params,\n\t\t\trequest_params,\n\t\t);\n\t}\n\n\tdelete(\n\t\ttranslation_status_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<TranslationStatusDeleted> {\n\t\treturn this.doDelete(translation_status_id, request_params);\n\t}\n\n\tavailable_colors(\n\t\trequest_params: ProjectOnly,\n\t): Promise<TranslationStatusColors> {\n\t\treturn this.createPromise(\n\t\t\t\"GET\",\n\t\t\trequest_params,\n\t\t\tthis.returnBareJSON<TranslationStatusColors>,\n\t\t\t{},\n\t\t\t\"projects/{!:project_id}/custom_translation_statuses/colors\",\n\t\t);\n\t}\n}\n","import type { Translation as TranslationInterface } from \"../interfaces/translation.js\";\nimport type { TranslationStatus } from \"../interfaces/translation_status.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class Translation extends BaseModel implements TranslationInterface {\n\tdeclare translation_id: number;\n\tdeclare key_id: number;\n\tdeclare language_iso: string;\n\tdeclare modified_at: string;\n\tdeclare modified_at_timestamp: number;\n\tdeclare modified_by: number;\n\tdeclare modified_by_email: string;\n\tdeclare translation: string;\n\tdeclare is_unverified: boolean;\n\tdeclare is_reviewed: boolean;\n\tdeclare reviewed_by: number;\n\tdeclare is_fuzzy: boolean;\n\tdeclare words: number;\n\tdeclare custom_translation_statuses: TranslationStatus[];\n\tdeclare task_id: number;\n\tdeclare segment_number: number;\n}\n","import type { CursorPaginatedResult } from \"../interfaces/cursor_paginated_result.js\";\nimport { Translation } from \"../models/translation.js\";\nimport type { ProjectOnly } from \"../types/common_get_params.js\";\nimport type {\n\tGetTranslationParams,\n\tListTranslationParams,\n\tUpdateTranslationParams,\n} from \"../types/translations.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class Translations extends BaseCollection<Translation> {\n\tprotected static override prefixURI =\n\t\t\"projects/{!:project_id}/translations/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => Translation {\n\t\treturn Translation;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"translations\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"translation\";\n\t}\n\n\tlist(\n\t\trequest_params: ListTranslationParams,\n\t): Promise<CursorPaginatedResult<Translation>> {\n\t\treturn this.doListCursor(request_params);\n\t}\n\n\tget(\n\t\ttranslation_id: string | number,\n\t\trequest_params: GetTranslationParams,\n\t): Promise<Translation> {\n\t\treturn this.doGet(translation_id, request_params);\n\t}\n\n\tupdate(\n\t\ttranslation_id: string | number,\n\t\ttranslation_params: UpdateTranslationParams,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Translation> {\n\t\treturn this.doUpdate(translation_id, translation_params, request_params);\n\t}\n}\n","import type { UserGroup as UserGroupInterface } from \"../interfaces/user_group.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class UserGroup extends BaseModel implements UserGroupInterface {\n\tdeclare group_id: number;\n\tdeclare name: string;\n\tdeclare permissions: {\n\t\tis_admin: boolean; // deprecated\n\t\tis_reviewer: boolean; // deprecated\n\t\tadmin_rights: string[];\n\t\tlanguages: Array<{\n\t\t\tlang_id: number;\n\t\t\tlang_iso: string;\n\t\t\tlang_name: string;\n\t\t\tis_writable: boolean;\n\t\t}>;\n\t};\n\tdeclare created_at: string;\n\tdeclare created_at_timestamp: number;\n\tdeclare team_id: number;\n\tdeclare projects: string[] | number[];\n\tdeclare members: number[] | string[];\n\tdeclare role_id: number | null;\n}\n","import type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { UserGroup } from \"../models/user_group.js\";\nimport type { TeamOnly } from \"../types/common_get_params.js\";\nimport type { TeamWithPagination } from \"../types/teams.js\";\nimport type {\n\tUserGroupDeleted,\n\tUserGroupParams,\n} from \"../types/user_groups.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class UserGroups extends BaseCollection<UserGroup> {\n\tprotected static override prefixURI = \"teams/{!:team_id}/groups/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => UserGroup {\n\t\treturn UserGroup;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"user_groups\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn null;\n\t}\n\n\tlist(\n\t\trequest_params: TeamWithPagination,\n\t): Promise<PaginatedResult<UserGroup>> {\n\t\treturn this.doList(request_params) as Promise<PaginatedResult<UserGroup>>;\n\t}\n\n\tcreate(\n\t\tuser_group_params: UserGroupParams,\n\t\trequest_params: TeamOnly,\n\t): Promise<UserGroup> {\n\t\treturn this.doCreate(\n\t\t\tuser_group_params,\n\t\t\trequest_params,\n\t\t\tthis.populateGroupFromJsonRoot,\n\t\t);\n\t}\n\n\tget(\n\t\tuser_group_id: string | number,\n\t\trequest_params: TeamOnly,\n\t): Promise<UserGroup> {\n\t\treturn this.doGet(user_group_id, request_params);\n\t}\n\n\tupdate(\n\t\tuser_group_id: string | number,\n\t\tuser_group_params: UserGroupParams,\n\t\trequest_params: TeamOnly,\n\t): Promise<UserGroup> {\n\t\treturn this.doUpdate(\n\t\t\tuser_group_id,\n\t\t\tuser_group_params,\n\t\t\trequest_params,\n\t\t\tthis.populateGroupFromJsonRoot,\n\t\t);\n\t}\n\n\tdelete(\n\t\tuser_group_id: string | number,\n\t\trequest_params: TeamOnly,\n\t): Promise<UserGroupDeleted> {\n\t\treturn this.doDelete(user_group_id, request_params);\n\t}\n\n\tadd_members_to_group(\n\t\tteam_id: string | number,\n\t\tgroup_id: string | number,\n\t\tuser_ids: string[] | number[],\n\t): Promise<UserGroup> {\n\t\tconst params = {\n\t\t\tteam_id: team_id,\n\t\t\tgroup_id: group_id,\n\t\t};\n\t\tconst body = { users: user_ids };\n\t\treturn this.createPromise(\n\t\t\t\"PUT\",\n\t\t\tparams,\n\t\t\tthis.populateGroupFromJsonRoot,\n\t\t\tbody,\n\t\t\t\"teams/{!:team_id}/groups/{!:group_id}/members/add\",\n\t\t);\n\t}\n\n\tremove_members_from_group(\n\t\tteam_id: string | number,\n\t\tgroup_id: string | number,\n\t\tuser_ids: string[] | number[],\n\t): Promise<UserGroup> {\n\t\tconst params = {\n\t\t\tteam_id: team_id,\n\t\t\tgroup_id: group_id,\n\t\t};\n\t\tconst body = { users: user_ids };\n\t\treturn this.createPromise(\n\t\t\t\"PUT\",\n\t\t\tparams,\n\t\t\tthis.populateGroupFromJsonRoot,\n\t\t\tbody,\n\t\t\t\"teams/{!:team_id}/groups/{!:group_id}/members/remove\",\n\t\t);\n\t}\n\n\tadd_projects_to_group(\n\t\tteam_id: string | number,\n\t\tgroup_id: string | number,\n\t\tproject_ids: string[] | number[],\n\t): Promise<UserGroup> {\n\t\tconst params = {\n\t\t\tteam_id: team_id,\n\t\t\tgroup_id: group_id,\n\t\t};\n\t\tconst body = { projects: project_ids };\n\t\treturn this.createPromise(\n\t\t\t\"PUT\",\n\t\t\tparams,\n\t\t\tthis.populateGroupFromJsonRoot,\n\t\t\tbody,\n\t\t\t\"teams/{!:team_id}/groups/{!:group_id}/projects/add\",\n\t\t);\n\t}\n\n\tremove_projects_from_group(\n\t\tteam_id: string | number,\n\t\tgroup_id: string | number,\n\t\tproject_ids: string[] | number[],\n\t): Promise<UserGroup> {\n\t\tconst params = {\n\t\t\tteam_id: team_id,\n\t\t\tgroup_id: group_id,\n\t\t};\n\t\tconst body = { projects: project_ids };\n\t\treturn this.createPromise(\n\t\t\t\"PUT\",\n\t\t\tparams,\n\t\t\tthis.populateGroupFromJsonRoot,\n\t\t\tbody,\n\t\t\t\"teams/{!:team_id}/groups/{!:group_id}/projects/remove\",\n\t\t);\n\t}\n\n\tprotected populateGroupFromJsonRoot(\n\t\tjson: Record<string, unknown>,\n\t\theaders: Headers,\n\t): UserGroup {\n\t\tconst formatted_json = json.group as Record<string, unknown>;\n\t\treturn this.populateObjectFromJson(formatted_json, headers);\n\t}\n}\n","import type { AuditEventV1 as IAuditEventV1 } from \"../../interfaces/v1/audit_event.js\";\r\n\r\ntype WithoutUndefined<T> = Exclude<T, undefined>;\r\n\r\nexport class AuditEventV1 implements IAuditEventV1 {\r\n\treadonly [key: string]: unknown;\r\n\r\n\treadonly class_uid!: number;\r\n\treadonly class_name?: string;\r\n\r\n\treadonly category_uid!: number;\r\n\treadonly category_name?: string;\r\n\r\n\treadonly activity_id!: number;\r\n\treadonly activity_name?: string;\r\n\r\n\treadonly type_uid!: number;\r\n\treadonly type_name?: string;\r\n\r\n\treadonly severity_id!: number;\r\n\treadonly severity?: string;\r\n\r\n\treadonly status_id?: number;\r\n\treadonly status?: string;\r\n\r\n\treadonly time!: number;\r\n\r\n\treadonly metadata!: IAuditEventV1[\"metadata\"];\r\n\r\n\treadonly actor?: WithoutUndefined<IAuditEventV1[\"actor\"]>;\r\n\r\n\treadonly src_endpoint?: WithoutUndefined<IAuditEventV1[\"src_endpoint\"]>;\r\n\r\n\treadonly http_request?: WithoutUndefined<IAuditEventV1[\"http_request\"]>;\r\n\r\n\treadonly enrichments?: WithoutUndefined<IAuditEventV1[\"enrichments\"]>;\r\n\r\n\treadonly unmapped?: WithoutUndefined<IAuditEventV1[\"unmapped\"]>;\r\n\r\n\tconstructor(json: Record<string, unknown>) {\r\n\t\tObject.assign(this, json);\r\n\t}\r\n}\r\n","import type { CursorPaginatedResultV1 } from \"../../interfaces/v1/cursor_paginated_result.js\";\r\nimport { AuditEventV1 } from \"../../models/v1/audit_event.js\";\r\nimport type { AuditLogParams } from \"../../types/v1/audit_logs.js\";\r\nimport { BaseCollection } from \"../base_collection.js\";\r\n\r\nexport class AuditLogs extends BaseCollection<AuditEventV1> {\r\n\tprotected static override prefixURI = \"audit-logs\";\r\n\r\n\tprotected override get elementClass(): new (\r\n\t\tjson: Record<string, unknown>,\r\n\t) => AuditEventV1 {\r\n\t\treturn AuditEventV1;\r\n\t}\r\n\r\n\tlist(\r\n\t\trequest_params: AuditLogParams = {},\r\n\t): Promise<CursorPaginatedResultV1<AuditEventV1>> {\r\n\t\treturn this.doListCursorV1(request_params);\r\n\t}\r\n}\r\n","import type { Webhook as WebhookInterface } from \"../interfaces/webhook.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class Webhook extends BaseModel implements WebhookInterface {\n\tdeclare webhook_id: string;\n\tdeclare branch: string;\n\tdeclare url: string;\n\tdeclare secret: string;\n\tdeclare events: string[];\n\tdeclare event_lang_map: Array<{\n\t\tevent: string;\n\t\tlang_iso_codes: string[];\n\t}>;\n}\n","import type { PaginatedResult } from \"../interfaces/paginated_result.js\";\nimport { Webhook } from \"../models/webhook.js\";\nimport type {\n\tProjectOnly,\n\tProjectWithPagination,\n} from \"../types/common_get_params.js\";\nimport type {\n\tCreateWebhookParams,\n\tUpdateWebhookParams,\n\tWebhookDeleted,\n\tWebhookRegenerated,\n} from \"../types/webhooks.js\";\nimport { BaseCollection } from \"./base_collection.js\";\n\nexport class Webhooks extends BaseCollection<Webhook> {\n\tprotected static override prefixURI =\n\t\t\"projects/{!:project_id}/webhooks/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => Webhook {\n\t\treturn Webhook;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"webhooks\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"webhook\";\n\t}\n\n\tlist(\n\t\trequest_params: ProjectWithPagination,\n\t): Promise<PaginatedResult<Webhook>> {\n\t\treturn this.doList(request_params) as Promise<PaginatedResult<Webhook>>;\n\t}\n\n\tcreate(\n\t\twebhook_params: CreateWebhookParams,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Webhook> {\n\t\treturn this.doCreate(\n\t\t\twebhook_params,\n\t\t\trequest_params,\n\t\t\tthis.populateObjectFromJsonRoot,\n\t\t);\n\t}\n\n\tget(\n\t\twebhook_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Webhook> {\n\t\treturn this.doGet(webhook_id, request_params);\n\t}\n\n\tupdate(\n\t\twebhook_id: string | number,\n\t\twebhook_params: UpdateWebhookParams,\n\t\trequest_params: ProjectOnly,\n\t): Promise<Webhook> {\n\t\treturn this.doUpdate(webhook_id, webhook_params, request_params);\n\t}\n\n\tdelete(\n\t\twebhook_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<WebhookDeleted> {\n\t\treturn this.doDelete(webhook_id, request_params);\n\t}\n\n\tregenerate_secret(\n\t\twebhook_id: string | number,\n\t\trequest_params: ProjectOnly,\n\t): Promise<WebhookRegenerated> {\n\t\tconst params = {\n\t\t\t...request_params,\n\t\t\t...{ id: webhook_id },\n\t\t};\n\t\treturn this.createPromise(\n\t\t\t\"PATCH\",\n\t\t\tparams,\n\t\t\tthis.returnBareJSON<WebhookRegenerated>,\n\t\t\tnull,\n\t\t\t\"projects/{!:project_id}/webhooks/{:id}/secret/regenerate\",\n\t\t);\n\t}\n}\n","import type { ClientData } from \"../interfaces/client_data.js\";\nimport type { ClientParams } from \"../interfaces/client_params.js\";\n/**\n * A foundational client class that establishes authentication and configuration data.\n * Other specialized clients can inherit from this class to leverage the configured\n * authentication, compression, host, and timeout settings.\n */\nexport class BaseClient {\n\t/**\n\t * Internal client data including token, token type, host, compression, and timeouts.\n\t */\n\treadonly clientData: ClientData = {\n\t\ttoken: \"\",\n\t\ttokenType: \"\",\n\t\tauthHeader: \"x-api-token\",\n\t\tenableCompression: false,\n\t\trequestTimeout: 0,\n\t\tsilent: false,\n\t};\n\n\t/**\n\t * Constructs a new BaseClient instance.\n\t * @param params - Configuration parameters including API key and optional features.\n\t * @throws Error if the API key is not provided or is empty.\n\t */\n\tconstructor({\n\t\tapiKey,\n\t\tenableCompression = false,\n\t\tsilent = false,\n\t\ttokenType = \"\",\n\t\thost,\n\t\trequestTimeout,\n\t\tuserAgent,\n\t}: ClientParams) {\n\t\tif (typeof apiKey !== \"string\" || apiKey.trim().length === 0) {\n\t\t\tthrow new Error(\n\t\t\t\t\"Instantiation failed: A non-empty API key or JWT must be provided.\",\n\t\t\t);\n\t\t}\n\n\t\tthis.clientData = {\n\t\t\ttoken: apiKey,\n\t\t\ttokenType: tokenType.trim(),\n\t\t\tauthHeader: \"x-api-token\",\n\t\t\tenableCompression,\n\t\t\thost,\n\t\t\trequestTimeout: requestTimeout ?? 0,\n\t\t\tsilent,\n\t\t\tuserAgent,\n\t\t};\n\t}\n}\n","import {\n\tBranches,\n\tComments,\n\tContributors,\n\tFiles,\n\tGlossaryTerms,\n\tJwt,\n\tKeys,\n\tLanguages,\n\tOrders,\n\tPaymentCards,\n\tPermissionTemplates,\n\tProjects,\n\tQueuedProcesses,\n\tScreenshots,\n\tSegments,\n\tSnapshots,\n\tTasks,\n\tTeams,\n\tTeamUserBillingDetails,\n\tTeamUsers,\n\tTranslationProviders,\n\tTranslationStatuses,\n\tTranslations,\n\tUserGroups,\n\tWebhooks,\n} from \"../collections/index.js\";\n\nimport type { ClientParams } from \"../interfaces/client_params.js\";\nimport { BaseClient } from \"./base_client.js\";\n\n/**\n * A main entry point for interacting with the Lokalise API.\n * Provides easy access to various resource collections (Branches, Comments, Projects, etc.)\n * through dedicated methods.\n */\nexport class LokaliseApi extends BaseClient {\n\t/**\n\t * Creates a new instance of the LokaliseApi client.\n\t * @param params - Configuration parameters including `apiKey` and optional `version`, `host`, etc.\n\t */\n\tconstructor(params: ClientParams) {\n\t\tsuper(params);\n\n\t\t// Default to \"api2\" version if not explicitly provided\n\t\tthis.clientData.version = params.version ?? \"api2\";\n\t\tthis.clientData.authHeader = params.header ?? this.clientData.authHeader;\n\t}\n\n\t/**\n\t * Access Branch-related endpoints.\n\t */\n\tbranches(): Branches {\n\t\treturn new Branches(this.clientData);\n\t}\n\n\t/**\n\t * Access Comment-related endpoints.\n\t */\n\tcomments(): Comments {\n\t\treturn new Comments(this.clientData);\n\t}\n\n\t/**\n\t * Access Contributor-related endpoints.\n\t */\n\tcontributors(): Contributors {\n\t\treturn new Contributors(this.clientData);\n\t}\n\n\t/**\n\t * Access File-related endpoints.\n\t */\n\tfiles(): Files {\n\t\treturn new Files(this.clientData);\n\t}\n\n\t/**\n\t * Access Glossary-related endpoints.\n\t */\n\tglossaryTerms(): GlossaryTerms {\n\t\treturn new GlossaryTerms(this.clientData);\n\t}\n\n\t/**\n\t * Access JWT-related endpoints.\n\t */\n\tjwt(): Jwt {\n\t\treturn new Jwt(this.clientData);\n\t}\n\n\t/**\n\t * Access Key-related endpoints.\n\t */\n\tkeys(): Keys {\n\t\treturn new Keys(this.clientData);\n\t}\n\n\t/**\n\t * Access Language-related endpoints.\n\t */\n\tlanguages(): Languages {\n\t\treturn new Languages(this.clientData);\n\t}\n\n\t/**\n\t * Access Order-related endpoints.\n\t */\n\torders(): Orders {\n\t\treturn new Orders(this.clientData);\n\t}\n\n\t/**\n\t * Access Payment Card-related endpoints.\n\t */\n\tpaymentCards(): PaymentCards {\n\t\treturn new PaymentCards(this.clientData);\n\t}\n\n\t/**\n\t * Access Permission Template-related endpoints.\n\t */\n\tpermissionTemplates(): PermissionTemplates {\n\t\treturn new PermissionTemplates(this.clientData);\n\t}\n\n\t/**\n\t * Access Project-related endpoints.\n\t */\n\tprojects(): Projects {\n\t\treturn new Projects(this.clientData);\n\t}\n\n\t/**\n\t * Access Queued Process-related endpoints.\n\t */\n\tqueuedProcesses(): QueuedProcesses {\n\t\treturn new QueuedProcesses(this.clientData);\n\t}\n\n\t/**\n\t * Access Screenshot-related endpoints.\n\t */\n\tscreenshots(): Screenshots {\n\t\treturn new Screenshots(this.clientData);\n\t}\n\n\t/**\n\t * Access Segment-related endpoints.\n\t */\n\tsegments(): Segments {\n\t\treturn new Segments(this.clientData);\n\t}\n\n\t/**\n\t * Access Snapshot-related endpoints.\n\t */\n\tsnapshots(): Snapshots {\n\t\treturn new Snapshots(this.clientData);\n\t}\n\n\t/**\n\t * Access Task-related endpoints.\n\t */\n\ttasks(): Tasks {\n\t\treturn new Tasks(this.clientData);\n\t}\n\n\t/**\n\t * Access Team-related endpoints.\n\t */\n\tteams(): Teams {\n\t\treturn new Teams(this.clientData);\n\t}\n\n\t/**\n\t * Access Team User-related endpoints.\n\t */\n\tteamUsers(): TeamUsers {\n\t\treturn new TeamUsers(this.clientData);\n\t}\n\n\t/**\n\t * Access Team User Billing Detail-related endpoints.\n\t */\n\tteamUserBillingDetails(): TeamUserBillingDetails {\n\t\treturn new TeamUserBillingDetails(this.clientData);\n\t}\n\n\t/**\n\t * Access Translation-related endpoints.\n\t */\n\ttranslations(): Translations {\n\t\treturn new Translations(this.clientData);\n\t}\n\n\t/**\n\t * Access Translation Provider-related endpoints.\n\t */\n\ttranslationProviders(): TranslationProviders {\n\t\treturn new TranslationProviders(this.clientData);\n\t}\n\n\t/**\n\t * Access Translation Status-related endpoints.\n\t */\n\ttranslationStatuses(): TranslationStatuses {\n\t\treturn new TranslationStatuses(this.clientData);\n\t}\n\n\t/**\n\t * Access User Group-related endpoints.\n\t */\n\tuserGroups(): UserGroups {\n\t\treturn new UserGroups(this.clientData);\n\t}\n\n\t/**\n\t * Access Webhook-related endpoints.\n\t */\n\twebhooks(): Webhooks {\n\t\treturn new Webhooks(this.clientData);\n\t}\n}\n","import type { ClientParams } from \"../interfaces/client_params.js\";\nimport { LokaliseApi } from \"./lokalise_api.js\";\n\n/**\n * A specialized client for interacting with the Lokalise API using OAuth authentication.\n * Extends `LokaliseApi` and configures the token type and authorization header to use Bearer tokens.\n */\nexport class LokaliseApiOAuth extends LokaliseApi {\n\t/**\n\t * Constructs a new LokaliseApiOAuth client instance.\n\t * @param params - Configuration parameters including `apiKey` (OAuth token)\n\t *                 and optionally `tokenType` (defaults to \"Bearer\").\n\t * @throws Error If `apiKey` is missing or empty.\n\t */\n\tconstructor(params: ClientParams) {\n\t\tsuper(params);\n\n\t\t// Default to \"Bearer\" if tokenType not provided.\n\t\tthis.clientData.tokenType = (params.tokenType ?? \"Bearer\").trim();\n\n\t\t// For OAuth, the header should be `Authorization`.\n\t\tthis.clientData.authHeader = \"Authorization\";\n\t}\n}\n","import type { OtaBundle as OtaBundleInterface } from \"../../interfaces/ota/ota_bundle.js\";\nimport { BaseModel } from \"./../base_model.js\";\n\nexport class OtaBundle extends BaseModel implements OtaBundleInterface {\n\tdeclare id: number;\n\tdeclare projectId: string;\n\tdeclare isPrerelease: boolean;\n\tdeclare isProduction: boolean;\n\tdeclare createdAt: string;\n\tdeclare createdBy: string;\n\tdeclare framework: string;\n\tdeclare description: string;\n\tdeclare isFrozen: boolean;\n\tdeclare lokaliseId: number;\n\tdeclare fileId: string;\n\tdeclare fileUrl: string;\n\tdeclare modifiedAt: string;\n}\n","import { BaseCollection } from \"../collections/base_collection.js\";\nimport type { HttpMethod } from \"../types/http_method.js\";\n\nexport abstract class OtaCollection<\n\tElementType,\n\tSecondaryType = ElementType,\n> extends BaseCollection<ElementType, SecondaryType> {\n\tprotected override doDelete<\n\t\tT = Record<string, unknown> | Record<string, unknown>[],\n\t>(id: string | number, req_params: Record<string, unknown>): Promise<T> {\n\t\tconst params = { ...req_params, id };\n\t\treturn this.createPromise(\n\t\t\t\"DELETE\",\n\t\t\tparams,\n\t\t\tthis.returnJSONFromData,\n\t\t\tnull,\n\t\t) as Promise<T>;\n\t}\n\n\tprotected returnJSONFromData(\n\t\tjson: Record<string, unknown>,\n\t): Record<string, unknown> | Array<Record<string, unknown>> {\n\t\tconst data = json.data;\n\n\t\tif (\n\t\t\tdata &&\n\t\t\ttypeof data === \"object\" &&\n\t\t\t(!Array.isArray(data) ||\n\t\t\t\tdata.every((item) => typeof item === \"object\" && item !== null))\n\t\t) {\n\t\t\treturn data as Record<string, unknown> | Array<Record<string, unknown>>;\n\t\t}\n\n\t\tthrow new Error(\n\t\t\t\"Invalid response format: expected object or array of objects in `data`\",\n\t\t);\n\t}\n\n\tprotected async createVoidPromise(\n\t\tmethod: HttpMethod,\n\t\tparams: Record<string, unknown>,\n\t\tbody: object | object[] | null,\n\t\turi: string | null = null,\n\t): Promise<null> {\n\t\tawait this.prepareRequest(method, body, params, uri);\n\t\treturn null;\n\t}\n}\n","import { OtaBundle } from \"../models/ota/ota_bundle.js\";\nimport type {\n\tOtaBundleUpdateData,\n\tOtaResourceDeleted,\n\tOtaTeamProject,\n} from \"../types/ota.js\";\nimport { OtaCollection } from \"./ota_collection.js\";\n\nexport class OtaBundleManagement extends OtaCollection<OtaBundle> {\n\tprotected static override prefixURI =\n\t\t\"teams/{!:teamId}/projects/{!:lokaliseProjectId}/bundles/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => OtaBundle {\n\t\treturn OtaBundle;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"data\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"data\";\n\t}\n\n\tlist(request_params: OtaTeamProject): Promise<OtaBundle[]> {\n\t\treturn this.doList(request_params) as Promise<OtaBundle[]>;\n\t}\n\n\tget(\n\t\tbundleId: string | number,\n\t\trequestParams: OtaTeamProject,\n\t): Promise<OtaBundle> {\n\t\treturn this.doGet(bundleId, requestParams);\n\t}\n\n\tupdate(\n\t\tbundleId: string | number,\n\t\tbundleParams: OtaBundleUpdateData,\n\t\trequestParams: OtaTeamProject,\n\t): Promise<OtaBundle> {\n\t\treturn this.doUpdate(\n\t\t\tbundleId,\n\t\t\tbundleParams,\n\t\t\trequestParams,\n\t\t\tthis.populateObjectFromJsonRoot,\n\t\t\t\"PATCH\",\n\t\t);\n\t}\n\n\tdelete(\n\t\tbundleId: string | number,\n\t\trequestParams: OtaTeamProject,\n\t): Promise<OtaResourceDeleted> {\n\t\treturn this.doDelete(bundleId, requestParams);\n\t}\n}\n","import { Branch } from \"../models/branch.js\";\nimport type { OtaTeamProjectFramework } from \"../types/ota.js\";\nimport { OtaCollection } from \"./ota_collection.js\";\n\nexport class OtaBundlePublishing extends OtaCollection<void> {\n\tprotected static override prefixURI =\n\t\t\"teams/{!:teamId}/projects/{!:lokaliseProjectId}/frameworks/{!:framework}/{!:action}\";\n\n\t// This is just a dummy implementation to keep linter happy\n\t// It's not used in this class\n\t/* v8 ignore next 5 */\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => Branch {\n\t\treturn Branch;\n\t}\n\n\tpublish(\n\t\tbundleId: number | string,\n\t\trequest_params: OtaTeamProjectFramework,\n\t): Promise<null> {\n\t\tconst params = {\n\t\t\t...request_params,\n\t\t\t...{ action: \"publish\" },\n\t\t};\n\t\treturn this.createVoidPromise(\"POST\", params, {\n\t\t\tbundleId,\n\t\t});\n\t}\n\n\tstage(\n\t\tbundleId: number | string,\n\t\trequest_params: OtaTeamProjectFramework,\n\t): Promise<null> {\n\t\tconst params = {\n\t\t\t...request_params,\n\t\t\t...{ action: \"stage\" },\n\t\t};\n\t\treturn this.createVoidPromise(\"POST\", params, {\n\t\t\tbundleId,\n\t\t});\n\t}\n}\n","import type { OtaBundleArchive as OtaBundleArchiveInterface } from \"../../interfaces/ota/ota_bundle_archive.js\";\nimport { BaseModel } from \"./../base_model.js\";\n\nexport class OtaBundleArchive\n\textends BaseModel\n\timplements OtaBundleArchiveInterface\n{\n\tdeclare url: string;\n\tdeclare version: number;\n}\n","import { OtaBundleArchive } from \"../models/ota/ota_bundle_archive.js\";\nimport type {\n\tOtaProjectFramework,\n\tOtaRequestBundleParams,\n} from \"../types/ota.js\";\nimport { OtaCollection } from \"./ota_collection.js\";\n\nexport class OtaBundles extends OtaCollection<OtaBundleArchive> {\n\tprotected static rootElementNameSingular = \"data\";\n\tprotected static override prefixURI =\n\t\t\"lokalise/projects/{!:lokaliseProjectId}/frameworks/{!:framework}\";\n\tprotected static elementClass = OtaBundleArchive;\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => OtaBundleArchive {\n\t\treturn OtaBundleArchive;\n\t}\n\n\tprotected override get rootElementNameSingular(): string {\n\t\treturn \"data\";\n\t}\n\n\tget(\n\t\tbundle_params: OtaRequestBundleParams,\n\t\trequest_params: OtaProjectFramework,\n\t): Promise<OtaBundleArchive> {\n\t\tconst params = {\n\t\t\t...request_params,\n\t\t\t...bundle_params,\n\t\t};\n\n\t\treturn this.createPromise(\n\t\t\t\"GET\",\n\t\t\tparams,\n\t\t\tthis.populateObjectFromJsonRoot,\n\t\t\tnull,\n\t\t);\n\t}\n}\n","import type { OtaFreezePeriod as OtaFreezePeriodInterface } from \"../../interfaces/ota/ota_freeze_period.js\";\nimport { BaseModel } from \"./../base_model.js\";\n\nexport class OtaFreezePeriod\n\textends BaseModel\n\timplements OtaFreezePeriodInterface\n{\n\tdeclare id: number;\n\tdeclare projectId: number;\n\tdeclare bundleId: number;\n\tdeclare framework: string;\n\tdeclare from: string;\n\tdeclare to: string;\n}\n","import { OtaFreezePeriod } from \"../models/ota/ota_freeze_period.js\";\nimport type {\n\tOtaFreezePeriodParams,\n\tOtaResourceDeleted,\n\tOtaTeamProject,\n\tOtaTeamProjectFramework,\n} from \"../types/ota.js\";\nimport { OtaCollection } from \"./ota_collection.js\";\n\nexport class OtaFreezePeriods extends OtaCollection<OtaFreezePeriod> {\n\tprotected static override prefixURI =\n\t\t\"teams/{!:teamId}/projects/{!:lokaliseProjectId}/bundle-freezes/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => OtaFreezePeriod {\n\t\treturn OtaFreezePeriod;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"data\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"data\";\n\t}\n\n\tlist(requestParams: OtaTeamProjectFramework): Promise<OtaFreezePeriod[]> {\n\t\treturn this.doList(requestParams) as Promise<OtaFreezePeriod[]>;\n\t}\n\n\tcreate(\n\t\tfreezeParams: OtaFreezePeriodParams,\n\t\trequestParams: OtaTeamProject,\n\t): Promise<OtaFreezePeriod> {\n\t\treturn this.doCreate(\n\t\t\tfreezeParams,\n\t\t\trequestParams,\n\t\t\tthis.populateObjectFromJsonRoot,\n\t\t);\n\t}\n\n\tupdate(\n\t\tfreezeId: string | number,\n\t\tfreezeParams: OtaFreezePeriodParams,\n\t\trequestParams: OtaTeamProject,\n\t): Promise<OtaFreezePeriod> {\n\t\treturn this.doUpdate(freezeId, freezeParams, requestParams);\n\t}\n\n\tdelete(\n\t\tfreezeId: string | number,\n\t\trequestParams: OtaTeamProject,\n\t): Promise<OtaResourceDeleted> {\n\t\treturn this.doDelete(freezeId, requestParams);\n\t}\n}\n","import type { OtaSdkToken as OtaSdkTokenInterface } from \"../../interfaces/ota/ota_sdk_token.js\";\nimport { BaseModel } from \"./../base_model.js\";\n\nexport class OtaSdkToken extends BaseModel implements OtaSdkTokenInterface {\n\tdeclare id: number;\n\tdeclare token: string;\n\tdeclare projectId: number;\n\tdeclare lokaliseId: number;\n\tdeclare createdAt: string;\n}\n","import { OtaSdkToken } from \"../models/ota/ota_sdk_token.js\";\nimport type { OtaResourceDeleted, OtaTeamProject } from \"../types/ota.js\";\nimport { OtaCollection } from \"./ota_collection.js\";\n\nexport class OtaSdkTokens extends OtaCollection<OtaSdkToken> {\n\tprotected static override prefixURI =\n\t\t\"teams/{!:teamId}/projects/{!:lokaliseProjectId}/tokens/{:id}\";\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => OtaSdkToken {\n\t\treturn OtaSdkToken;\n\t}\n\n\tprotected override get rootElementName(): string {\n\t\treturn \"data\";\n\t}\n\n\tprotected override get rootElementNameSingular(): string | null {\n\t\treturn \"data\";\n\t}\n\n\tlist(request_params: OtaTeamProject): Promise<OtaSdkToken[]> {\n\t\treturn this.doList(request_params) as Promise<OtaSdkToken[]>;\n\t}\n\n\tcreate(request_params: OtaTeamProject): Promise<OtaSdkToken> {\n\t\treturn this.doCreate(null, request_params, this.populateObjectFromJsonRoot);\n\t}\n\n\tdelete(\n\t\ttokenId: string | number,\n\t\trequest_params: OtaTeamProject,\n\t): Promise<OtaResourceDeleted> {\n\t\treturn this.doDelete(tokenId, request_params);\n\t}\n}\n","import type { OtaStatistics as OtaStatisticsInterface } from \"../../interfaces/ota/ota_statistics.js\";\nimport { BaseModel } from \"./../base_model.js\";\n\nexport class OtaStatistics extends BaseModel implements OtaStatisticsInterface {\n\tdeclare lokaliseProjectId: string;\n\tdeclare from: string;\n\tdeclare to: string;\n\tdeclare sdk: string;\n\tdeclare daily: Array<{\n\t\tdate: string;\n\t\tdownloads: number;\n\t\ttrafficMb: number;\n\t\ttrafficBytes: string;\n\t\tframework: string;\n\t}>;\n\tdeclare monthly: Array<{\n\t\tdate: string;\n\t\tdownloads: number;\n\t\ttrafficMb: number;\n\t\ttrafficBytes: string;\n\t\tframework: string;\n\t}>;\n\tdeclare totals: {\n\t\tdownloads: number;\n\t\ttrafficMb: number;\n\t\ttrafficBytes: string;\n\t};\n}\n","import { OtaStatistics } from \"../models/ota/ota_statistics.js\";\nimport type { OtaTeamProject, OtaUsageParams } from \"../types/ota.js\";\nimport { OtaCollection } from \"./ota_collection.js\";\n\nexport class OtaUsageStatistics extends OtaCollection<OtaStatistics> {\n\tprotected static override prefixURI =\n\t\t\"teams/{!:teamId}/projects/{!:lokaliseProjectId}/stats\";\n\tprotected static elementClass = OtaStatistics;\n\n\tprotected get elementClass(): new (\n\t\tjson: Record<string, unknown>,\n\t) => OtaStatistics {\n\t\treturn OtaStatistics;\n\t}\n\n\tget(\n\t\tbundle_params: OtaUsageParams,\n\t\trequest_params: OtaTeamProject,\n\t): Promise<OtaStatistics> {\n\t\tconst params = {\n\t\t\t...request_params,\n\t\t\t...bundle_params,\n\t\t};\n\n\t\treturn this.createPromise(\"GET\", params, this.populateObjectFromJson, null);\n\t}\n}\n","import type { ClientParams } from \"../interfaces/client_params.js\";\nimport {\n\tOtaBundleManagement,\n\tOtaBundlePublishing,\n\tOtaFreezePeriods,\n\tOtaSdkTokens,\n\tOtaUsageStatistics,\n} from \"../ota_collections/index.js\";\nimport { BaseClient } from \"./base_client.js\";\n\n/**\n * A specialized client configured for interacting with Lokalise OTA endpoints.\n * Extends `BaseClient` and sets defaults suitable for OTA requests:\n * - `tokenType` defaults to \"Bearer\"\n * - `authHeader` set to \"Authorization\"\n * - `host` defaults to \"https://ota.lokalise.com\"\n * - `version` defaults to \"v3\"\n */\nexport class LokaliseApiOta extends BaseClient {\n\t/**\n\t * Creates a new LokaliseApiOta client instance.\n\t * @param params - Configuration parameters including `apiKey` and optional overrides for tokenType, host, version, etc.\n\t * @throws Error If `apiKey` is missing or empty.\n\t */\n\tconstructor(params: ClientParams) {\n\t\tsuper(params);\n\n\t\tthis.clientData.tokenType = (params.tokenType ?? \"Bearer\").trim();\n\t\tthis.clientData.authHeader = \"Authorization\";\n\t\tthis.clientData.host = this.clientData.host ?? \"https://ota.lokalise.com\";\n\t\tthis.clientData.version = params.version ?? \"v3\";\n\t}\n\n\t/**\n\t * Provides access to the OtaBundleManagement collection.\n\t */\n\totaBundleManagement(): OtaBundleManagement {\n\t\treturn new OtaBundleManagement(this.clientData);\n\t}\n\n\t/**\n\t * Provides access to the OtaBundlePublishing collection.\n\t */\n\totaBundlePublishing(): OtaBundlePublishing {\n\t\treturn new OtaBundlePublishing(this.clientData);\n\t}\n\n\t/**\n\t * Provides access to the OtaUsageStatistics collection.\n\t */\n\totaUsageStatistics(): OtaUsageStatistics {\n\t\treturn new OtaUsageStatistics(this.clientData);\n\t}\n\n\t/**\n\t * Provides access to the OtaFreezePeriods collection.\n\t */\n\totaFreezePeriods(): OtaFreezePeriods {\n\t\treturn new OtaFreezePeriods(this.clientData);\n\t}\n\n\t/**\n\t * Provides access to the OtaSdkTokens collection.\n\t */\n\totaSdkTokens(): OtaSdkTokens {\n\t\treturn new OtaSdkTokens(this.clientData);\n\t}\n}\n","import { AuditLogs } from \"../collections/index.js\";\r\nimport type { ClientParams } from \"../interfaces/client_params.js\";\r\nimport { BaseClient } from \"./base_client.js\";\r\n\r\n/**\r\n * A main entry point for interacting with Lokalise API v1.\r\n * Provides access to resource collections available through API version v1.\r\n */\r\nexport class LokaliseApiV1 extends BaseClient {\r\n\t/**\r\n\t * Creates a new instance of the LokaliseApiV1 client.\r\n\t * @param params - Configuration parameters including `apiKey` and optional `version`, `host`, etc.\r\n\t */\r\n\tconstructor(params: ClientParams) {\r\n\t\tsuper(params);\r\n\r\n\t\t// Default to \"v1\" if not explicitly provided\r\n\t\tthis.clientData.version = params.version ?? \"v1\";\r\n\t\tthis.clientData.authHeader = params.header ?? this.clientData.authHeader;\r\n\t}\r\n\r\n\t/**\r\n\t * Access Audit Logs endpoints.\r\n\t */\r\n\tauditLogs(): AuditLogs {\r\n\t\treturn new AuditLogs(this.clientData);\r\n\t}\r\n}\r\n","import type { ClientParams } from \"../interfaces/client_params.js\";\nimport { OtaBundles } from \"../ota_collections/ota_bundles.js\";\nimport { BaseClient } from \"./base_client.js\";\n\n/**\n * A specialized client for interacting with Lokalise OTA (Over-The-Air) bundle resources.\n * Extends the BaseClient to configure authentication and endpoint specifics for OTA bundles.\n */\nexport class LokaliseOtaBundles extends BaseClient {\n\t/**\n\t * Constructs a new LokaliseOtaBundles client instance.\n\t * @param params - Configuration parameters, including the required `apiKey`.\n\t *                 Optional parameters include `version`, `host`, etc.\n\t *                 Defaults: `host` = \"https://ota.lokalise.com\", `version` = \"v3\".\n\t * @throws Error If no valid API key is provided.\n\t */\n\tconstructor(params: ClientParams) {\n\t\tsuper(params);\n\n\t\t// Use the OTA-specific auth header and default host.\n\t\tthis.clientData.authHeader = \"x-ota-api-token\";\n\t\tthis.clientData.host = this.clientData.host ?? \"https://ota.lokalise.com\";\n\n\t\t// Default OTA API version if not provided.\n\t\tthis.clientData.version = params.version ?? \"v3\";\n\t}\n\n\t/**\n\t * Provides access to the OtaBundles collection.\n\t * @returns An OtaBundles instance.\n\t */\n\totaBundles(): OtaBundles {\n\t\treturn new OtaBundles(this.clientData);\n\t}\n}\n","import type { AuthData as AuthDataInterface } from \"../interfaces/auth_data.js\";\nimport { getVersion } from \"../lokalise/pkg.js\";\nimport type { AuthError } from \"../models/auth_error.js\";\nimport type { HttpMethod } from \"../types/http_method.js\";\n\ninterface ResolvedResponse<T = unknown> {\n\tjson: T;\n\theaders: Headers;\n}\n\n/**\n * Builds and returns headers for the request.\n */\nasync function buildHeaders(): Promise<Headers> {\n\tconst headers = new Headers({\n\t\tAccept: \"application/json\",\n\t\t\"User-Agent\": `node-lokalise-api/${await getVersion()}`,\n\t\t\"Content-type\": \"application/json\",\n\t});\n\n\treturn headers;\n}\n\n/**\n * Fetches the response from the API and handles response validation.\n */\nasync function fetchAndHandleResponse<T = unknown>(\n\ttarget: URL,\n\toptions: RequestInit,\n): Promise<ResolvedResponse<T>> {\n\ttry {\n\t\tconst response = await fetch(target, options);\n\t\tconst responseJSON = await response.json();\n\n\t\tif (response.ok) {\n\t\t\treturn {\n\t\t\t\tjson: responseJSON,\n\t\t\t\theaders: response.headers,\n\t\t\t};\n\t\t}\n\n\t\tconst error: AuthError = {\n\t\t\tcode: response.status,\n\t\t\t...responseJSON,\n\t\t};\n\t\treturn Promise.reject(error);\n\t} catch (err) {\n\t\tconst error: AuthError = {\n\t\t\terror: (err as Error).message,\n\t\t\tcode: 500,\n\t\t\terror_description: \"\",\n\t\t};\n\t\treturn Promise.reject(error);\n\t}\n}\n\n/**\n * Creates and sends an HTTP request, returning the parsed response.\n */\nexport async function createPromise<T = unknown>(\n\turi: string,\n\tmethod: HttpMethod,\n\tbody: object | object[],\n\t{ host, version }: AuthDataInterface,\n): Promise<ResolvedResponse<T>> {\n\tconst fullUri = `/${version}/${uri}`;\n\tconst target = new URL(fullUri, host);\n\n\tconst options: RequestInit = {\n\t\tmethod,\n\t\theaders: await buildHeaders(),\n\t\tbody: JSON.stringify(body),\n\t};\n\n\treturn fetchAndHandleResponse<T>(target, options);\n}\n","import type { AuthData as AuthDataInterface } from \"../interfaces/auth_data.js\";\nimport type { RefreshTokenResponse } from \"../interfaces/refresh_token_response.js\";\nimport type { RequestTokenResponse } from \"../interfaces/request_token_response.js\";\nimport type { AuthError } from \"../models/auth_error.js\";\nimport { createPromise } from \"./auth_request.js\";\n\nexport class LokaliseAuth {\n\tpublic authData: AuthDataInterface;\n\n\t/**\n\t * Instantiate LokaliseAuth to work with OAuth 2 tokens\n\t *\n\t * @param clientId - The client ID (mandatory)\n\t * @param clientSecret - The client secret (mandatory)\n\t * @param host - Optional host, defaults to \"https://app.lokalise.com\"\n\t * @param version - Optional API version, defaults to \"oauth2\"\n\t */\n\tconstructor(\n\t\tclientId: string,\n\t\tclientSecret: string,\n\t\thost = \"https://app.lokalise.com\",\n\t\tversion = \"oauth2\",\n\t) {\n\t\tif (!clientId || !clientSecret) {\n\t\t\tthrow new Error(\n\t\t\t\t\"Error: Instantiation failed: Please pass client ID and client secret\",\n\t\t\t);\n\t\t}\n\n\t\tthis.authData = {\n\t\t\tclient_id: clientId,\n\t\t\tclient_secret: clientSecret,\n\t\t\thost,\n\t\t\tversion,\n\t\t};\n\t}\n\n\t/**\n\t * Generate the authorization URL\n\t *\n\t * @param scope - The scope(s) for the authorization\n\t * @param redirectUri - Optional redirect URI\n\t * @param state - Optional state parameter\n\t * @returns The authorization URL as a string\n\t */\n\tauth(scope: string | string[], redirectUri?: string, state?: string): string {\n\t\tconst scopeString = Array.isArray(scope) ? scope.join(\" \") : scope;\n\n\t\tconst params: Record<string, string> = {\n\t\t\tclient_id: this.authData.client_id,\n\t\t\tscope: scopeString,\n\t\t\t...(state && { state }),\n\t\t\t...(redirectUri && { redirect_uri: redirectUri }),\n\t\t};\n\n\t\treturn this.buildUrl(params);\n\t}\n\n\t/**\n\t * Exchange an authorization code for an access token\n\t *\n\t * @param code - The authorization code\n\t * @returns A promise resolving to the token response\n\t */\n\ttoken(code: string): Promise<RequestTokenResponse> {\n\t\tconst params = {\n\t\t\t...this.baseParams(),\n\t\t\tcode,\n\t\t\tgrant_type: \"authorization_code\",\n\t\t};\n\n\t\treturn this.doRequest<RequestTokenResponse>(params);\n\t}\n\n\t/**\n\t * Refresh an access token using a refresh token\n\t *\n\t * @param refreshToken - The refresh token\n\t * @returns A promise resolving to the token response\n\t */\n\trefresh(refreshToken: string): Promise<RefreshTokenResponse> {\n\t\tconst params = {\n\t\t\t...this.baseParams(),\n\t\t\trefresh_token: refreshToken,\n\t\t\tgrant_type: \"refresh_token\",\n\t\t};\n\n\t\treturn this.doRequest<RefreshTokenResponse>(params);\n\t}\n\n\t/**\n\t * Internal method to perform the API request\n\t *\n\t * @param params - Request parameters\n\t * @returns A promise resolving to the API response\n\t */\n\tprivate async doRequest<T>(params: Record<string, string>): Promise<T> {\n\t\ttry {\n\t\t\tconst data = await createPromise(\"token\", \"POST\", params, this.authData);\n\n\t\t\treturn data.json as T;\n\t\t} catch (err) {\n\t\t\tthrow this.handleReject(err);\n\t\t}\n\t}\n\n\t/**\n\t * Build the authorization URL\n\t *\n\t * @param params - URL parameters\n\t * @returns The complete URL as a string\n\t */\n\tprivate buildUrl(params: Record<string, string>): string {\n\t\tconst url = new URL(\"auth\", this.authData.host);\n\t\turl.search = new URLSearchParams(params).toString();\n\t\treturn url.toString();\n\t}\n\n\t/**\n\t * Get the base parameters for authentication requests\n\t *\n\t * @returns A record containing the client ID and client secret\n\t */\n\tprivate baseParams(): Record<string, string> {\n\t\treturn {\n\t\t\tclient_id: this.authData.client_id,\n\t\t\tclient_secret: this.authData.client_secret,\n\t\t};\n\t}\n\n\t/**\n\t * Handle API request errors and transform them into an `AuthError`\n\t *\n\t * @param error - The error object\n\t * @returns An `AuthError` instance\n\t */\n\tprivate handleReject(error: unknown): AuthError {\n\t\treturn error as AuthError;\n\t}\n}\n","import type { IAuthError } from \"../interfaces/auth_error.js\";\nimport { BaseModel } from \"./base_model.js\";\n\nexport class AuthError extends BaseModel implements IAuthError {\n\tdeclare code: number;\n\tdeclare error: string;\n\tdeclare error_description: string;\n\tdeclare error_uri?: string;\n}\n"],"mappings":";;;AAAA,IAAsB,YAAtB,MAEE;CACD,YAAY,QAAoB;EAC/B,OAAO,OAAO,MAAM,MAAM;CAC3B;AACD;;;;ACHA,IAAa,SAAb,cAA4B,UAAqC,CAOjE;;;;;;;;ACJA,SAAS,UAAkB;CAC1B,OAAO;AACR;;;;;;;AAQA,eAAsB,aAA8B;CACnD,IAAI;EACH,MAAM,OAAO,MAAM,SAAS,IAAI,IAAI,QAAQ,GAAG,OAAO,KAAK,GAAG,CAAC;EAC/D,MAAM,MAAM,KAAK,MAAM,KAAK,SAAS,CAAC;EACtC,OAAO,OAAO,IAAI,OAAO;CAC1B,QAAQ;EACP,OAAO;CACR;AACD;;;;;;;ACnBA,IAAa,WAAb,cAA8B,MAA2B;;;;CAIxD;;;;CAKA;;;;;;;;CASA,YACC,SACA,MACA,SACC;EACD,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,IAAI,SACH,KAAK,UAAU;CAEjB;;;;;;CAOA,AAAS,WAAmB;EAC3B,IAAI,cAAc,kBAAkB,KAAK;EACzC,eAAe,WAAW,KAAK,KAAK;EAEpC,IAAI,KAAK,SAAS;GACjB,MAAM,mBAAmB,OAAO,QAAQ,KAAK,OAAO,CAAC,CACnD,KAAK,CAAC,KAAK,WAAW,GAAG,IAAI,IAAI,OAAO,CAAC,CACzC,KAAK,IAAI;GAEX,eAAe,eAAe;EAC/B;EACA,OAAO;CACR;AACD;;;;;;;;ACvCA,IAAa,aAAb,MAAa,WAAW;;;;CAIvB,OAA0B,UAAU;;;;CAKpC,AAAO;;;;;CAMP,AAAO,SAAkC,CAAC;;;;;CAM1C,YAAY,QAAiC;EAE5C,KAAK,SAAS,EAAE,GAAG,OAAO;CAC3B;;;;;;;;;;CAmBA,aAAoB,OACnB,KACA,QACA,MACA,QACA,YACsB;EACtB,MAAM,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