@c-rex/api 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1257 -408
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1257 -408
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -2
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/cookies.ts","../src/OIDC.ts","../../constants/src/index.ts","../src/rpc.ts","../../services/src/baseService.ts","../../utils/src/utils.ts","../../utils/src/classMerge.ts","../../utils/src/params.ts","../../utils/src/renditions.ts","../../services/src/transforms/documentTypes.ts","../../services/src/transforms/information.ts","../../services/src/informationUnits.ts","../../services/src/language.ts","../../services/src/transforms/topics.ts"],"sourcesContent":["//Do not export logger.ts. Logger must be exported as an another entrypoint on package.json\nexport * from \"./cookies\";\nexport * from \"./OIDC\";\nexport * from \"./rpc\";\n","import { NextRequest, NextResponse } from 'next/server';\nimport { cookies } from 'next/headers';\n\n/**\n * Retrieves a cookie value by key from the request\n * @param {NextRequest} req - The Next.js request object\n * @returns {Promise<NextResponse>} JSON response containing the cookie key-value pair or error\n */\nexport const getCookieFromServer = async (req: NextRequest): Promise<NextResponse> => {\n const key = req.nextUrl.searchParams.get('key');\n if (!key) return NextResponse.json({ error: 'Missing key' }, { status: 400 });\n\n const value = cookies().get(key);\n const response = NextResponse.json({ key, value: value?.value || null });\n\n return response;\n}","import { NextResponse } from 'next/server';\nimport { CREX_TOKEN_HEADER_KEY } from '@c-rex/constants';\nimport { getIssuerMetadata, getToken } from '@c-rex/core/OIDC';\nimport { CrexSDK } from '@c-rex/core/sdk';\n\n/**\n * Retrieves an access token using client credentials flow from the configured OIDC provider\n * \n * @returns NextResponse with success status or error message\n * @throws Error if token retrieval fails\n */\nexport const getTokenMethod = async (): Promise<NextResponse> => {\n try {\n const { token, expiresAt, error } = await getToken();\n\n if (error) {\n return NextResponse.json({ error }, { status: 500 });\n }\n\n const response = NextResponse.json({ token: token });\n\n response.cookies.set({\n name: CREX_TOKEN_HEADER_KEY,\n value: token,\n httpOnly: true,\n secure: process.env.NODE_ENV === 'production',\n sameSite: 'lax',\n path: '/',\n expires: expiresAt ? new Date(expiresAt * 1000) : undefined\n });\n\n return response;\n\n } catch (error) {\n return NextResponse.json({ error: String(error) }, { status: 500 });\n }\n}\n\nexport const discoverIssuerMethod = async (): Promise<NextResponse> => {\n try {\n const metadata = await getIssuerMetadata();\n const sdk = new CrexSDK();\n const config = sdk.getServerConfig();\n sdk.updateConfigProp('OIDC', {\n ...config.OIDC,\n issuerMetadata: metadata\n });\n\n const response = NextResponse.json({ issuerMetadata: metadata });\n\n return response;\n\n } catch (error) {\n return NextResponse.json({ error: String(error) }, { status: 500 });\n }\n}\n","export const ALL = \"*\"\n\nexport const LOG_CATEGORIES = [\n \"NoLicense\",\n \"Scenario\",\n \"Favorites\",\n \"Subscription\",\n \"Share\",\n \"Document\",\n \"Search\",\n \"History\",\n \"Notification\",\n \"UserProfile\",\n] as const;\n\nexport const LOG_LEVELS = {\n critical: 2,\n error: 3,\n warning: 4,\n info: 6,\n debug: 7,\n} as const;\n\nexport const RESULT_VIEW_STYLES = [\n \"cards\",\n \"table\",\n \"table-with-images\",\n] as const;\n\nexport const API = {\n MAX_RETRY: 3,\n API_TIMEOUT: 10000,\n RETRY_DELAY: 500,\n API_HEADERS: {\n \"content-Type\": \"application/json\",\n },\n};\n\nexport const SDK_CONFIG_KEY = \"crex-sdk-config\";\n\nexport const CONTENT_LANG_KEY = \"CONTENT_LANG_KEY\";\n\nexport const AVAILABLE_CONTENT_LANG_KEY = \"AVAILABLE_CONTENT_LANG_KEY\";\n\nexport const UI_LANG_KEY = \"UI_LANG_KEY\";\n\nexport const FLAGS_BY_LANG = {\n \"en\": \"US\",\n \"de\": \"DE\",\n};\n\nexport const DEFAULT_LANG = \"en-US\";\n\nexport const EN_LANG = \"en\";\n\nexport const UI_LANG_OPTIONS = [\"en-us\", \"de-de\"];\n\nexport const TOPICS_TYPE_AND_LINK = \"topics\";\nexport const BLOG_TYPE_AND_LINK = \"blog\";\nexport const DOCUMENTS_TYPE_AND_LINK = \"documents\";\n\nexport const TOPIC = \"TOPIC\";\nexport const DOCUMENT = \"DOCUMENT\";\nexport const PACKAGE = \"PACKAGE\";\nexport const FRAGMENT = \"FRAGMENT\";\n\nexport const RESULT_TYPES = {\n TOPIC: TOPIC,\n DOCUMENT: DOCUMENT,\n PACKAGE: PACKAGE,\n FRAGMENT: FRAGMENT\n} as const;\n\nexport const FILES_EXTENSIONS = {\n PDF: \"application/pdf\",\n HTML: \"text/html\",\n} as const;\n\nexport const DEFAULT_COOKIE_LIMIT = 30 * 24 * 60 * 60 * 1000; // 30 days in milliseconds\n\nexport const ICONS_BY_FILE_EXTENSION = {\n \"application/pdf\": \"FaFilePdf\",\n} as const;\n\nexport const DEFAULT_ICON = \"file\";\n\nexport const CREX_TOKEN_HEADER_KEY = \"crex-token\";\n\nexport const WILD_CARD_OPTIONS = {\n BOTH: \"BOTH\",\n END: \"END\",\n START: \"START\",\n NONE: \"NONE\",\n} as const;\n\nexport const OPERATOR_OPTIONS = {\n AND: \"AND\",\n OR: \"OR\",\n} as const;\n\nexport const ARTICLE_PAGE_LAYOUT = {\n BLOG: \"BLOG\",\n DOCUMENT: \"DOCUMENT\",\n} as const;\n\nexport const DEVICE_OPTIONS = {\n MOBILE: \"mobile\",\n TABLET: \"tablet\",\n DESKTOP: \"desktop\",\n}\nexport const BREAKPOINTS = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n \"2xl\": 1536,\n};\n\nexport const MARKER_COLORS = [\n \"red-500\",\n \"orange-500\",\n \"yellow-400\",\n \"green-500\",\n \"teal-500\",\n \"blue-500\",\n \"sky-500\",\n \"purple-500\",\n \"pink-500\",\n \"gray-500\",\n \"neutral-800\",\n \"cyan-500\",\n \"lime-500\",\n \"amber-500\",\n \"indigo-500\",\n];","import { CrexLogger } from '@c-rex/core/logger';\nimport { InformationUnitsService, LanguageService } from '@c-rex/services';\nimport { NextRequest, NextResponse } from 'next/server';\n\n/**\n * Registry of available services that can be called via RPC.\n */\nconst serviceRegistry = {\n InformationUnitsService,\n CrexLogger,\n LanguageService\n};\n\n/**\n * Interface for RPC payload.\n */\ntype RpcPayload = {\n method: string;\n params: any;\n};\n\n/**\n * Handles POST requests for RPC (Remote Procedure Call) functionality.\n * Allows calling methods on registered services with parameters.\n * \n * @param req - The Next.js request object containing the RPC payload\n * @returns A JSON response with the result of the method call, or an error if the service or method is not found\n */\nexport const POST = async (req: NextRequest) => {\n try {\n const { method, params }: RpcPayload = await req.json();\n const [serviceName, methodName] = method.split('.');\n const ServiceClass = serviceRegistry[serviceName as keyof typeof serviceRegistry];\n\n if (!ServiceClass) {\n return NextResponse.json({ error: `Service '${serviceName}' not found` }, { status: 404 });\n }\n\n const serviceInstance = new ServiceClass();\n const handler = (serviceInstance as any)[methodName as any];\n\n if (typeof handler !== 'function') {\n return NextResponse.json({ error: `Method '${methodName}' not found on '${serviceName}'` }, { status: 404 });\n }\n\n const result = await handler.call(serviceInstance, params);\n return NextResponse.json({ data: result });\n } catch (error) {\n const logger = new CrexLogger()\n logger.log({\n level: \"error\",\n message: `RPC.POST error: ${error}`\n })\n return NextResponse.json({ error: String(error) }, { status: 500 });\n }\n}\n","import { CrexApi } from \"@c-rex/core/requests\";\nimport { QueryParams } from \"@c-rex/types\";\nimport { generateQueryParams } from \"@c-rex/utils\";\nimport { Method } from \"axios\";\n\n/**\n * Base service class that provides common functionality for API interactions.\n * All specific service classes extend this base class.\n */\nexport class BaseService {\n protected api: CrexApi;\n private endpoint: string;\n\n /**\n * Creates a new instance of BaseService.\n * \n * @param endpoint - The API endpoint URL for this service\n */\n constructor(endpoint: string) {\n this.api = new CrexApi();\n this.endpoint = endpoint;\n }\n\n /**\n * Makes an API request to the specified endpoint.\n * \n * @param options - Request configuration options\n * @param options.path - Optional path to append to the endpoint\n * @param options.params - Optional query parameters to include in the request\n * @param options.method - HTTP method to use (defaults to 'get')\n * @param options.transformer - Optional function to transform the response data\n * @returns The response data, optionally transformed\n * @throws Error if the API request fails\n */\n protected async request<T>({\n path = \"\",\n method = \"get\",\n params = [],\n headers = {},\n transformer = (response: any) => response,\n }: {\n path?: string,\n method?: Method,\n params?: QueryParams[],\n headers?: any,\n transformer?: (data: any) => T,\n }): Promise<T> {\n\n let url = `${this.endpoint}${path}`;\n\n const queryParams = generateQueryParams(params);\n if (queryParams.length > 0) {\n url += `?${queryParams}`;\n }\n\n const response = await this.api.execute({\n url,\n method,\n headers,\n })\n\n return await transformer(response);\n }\n}\n\n","import { FLAGS_BY_LANG } from \"@c-rex/constants\";\nimport { AvailableVersionsInterface, informationUnitsResponseItem } from \"@c-rex/interfaces\";\n\n/**\n * Retrieves the country code associated with a given language code.\n * @param lang - The language code to look up (e.g., \"en-US\")\n * @returns The corresponding country code, or the original language code if not found\n */\nexport const getCountryCodeByLang = (lang: string): string => {\n const mappedKeys = Object.keys(FLAGS_BY_LANG);\n\n if (!mappedKeys.includes(lang)) {\n return lang\n }\n\n type LangKey = keyof typeof FLAGS_BY_LANG;\n const country = FLAGS_BY_LANG[lang as LangKey]\n\n return country\n}\n\nexport const formatDateToLocale = (date: string, locale: string): string => {\n if (typeof date !== 'string' || !date) {\n return date;\n }\n\n const dateAux = new Date(date);\n return new Intl.DateTimeFormat(locale, {\n day: '2-digit',\n month: 'long',\n year: 'numeric'\n }).format(dateAux);\n}\n\nexport const createAvailableVersionList = (\n versions: informationUnitsResponseItem[],\n articleLang: string,\n type: string\n): AvailableVersionsInterface[] => {\n\n const availableVersions = versions.map(item => {\n return {\n shortId: item.shortId,\n active: item.language === articleLang,\n lang: item.language,\n country: item.language.split(\"-\")[1],\n link: `/${type}/${item.shortId}`,\n }\n }).sort((a, b) => {\n if (a.lang < b.lang) return -1;\n if (a.lang > b.lang) return 1;\n return 0;\n }) as AvailableVersionsInterface[];\n\n return availableVersions;\n}","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merges multiple class values into a single string using clsx and tailwind-merge.\n * Useful for conditionally applying Tailwind CSS classes.\n * @param inputs - Any number of class values (strings, objects, arrays, etc.)\n * @returns A merged string of class names optimized for Tailwind CSS\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import { QueryParams } from '@c-rex/types';\n\n/**\n * Creates an array of parameter objects from a list of field values.\n * @param fieldsList - Array of field values to transform into parameter objects\n * @param key - The key to use for each parameter object (defaults to \"Fields\")\n * @returns An array of objects with key-value pairs\n */\nexport const createParams = (fieldsList: string[], key: string = \"Fields\") => {\n if (!fieldsList || fieldsList.length === 0) {\n return [];\n }\n\n return fieldsList.map((item) => ({\n key: key,\n value: item,\n }));\n}\n\n/**\n * Generates a URL query string from an array of parameter objects.\n * @param params - Array of QueryParams objects containing key-value pairs\n * @returns A URL-encoded query string\n */\nexport const generateQueryParams = (params: QueryParams[]): string => {\n const queryParams = params\n .map((param) => `${encodeURIComponent(param.key)}=${encodeURIComponent(param.value)}`)\n .join(\"&\");\n return queryParams;\n};\n","import { informationUnitsRenditions } from \"@c-rex/interfaces\";\nimport { DocumentsType } from \"@c-rex/types\";\n\n\nexport const getFileRenditions = ({ renditions }: { renditions: informationUnitsRenditions[] }): DocumentsType => {\n if (renditions == undefined || renditions.length == 0) {\n return {};\n }\n\n const filteredRenditions = renditions.filter(\n (item) => item.format != \"application/xhtml+xml\" && item.format != \"application/json\" && item.format != \"application/llm+xml\"\n );\n\n if (filteredRenditions.length == 0 || filteredRenditions[0] == undefined) {\n return {};\n }\n\n const result: {\n [key: string]: {\n view: string;\n download: string;\n }\n } = {}\n\n filteredRenditions.forEach((item) => {\n const key = item.format\n\n if (result[key] == undefined) {\n result[key] = {\n view: \"\",\n download: \"\"\n }\n }\n\n result[key].download = item.links.filter((link) => link.rel == \"download\")[0]?.href\n result[key].view = item.links.filter((link) => link.rel == \"view\")[0]?.href\n })\n\n return result\n}","import { CONTENT_LANG_KEY } from \"@c-rex/constants\";\nimport { CrexSDK } from \"@c-rex/core/sdk\";\nimport { DefaultRequest } from \"@c-rex/interfaces\";\nimport { DocumentTypesItem } from \"@c-rex/interfaces\";\nimport { cookies } from \"next/headers\";\n\nexport const transformDocumentTypes = async (data: DefaultRequest<DocumentTypesItem>) => {\n const labels: { shortId: string, label: string }[] = [];\n const sdk = new CrexSDK();\n const config = sdk.getClientConfig();\n const contentLanguage = cookies().get(CONTENT_LANG_KEY)?.value || config.languageSwitcher.default;\n const language = contentLanguage.split(\"-\")[0];\n\n data.items.forEach((documentItem) => {\n const label = documentItem.labels.find((item) => item.language.toLowerCase() === language.toLowerCase());\n\n labels.push({\n shortId: documentItem.shortId,\n label: label ? label.value : \"\"\n })\n });\n\n return labels;\n};\n","import { CONTENT_LANG_KEY, EN_LANG, RESULT_TYPES } from \"@c-rex/constants\";\nimport {\n DefaultRequest,\n informationUnitsResponse,\n informationUnitsItems,\n} from \"@c-rex/interfaces\";\nimport { cookies } from 'next/headers';\nimport { getFileRenditions } from \"@c-rex/utils\";\nimport { CrexLogger } from '@c-rex/core/logger';\nimport { AutocompleteSuggestion } from \"@c-rex/interfaces\";\nimport { informationUnitsResponseItem } from \"@c-rex/interfaces\";\nimport { CrexSDK } from \"@c-rex/core/sdk\";\n\nexport const transformInformationUnits = async (data: DefaultRequest<informationUnitsItems>): Promise<informationUnitsResponse> => {\n const logger = new CrexLogger()\n const sdk = new CrexSDK();\n const frontEndConfig = sdk.getClientConfig();\n const backEndConfig = sdk.getServerConfig();\n const filteredTags: any = {}\n\n const items: informationUnitsResponseItem[] = data.items.map((item) => {\n const type = item.class.labels.filter((item) => item.language === EN_LANG)[0].value.toUpperCase();\n const files = getFileRenditions({ renditions: item?.renditions });\n\n let link = `/topics/${item.shortId}`;\n\n if (frontEndConfig.results.articlePageLayout == \"BLOG\") {\n link = `/blog/${item.shortId}`\n } else if (type == RESULT_TYPES.DOCUMENT) {\n link = `/documents/${item.shortId}`;\n }\n\n let title = \"NO TITLE\"\n if (item.titles) {\n title = item.titles[0].value;\n } else if (item.labels) {\n title = item.labels[0].value;\n }\n\n let language = \"NO LANGUAGE\"\n if (item.languages.length > 0) {\n language = item.languages[0];\n }\n\n let versionOf: string[] = []\n if (item?.versionOf && item.versionOf?.labels) {\n versionOf = item.versionOf.labels.map(item => item.language).filter((value) => value !== undefined);\n }\n\n return {\n language: language,\n title: title,\n type: type,\n localeType: \"\",\n revision: item.revision,\n shortId: item.shortId,\n multipleVersions: versionOf,\n disabled: frontEndConfig.results.disabledResults.includes(type as any),\n link: link,\n files\n }\n });\n\n if (data.tags) {\n const contentLang = (cookies().get(CONTENT_LANG_KEY)?.value || EN_LANG).toLowerCase()\n const splittedContentLang = contentLang.split(\"-\")[0];\n\n for (const [key, value] of Object.entries(data.tags)) {\n\n if (!value || !value.items || value.items.length === 0) {\n continue;\n }\n if (!backEndConfig.search.tags.includes(key)) {\n continue;\n }\n\n const aux = value.items.map(item => {\n if (item?.shortId === undefined) return null\n if (Number(item.hits) === 0) return null\n if (item?.labels === undefined || item?.labels.length === 0) {\n logger.log({\n level: \"warning\",\n message: `No labels on item with id ${item.shortId} from category ${key}`\n })\n return null;\n }\n\n let label = \"\"\n\n for (const labelItem of item.labels) {\n if (labelItem.language === undefined) {\n logger.log({\n level: \"info\",\n message: `No language on label ${labelItem.value} from category ${key}`\n })\n label = labelItem.value\n break;\n }\n\n if (labelItem.language.toLowerCase() === contentLang || labelItem.language.toLowerCase() === splittedContentLang) {\n label = labelItem.value\n break;\n }\n\n label = labelItem.value\n\n //TODO: fallback in english\n }\n\n return {\n hits: item.hits,\n total: item.total,\n label: label,\n active: false,\n shortId: item.shortId,\n }\n }).filter((item) => item !== null)\n\n if (aux.length === 0) {\n continue;\n }\n\n filteredTags[key] = aux;\n }\n }\n\n return {\n tags: filteredTags,\n items: items,\n pageInfo: data.pageInfo,\n };\n};\n\nexport const transformSuggestions = (data: AutocompleteSuggestion, query: string) => {\n const suggestions: string[] = []\n const comparableList: string[] = []\n\n data.suggestions.forEach((item) => {\n suggestions.push(item.value);\n comparableList.push(item.value.toLowerCase())\n })\n\n if (!comparableList.includes(query.toLowerCase())) {\n return [query, ...suggestions];\n }\n\n return suggestions\n}","import {\n AutocompleteSuggestion,\n informationUnitsResponse,\n informationUnitsItems,\n} from \"@c-rex/interfaces\";\nimport { transformInformationUnits, transformSuggestions } from \"./transforms/information\";\nimport { createParams } from \"@c-rex/utils\";\nimport { BaseService } from \"./baseService\";\nimport { OperatorType, WildCardType } from \"@c-rex/types\";\nimport { OPERATOR_OPTIONS, WILD_CARD_OPTIONS } from \"@c-rex/constants\";\n\n/**\n * Service for interacting with information units in the API.\n * Provides methods to retrieve and search information units.\n */\nexport class InformationUnitsService extends BaseService {\n constructor() {\n super(\"InformationUnits/\");\n }\n\n /**\n * Retrieves a list of information units based on specified criteria.\n * \n * @param options - Options for filtering and paginating the information units list\n * @param options.queries - Optional search query string\n * @param options.page - Optional page number for pagination (defaults to 1)\n * @param options.fields - Optional array of fields to include in the response\n * @param options.filters - Optional array of filter strings to apply\n * @param options.languages - Optional array of language codes to filter by\n * @returns A promise that resolves to the information units response\n * @throws Error if the API request fails\n */\n public async getList({\n queries = \"\",\n page = 1,\n fields = [],\n filters = [],\n tags = [],\n restrict = [],\n languages = [],\n wildcard = WILD_CARD_OPTIONS.BOTH,\n operator = OPERATOR_OPTIONS.AND,\n like = false,\n }: {\n queries?: string,\n page?: number,\n filters?: string[],\n restrict?: string[],\n fields?: string[],\n tags?: string[],\n languages?: string[],\n wildcard?: WildCardType,\n operator?: OperatorType,\n like?: boolean,\n }): Promise<informationUnitsResponse> {\n const remainFields = createParams(fields, \"Fields\");\n const remainFilters = createParams(filters, \"Filter\");\n const restrictions = createParams(restrict, \"Restrict\");\n const remainTags = createParams(tags, \"Tags\");\n\n const params = [\n { key: \"pageSize\", value: \"12\" },\n { key: \"wildcard\", value: wildcard.toLowerCase() },\n { key: \"PageNumber\", value: page.toString() },\n { key: \"Operator\", value: operator },\n { key: \"Like\", value: like.toString() },\n ...remainTags,\n ...remainFields,\n ...remainFilters,\n ...restrictions\n ];\n\n if (languages.length > 0) {\n const languageParam = `VALUES ?lang { ${languages.map(lang => `\"${lang}\"`).join(\" \")} } ?s iirds:language ?lang .`\n params.push({ key: \"sparqlWhere\", value: languageParam });\n }\n if (queries.length > 0) {\n params.push(\n { key: \"Query\", value: queries },\n );\n }\n\n return await this.request({\n params: params,\n transformer: transformInformationUnits\n });\n }\n\n /**\n * Retrieves a specific information unit by its ID.\n * Includes renditions, directory nodes, version information, titles, languages, and labels.\n * \n * @param options - Options for retrieving the information unit\n * @param options.id - The unique identifier of the information unit\n * @returns A promise that resolves to the information unit data\n * @throws Error if the API request fails\n */\n public async getItem({ id, shouldGetAllFields = false }: { id: string, shouldGetAllFields?: boolean }): Promise<informationUnitsItems> {\n const params = []\n\n if (!shouldGetAllFields) {\n params.push(\n { key: \"Fields\", value: \"renditions\" },\n { key: \"Fields\", value: \"directoryNodes\" },\n { key: \"Fields\", value: \"versionOf\" },\n { key: \"Fields\", value: \"titles\" },\n { key: \"Fields\", value: \"languages\" },\n { key: \"Fields\", value: \"labels\" },\n { key: \"Fields\", value: \"packages\" },\n { key: \"Fields\", value: \"created\" },\n { key: \"Fields\", value: \"revision\" },\n );\n }\n\n return await this.request({\n path: id,\n params,\n });\n }\n\n /**\n * Retrieves autocomplete suggestions based on a query prefix.\n * \n * @param options - Options for retrieving suggestions\n * @param options.query - The query prefix to get suggestions for\n * @param options.language - The language of the suggestions\n * @returns A promise that resolves to an array of suggestion strings\n * @throws Error if the API request fails\n */\n public async getSuggestions(\n { query, language }: { query: string, language: string }\n ): Promise<string[]> {\n return await this.request({\n path: 'Suggestions',\n params: [\n { key: \"prefix\", value: query },\n { key: \"lang\", value: language },\n ],\n transformer: (data: AutocompleteSuggestion) => transformSuggestions(data, query)\n });\n }\n}\n","import { LanguageAndCountries } from \"@c-rex/interfaces\";\nimport { BaseService } from \"./baseService\";\nimport { getCountryCodeByLang } from \"@c-rex/utils\";\nimport { CrexSDK } from \"@c-rex/core/sdk\";\n\n/**\n * Service for interacting with language-related functionality in the API.\n * Provides methods to retrieve language and country information.\n */\nexport class LanguageService extends BaseService {\n constructor() {\n const sdk = new CrexSDK();\n const configs = sdk.getClientConfig();\n super(configs.languageSwitcher.endpoint);\n }\n\n /**\n * Retrieves a list of available languages and their associated countries.\n * Transforms the API response to include language code, country code, and original value.\n * \n * @returns A promise that resolves to an array of language and country objects\n * @throws Error if the API request fails\n */\n public async getLanguagesAndCountries(): Promise<LanguageAndCountries[]> {\n return await this.request({\n transformer: (data: { value: string; score: number }[]) => {\n const countryCodeList = data.map((item) => {\n /*\n api -> en, en-US\n default -> en-US. Then use EN-US \n\n api -> en\n default -> en-US. Then use EN\n */\n //should be abble to handle this items: en-US, en, pt, pt-PT, pt-BR \n\n const splittedValue = item.value.split(\"-\")\n const lang = splittedValue[0]\n let country = splittedValue[0]\n\n if (splittedValue.length > 1) {\n country = splittedValue[1]\n } else {\n country = getCountryCodeByLang(lang)\n }\n\n return {\n country: country,\n lang: lang,\n value: item.value,\n }\n })\n\n return countryCodeList.sort((a, b) => {\n return a.value.localeCompare(b.value)\n })\n },\n });\n }\n}\n","import { EN_LANG, RESULT_TYPES, UI_LANG_KEY } from \"@c-rex/constants\";\nimport { DefaultRequest, TopicsRequestItem, DefaultResponse, TopicsResponseItem } from \"@c-rex/interfaces\";\nimport { cookies } from 'next/headers';\nimport { CrexLogger } from '@c-rex/core/logger';\nimport { formatDateToLocale } from \"@c-rex/utils\";\nimport { CrexSDK } from \"@c-rex/core/sdk\";\n\nexport const transformTopics = async (data: DefaultRequest<TopicsRequestItem>): Promise<DefaultResponse<TopicsResponseItem, null>> => {\n const logger = new CrexLogger()\n const sdk = new CrexSDK();\n const config = sdk.getClientConfig();\n const uiLang = (cookies().get(UI_LANG_KEY)?.value || config.languageSwitcher.default).toLowerCase()\n\n const items = data.items.map(item => {\n const type = item.class.labels.filter((item) => item.language === EN_LANG)[0].value.toUpperCase();\n\n let link = `/topics/${item.shortId}`;\n\n if (config.results.articlePageLayout == \"BLOG\") {\n link = `/blog/${item.shortId}`\n } else if (type == RESULT_TYPES.DOCUMENT) {\n link = `/documents/${item.shortId}`;\n }\n\n let title = \"NO TITLE\"\n let language = \"NO LANGUAGE\"\n\n try {\n if (item.titles) {\n title = item.titles[0].value\n language = item.titles[0].language\n } else {\n title = item.labels[0].value\n language = item.labels[0].language\n }\n } catch {\n logger.log({\n level: \"error\",\n message: `No label or title on item ${item.shortId}`\n })\n }\n\n let renditionUrl = \"\"\n const renditions = item.renditions.filter(item => item.format == \"application/xhtml+xml\");\n if (renditions.length > 0 || renditions[0] !== undefined) {\n const filteredLinks = renditions[0].links.filter((renditionItem) => renditionItem.rel == \"view\");\n if (filteredLinks.length > 0 || filteredLinks[0] !== undefined) {\n renditionUrl = filteredLinks[0].href;\n };\n };\n\n let categoryType = type\n if (item.applicableForTypes && item.applicableForTypes.length > 0) {\n const splittedContentLang = uiLang.split(\"-\")[0];\n categoryType = item.applicableForTypes[0].labels.find(item => item.language === splittedContentLang)?.value || categoryType;\n }\n\n return {\n language: language,\n title: title,\n type: categoryType,\n localeType: \"\",\n shortId: item.shortId,\n created: formatDateToLocale(item.created, uiLang),\n disabled: config.results.disabledResults.includes(type as any),\n link: link,\n renditionUrl: renditionUrl,\n image: null,\n description: null,\n }\n })\n\n return {\n tags: null,\n items: items,\n pageInfo: data.pageInfo,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,oBAA0C;AAC1C,qBAAwB;AAOjB,IAAM,sBAAsB,OAAO,QAA4C;AAClF,QAAM,MAAM,IAAI,QAAQ,aAAa,IAAI,KAAK;AAC9C,MAAI,CAAC,IAAK,QAAO,2BAAa,KAAK,EAAE,OAAO,cAAc,GAAG,EAAE,QA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AG,EAAE,QAAQ,IAAI,CAAC;AAAA,EACtE;AACJ;","names":["import_server","import_logger","import_sdk","import_headers","import_headers","import_sdk","item","import_sdk","import_headers","import_logger","import_sdk","import_server"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/cookies.ts","../src/OIDC.ts","../../constants/src/generated/model-fields.ts","../../constants/src/index.ts","../src/rpc.ts"],"sourcesContent":["//Do not export logger.ts. Logger must be exported as an another entrypoint on package.json\nexport * from \"./cookies\";\nexport * from \"./OIDC\";\nexport * from \"./rpc\";\n","import { NextRequest, NextResponse } from 'next/server';\nimport { cookies } from 'next/headers';\n\n/**\n * Retrieves a cookie value by key from the request\n * @param {NextRequest} req - The Next.js request object\n * @returns {Promise<NextResponse>} JSON response containing the cookie key-value pair or error\n */\nexport const getCookieFromServer = async (req: NextRequest): Promise<NextResponse> => {\n const key = req.nextUrl.searchParams.get('key');\n if (!key) return NextResponse.json({ error: 'Missing key' }, { status: 400 });\n\n const value = cookies().get(key);\n const response = NextResponse.json({ key, value: value?.value || null });\n\n return response;\n}","import { NextResponse } from 'next/server';\nimport { CREX_TOKEN_HEADER_KEY } from '@c-rex/constants';\nimport { getIssuerMetadata, getToken } from '@c-rex/core/OIDC';\nimport { CrexSDK } from '@c-rex/core/sdk';\n\n/**\n * Retrieves an access token using client credentials flow from the configured OIDC provider\n * \n * @returns NextResponse with success status or error message\n * @throws Error if token retrieval fails\n */\nexport const getTokenMethod = async (): Promise<NextResponse> => {\n try {\n const { token, expiresAt, error } = await getToken();\n\n if (error) {\n return NextResponse.json({ error }, { status: 500 });\n }\n\n const response = NextResponse.json({ token: token });\n\n response.cookies.set({\n name: CREX_TOKEN_HEADER_KEY,\n value: token,\n httpOnly: true,\n secure: process.env.NODE_ENV === 'production',\n sameSite: 'lax',\n path: '/',\n expires: expiresAt ? new Date(expiresAt * 1000) : undefined\n });\n\n return response;\n\n } catch (error) {\n return NextResponse.json({ error: String(error) }, { status: 500 });\n }\n}\n\nexport const discoverIssuerMethod = async (): Promise<NextResponse> => {\n try {\n const metadata = await getIssuerMetadata();\n const sdk = new CrexSDK();\n const config = sdk.getServerConfig();\n sdk.updateConfigProp('OIDC', {\n ...config.OIDC,\n issuerMetadata: metadata\n });\n\n const response = NextResponse.json({ issuerMetadata: metadata });\n\n return response;\n\n } catch (error) {\n return NextResponse.json({ error: String(error) }, { status: 500 });\n }\n}\n","/**\n * Auto-generated from OpenAPI spec\n * Source: https://staging.c-rex.net/ids/api/swagger/v1/swagger.json\n * Generated: 2025-12-09T23:10:42.858Z\n * Do not edit manually\n */\n\n// Field constants for compile-time validation of Fields query parameter\n\nexport const AdministrativeMetadataModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const AdministrativeMetadataModelFieldsAll = Object.values(AdministrativeMetadataModelFields);\n\nexport const AuditStateModelFields = {\n id: \"id\",\n state: \"state\",\n} as const;\n\nexport const AuditStateModelFieldsAll = Object.values(AuditStateModelFields);\n\nexport const AuthStateModelFields = {\n state: \"state\",\n licenses: \"licenses\",\n roles: \"roles\",\n} as const;\n\nexport const AuthStateModelFieldsAll = Object.values(AuthStateModelFields);\n\nexport const ComponentModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n productGraphic: \"productGraphic\",\n titles: \"titles\",\n parents: \"parents\",\n ancestors: \"ancestors\",\n ancestorsOrSelf: \"ancestorsOrSelf\",\n components: \"components\",\n identities: \"identities\",\n parties: \"parties\",\n informationUnits: \"informationUnits\",\n seeAlso: \"seeAlso\",\n} as const;\n\nexport const ComponentModelFieldsAll = Object.values(ComponentModelFields);\n\nexport const ContentLifeCycleStatusModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n dateOfEffect: \"dateOfEffect\",\n dateOfExpiry: \"dateOfExpiry\",\n dateOfStatus: \"dateOfStatus\",\n purpose: \"purpose\",\n value: \"value\",\n parties: \"parties\",\n} as const;\n\nexport const ContentLifeCycleStatusModelFieldsAll = Object.values(ContentLifeCycleStatusModelFields);\n\nexport const ContentLifeCycleStatusValueModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const ContentLifeCycleStatusValueModelFieldsAll = Object.values(ContentLifeCycleStatusValueModelFields);\n\nexport const DirectoryNodeModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n structureType: \"structureType\",\n parents: \"parents\",\n ancestors: \"ancestors\",\n ancestorsOrSelf: \"ancestorsOrSelf\",\n childNodes: \"childNodes\",\n informationUnits: \"informationUnits\",\n} as const;\n\nexport const DirectoryNodeModelFieldsAll = Object.values(DirectoryNodeModelFields);\n\nexport const DirectoryNodeTypeModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const DirectoryNodeTypeModelFieldsAll = Object.values(DirectoryNodeTypeModelFields);\n\nexport const DocumentModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n revision: \"revision\",\n created: \"created\",\n modified: \"modified\",\n abstract: \"abstract\",\n replaces: \"replaces\",\n versionOf: \"versionOf\",\n titles: \"titles\",\n languages: \"languages\",\n parties: \"parties\",\n renditions: \"renditions\",\n identities: \"identities\",\n components: \"components\",\n informationSubjects: \"informationSubjects\",\n topicTypes: \"topicTypes\",\n documentTypes: \"documentTypes\",\n directoryNodes: \"directoryNodes\",\n contentLifeCycleStatus: \"contentLifeCycleStatus\",\n applicableForTypes: \"applicableForTypes\",\n planningTimes: \"planningTimes\",\n events: \"events\",\n functionalMetadata: \"functionalMetadata\",\n informationUnits: \"informationUnits\",\n productFeatures: \"productFeatures\",\n productLifeCyclePhases: \"productLifeCyclePhases\",\n productMetadata: \"productMetadata\",\n productVariants: \"productVariants\",\n qualifications: \"qualifications\",\n supplies: \"supplies\",\n} as const;\n\nexport const DocumentModelFieldsAll = Object.values(DocumentModelFields);\n\nexport const DocumentTypeModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const DocumentTypeModelFieldsAll = Object.values(DocumentTypeModelFields);\n\nexport const DocumentationMetadataModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const DocumentationMetadataModelFieldsAll = Object.values(DocumentationMetadataModelFields);\n\nexport const DomainEntityModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n} as const;\n\nexport const DomainEntityModelFieldsAll = Object.values(DomainEntityModelFields);\n\nexport const EventModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n eventCode: \"eventCode\",\n eventType: \"eventType\",\n} as const;\n\nexport const EventModelFieldsAll = Object.values(EventModelFields);\n\nexport const ExternalProductGraphicModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n revision: \"revision\",\n created: \"created\",\n modified: \"modified\",\n abstract: \"abstract\",\n replaces: \"replaces\",\n versionOf: \"versionOf\",\n titles: \"titles\",\n languages: \"languages\",\n parties: \"parties\",\n renditions: \"renditions\",\n identities: \"identities\",\n components: \"components\",\n informationSubjects: \"informationSubjects\",\n topicTypes: \"topicTypes\",\n documentTypes: \"documentTypes\",\n directoryNodes: \"directoryNodes\",\n contentLifeCycleStatus: \"contentLifeCycleStatus\",\n applicableForTypes: \"applicableForTypes\",\n planningTimes: \"planningTimes\",\n events: \"events\",\n functionalMetadata: \"functionalMetadata\",\n informationUnits: \"informationUnits\",\n productFeatures: \"productFeatures\",\n productLifeCyclePhases: \"productLifeCyclePhases\",\n productMetadata: \"productMetadata\",\n productVariants: \"productVariants\",\n qualifications: \"qualifications\",\n supplies: \"supplies\",\n} as const;\n\nexport const ExternalProductGraphicModelFieldsAll = Object.values(ExternalProductGraphicModelFields);\n\nexport const ExternalProductOntologyModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n itemNumbers: \"itemNumbers\",\n productSeries: \"productSeries\",\n productModels: \"productModels\",\n productNames: \"productNames\",\n products: \"products\",\n} as const;\n\nexport const ExternalProductOntologyModelFieldsAll = Object.values(ExternalProductOntologyModelFields);\n\nexport const FragmentModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n revision: \"revision\",\n created: \"created\",\n modified: \"modified\",\n abstract: \"abstract\",\n replaces: \"replaces\",\n versionOf: \"versionOf\",\n titles: \"titles\",\n languages: \"languages\",\n parties: \"parties\",\n renditions: \"renditions\",\n identities: \"identities\",\n components: \"components\",\n informationSubjects: \"informationSubjects\",\n topicTypes: \"topicTypes\",\n documentTypes: \"documentTypes\",\n directoryNodes: \"directoryNodes\",\n contentLifeCycleStatus: \"contentLifeCycleStatus\",\n applicableForTypes: \"applicableForTypes\",\n planningTimes: \"planningTimes\",\n events: \"events\",\n functionalMetadata: \"functionalMetadata\",\n informationUnits: \"informationUnits\",\n productFeatures: \"productFeatures\",\n productLifeCyclePhases: \"productLifeCyclePhases\",\n productMetadata: \"productMetadata\",\n productVariants: \"productVariants\",\n qualifications: \"qualifications\",\n supplies: \"supplies\",\n} as const;\n\nexport const FragmentModelFieldsAll = Object.values(FragmentModelFields);\n\nexport const FunctionalMetadataModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const FunctionalMetadataModelFieldsAll = Object.values(FunctionalMetadataModelFields);\n\nexport const IdentityDomainModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n parties: \"parties\",\n} as const;\n\nexport const IdentityDomainModelFieldsAll = Object.values(IdentityDomainModelFields);\n\nexport const IdentityModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n identifier: \"identifier\",\n identityDomain: \"identityDomain\",\n} as const;\n\nexport const IdentityModelFieldsAll = Object.values(IdentityModelFields);\n\nexport const InformationObjectModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n identities: \"identities\",\n} as const;\n\nexport const InformationObjectModelFieldsAll = Object.values(InformationObjectModelFields);\n\nexport const InformationSubjectCollectionModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const InformationSubjectCollectionModelFieldsAll = Object.values(InformationSubjectCollectionModelFields);\n\nexport const InformationSubjectConformityModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const InformationSubjectConformityModelFieldsAll = Object.values(InformationSubjectConformityModelFields);\n\nexport const InformationSubjectFormalityModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const InformationSubjectFormalityModelFieldsAll = Object.values(InformationSubjectFormalityModelFields);\n\nexport const InformationSubjectFunctionalityModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const InformationSubjectFunctionalityModelFieldsAll = Object.values(InformationSubjectFunctionalityModelFields);\n\nexport const InformationSubjectModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const InformationSubjectModelFieldsAll = Object.values(InformationSubjectModelFields);\n\nexport const InformationSubjectProcessModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const InformationSubjectProcessModelFieldsAll = Object.values(InformationSubjectProcessModelFields);\n\nexport const InformationSubjectSafetyModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const InformationSubjectSafetyModelFieldsAll = Object.values(InformationSubjectSafetyModelFields);\n\nexport const InformationSubjectSafetyWarningMessageModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const InformationSubjectSafetyWarningMessageModelFieldsAll = Object.values(InformationSubjectSafetyWarningMessageModelFields);\n\nexport const InformationSubjectTechnicalDataModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const InformationSubjectTechnicalDataModelFieldsAll = Object.values(InformationSubjectTechnicalDataModelFields);\n\nexport const InformationSubjectTechnicalOverviewModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const InformationSubjectTechnicalOverviewModelFieldsAll = Object.values(InformationSubjectTechnicalOverviewModelFields);\n\nexport const InformationTypeModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const InformationTypeModelFieldsAll = Object.values(InformationTypeModelFields);\n\nexport const InformationUnitModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n revision: \"revision\",\n created: \"created\",\n modified: \"modified\",\n abstract: \"abstract\",\n replaces: \"replaces\",\n versionOf: \"versionOf\",\n titles: \"titles\",\n languages: \"languages\",\n parties: \"parties\",\n renditions: \"renditions\",\n identities: \"identities\",\n components: \"components\",\n informationSubjects: \"informationSubjects\",\n topicTypes: \"topicTypes\",\n documentTypes: \"documentTypes\",\n directoryNodes: \"directoryNodes\",\n contentLifeCycleStatus: \"contentLifeCycleStatus\",\n applicableForTypes: \"applicableForTypes\",\n planningTimes: \"planningTimes\",\n events: \"events\",\n functionalMetadata: \"functionalMetadata\",\n informationUnits: \"informationUnits\",\n productFeatures: \"productFeatures\",\n productLifeCyclePhases: \"productLifeCyclePhases\",\n productMetadata: \"productMetadata\",\n productVariants: \"productVariants\",\n qualifications: \"qualifications\",\n supplies: \"supplies\",\n} as const;\n\nexport const InformationUnitModelFieldsAll = Object.values(InformationUnitModelFields);\n\nexport const OwlClassModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n} as const;\n\nexport const OwlClassModelFieldsAll = Object.values(OwlClassModelFields);\n\nexport const PackageModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n revision: \"revision\",\n created: \"created\",\n modified: \"modified\",\n abstract: \"abstract\",\n replaces: \"replaces\",\n versionOf: \"versionOf\",\n titles: \"titles\",\n languages: \"languages\",\n parties: \"parties\",\n renditions: \"renditions\",\n identities: \"identities\",\n components: \"components\",\n informationSubjects: \"informationSubjects\",\n topicTypes: \"topicTypes\",\n documentTypes: \"documentTypes\",\n directoryNodes: \"directoryNodes\",\n contentLifeCycleStatus: \"contentLifeCycleStatus\",\n applicableForTypes: \"applicableForTypes\",\n planningTimes: \"planningTimes\",\n events: \"events\",\n functionalMetadata: \"functionalMetadata\",\n informationUnits: \"informationUnits\",\n productFeatures: \"productFeatures\",\n productLifeCyclePhases: \"productLifeCyclePhases\",\n productMetadata: \"productMetadata\",\n productVariants: \"productVariants\",\n qualifications: \"qualifications\",\n supplies: \"supplies\",\n iirdsVersion: \"iirdsVersion\",\n formatRestriction: \"formatRestriction\",\n directories: \"directories\",\n} as const;\n\nexport const PackageModelFieldsAll = Object.values(PackageModelFields);\n\nexport const PartyModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n partyRole: \"partyRole\",\n vcard: \"vcard\",\n} as const;\n\nexport const PartyModelFieldsAll = Object.values(PartyModelFields);\n\nexport const PartyRoleModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const PartyRoleModelFieldsAll = Object.values(PartyRoleModelFields);\n\nexport const PlanningDownTimeModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n duration: \"duration\",\n} as const;\n\nexport const PlanningDownTimeModelFieldsAll = Object.values(PlanningDownTimeModelFields);\n\nexport const PlanningMaintenanceIntervalModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n duration: \"duration\",\n frequency: \"frequency\",\n} as const;\n\nexport const PlanningMaintenanceIntervalModelFieldsAll = Object.values(PlanningMaintenanceIntervalModelFields);\n\nexport const PlanningSetupTimeModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n duration: \"duration\",\n} as const;\n\nexport const PlanningSetupTimeModelFieldsAll = Object.values(PlanningSetupTimeModelFields);\n\nexport const PlanningTimeModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n duration: \"duration\",\n} as const;\n\nexport const PlanningTimeModelFieldsAll = Object.values(PlanningTimeModelFields);\n\nexport const PlanningWorkingTimeModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n duration: \"duration\",\n} as const;\n\nexport const PlanningWorkingTimeModelFieldsAll = Object.values(PlanningWorkingTimeModelFields);\n\nexport const ProductFeatureModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const ProductFeatureModelFieldsAll = Object.values(ProductFeatureModelFields);\n\nexport const ProductFunctionModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const ProductFunctionModelFieldsAll = Object.values(ProductFunctionModelFields);\n\nexport const ProductLcpAfterUseModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const ProductLcpAfterUseModelFieldsAll = Object.values(ProductLcpAfterUseModelFields);\n\nexport const ProductLcpDesignAndRealizationModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const ProductLcpDesignAndRealizationModelFieldsAll = Object.values(ProductLcpDesignAndRealizationModelFields);\n\nexport const ProductLcpPuttingToUseModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const ProductLcpPuttingToUseModelFieldsAll = Object.values(ProductLcpPuttingToUseModelFields);\n\nexport const ProductLcpUseModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const ProductLcpUseModelFieldsAll = Object.values(ProductLcpUseModelFields);\n\nexport const ProductLifeCyclePhaseModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const ProductLifeCyclePhaseModelFieldsAll = Object.values(ProductLifeCyclePhaseModelFields);\n\nexport const ProductMetadataModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const ProductMetadataModelFieldsAll = Object.values(ProductMetadataModelFields);\n\nexport const ProductPropertyModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const ProductPropertyModelFieldsAll = Object.values(ProductPropertyModelFields);\n\nexport const ProductVariantModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n identities: \"identities\",\n parties: \"parties\",\n} as const;\n\nexport const ProductVariantModelFieldsAll = Object.values(ProductVariantModelFields);\n\nexport const QualificationModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const QualificationModelFieldsAll = Object.values(QualificationModelFields);\n\nexport const QualificationRoleModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const QualificationRoleModelFieldsAll = Object.values(QualificationRoleModelFields);\n\nexport const QualificationSkillLevelModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const QualificationSkillLevelModelFieldsAll = Object.values(QualificationSkillLevelModelFields);\n\nexport const RenditionModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n source: \"source\",\n format: \"format\",\n identities: \"identities\",\n selectors: \"selectors\",\n informationUnits: \"informationUnits\",\n} as const;\n\nexport const RenditionModelFieldsAll = Object.values(RenditionModelFields);\n\nexport const RenditionSelectorModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n} as const;\n\nexport const RenditionSelectorModelFieldsAll = Object.values(RenditionSelectorModelFields);\n\nexport const SupplyConsumableModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const SupplyConsumableModelFieldsAll = Object.values(SupplyConsumableModelFields);\n\nexport const SupplyHardwareToolModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const SupplyHardwareToolModelFieldsAll = Object.values(SupplyHardwareToolModelFields);\n\nexport const SupplyLubricantModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const SupplyLubricantModelFieldsAll = Object.values(SupplyLubricantModelFields);\n\nexport const SupplyModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const SupplyModelFieldsAll = Object.values(SupplyModelFields);\n\nexport const SupplyOperatingModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const SupplyOperatingModelFieldsAll = Object.values(SupplyOperatingModelFields);\n\nexport const SupplySparePartModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const SupplySparePartModelFieldsAll = Object.values(SupplySparePartModelFields);\n\nexport const TopicModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n revision: \"revision\",\n created: \"created\",\n modified: \"modified\",\n abstract: \"abstract\",\n replaces: \"replaces\",\n versionOf: \"versionOf\",\n titles: \"titles\",\n languages: \"languages\",\n parties: \"parties\",\n renditions: \"renditions\",\n identities: \"identities\",\n components: \"components\",\n informationSubjects: \"informationSubjects\",\n topicTypes: \"topicTypes\",\n documentTypes: \"documentTypes\",\n directoryNodes: \"directoryNodes\",\n contentLifeCycleStatus: \"contentLifeCycleStatus\",\n applicableForTypes: \"applicableForTypes\",\n planningTimes: \"planningTimes\",\n events: \"events\",\n functionalMetadata: \"functionalMetadata\",\n informationUnits: \"informationUnits\",\n productFeatures: \"productFeatures\",\n productLifeCyclePhases: \"productLifeCyclePhases\",\n productMetadata: \"productMetadata\",\n productVariants: \"productVariants\",\n qualifications: \"qualifications\",\n supplies: \"supplies\",\n} as const;\n\nexport const TopicModelFieldsAll = Object.values(TopicModelFields);\n\nexport const TopicTypeConceptModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const TopicTypeConceptModelFieldsAll = Object.values(TopicTypeConceptModelFields);\n\nexport const TopicTypeFormModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const TopicTypeFormModelFieldsAll = Object.values(TopicTypeFormModelFields);\n\nexport const TopicTypeLearningModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const TopicTypeLearningModelFieldsAll = Object.values(TopicTypeLearningModelFields);\n\nexport const TopicTypeModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const TopicTypeModelFieldsAll = Object.values(TopicTypeModelFields);\n\nexport const TopicTypeReferenceModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const TopicTypeReferenceModelFieldsAll = Object.values(TopicTypeReferenceModelFields);\n\nexport const TopicTypeTaskModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const TopicTypeTaskModelFieldsAll = Object.values(TopicTypeTaskModelFields);\n\nexport const TopicTypeTroubleShootingModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n} as const;\n\nexport const TopicTypeTroubleShootingModelFieldsAll = Object.values(TopicTypeTroubleShootingModelFields);\n\nexport const VCardCalendarModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n source: \"source\",\n} as const;\n\nexport const VCardCalendarModelFieldsAll = Object.values(VCardCalendarModelFields);\n\nexport const VCardGroupModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n fullName: \"fullName\",\n photos: \"photos\",\n emails: \"emails\",\n telephones: \"telephones\",\n addresses: \"addresses\",\n calendars: \"calendars\",\n urls: \"urls\",\n members: \"members\",\n} as const;\n\nexport const VCardGroupModelFieldsAll = Object.values(VCardGroupModelFields);\n\nexport const VCardImageModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n classes: \"classes\",\n value: \"value\",\n source: \"source\",\n} as const;\n\nexport const VCardImageModelFieldsAll = Object.values(VCardImageModelFields);\n\nexport const VCardIndividualModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n fullName: \"fullName\",\n photos: \"photos\",\n emails: \"emails\",\n telephones: \"telephones\",\n addresses: \"addresses\",\n calendars: \"calendars\",\n urls: \"urls\",\n title: \"title\",\n role: \"role\",\n gender: \"gender\",\n} as const;\n\nexport const VCardIndividualModelFieldsAll = Object.values(VCardIndividualModelFields);\n\nexport const VCardInfoModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n classes: \"classes\",\n value: \"value\",\n countryName: \"countryName\",\n locality: \"locality\",\n postalCode: \"postalCode\",\n streetAddress: \"streetAddress\",\n} as const;\n\nexport const VCardInfoModelFieldsAll = Object.values(VCardInfoModelFields);\n\nexport const VCardLocationModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n fullName: \"fullName\",\n photos: \"photos\",\n emails: \"emails\",\n telephones: \"telephones\",\n addresses: \"addresses\",\n calendars: \"calendars\",\n urls: \"urls\",\n members: \"members\",\n} as const;\n\nexport const VCardLocationModelFieldsAll = Object.values(VCardLocationModelFields);\n\nexport const VCardModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n fullName: \"fullName\",\n photos: \"photos\",\n emails: \"emails\",\n telephones: \"telephones\",\n addresses: \"addresses\",\n calendars: \"calendars\",\n urls: \"urls\",\n} as const;\n\nexport const VCardModelFieldsAll = Object.values(VCardModelFields);\n\nexport const VCardOrganizationModelFields = {\n id: \"id\",\n shortId: \"shortId\",\n score: \"score\",\n class: \"class\",\n labels: \"labels\",\n comments: \"comments\",\n descriptions: \"descriptions\",\n synonyms: \"synonyms\",\n packages: \"packages\",\n links: \"links\",\n fullName: \"fullName\",\n photos: \"photos\",\n emails: \"emails\",\n telephones: \"telephones\",\n addresses: \"addresses\",\n calendars: \"calendars\",\n urls: \"urls\",\n organizationName: \"organizationName\",\n organizationUnit: \"organizationUnit\",\n members: \"members\",\n logos: \"logos\",\n} as const;\n\nexport const VCardOrganizationModelFieldsAll = Object.values(VCardOrganizationModelFields);\n","export * from './generated/model-fields'\n\nexport const ALL = \"*\"\n\nexport const LOG_CATEGORIES = [\n \"NoLicense\",\n \"Scenario\",\n \"Favorites\",\n \"Subscription\",\n \"Share\",\n \"Document\",\n \"Search\",\n \"History\",\n \"Notification\",\n \"UserProfile\",\n] as const;\n\nexport const LOG_LEVELS = {\n critical: 2,\n error: 3,\n warning: 4,\n info: 6,\n debug: 7,\n} as const;\n\nexport const RESULT_VIEW_STYLES = [\n \"cards\",\n \"table\",\n \"table-with-images\",\n] as const;\n\nexport const API = {\n MAX_RETRY: 3,\n API_TIMEOUT: 10000,\n RETRY_DELAY: 500,\n API_HEADERS: {\n \"content-Type\": \"application/json\",\n },\n};\n\nexport const SDK_CONFIG_KEY = \"crex-sdk-config\";\n\nexport const AVAILABLE_CONTENT_LANG_KEY = \"AVAILABLE_CONTENT_LANG_KEY\";\n\nexport const UI_LANG_KEY = \"UI_LANG_KEY\";\n\nexport const FLAGS_BY_LANG = {\n \"en\": \"US\",\n \"de\": \"DE\",\n};\n\nexport const DEFAULT_LANG = \"en-US\";\n\nexport const EN_LANG = \"en\";\n\nexport const UI_LANG_OPTIONS = [\"en-us\", \"de-de\"];\n\nexport const TOPICS_TYPE_AND_LINK = \"topics\";\nexport const BLOG_TYPE_AND_LINK = \"blog\";\nexport const DOCUMENTS_TYPE_AND_LINK = \"documents\";\n\nexport const TOPIC = \"TOPIC\";\nexport const DOCUMENT = \"DOCUMENT\";\nexport const PACKAGE = \"PACKAGE\";\nexport const FRAGMENT = \"FRAGMENT\";\n\nexport const RESULT_TYPES = {\n TOPIC: TOPIC,\n DOCUMENT: DOCUMENT,\n PACKAGE: PACKAGE,\n FRAGMENT: FRAGMENT\n} as const;\n\nexport const FILES_EXTENSIONS = {\n PDF: \"application/pdf\",\n HTML: \"text/html\",\n} as const;\n\nexport const DEFAULT_COOKIE_LIMIT = 30 * 24 * 60 * 60 * 1000; // 30 days in milliseconds\n\nexport const ICONS_BY_FILE_EXTENSION = {\n \"application/pdf\": \"FaFilePdf\",\n} as const;\n\nexport const DEFAULT_ICON = \"file\";\n\nexport const CREX_TOKEN_HEADER_KEY = \"crex-token\";\n\nexport const WILD_CARD_OPTIONS = {\n BOTH: \"BOTH\",\n END: \"END\",\n START: \"START\",\n NONE: \"NONE\",\n} as const;\n\nexport const OPERATOR_OPTIONS = {\n AND: \"AND\",\n OR: \"OR\",\n} as const;\n\nexport const ARTICLE_PAGE_LAYOUT = {\n BLOG: \"BLOG\",\n DOCUMENT: \"DOCUMENT\",\n} as const;\n\nexport const DEVICE_OPTIONS = {\n MOBILE: \"mobile\",\n TABLET: \"tablet\",\n DESKTOP: \"desktop\",\n}\nexport const BREAKPOINTS = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n \"2xl\": 1536,\n};\n\nexport const MARKER_COLORS = [\n \"red-500\",\n \"orange-500\",\n \"yellow-400\",\n \"green-500\",\n \"teal-500\",\n \"blue-500\",\n \"sky-500\",\n \"purple-500\",\n \"pink-500\",\n \"gray-500\",\n \"neutral-800\",\n \"cyan-500\",\n \"lime-500\",\n \"amber-500\",\n \"indigo-500\",\n];","import { CrexLogger } from '@c-rex/core/logger';\nimport { NextRequest, NextResponse } from 'next/server';\n\n/**\n * Registry of available services that can be called via RPC.\n */\nconst serviceRegistry = {\n CrexLogger,\n};\n\n/**\n * Interface for RPC payload.\n */\ntype RpcPayload = {\n method: string;\n params: any;\n};\n\n/**\n * Handles POST requests for RPC (Remote Procedure Call) functionality.\n * Allows calling methods on registered services with parameters.\n * \n * @param req - The Next.js request object containing the RPC payload\n * @returns A JSON response with the result of the method call, or an error if the service or method is not found\n */\nexport const POST = async (req: NextRequest) => {\n try {\n const { method, params }: RpcPayload = await req.json();\n const [serviceName, methodName] = method.split('.');\n const ServiceClass = serviceRegistry[serviceName as keyof typeof serviceRegistry];\n\n if (!ServiceClass) {\n return NextResponse.json({ error: `Service '${serviceName}' not found` }, { status: 404 });\n }\n\n const serviceInstance = new ServiceClass();\n const handler = (serviceInstance as any)[methodName as any];\n\n if (typeof handler !== 'function') {\n return NextResponse.json({ error: `Method '${methodName}' not found on '${serviceName}'` }, { status: 404 });\n }\n\n const result = await handler.call(serviceInstance, params);\n return NextResponse.json({ data: result });\n } catch (error) {\n const logger = new CrexLogger()\n logger.log({\n level: \"error\",\n message: `RPC.POST error: ${error}`\n })\n return NextResponse.json({ error: String(error) }, { status: 500 });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,oBAA0C;AAC1C,qBAAwB;AAOjB,IAAM,sBAAsB,OAAO,QAA4C;AAClF,QAAM,MAAM,IAAI,QAAQ,aAAa,IAAI,KAAK;AAC9C,MAAI,CAAC,IAAK,QAAO,2BAAa,KAAK,EAAE,OA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