@c-rex/core 0.1.21 → 0.1.23
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/OIDC.js +239 -27
- package/dist/OIDC.js.map +1 -1
- package/dist/OIDC.mjs +239 -27
- package/dist/OIDC.mjs.map +1 -1
- package/dist/logger.js +239 -27
- package/dist/logger.js.map +1 -1
- package/dist/logger.mjs +239 -27
- package/dist/logger.mjs.map +1 -1
- package/dist/requests.d.mts +66 -2
- package/dist/requests.d.ts +66 -2
- package/dist/requests.js +866 -47
- package/dist/requests.js.map +1 -1
- package/dist/requests.mjs +842 -46
- package/dist/requests.mjs.map +1 -1
- package/dist/sdk.js +124 -9
- package/dist/sdk.js.map +1 -1
- package/dist/sdk.mjs +124 -9
- package/dist/sdk.mjs.map +1 -1
- package/package.json +70 -69
package/dist/requests.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../constants/src/generated/model-fields.ts","../../constants/src/index.ts","../src/requests.ts","../src/logger.ts","../src/transports/matomo.ts","../src/transports/graylog.ts","../src/utils.ts","../src/sdk.ts","../src/OIDC.ts"],"sourcesContent":["/**\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 { CREX_TOKEN_HEADER_KEY } from \"@c-rex/constants\";\nimport { ConfigInterface } from \"@c-rex/interfaces\";\nimport { cookies } from \"next/headers\";\nimport { CrexLogger } from \"./logger\";\nimport { getToken } from \"./OIDC\";\nimport { CrexSDK } from \"./sdk\";\n\n/**\n * HTTP methods supported by the API client.\n */\ntype HttpMethod = \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"PATCH\" | \"HEAD\" | \"OPTIONS\";\n\n/**\n * Type for query parameter values - supports primitives and arrays.\n */\ntype ParamValue = string | number | boolean | undefined | (string | number | boolean)[];\n\n/**\n * Interface for API call parameters.\n */\ninterface CallParams {\n url: string;\n method: HttpMethod;\n body?: any;\n headers?: Record<string, string>;\n params?: Record<string, ParamValue>;\n}\n\n/**\n * API client class for the CREX application.\n * Handles API requests with caching, authentication, and retry logic.\n */\nexport class CrexApi {\n private customerConfig!: ConfigInterface;\n private baseUrl!: string;\n private logger!: CrexLogger;\n\n /**\n * Initializes the API client if it hasn't been initialized yet.\n * Loads customer configuration and initializes the logger.\n * \n * @private\n */\n private async initAPI() {\n this.logger = new CrexLogger();\n\n if (!this.customerConfig) {\n const sdk = new CrexSDK();\n this.customerConfig = sdk.getServerConfig();\n }\n\n if (!this.baseUrl) {\n if (this.customerConfig.baseUrl.length === 0) {\n throw new Error(\"CrexAPI.initAPI error: baseUrl is undefined\");\n }\n\n this.baseUrl = this.customerConfig.baseUrl;\n }\n }\n\n private async manageToken() {\n // @todo: save token on global node memory to avoid multiple fetches in the same request\n try {\n let token = \"\";\n const hasToken = cookies().get(CREX_TOKEN_HEADER_KEY);\n\n if (hasToken == undefined || hasToken.value === null) {\n const { token: tokenResult } = await getToken();\n\n if (tokenResult.length === 0) throw new Error(\"Token is undefined\");\n\n token = tokenResult;\n } else {\n token = hasToken.value;\n }\n\n return token;\n } catch (error) {\n this.logger.log({\n level: \"error\",\n message: `CrexAPI.manageToken error: ${error}`\n });\n\n throw error\n }\n }\n\n /**\n * Builds the full URL with query parameters.\n * Handles arrays by adding repeated parameters (e.g., fields=1&fields=2).\n * \n * @param url - The endpoint URL\n * @param params - Optional query parameters (supports arrays)\n * @returns The full URL with query string\n */\n private buildUrl(url: string, params?: Record<string, ParamValue>): string {\n const fullUrl = new URL(url, this.baseUrl);\n\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n if (value !== undefined) {\n if (Array.isArray(value)) {\n value.forEach(v => fullUrl.searchParams.append(key, String(v)));\n } else {\n fullUrl.searchParams.append(key, String(value));\n }\n }\n });\n }\n\n return fullUrl.toString();\n }\n\n /**\n * Executes an API request with caching, authentication, and retry logic.\n * \n * @param options - Request options\n * @param options.url - The URL to request\n * @param options.method - The HTTP method to use\n * @param options.params - Optional query parameters\n * @param options.body - Optional request body\n * @param options.headers - Optional request headers\n * @returns The response data\n * @throws Error if the request fails after maximum retries\n */\n async execute<T>({\n url,\n method,\n params,\n body,\n headers = {},\n }: CallParams): Promise<T> {\n try {\n await this.initAPI();\n\n const requestHeaders: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n ...headers,\n };\n\n if (this.customerConfig.OIDC.client.enabled) {\n const token = await this.manageToken();\n requestHeaders[\"Authorization\"] = `Bearer ${token}`;\n }\n\n const fullUrl = this.buildUrl(url, params);\n const response = await fetch(fullUrl, {\n cache: 'force-cache',\n method,\n headers: requestHeaders,\n body: body ? JSON.stringify(body) : undefined,\n });\n\n if (!response.ok) {\n console.log(fullUrl)\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n\n const data = await response.json() as T;\n\n return data;\n } catch (error) {\n this.logger.log({\n level: \"error\",\n message: `CrexAPI.execute error: ${error}`\n });\n throw error;\n }\n }\n}","import winston from \"winston\";\nimport { MatomoTransport } from \"./transports/matomo\";\nimport { GraylogTransport } from \"./transports/graylog\";\nimport { ConfigInterface } from \"@c-rex/interfaces\";\nimport { LogCategoriesType, LogLevelType } from \"@c-rex/types\";\nimport { LOG_LEVELS } from \"@c-rex/constants\";\nimport { CrexSDK } from \"./sdk\";\n\n\n/**\n * Logger class for the CREX application.\n * Provides logging functionality with multiple transports (Console, Matomo, Graylog).\n */\nexport class CrexLogger {\n private customerConfig!: ConfigInterface;\n public logger!: winston.Logger;\n\n /**\n * Initializes the logger instance if it hasn't been initialized yet.\n * Loads customer configuration and creates the logger with appropriate transports.\n * \n * @private\n */\n private async initLogger() {\n try {\n if (!this.customerConfig) {\n const sdk = new CrexSDK();\n\n this.customerConfig = sdk.getServerConfig();\n }\n if (!this.logger) {\n this.logger = this.createLogger();\n }\n } catch (error) {\n console.log(\"Error initializing logger:\", error);\n }\n }\n\n /**\n * Logs a message with the specified level and optional category.\n * \n * @param options - Logging options\n * @param options.level - The log level (error, warn, info, etc.)\n * @param options.message - The message to log\n * @param options.category - Optional category for the log message\n */\n public async log({ level, message, category }: {\n level: LogLevelType,\n message: string,\n category?: LogCategoriesType\n }) {\n await this.initLogger();\n const timestamp = new Date().toISOString();\n const newMessage = `[${timestamp}] ${message}`;\n this.logger.log(level, newMessage, category);\n }\n\n /**\n * Creates a new Winston logger instance with configured transports.\n * \n * @private\n * @returns A configured Winston logger instance\n */\n private createLogger() {\n return winston.createLogger({\n levels: LOG_LEVELS,\n transports: [\n new winston.transports.Console({\n level: this.customerConfig.logs.console.minimumLevel,\n silent: this.customerConfig.logs.console.silent,\n }),\n new MatomoTransport(this.customerConfig),\n new GraylogTransport(this.customerConfig),\n ],\n });\n }\n}","import Transport from \"winston-transport\";\nimport { LogCategoriesType, LogLevelType } from \"@c-rex/types\";\nimport { ALL } from \"@c-rex/constants\";\nimport { ConfigInterface } from \"@c-rex/interfaces\";\n\n/**\n * Winston transport for sending logs to Matomo analytics.\n * Extends the base Winston transport with Matomo-specific functionality.\n */\nexport class MatomoTransport extends Transport {\n public matomoTransport: any;\n private configs: ConfigInterface;\n\n /**\n * Creates a new instance of MatomoTransport.\n * \n * @param configs - The application configuration containing logging settings\n */\n constructor(configs: ConfigInterface) {\n super({\n level: configs.logs.matomo.minimumLevel,\n silent: configs.logs.matomo.silent,\n });\n\n this.matomoTransport = new Transport();\n this.configs = configs;\n }\n\n /**\n * Logs a message to Matomo if the message category is included in the configured categories.\n * \n * @param info - The log information including level, message, and category\n * @param callback - Callback function to execute after logging\n */\n log(\n info: { level: LogLevelType, message: string, category: LogCategoriesType },\n callback: () => void,\n ): void {\n const matomoCategory = this.configs.logs.matomo.categoriesLevel\n\n if (matomoCategory.includes(info.category) || matomoCategory.includes(ALL)) {\n this.matomoTransport.log(info, callback);\n }\n }\n}\n","import Transport from \"winston-transport\";\nimport Graylog2Transport from \"winston-graylog2\";\nimport { LogCategoriesType, LogLevelType } from \"@c-rex/types\";\nimport { ALL } from \"@c-rex/constants\";\nimport { ConfigInterface } from \"@c-rex/interfaces\";\n\n/**\n * Winston transport for sending logs to Graylog.\n * Extends the base Winston transport with Graylog-specific functionality.\n */\nexport class GraylogTransport extends Transport {\n public graylogTransport: any;\n private configs: ConfigInterface\n\n /**\n * Creates a new instance of GraylogTransport.\n * \n * @param configs - The application configuration containing logging settings\n */\n constructor(configs: ConfigInterface) {\n if (!configs.logs.graylog.hostname || configs.logs.graylog.port === undefined) {\n throw new Error(\"Graylog hostname and port must be defined\");\n }\n\n super({\n level: configs.logs.graylog.minimumLevel,\n silent: configs.logs.graylog.silent,\n });\n\n this.configs = configs;\n this.graylogTransport = new Graylog2Transport({\n name: configs.logs.graylog.app,\n silent: configs.logs.graylog.silent,\n handleExceptions: false,\n graylog: {\n servers: [\n { host: configs.logs.graylog.hostname, port: configs.logs.graylog.port }\n ],\n },\n });\n }\n\n /**\n * Logs a message to Graylog if the message category is included in the configured categories.\n * \n * @param info - The log information including level, message, and category\n * @param callback - Callback function to execute after logging\n */\n log(\n info: { level: LogLevelType, message: string, category: LogCategoriesType },\n callback: () => void,\n ): void {\n const graylogCategory = this.configs.logs.graylog.categoriesLevel\n\n if (graylogCategory.includes(info.category) || graylogCategory.includes(ALL)) {\n this.graylogTransport.log(info, callback);\n }\n }\n}\n","import { WarningVars } from \"@c-rex/types\";\nimport { logInfo, OIDCInterface } from \"@c-rex/interfaces\";\nimport { LogLevelType } from \"@c-rex/types\";\nimport { LogCategoriesType } from \"@c-rex/types\";\n\nconst formatIssuer = (issuer: string): string => {\n let newIssuer = issuer\n const lastChar = newIssuer.charAt(newIssuer.length - 1)\n if (lastChar !== \"/\") {\n newIssuer += \"/\"\n }\n newIssuer += \".well-known/openid-configuration\"\n\n return newIssuer;\n}\nexport const formatApiUrl = (apiUrl: string): string => {\n let newApiUrl = apiUrl\n const lastChar = newApiUrl.charAt(newApiUrl.length - 1)\n if (lastChar !== \"/\") {\n newApiUrl += \"/\"\n }\n if (!newApiUrl.includes(\"iirds/v1/\")) {\n newApiUrl += \"iirds/v1/\"\n }\n\n return newApiUrl;\n}\n\nexport const mergeConfigs = <T>(defaultConfig: Partial<T>, envVars: Partial<T>): T => {\n const definedEnvVars: T = {} as T;\n\n for (const key in envVars) {\n if (envVars[key] !== undefined) {\n definedEnvVars[key] = envVars[key];\n }\n }\n\n return {\n ...defaultConfig,\n ...definedEnvVars,\n };\n}\n\nexport const generateWarnings = (vars: WarningVars[]): string[] => {\n\n const warnings: string[] = []\n\n vars.forEach((variable) => {\n const value = process.env[variable.key];\n if (value === undefined) {\n warnings.push(`Missing environment variable ${variable.key}, using default value: ${variable.default}`)\n }\n })\n\n return warnings;\n}\n\nexport const createUserOIDCConfig = (): { user: OIDCInterface, warnings: string[] } => {\n const warnings: string[] = []\n const userDefaults: Partial<OIDCInterface> = {\n secret: \"dummy\",\n scope: \"openid profile crex.ids.api crex.ids.api.public\",\n enabled: true,\n }\n const userEnvs: Partial<OIDCInterface> = {\n id: process.env.CREX_IDS_CLIENT_ID,\n secret: process.env.CREX_IDS_CLIENT_SECRET,\n scope: process.env.CREX_IDS_USER_SCOPES,\n issuer: process.env.OIDC_ISSUER == undefined ? undefined : formatIssuer(process.env.OIDC_ISSUER),\n enabled: process.env.CREX_IDS_USER_LOGIN_ENABLE == undefined ? undefined : process.env.CREX_IDS_USER_LOGIN_ENABLE == \"true\",\n }\n const user: OIDCInterface = mergeConfigs<OIDCInterface>(userDefaults, userEnvs);\n\n if (user.enabled) {\n const disableOIDCVars = [\n { key: \"CREX_IDS_CLIENT_ID\", value: process.env.CREX_IDS_CLIENT_ID },\n { key: \"OIDC_ISSUER\", value: process.env.OIDC_ISSUER },\n ]\n disableOIDCVars.forEach((variable) => {\n if (variable.value === undefined) {\n user.enabled = false\n\n warnings.push(`Missing environment variable ${variable.key}, disabling client and login`)\n }\n })\n\n }\n\n if (user.enabled) {\n const userWarningVars = [\n { key: \"CREX_IDS_USER_SCOPES\", default: user.scope },\n { key: \"CREX_IDS_CLIENT_SECRET\", default: user.secret },\n { key: \"CREX_IDS_USER_LOGIN_ENABLE\", default: user.enabled }\n ]\n const aux = generateWarnings(userWarningVars)\n warnings.push(...aux);\n }\n\n return { user, warnings }\n}\n\nexport const createClientOIDCConfig = (): { client: OIDCInterface, warnings: string[] } => {\n const warnings: string[] = []\n const clientDefault: Partial<OIDCInterface> = {\n secret: \"dummy\",\n enabled: true,\n }\n const clientEnvs: Partial<OIDCInterface> = {\n id: process.env.CREX_IDS_CLIENT_ID,\n issuer: process.env.OIDC_ISSUER == undefined ? undefined : formatIssuer(process.env.OIDC_ISSUER),\n secret: process.env.CREX_IDS_CLIENT_SECRET,\n enabled: process.env.CREX_IDS_CLIENT_LOGIN_ENABLE == undefined ? undefined : process.env.CREX_IDS_CLIENT_LOGIN_ENABLE == \"true\",\n }\n const client: OIDCInterface = mergeConfigs<OIDCInterface>(clientDefault, clientEnvs);\n\n if (client.enabled) {\n const disableOIDCVars = [\n { key: \"CREX_IDS_CLIENT_ID\", value: process.env.CREX_IDS_CLIENT_ID },\n { key: \"OIDC_ISSUER\", value: process.env.OIDC_ISSUER },\n ]\n disableOIDCVars.forEach((variable) => {\n if (variable.value === undefined) {\n client.enabled = false\n warnings.push(`Missing environment variable ${variable.key}, disabling client and login`)\n }\n })\n }\n\n if (client.enabled) {\n const clientWarningVars = [\n { key: \"CREX_IDS_CLIENT_SECRET\", default: client.secret },\n { key: \"CREX_IDS_CLIENT_LOGIN_ENABLE\", default: client.enabled }\n ]\n\n const aux = generateWarnings(clientWarningVars)\n warnings.push(...aux);\n }\n\n return { client, warnings }\n}\n\nexport const createConsoleLoggerConfig = (): { consoleLogger: Omit<logInfo, \"hostname\" | \"app\" | \"categoriesLevel\">, warnings: string[]; } => {\n const warnings: string[] = []\n\n const consoleLoggerDefaults: Partial<logInfo> = {\n minimumLevel: \"info\" as LogLevelType,\n silent: false,\n }\n const consoleLoggerEnvs: Partial<logInfo> = {\n minimumLevel: process.env.LOG_CONSOLE_LEVEL as LogLevelType,\n silent: process.env.LOG_CONSOLE_SILENT == undefined ? undefined : process.env.LOG_CONSOLE_SILENT == \"true\",\n }\n const consoleLogger: logInfo = mergeConfigs<logInfo>(consoleLoggerDefaults, consoleLoggerEnvs);\n\n if (consoleLogger.silent == false) {\n const consoleWarningsVars = [\n { key: \"LOG_CONSOLE_SILENT\", default: consoleLogger.silent },\n { key: \"LOG_CONSOLE_LEVEL\", default: consoleLogger.minimumLevel }\n ]\n const aux = generateWarnings(consoleWarningsVars)\n warnings.push(...aux);\n }\n\n return {\n consoleLogger,\n warnings\n }\n}\n\nexport const createGraylogLoggerConfig = (projectName: string): { graylog: logInfo, warnings: string[] } => {\n const warnings: string[] = []\n\n const graylogDefaults: Partial<logInfo> = {\n app: `NextJs-Project-${projectName}`,\n minimumLevel: \"info\" as LogLevelType,\n silent: false,\n hostname: \"https://log.c-rex.net\",\n port: 12202,\n categoriesLevel: [\"NoLicense\", \"Scenario\", \"Document\", \"Search\", \"Notification\", \"History\", \"UserProfile\"],\n }\n const graylogEnvs: Partial<logInfo> = {\n app: process.env.LOG_GRAYLOG_APP_NAME,\n silent: process.env.LOG_GRAYLOG_SILENT == undefined ? undefined : process.env.LOG_GRAYLOG_SILENT == \"true\",\n hostname: process.env.LOG_GRAYLOG_HOSTNAME,\n port: process.env.LOG_GRAYLOG_PORT == undefined ? undefined : Number(process.env.LOG_GRAYLOG_PORT),\n minimumLevel: process.env.LOG_GRAYLOG_LEVEL as any,\n categoriesLevel: process.env.LOG_GRAYLOG_CATEGORIES == undefined ? undefined : process.env.LOG_GRAYLOG_CATEGORIES.split(\",\") as LogCategoriesType[],\n }\n const graylog: logInfo = mergeConfigs<logInfo>(graylogDefaults, graylogEnvs);\n\n if (graylog.silent == false) {\n const graylogWarningVars = [\n { key: \"LOG_GRAYLOG_APP_NAME\", default: graylog.app },\n { key: \"LOG_GRAYLOG_HOSTNAME\", default: graylog.hostname },\n { key: \"LOG_GRAYLOG_LEVEL\", default: graylog.minimumLevel },\n { key: \"LOG_GRAYLOG_SILENT\", default: graylog.silent },\n { key: \"LOG_GRAYLOG_CATEGORIES\", default: graylog.categoriesLevel },\n { key: \"LOG_GRAYLOG_PORT\", default: graylog.port }\n ]\n const aux = generateWarnings(graylogWarningVars)\n warnings.push(...aux);\n }\n\n return {\n graylog,\n warnings\n }\n}\n\nexport const createMatomoLoggerConfig = (projectName: string): { matomo: logInfo, warnings: string[] } => {\n const warnings: string[] = []\n\n const matomoDefaults: Partial<logInfo> = {\n app: `NextJs-Project-${projectName}`,\n minimumLevel: \"info\" as LogLevelType,\n silent: true,\n hostname: \"\",\n port: 0,\n categoriesLevel: [\"NoLicense\", \"Scenario\", \"Document\", \"Search\", \"Notification\", \"History\", \"UserProfile\"],\n }\n const matomoEnvs: Partial<logInfo> = {\n app: process.env.LOG_MATOMO_APP_NAME,\n silent: process.env.LOG_MATOMO_SILENT == undefined ? undefined : process.env.LOG_MATOMO_SILENT == \"true\",\n hostname: process.env.LOG_MATOMO_HOSTNAME,\n port: process.env.LOG_MATOMO_PORT == undefined ? undefined : Number(process.env.LOG_MATOMO_PORT),\n minimumLevel: process.env.LOG_MATOMO_LEVEL as any,\n categoriesLevel: process.env.LOG_MATOMO_CATEGORIES == undefined ? undefined : process.env.LOG_MATOMO_CATEGORIES.split(\",\") as LogCategoriesType[],\n }\n const matomo: logInfo = mergeConfigs<logInfo>(matomoDefaults, matomoEnvs);\n\n\n const matomoSilentVars = [\n { key: \"LOG_MATOMO_SILENT\", value: process.env.LOG_MATOMO_SILENT },\n { key: \"LOG_MATOMO_HOSTNAME\", value: process.env.LOG_MATOMO_HOSTNAME },\n { key: \"LOG_MATOMO_PORT\", value: process.env.LOG_MATOMO_PORT }\n ]\n matomoSilentVars.forEach((variable) => {\n if (variable.value === undefined) {\n matomo.silent = true\n warnings.push(`Missing environment variable ${variable.key}, setting matomo logger to silent`)\n }\n })\n\n if (matomo.silent == false) {\n const matomoWarningVars = [\n { key: \"LOG_MATOMO_APP_NAME\", default: matomo.app },\n { key: \"LOG_MATOMO_LEVEL\", default: matomo.minimumLevel },\n { key: \"LOG_MATOMO_CATEGORIES\", default: matomo.categoriesLevel }\n ]\n const aux = generateWarnings(matomoWarningVars)\n warnings.push(...aux);\n }\n\n return {\n matomo,\n warnings\n }\n}\n\n","import { ConfigInterface, CookiesConfigs, CustomerConfig } from \"@c-rex/interfaces\";\nimport {\n createClientOIDCConfig,\n createConsoleLoggerConfig,\n createGraylogLoggerConfig,\n createMatomoLoggerConfig,\n createUserOIDCConfig,\n formatApiUrl\n} from \"./utils\";\nimport { cookies } from \"next/headers\";\nimport { SDK_CONFIG_KEY } from \"@c-rex/constants\";\n\ndeclare global {\n // eslint-disable-next-line no-var\n var __GLOBAL_CONFIG__: ConfigInterface | null;\n}\n\n/**\n * SDK class for the CREX application.\n * Provides configuration and authentication functionality.\n */\nexport class CrexSDK {\n public userAuthConfig!: any;\n public customerConfig!: ConfigInterface;\n public cookiesConfig!: CookiesConfigs;\n\n public async getUserAuthConfig() {\n if (this.userAuthConfig) {\n return this.userAuthConfig;\n }\n\n if (!this.customerConfig) {\n this.customerConfig = this.getServerConfig()\n }\n\n const user = this.customerConfig.OIDC.user;\n const userInfoEndPoint = this.customerConfig.OIDC.issuerMetadata?.userinfo_endpoint;\n if (user.enabled) {\n this.userAuthConfig = {\n providers: [\n {\n id: \"crex\",\n name: \"CREX\",\n type: \"oauth\",\n version: \"2.0\",\n clientId: user.id,\n wellKnown: user.issuer,\n clientSecret: user.secret,\n authorization: {\n params: {\n scope: user.scope,\n prompt: \"login\"\n }\n },\n idToken: true,\n checks: [\"pkce\", \"state\"],\n async profile(_: any, tokens: any) {\n const res = await fetch(userInfoEndPoint, {\n headers: {\n Authorization: `Bearer ${tokens.access_token}`,\n },\n });\n\n const userinfo = await res.json();\n\n return {\n id: userinfo.sub,\n name: userinfo.name,\n email: userinfo.email,\n };\n },\n callbacks: {\n async jwt({ token, account }: any) {\n if (account) {\n token.id_token = account.id_token;\n }\n return token;\n },\n async session({ session, token }: any) {\n session.id_token = token.id_token;\n return session;\n },\n },\n },\n ]\n }\n };\n\n return this.userAuthConfig;\n }\n\n public createCustomerConfig(CUSTOMER_CONFIG: CustomerConfig, shouldLog: boolean): { cookiesConfig: CookiesConfigs, config: ConfigInterface } {\n\n const requiredEnvVars = [\"CREX_IDS_API_URL\", \"NEXT_PUBLIC_API_URL\"]\n const required = requiredEnvVars.map(key => {\n const value = process.env[key];\n if (value === undefined) {\n return `Missing required environment variable: ${key}`;\n }\n\n return \"\"\n }).filter(item => item.length > 0)\n\n const { user, warnings: userWarnings } = createUserOIDCConfig()\n const { client, warnings: clientWarnings } = createClientOIDCConfig()\n const { matomo, warnings: matomoWarnings } = createMatomoLoggerConfig(CUSTOMER_CONFIG.projectName)\n const { graylog, warnings: graylogWarnings } = createGraylogLoggerConfig(CUSTOMER_CONFIG.projectName)\n const { consoleLogger, warnings: consoleWarnings } = createConsoleLoggerConfig()\n\n const warnings = required.concat(\n consoleWarnings,\n clientWarnings,\n userWarnings,\n graylogWarnings,\n matomoWarnings\n )\n\n if (shouldLog) {\n if (warnings.length > 0) console.warn(warnings.join('\\n'));\n }\n\n const cookiesConfig: CookiesConfigs = {\n publicNextApiUrl: process.env.NEXT_PUBLIC_API_URL!,\n ...CUSTOMER_CONFIG,\n OIDC: {\n clientEnabled: client.enabled,\n userEnabled: user.enabled,\n },\n }\n\n const config: ConfigInterface = {\n baseUrl: process.env.CREX_IDS_API_URL == undefined ? \"\" : formatApiUrl(process.env.CREX_IDS_API_URL),\n OIDC: { client, user },\n logs: { console: consoleLogger, graylog, matomo, },\n ...CUSTOMER_CONFIG,\n }\n\n return { cookiesConfig, config };\n }\n\n public getClientConfig = (): CookiesConfigs => {\n const jsonConfigs = cookies().get(SDK_CONFIG_KEY)?.value;\n if (!jsonConfigs) {\n throw new Error('Configs not found');\n }\n\n const configs: CookiesConfigs = JSON.parse(jsonConfigs);\n\n return configs;\n }\n\n public getServerConfig() {\n if (!global.__GLOBAL_CONFIG__) {\n throw new Error('Server config not initialized');\n }\n return global.__GLOBAL_CONFIG__;\n }\n\n public initializeConfig(config: ConfigInterface) {\n if (global.__GLOBAL_CONFIG__) return global.__GLOBAL_CONFIG__;\n global.__GLOBAL_CONFIG__ = config;\n return global.__GLOBAL_CONFIG__;\n }\n\n public updateConfigProp(key: keyof ConfigInterface, value: any) {\n if (!global.__GLOBAL_CONFIG__) {\n throw new Error('Server config not initialized');\n }\n global.__GLOBAL_CONFIG__[key] = value;\n return global.__GLOBAL_CONFIG__;\n }\n}","import { Issuer } from 'openid-client';\nimport { CrexLogger } from './logger';\nimport { CrexSDK } from './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 getToken = async (): Promise<{ token: string; expiresAt: number; error?: string }> => {\n try {\n const sdk = new CrexSDK();\n const config = sdk.getServerConfig();\n const issuer = await Issuer.discover(config.OIDC.client.issuer);\n const client = new issuer.Client({\n client_id: config.OIDC.client.id,\n client_secret: config.OIDC.client.secret,\n });\n const tokenSet = await client.grant({ grant_type: 'client_credentials' });\n\n const token = tokenSet.access_token!;\n const expiresAt = tokenSet.expires_at!;\n\n return { token, expiresAt };\n\n } catch (error) {\n const logger = new CrexLogger()\n logger.log({\n level: \"error\",\n message: `getToken error: ${error}`\n })\n return { token: '', expiresAt: 0, error: JSON.stringify(error) };\n\n }\n}\n\nexport const getIssuerMetadata = async (): Promise<any> => {\n try {\n const sdk = new CrexSDK();\n const config = sdk.getServerConfig();\n const issuer = await Issuer.discover(config.OIDC.client.issuer);\n return issuer.metadata;\n } catch (error) {\n const logger = new CrexLogger()\n logger.log({\n level: \"error\",\n message: `getIssuerMetadata error: ${error}`\n })\n return null\n }\n}\n"],"mappings":";AASO,IAAM,oCAAoC;AAAA,EAC7C,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,cAAc;AAAA,EACd,UAAU;AAAA,EACV,UAAU;AAAA,EACV,OAAO;AACX;AAEO,IAAM,uCAAuC,OAAO,OAAO,iCAAiC;AAE5F,IAAM,wBAAwB;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,QAAQ,aAAa,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC;AAAA,UAClE,OAAO;AACH,oBAAQ,aAAa,OAAO,KAAK,OAAO,KAAK,CAAC;AAAA,UAClD;AAAA,QACJ;AAAA,MACJ,CAAC;AAAA,IACL;AAEA,WAAO,QAAQ,SAAS;AAAA,EAC5B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,MAAM,QAAW;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU,CAAC;AAAA,EACf,GAA2B;AACvB,QAAI;AACA,YAAM,KAAK,QAAQ;AAEnB,YAAM,iBAAyC;AAAA,QAC3C,gBAAgB;AAAA,QAChB,GAAG;AAAA,MACP;AAEA,UAAI,KAAK,eAAe,KAAK,OAAO,SAAS;AACzC,cAAM,QAAQ,MAAM,KAAK,YAAY;AACrC,uBAAe,eAAe,IAAI,UAAU,KAAK;AAAA,MACrD;AAEA,YAAM,UAAU,KAAK,SAAS,KAAK,MAAM;AACzC,YAAM,WAAW,MAAM,MAAM,SAAS;AAAA,QAClC,OAAO;AAAA,QACP;AAAA,QACA,SAAS;AAAA,QACT,MAAM,OAAO,KAAK,UAAU,IAAI,IAAI;AAAA,MACxC,CAAC;AAED,UAAI,CAAC,SAAS,IAAI;AACd,gBAAQ,IAAI,OAAO;AACnB,cAAM,IAAI,MAAM,uBAAuB,SAAS,MAAM,EAAE;AAAA,MAC5D;AAEA,YAAM,OAAO,MAAM,SAAS,KAAK;AAEjC,aAAO;AAAA,IACX,SAAS,OAAO;AACZ,WAAK,OAAO,IAAI;AAAA,QACZ,OAAO;AAAA,QACP,SAAS,0BAA0B,KAAK;AAAA,MAC5C,CAAC;AACD,YAAM;AAAA,IACV;AAAA,EACJ;AACJ;","names":["cookies","Transport","Transport","cookies"]}
|
|
1
|
+
{"version":3,"sources":["../../constants/src/generated/model-fields.ts","../../constants/src/index.ts","../src/requests.ts","../src/logger.ts","../src/transports/matomo.ts","../src/transports/graylog.ts","../src/utils.ts","../src/sdk.ts","../src/OIDC.ts"],"sourcesContent":["/**\r\n * Auto-generated from OpenAPI spec\r\n * Source: https://staging.c-rex.net/ids/api/swagger/v1/swagger.json\r\n * Generated: 2026-02-28T18:07:46.988Z\r\n * Do not edit manually\r\n */\r\n\r\n// Field constants for compile-time validation of Fields query parameter\r\n\r\nexport const AdministrativeMetadataModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const AdministrativeMetadataModelFieldsAll = Object.values(AdministrativeMetadataModelFields);\r\n\r\nexport const AuditStateModelFields = {\r\n id: \"id\",\r\n state: \"state\",\r\n} as const;\r\n\r\nexport const AuditStateModelFieldsAll = Object.values(AuditStateModelFields);\r\n\r\nexport const AuthStateModelFields = {\r\n state: \"state\",\r\n licenses: \"licenses\",\r\n roles: \"roles\",\r\n} as const;\r\n\r\nexport const AuthStateModelFieldsAll = Object.values(AuthStateModelFields);\r\n\r\nexport const CategoryModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n parents: \"parents\",\r\n ancestors: \"ancestors\",\r\n ancestorsOrSelf: \"ancestorsOrSelf\",\r\n categories: \"categories\",\r\n} as const;\r\n\r\nexport const CategoryModelFieldsAll = Object.values(CategoryModelFields);\r\n\r\nexport const ComponentModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n productGraphic: \"productGraphic\",\r\n titles: \"titles\",\r\n parents: \"parents\",\r\n ancestors: \"ancestors\",\r\n ancestorsOrSelf: \"ancestorsOrSelf\",\r\n components: \"components\",\r\n identities: \"identities\",\r\n parties: \"parties\",\r\n informationUnits: \"informationUnits\",\r\n seeAlso: \"seeAlso\",\r\n} as const;\r\n\r\nexport const ComponentModelFieldsAll = Object.values(ComponentModelFields);\r\n\r\nexport const ContentLifeCycleStatusModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n dateOfEffect: \"dateOfEffect\",\r\n dateOfExpiry: \"dateOfExpiry\",\r\n dateOfStatus: \"dateOfStatus\",\r\n purpose: \"purpose\",\r\n value: \"value\",\r\n parties: \"parties\",\r\n} as const;\r\n\r\nexport const ContentLifeCycleStatusModelFieldsAll = Object.values(ContentLifeCycleStatusModelFields);\r\n\r\nexport const ContentLifeCycleStatusValueModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const ContentLifeCycleStatusValueModelFieldsAll = Object.values(ContentLifeCycleStatusValueModelFields);\r\n\r\nexport const DirectoryNodeModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n structureType: \"structureType\",\r\n parents: \"parents\",\r\n ancestors: \"ancestors\",\r\n ancestorsOrSelf: \"ancestorsOrSelf\",\r\n childNodes: \"childNodes\",\r\n informationUnits: \"informationUnits\",\r\n} as const;\r\n\r\nexport const DirectoryNodeModelFieldsAll = Object.values(DirectoryNodeModelFields);\r\n\r\nexport const DirectoryNodeTypeModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const DirectoryNodeTypeModelFieldsAll = Object.values(DirectoryNodeTypeModelFields);\r\n\r\nexport const DocumentModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n revision: \"revision\",\r\n created: \"created\",\r\n modified: \"modified\",\r\n abstract: \"abstract\",\r\n replaces: \"replaces\",\r\n versionOf: \"versionOf\",\r\n titles: \"titles\",\r\n languages: \"languages\",\r\n parties: \"parties\",\r\n renditions: \"renditions\",\r\n identities: \"identities\",\r\n components: \"components\",\r\n informationSubjects: \"informationSubjects\",\r\n topicTypes: \"topicTypes\",\r\n documentTypes: \"documentTypes\",\r\n directoryNodes: \"directoryNodes\",\r\n contentLifeCycleStatus: \"contentLifeCycleStatus\",\r\n applicableForTypes: \"applicableForTypes\",\r\n planningTimes: \"planningTimes\",\r\n events: \"events\",\r\n functionalMetadata: \"functionalMetadata\",\r\n informationUnits: \"informationUnits\",\r\n productFeatures: \"productFeatures\",\r\n productLifeCyclePhases: \"productLifeCyclePhases\",\r\n productMetadata: \"productMetadata\",\r\n productVariants: \"productVariants\",\r\n qualifications: \"qualifications\",\r\n supplies: \"supplies\",\r\n} as const;\r\n\r\nexport const DocumentModelFieldsAll = Object.values(DocumentModelFields);\r\n\r\nexport const DocumentTypeModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const DocumentTypeModelFieldsAll = Object.values(DocumentTypeModelFields);\r\n\r\nexport const DocumentationMetadataModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const DocumentationMetadataModelFieldsAll = Object.values(DocumentationMetadataModelFields);\r\n\r\nexport const DomainEntityModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n} as const;\r\n\r\nexport const DomainEntityModelFieldsAll = Object.values(DomainEntityModelFields);\r\n\r\nexport const EventModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n eventCode: \"eventCode\",\r\n eventType: \"eventType\",\r\n} as const;\r\n\r\nexport const EventModelFieldsAll = Object.values(EventModelFields);\r\n\r\nexport const ExternalProductGraphicModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n revision: \"revision\",\r\n created: \"created\",\r\n modified: \"modified\",\r\n abstract: \"abstract\",\r\n replaces: \"replaces\",\r\n versionOf: \"versionOf\",\r\n titles: \"titles\",\r\n languages: \"languages\",\r\n parties: \"parties\",\r\n renditions: \"renditions\",\r\n identities: \"identities\",\r\n components: \"components\",\r\n informationSubjects: \"informationSubjects\",\r\n topicTypes: \"topicTypes\",\r\n documentTypes: \"documentTypes\",\r\n directoryNodes: \"directoryNodes\",\r\n contentLifeCycleStatus: \"contentLifeCycleStatus\",\r\n applicableForTypes: \"applicableForTypes\",\r\n planningTimes: \"planningTimes\",\r\n events: \"events\",\r\n functionalMetadata: \"functionalMetadata\",\r\n informationUnits: \"informationUnits\",\r\n productFeatures: \"productFeatures\",\r\n productLifeCyclePhases: \"productLifeCyclePhases\",\r\n productMetadata: \"productMetadata\",\r\n productVariants: \"productVariants\",\r\n qualifications: \"qualifications\",\r\n supplies: \"supplies\",\r\n} as const;\r\n\r\nexport const ExternalProductGraphicModelFieldsAll = Object.values(ExternalProductGraphicModelFields);\r\n\r\nexport const ExternalProductOntologyModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n itemNumbers: \"itemNumbers\",\r\n productSeries: \"productSeries\",\r\n productModels: \"productModels\",\r\n productNames: \"productNames\",\r\n products: \"products\",\r\n} as const;\r\n\r\nexport const ExternalProductOntologyModelFieldsAll = Object.values(ExternalProductOntologyModelFields);\r\n\r\nexport const FragmentModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n revision: \"revision\",\r\n created: \"created\",\r\n modified: \"modified\",\r\n abstract: \"abstract\",\r\n replaces: \"replaces\",\r\n versionOf: \"versionOf\",\r\n titles: \"titles\",\r\n languages: \"languages\",\r\n parties: \"parties\",\r\n renditions: \"renditions\",\r\n identities: \"identities\",\r\n components: \"components\",\r\n informationSubjects: \"informationSubjects\",\r\n topicTypes: \"topicTypes\",\r\n documentTypes: \"documentTypes\",\r\n directoryNodes: \"directoryNodes\",\r\n contentLifeCycleStatus: \"contentLifeCycleStatus\",\r\n applicableForTypes: \"applicableForTypes\",\r\n planningTimes: \"planningTimes\",\r\n events: \"events\",\r\n functionalMetadata: \"functionalMetadata\",\r\n informationUnits: \"informationUnits\",\r\n productFeatures: \"productFeatures\",\r\n productLifeCyclePhases: \"productLifeCyclePhases\",\r\n productMetadata: \"productMetadata\",\r\n productVariants: \"productVariants\",\r\n qualifications: \"qualifications\",\r\n supplies: \"supplies\",\r\n} as const;\r\n\r\nexport const FragmentModelFieldsAll = Object.values(FragmentModelFields);\r\n\r\nexport const FunctionalMetadataModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const FunctionalMetadataModelFieldsAll = Object.values(FunctionalMetadataModelFields);\r\n\r\nexport const IdentityDomainModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n parties: \"parties\",\r\n} as const;\r\n\r\nexport const IdentityDomainModelFieldsAll = Object.values(IdentityDomainModelFields);\r\n\r\nexport const IdentityModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n identifier: \"identifier\",\r\n identityDomain: \"identityDomain\",\r\n} as const;\r\n\r\nexport const IdentityModelFieldsAll = Object.values(IdentityModelFields);\r\n\r\nexport const InformationObjectModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n identities: \"identities\",\r\n} as const;\r\n\r\nexport const InformationObjectModelFieldsAll = Object.values(InformationObjectModelFields);\r\n\r\nexport const InformationSubjectCollectionModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const InformationSubjectCollectionModelFieldsAll = Object.values(InformationSubjectCollectionModelFields);\r\n\r\nexport const InformationSubjectConformityModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const InformationSubjectConformityModelFieldsAll = Object.values(InformationSubjectConformityModelFields);\r\n\r\nexport const InformationSubjectFormalityModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const InformationSubjectFormalityModelFieldsAll = Object.values(InformationSubjectFormalityModelFields);\r\n\r\nexport const InformationSubjectFunctionalityModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const InformationSubjectFunctionalityModelFieldsAll = Object.values(InformationSubjectFunctionalityModelFields);\r\n\r\nexport const InformationSubjectModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const InformationSubjectModelFieldsAll = Object.values(InformationSubjectModelFields);\r\n\r\nexport const InformationSubjectProcessModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const InformationSubjectProcessModelFieldsAll = Object.values(InformationSubjectProcessModelFields);\r\n\r\nexport const InformationSubjectSafetyModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const InformationSubjectSafetyModelFieldsAll = Object.values(InformationSubjectSafetyModelFields);\r\n\r\nexport const InformationSubjectSafetyWarningMessageModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const InformationSubjectSafetyWarningMessageModelFieldsAll = Object.values(InformationSubjectSafetyWarningMessageModelFields);\r\n\r\nexport const InformationSubjectTechnicalDataModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const InformationSubjectTechnicalDataModelFieldsAll = Object.values(InformationSubjectTechnicalDataModelFields);\r\n\r\nexport const InformationSubjectTechnicalOverviewModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const InformationSubjectTechnicalOverviewModelFieldsAll = Object.values(InformationSubjectTechnicalOverviewModelFields);\r\n\r\nexport const InformationTypeModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const InformationTypeModelFieldsAll = Object.values(InformationTypeModelFields);\r\n\r\nexport const InformationUnitModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n revision: \"revision\",\r\n created: \"created\",\r\n modified: \"modified\",\r\n abstract: \"abstract\",\r\n replaces: \"replaces\",\r\n versionOf: \"versionOf\",\r\n titles: \"titles\",\r\n languages: \"languages\",\r\n parties: \"parties\",\r\n renditions: \"renditions\",\r\n identities: \"identities\",\r\n components: \"components\",\r\n informationSubjects: \"informationSubjects\",\r\n topicTypes: \"topicTypes\",\r\n documentTypes: \"documentTypes\",\r\n directoryNodes: \"directoryNodes\",\r\n contentLifeCycleStatus: \"contentLifeCycleStatus\",\r\n applicableForTypes: \"applicableForTypes\",\r\n planningTimes: \"planningTimes\",\r\n events: \"events\",\r\n functionalMetadata: \"functionalMetadata\",\r\n informationUnits: \"informationUnits\",\r\n productFeatures: \"productFeatures\",\r\n productLifeCyclePhases: \"productLifeCyclePhases\",\r\n productMetadata: \"productMetadata\",\r\n productVariants: \"productVariants\",\r\n qualifications: \"qualifications\",\r\n supplies: \"supplies\",\r\n} as const;\r\n\r\nexport const InformationUnitModelFieldsAll = Object.values(InformationUnitModelFields);\r\n\r\nexport const OwlClassModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n} as const;\r\n\r\nexport const OwlClassModelFieldsAll = Object.values(OwlClassModelFields);\r\n\r\nexport const PackageModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n revision: \"revision\",\r\n created: \"created\",\r\n modified: \"modified\",\r\n abstract: \"abstract\",\r\n replaces: \"replaces\",\r\n versionOf: \"versionOf\",\r\n titles: \"titles\",\r\n languages: \"languages\",\r\n parties: \"parties\",\r\n renditions: \"renditions\",\r\n identities: \"identities\",\r\n components: \"components\",\r\n informationSubjects: \"informationSubjects\",\r\n topicTypes: \"topicTypes\",\r\n documentTypes: \"documentTypes\",\r\n directoryNodes: \"directoryNodes\",\r\n contentLifeCycleStatus: \"contentLifeCycleStatus\",\r\n applicableForTypes: \"applicableForTypes\",\r\n planningTimes: \"planningTimes\",\r\n events: \"events\",\r\n functionalMetadata: \"functionalMetadata\",\r\n informationUnits: \"informationUnits\",\r\n productFeatures: \"productFeatures\",\r\n productLifeCyclePhases: \"productLifeCyclePhases\",\r\n productMetadata: \"productMetadata\",\r\n productVariants: \"productVariants\",\r\n qualifications: \"qualifications\",\r\n supplies: \"supplies\",\r\n iirdsVersion: \"iirdsVersion\",\r\n formatRestriction: \"formatRestriction\",\r\n directories: \"directories\",\r\n} as const;\r\n\r\nexport const PackageModelFieldsAll = Object.values(PackageModelFields);\r\n\r\nexport const PartyModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n partyRole: \"partyRole\",\r\n vcard: \"vcard\",\r\n} as const;\r\n\r\nexport const PartyModelFieldsAll = Object.values(PartyModelFields);\r\n\r\nexport const PartyRoleModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const PartyRoleModelFieldsAll = Object.values(PartyRoleModelFields);\r\n\r\nexport const PlanningDownTimeModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n duration: \"duration\",\r\n} as const;\r\n\r\nexport const PlanningDownTimeModelFieldsAll = Object.values(PlanningDownTimeModelFields);\r\n\r\nexport const PlanningMaintenanceIntervalModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n duration: \"duration\",\r\n frequency: \"frequency\",\r\n} as const;\r\n\r\nexport const PlanningMaintenanceIntervalModelFieldsAll = Object.values(PlanningMaintenanceIntervalModelFields);\r\n\r\nexport const PlanningSetupTimeModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n duration: \"duration\",\r\n} as const;\r\n\r\nexport const PlanningSetupTimeModelFieldsAll = Object.values(PlanningSetupTimeModelFields);\r\n\r\nexport const PlanningTimeModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n duration: \"duration\",\r\n} as const;\r\n\r\nexport const PlanningTimeModelFieldsAll = Object.values(PlanningTimeModelFields);\r\n\r\nexport const PlanningWorkingTimeModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n duration: \"duration\",\r\n} as const;\r\n\r\nexport const PlanningWorkingTimeModelFieldsAll = Object.values(PlanningWorkingTimeModelFields);\r\n\r\nexport const ProductFeatureModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const ProductFeatureModelFieldsAll = Object.values(ProductFeatureModelFields);\r\n\r\nexport const ProductFunctionModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const ProductFunctionModelFieldsAll = Object.values(ProductFunctionModelFields);\r\n\r\nexport const ProductLcpAfterUseModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const ProductLcpAfterUseModelFieldsAll = Object.values(ProductLcpAfterUseModelFields);\r\n\r\nexport const ProductLcpDesignAndRealizationModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const ProductLcpDesignAndRealizationModelFieldsAll = Object.values(ProductLcpDesignAndRealizationModelFields);\r\n\r\nexport const ProductLcpPuttingToUseModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const ProductLcpPuttingToUseModelFieldsAll = Object.values(ProductLcpPuttingToUseModelFields);\r\n\r\nexport const ProductLcpUseModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const ProductLcpUseModelFieldsAll = Object.values(ProductLcpUseModelFields);\r\n\r\nexport const ProductLifeCyclePhaseModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const ProductLifeCyclePhaseModelFieldsAll = Object.values(ProductLifeCyclePhaseModelFields);\r\n\r\nexport const ProductMetadataModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const ProductMetadataModelFieldsAll = Object.values(ProductMetadataModelFields);\r\n\r\nexport const ProductPropertyModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const ProductPropertyModelFieldsAll = Object.values(ProductPropertyModelFields);\r\n\r\nexport const ProductVariantModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n identities: \"identities\",\r\n parties: \"parties\",\r\n} as const;\r\n\r\nexport const ProductVariantModelFieldsAll = Object.values(ProductVariantModelFields);\r\n\r\nexport const QualificationModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const QualificationModelFieldsAll = Object.values(QualificationModelFields);\r\n\r\nexport const QualificationRoleModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const QualificationRoleModelFieldsAll = Object.values(QualificationRoleModelFields);\r\n\r\nexport const QualificationSkillLevelModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const QualificationSkillLevelModelFieldsAll = Object.values(QualificationSkillLevelModelFields);\r\n\r\nexport const RenditionModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n source: \"source\",\r\n format: \"format\",\r\n identities: \"identities\",\r\n selectors: \"selectors\",\r\n informationUnits: \"informationUnits\",\r\n} as const;\r\n\r\nexport const RenditionModelFieldsAll = Object.values(RenditionModelFields);\r\n\r\nexport const RenditionSelectorModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n} as const;\r\n\r\nexport const RenditionSelectorModelFieldsAll = Object.values(RenditionSelectorModelFields);\r\n\r\nexport const SupplyConsumableModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const SupplyConsumableModelFieldsAll = Object.values(SupplyConsumableModelFields);\r\n\r\nexport const SupplyHardwareToolModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const SupplyHardwareToolModelFieldsAll = Object.values(SupplyHardwareToolModelFields);\r\n\r\nexport const SupplyLubricantModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const SupplyLubricantModelFieldsAll = Object.values(SupplyLubricantModelFields);\r\n\r\nexport const SupplyModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const SupplyModelFieldsAll = Object.values(SupplyModelFields);\r\n\r\nexport const SupplyOperatingModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const SupplyOperatingModelFieldsAll = Object.values(SupplyOperatingModelFields);\r\n\r\nexport const SupplySparePartModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const SupplySparePartModelFieldsAll = Object.values(SupplySparePartModelFields);\r\n\r\nexport const TopicModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n revision: \"revision\",\r\n created: \"created\",\r\n modified: \"modified\",\r\n abstract: \"abstract\",\r\n replaces: \"replaces\",\r\n versionOf: \"versionOf\",\r\n titles: \"titles\",\r\n languages: \"languages\",\r\n parties: \"parties\",\r\n renditions: \"renditions\",\r\n identities: \"identities\",\r\n components: \"components\",\r\n informationSubjects: \"informationSubjects\",\r\n topicTypes: \"topicTypes\",\r\n documentTypes: \"documentTypes\",\r\n directoryNodes: \"directoryNodes\",\r\n contentLifeCycleStatus: \"contentLifeCycleStatus\",\r\n applicableForTypes: \"applicableForTypes\",\r\n planningTimes: \"planningTimes\",\r\n events: \"events\",\r\n functionalMetadata: \"functionalMetadata\",\r\n informationUnits: \"informationUnits\",\r\n productFeatures: \"productFeatures\",\r\n productLifeCyclePhases: \"productLifeCyclePhases\",\r\n productMetadata: \"productMetadata\",\r\n productVariants: \"productVariants\",\r\n qualifications: \"qualifications\",\r\n supplies: \"supplies\",\r\n} as const;\r\n\r\nexport const TopicModelFieldsAll = Object.values(TopicModelFields);\r\n\r\nexport const TopicTypeConceptModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const TopicTypeConceptModelFieldsAll = Object.values(TopicTypeConceptModelFields);\r\n\r\nexport const TopicTypeFormModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const TopicTypeFormModelFieldsAll = Object.values(TopicTypeFormModelFields);\r\n\r\nexport const TopicTypeLearningModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const TopicTypeLearningModelFieldsAll = Object.values(TopicTypeLearningModelFields);\r\n\r\nexport const TopicTypeModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const TopicTypeModelFieldsAll = Object.values(TopicTypeModelFields);\r\n\r\nexport const TopicTypeReferenceModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const TopicTypeReferenceModelFieldsAll = Object.values(TopicTypeReferenceModelFields);\r\n\r\nexport const TopicTypeTaskModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const TopicTypeTaskModelFieldsAll = Object.values(TopicTypeTaskModelFields);\r\n\r\nexport const TopicTypeTroubleShootingModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n} as const;\r\n\r\nexport const TopicTypeTroubleShootingModelFieldsAll = Object.values(TopicTypeTroubleShootingModelFields);\r\n\r\nexport const VCardCalendarModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n source: \"source\",\r\n} as const;\r\n\r\nexport const VCardCalendarModelFieldsAll = Object.values(VCardCalendarModelFields);\r\n\r\nexport const VCardGroupModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n fullName: \"fullName\",\r\n photos: \"photos\",\r\n emails: \"emails\",\r\n telephones: \"telephones\",\r\n addresses: \"addresses\",\r\n calendars: \"calendars\",\r\n urls: \"urls\",\r\n members: \"members\",\r\n} as const;\r\n\r\nexport const VCardGroupModelFieldsAll = Object.values(VCardGroupModelFields);\r\n\r\nexport const VCardImageModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n classes: \"classes\",\r\n value: \"value\",\r\n source: \"source\",\r\n} as const;\r\n\r\nexport const VCardImageModelFieldsAll = Object.values(VCardImageModelFields);\r\n\r\nexport const VCardIndividualModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n fullName: \"fullName\",\r\n photos: \"photos\",\r\n emails: \"emails\",\r\n telephones: \"telephones\",\r\n addresses: \"addresses\",\r\n calendars: \"calendars\",\r\n urls: \"urls\",\r\n title: \"title\",\r\n role: \"role\",\r\n gender: \"gender\",\r\n} as const;\r\n\r\nexport const VCardIndividualModelFieldsAll = Object.values(VCardIndividualModelFields);\r\n\r\nexport const VCardInfoModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n classes: \"classes\",\r\n types: \"types\",\r\n value: \"value\",\r\n countryName: \"countryName\",\r\n locality: \"locality\",\r\n postalCode: \"postalCode\",\r\n streetAddress: \"streetAddress\",\r\n} as const;\r\n\r\nexport const VCardInfoModelFieldsAll = Object.values(VCardInfoModelFields);\r\n\r\nexport const VCardLocationModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n fullName: \"fullName\",\r\n photos: \"photos\",\r\n emails: \"emails\",\r\n telephones: \"telephones\",\r\n addresses: \"addresses\",\r\n calendars: \"calendars\",\r\n urls: \"urls\",\r\n members: \"members\",\r\n} as const;\r\n\r\nexport const VCardLocationModelFieldsAll = Object.values(VCardLocationModelFields);\r\n\r\nexport const VCardModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n fullName: \"fullName\",\r\n photos: \"photos\",\r\n emails: \"emails\",\r\n telephones: \"telephones\",\r\n addresses: \"addresses\",\r\n calendars: \"calendars\",\r\n urls: \"urls\",\r\n} as const;\r\n\r\nexport const VCardModelFieldsAll = Object.values(VCardModelFields);\r\n\r\nexport const VCardOrganizationModelFields = {\r\n id: \"id\",\r\n shortId: \"shortId\",\r\n score: \"score\",\r\n class: \"class\",\r\n labels: \"labels\",\r\n comments: \"comments\",\r\n descriptions: \"descriptions\",\r\n synonyms: \"synonyms\",\r\n packages: \"packages\",\r\n hasInformationUnits: \"hasInformationUnits\",\r\n links: \"links\",\r\n fullName: \"fullName\",\r\n photos: \"photos\",\r\n emails: \"emails\",\r\n telephones: \"telephones\",\r\n addresses: \"addresses\",\r\n calendars: \"calendars\",\r\n urls: \"urls\",\r\n organizationName: \"organizationName\",\r\n organizationUnit: \"organizationUnit\",\r\n members: \"members\",\r\n logos: \"logos\",\r\n} as const;\r\n\r\nexport const VCardOrganizationModelFieldsAll = Object.values(VCardOrganizationModelFields);\r\n","export * from './generated/model-fields'\r\n\r\nexport const ALL = \"*\"\r\n\r\nexport const LOG_CATEGORIES = [\r\n \"NoLicense\",\r\n \"Scenario\",\r\n \"Favorites\",\r\n \"Subscription\",\r\n \"Share\",\r\n \"Document\",\r\n \"Search\",\r\n \"History\",\r\n \"Notification\",\r\n \"UserProfile\",\r\n] as const;\r\n\r\nexport const LOG_LEVELS = {\r\n critical: 2,\r\n error: 3,\r\n warning: 4,\r\n info: 6,\r\n debug: 7,\r\n} as const;\r\n\r\nexport const RESULT_VIEW_STYLES = [\r\n \"information-unit-search-results-cards\",\r\n \"information-unit-search-results-table\",\r\n \"information-unit-search-results-card-list\",\r\n] as const;\r\n\r\nexport const API = {\r\n MAX_RETRY: 3,\r\n API_TIMEOUT: 10000,\r\n RETRY_DELAY: 500,\r\n API_HEADERS: {\r\n \"content-Type\": \"application/json\",\r\n },\r\n};\r\n\r\nexport const SDK_CONFIG_KEY = \"crex-sdk-config\";\r\n\r\nexport const UI_LANG_KEY = \"UI_LANG_KEY\";\r\nexport const CONTENT_LANG_KEY = \"CONTENT_LANG_KEY\";\r\n\r\nexport const FLAGS_BY_LANG = {\r\n \"en\": \"US\",\r\n \"de\": \"DE\",\r\n};\r\n\r\nexport const DEFAULT_LANG = \"en-US\";\r\n\r\nexport const EN_LANG = \"en\";\r\n\r\nexport const UI_LANG_OPTIONS = [\"en-us\", \"de-de\"];\r\n\r\nexport const TOPICS_TYPE_AND_LINK = \"topics\";\r\nexport const BLOG_TYPE_AND_LINK = \"blog\";\r\nexport const DOCUMENTS_TYPE_AND_LINK = \"documents\";\r\n\r\nexport const TOPIC = \"TOPIC\";\r\nexport const DOCUMENT = \"DOCUMENT\";\r\nexport const PACKAGE = \"PACKAGE\";\r\nexport const FRAGMENT = \"FRAGMENT\";\r\n\r\nexport const RESULT_TYPES = {\r\n TOPIC: TOPIC,\r\n DOCUMENT: DOCUMENT,\r\n PACKAGE: PACKAGE,\r\n FRAGMENT: FRAGMENT\r\n} as const;\r\n\r\nexport const FILES_EXTENSIONS = {\r\n PDF: \"application/pdf\",\r\n HTML: \"text/html\",\r\n} as const;\r\n\r\nexport const DEFAULT_COOKIE_LIMIT = 30 * 24 * 60 * 60 * 1000; // 30 days in milliseconds\r\n\r\nexport const ICONS_BY_FILE_EXTENSION = {\r\n \"application/pdf\": \"FaFilePdf\",\r\n} as const;\r\n\r\nexport const DEFAULT_ICON = \"file\";\r\n\r\nexport const CREX_TOKEN_HEADER_KEY = \"crex-token\";\r\n\r\nexport const WILD_CARD_OPTIONS = {\r\n BOTH: \"BOTH\",\r\n END: \"END\",\r\n START: \"START\",\r\n NONE: \"NONE\",\r\n} as const;\r\n\r\nexport const OPERATOR_OPTIONS = {\r\n AND: \"AND\",\r\n OR: \"OR\",\r\n} as const;\r\n\r\nexport const ARTICLE_PAGE_LAYOUT = {\r\n BLOG: \"BLOG\",\r\n DOCUMENT: \"DOCUMENT\",\r\n} as const;\r\n\r\nexport const DEVICE_OPTIONS = {\r\n MOBILE: \"mobile\",\r\n TABLET: \"tablet\",\r\n DESKTOP: \"desktop\",\r\n}\r\nexport const BREAKPOINTS = {\r\n sm: 640,\r\n md: 768,\r\n lg: 1024,\r\n xl: 1280,\r\n \"2xl\": 1536,\r\n};\r\n\r\nexport const MARKER_COLORS = [\r\n \"red-500\",\r\n \"orange-500\",\r\n \"yellow-400\",\r\n \"green-500\",\r\n \"teal-500\",\r\n \"blue-500\",\r\n \"sky-500\",\r\n \"purple-500\",\r\n \"pink-500\",\r\n \"gray-500\",\r\n \"neutral-800\",\r\n \"cyan-500\",\r\n \"lime-500\",\r\n \"amber-500\",\r\n \"indigo-500\",\r\n];\r\n","import { CREX_TOKEN_HEADER_KEY } from \"@c-rex/constants\";\r\nimport { ConfigInterface } from \"@c-rex/interfaces\";\r\nimport { cookies } from \"next/headers\";\r\nimport { revalidateTag } from \"next/cache\";\r\nimport { NextRequest, NextResponse } from \"next/server\";\r\nimport { appendFileSync, mkdirSync } from \"fs\";\r\nimport { dirname } from \"path\";\r\nimport { CrexLogger } from \"./logger\";\r\nimport { getToken } from \"./OIDC\";\r\nimport { CrexSDK } from \"./sdk\";\r\nimport { LogCategoriesType } from \"@c-rex/types\";\r\nimport { createRemoteJWKSet, errors as joseErrors, jwtVerify, type JWTPayload } from \"jose\";\r\n\r\n/**\r\n * HTTP methods supported by the API client.\r\n */\r\ntype HttpMethod = \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | \"PATCH\" | \"HEAD\" | \"OPTIONS\";\r\n\r\n/**\r\n * Type for query parameter values - supports primitives and arrays.\r\n */\r\ntype ParamValue = string | number | boolean | undefined | (string | number | boolean)[];\r\nconst AREA_PREFIX_PATTERN = /^(ids|iirds|iirdsmch|rdf|vcard|crex)\\/v1\\//i;\r\n/**\r\n * Cache constants below represent two distinct layers:\r\n * - internal cache tags (`CREX_*_TAG`) used by Next.js tag-based revalidation\r\n * - external cache segments (`CREX_CACHE_SEGMENT_*`) used by admin/API invalidation endpoints\r\n */\r\nexport const CREX_API_CACHE_TAG = \"crex-api\";\r\nexport const CREX_API_CACHE_VCARD_TAG = \"crex-api:vcard\";\r\nexport const CREX_READMODEL_CACHE_TAG = \"crex-readmodel\";\r\nexport const CREX_READMODEL_CACHE_VCARD_TAG = \"crex-readmodel:vcard\";\r\nexport const CREX_READMODEL_CACHE_METADATA_TAG = \"crex-readmodel:metadata\";\r\nexport const CREX_READMODEL_CACHE_ORGANIZATION_TAG = \"crex-readmodel:organization\";\r\nexport const CREX_READMODEL_CACHE_INFORMATION_SUBJECTS_TAG = \"crex-readmodel:information-subjects\";\r\nexport const CREX_READMODEL_CACHE_DOCUMENT_TYPES_TAG = \"crex-readmodel:document-types\";\r\nexport const CREX_READMODEL_CACHE_COMPONENTS_TAG = \"crex-readmodel:components\";\r\nexport const CREX_READMODEL_CACHE_PARTIES_TAG = \"crex-readmodel:parties\";\r\nexport const CREX_CACHE_SEGMENT_ALL = \"all\";\r\nexport const CREX_CACHE_SEGMENT_METADATA = \"metadata\";\r\nexport const CREX_CACHE_SEGMENT_VCARD = \"vcard\";\r\nexport const CREX_CACHE_SEGMENT_REQUESTS = \"requests\";\r\n\r\n/**\r\n * External cache segment names used by admin/API invalidation endpoints.\r\n * Segments are user-facing buckets; tags are internal cache keys used by Next.js revalidation.\r\n */\r\nexport type CrexCacheSegment =\r\n | typeof CREX_CACHE_SEGMENT_ALL\r\n | typeof CREX_CACHE_SEGMENT_METADATA\r\n | typeof CREX_CACHE_SEGMENT_VCARD\r\n | typeof CREX_CACHE_SEGMENT_REQUESTS;\r\n\r\n/**\r\n * Segment-to-tag mapping for cache invalidation.\r\n *\r\n * Why both levels exist:\r\n * - Segment (`metadata`, `vcard`, ...) is the coarse external API contract.\r\n * - Tag (`crex-readmodel:metadata`, ...) is the internal revalidation key.\r\n */\r\nexport const CREX_CACHE_SEGMENT_TO_TAGS: Record<CrexCacheSegment, string[]> = {\r\n [CREX_CACHE_SEGMENT_VCARD]: [\r\n CREX_API_CACHE_VCARD_TAG,\r\n CREX_READMODEL_CACHE_VCARD_TAG,\r\n CREX_READMODEL_CACHE_ORGANIZATION_TAG,\r\n ],\r\n [CREX_CACHE_SEGMENT_METADATA]: [\r\n CREX_READMODEL_CACHE_METADATA_TAG,\r\n CREX_READMODEL_CACHE_TAG,\r\n ],\r\n [CREX_CACHE_SEGMENT_REQUESTS]: [\r\n CREX_API_CACHE_TAG,\r\n CREX_API_CACHE_VCARD_TAG,\r\n ],\r\n [CREX_CACHE_SEGMENT_ALL]: [\r\n CREX_API_CACHE_TAG,\r\n CREX_API_CACHE_VCARD_TAG,\r\n CREX_READMODEL_CACHE_TAG,\r\n CREX_READMODEL_CACHE_VCARD_TAG,\r\n CREX_READMODEL_CACHE_METADATA_TAG,\r\n CREX_READMODEL_CACHE_ORGANIZATION_TAG,\r\n ],\r\n};\r\n\r\n/**\r\n * Resolves effective cache tags for the requested external segments.\r\n * Unknown segment strings are ignored.\r\n */\r\nexport const resolveCacheTagsForSegments = (segments: string[]): string[] => {\r\n const resolved = new Set<string>();\r\n\r\n for (const rawSegment of segments) {\r\n const normalized = rawSegment.trim().toLowerCase() as CrexCacheSegment;\r\n const mappedTags = CREX_CACHE_SEGMENT_TO_TAGS[normalized];\r\n if (!mappedTags) continue;\r\n mappedTags.forEach((tag) => resolved.add(tag));\r\n }\r\n\r\n return Array.from(resolved);\r\n};\r\n\r\n/**\r\n * Returns the canonical list of supported external cache segments.\r\n */\r\nexport const getSupportedCacheSegments = (): CrexCacheSegment[] => [\r\n CREX_CACHE_SEGMENT_ALL,\r\n CREX_CACHE_SEGMENT_METADATA,\r\n CREX_CACHE_SEGMENT_VCARD,\r\n CREX_CACHE_SEGMENT_REQUESTS,\r\n];\r\n\r\nexport class CacheClearAuthUnauthorizedError extends Error {\r\n constructor(message: string) {\r\n super(message);\r\n this.name = \"CacheClearAuthUnauthorizedError\";\r\n }\r\n}\r\n\r\nexport class CacheClearAuthConfigurationError extends Error {\r\n constructor(message: string) {\r\n super(message);\r\n this.name = \"CacheClearAuthConfigurationError\";\r\n }\r\n}\r\n\r\nconst CACHE_CLEAR_JWT_DISCOVERY_PATH = \"/.well-known/openid-configuration\";\r\nconst cacheClearIssuerDiscoveryCache = new Map<string, Promise<{ jwksUri: string }>>();\r\nconst cacheClearIssuerJwksCache = new Map<string, ReturnType<typeof createRemoteJWKSet>>();\r\n\r\nconst trimTrailingSlashes = (value: string): string => value.replace(/\\/+$/, \"\");\r\n\r\nconst normalizeIssuerForClaimValidation = (rawIssuer: string): string => {\r\n const trimmed = rawIssuer.trim();\r\n if (!trimmed) return \"\";\r\n const normalized = trimTrailingSlashes(trimmed);\r\n const lowered = normalized.toLowerCase();\r\n const loweredSuffix = CACHE_CLEAR_JWT_DISCOVERY_PATH.toLowerCase();\r\n if (lowered.endsWith(loweredSuffix)) {\r\n return normalized.slice(0, normalized.length - CACHE_CLEAR_JWT_DISCOVERY_PATH.length);\r\n }\r\n return normalized;\r\n};\r\n\r\nconst resolveCacheClearJwtConfig = (): { issuer: string; audience: string } => {\r\n const sdk = new CrexSDK();\r\n let configIssuer = \"\";\r\n let configAudience = \"\";\r\n try {\r\n const serverConfig = sdk.getServerConfig();\r\n configIssuer = serverConfig.OIDC.user.issuer || serverConfig.OIDC.client.issuer || \"\";\r\n configAudience = serverConfig.OIDC.user.id || serverConfig.OIDC.client.id || \"\";\r\n } catch {\r\n // Server config may not be initialized in route-first execution paths.\r\n }\r\n\r\n const issuer = normalizeIssuerForClaimValidation(\r\n process.env.CREX_CACHE_CLEAR_JWT_ISSUER ||\r\n process.env.OIDC_ISSUER ||\r\n configIssuer\r\n );\r\n const audience = (\r\n process.env.CREX_CACHE_CLEAR_JWT_AUDIENCE ||\r\n process.env.CREX_IDS_CLIENT_ID ||\r\n configAudience\r\n ).trim();\r\n\r\n if (!issuer || !audience) {\r\n throw new CacheClearAuthConfigurationError(\r\n \"JWT validation is not configured. Set OIDC_ISSUER and CREX_IDS_CLIENT_ID (or explicit cache-clear overrides).\"\r\n );\r\n }\r\n\r\n return { issuer, audience };\r\n};\r\n\r\nconst getCacheClearIssuerJwksUri = async (issuer: string): Promise<string> => {\r\n const cached = cacheClearIssuerDiscoveryCache.get(issuer);\r\n if (cached) return (await cached).jwksUri;\r\n\r\n const discoveryPromise = (async () => {\r\n const response = await fetch(`${issuer}${CACHE_CLEAR_JWT_DISCOVERY_PATH}`, {\r\n cache: \"no-store\",\r\n });\r\n if (!response.ok) {\r\n throw new CacheClearAuthConfigurationError(\r\n `OIDC discovery failed for cache-clear authorization: HTTP ${response.status}`\r\n );\r\n }\r\n const payload = (await response.json()) as { jwks_uri?: string };\r\n const jwksUri = payload.jwks_uri?.trim();\r\n if (!jwksUri) {\r\n throw new CacheClearAuthConfigurationError(\r\n \"OIDC discovery payload for cache-clear authorization has no jwks_uri\"\r\n );\r\n }\r\n return { jwksUri };\r\n })();\r\n\r\n cacheClearIssuerDiscoveryCache.set(issuer, discoveryPromise);\r\n try {\r\n return (await discoveryPromise).jwksUri;\r\n } catch (error) {\r\n cacheClearIssuerDiscoveryCache.delete(issuer);\r\n throw error;\r\n }\r\n};\r\n\r\nconst getCacheClearIssuerJwks = async (issuer: string) => {\r\n const cached = cacheClearIssuerJwksCache.get(issuer);\r\n if (cached) return cached;\r\n\r\n const jwksUri = await getCacheClearIssuerJwksUri(issuer);\r\n const jwks = createRemoteJWKSet(new URL(jwksUri));\r\n cacheClearIssuerJwksCache.set(issuer, jwks);\r\n return jwks;\r\n};\r\n\r\nexport const verifyCacheClearBearerToken = async (token: string): Promise<JWTPayload> => {\r\n if (!token) {\r\n throw new CacheClearAuthUnauthorizedError(\"missing bearer token\");\r\n }\r\n\r\n const { issuer, audience } = resolveCacheClearJwtConfig();\r\n const jwks = await getCacheClearIssuerJwks(issuer);\r\n\r\n try {\r\n const verified = await jwtVerify(token, jwks, {\r\n issuer,\r\n audience,\r\n });\r\n return verified.payload;\r\n } catch (error) {\r\n if (error instanceof joseErrors.JWTInvalid || error instanceof joseErrors.JOSEError) {\r\n throw new CacheClearAuthUnauthorizedError(\r\n error.message || \"invalid jwt\"\r\n );\r\n }\r\n throw error;\r\n }\r\n};\r\n\r\nexport const extractScopesFromJwtPayload = (payload: Record<string, unknown> | JWTPayload | null): string[] => {\r\n if (!payload) return [];\r\n\r\n const rawValues = [payload.scope, payload[\"crex-scope\"], payload.crex_scope];\r\n const scopes: string[] = [];\r\n\r\n for (const rawValue of rawValues) {\r\n if (typeof rawValue === \"string\") {\r\n scopes.push(...rawValue.split(/\\s+/).filter(Boolean));\r\n continue;\r\n }\r\n if (Array.isArray(rawValue)) {\r\n scopes.push(\r\n ...rawValue.filter((item): item is string => typeof item === \"string\" && item.trim().length > 0)\r\n );\r\n }\r\n }\r\n\r\n return Array.from(new Set(scopes));\r\n};\r\n\r\ntype CacheClearPayload = {\r\n segments?: string[];\r\n keys?: string[];\r\n};\r\n\r\nconst CACHE_CLEAR_ALLOWED_ADMIN_SCOPE = \"crex_sysadmin\";\r\n\r\nexport const handleCacheClearPostRequest = async (req: NextRequest): Promise<NextResponse> => {\r\n const traceId = req.headers.get(\"x-request-id\") || req.headers.get(\"x-correlation-id\") || \"n/a\";\r\n const authHeader = req.headers.get(\"authorization\") || \"\";\r\n const bearerToken = authHeader.startsWith(\"Bearer \") ? authHeader.slice(\"Bearer \".length).trim() : \"\";\r\n\r\n let scopes: string[] = [];\r\n try {\r\n const jwtPayload = await verifyCacheClearBearerToken(bearerToken);\r\n scopes = extractScopesFromJwtPayload(jwtPayload);\r\n } catch (error) {\r\n if (error instanceof CacheClearAuthUnauthorizedError) {\r\n console.warn(\"[cache-clear] unauthorized-invalid-jwt\", {\r\n traceId,\r\n reason: error instanceof Error ? error.message : \"jwt validation failed\",\r\n });\r\n return NextResponse.json({ error: \"unauthorized\" }, { status: 401 });\r\n }\r\n\r\n if (error instanceof CacheClearAuthConfigurationError) {\r\n console.error(\"[cache-clear] auth-validation-error\", {\r\n traceId,\r\n reason: error.message,\r\n });\r\n return NextResponse.json({ error: \"cache-clear auth misconfigured\" }, { status: 500 });\r\n }\r\n\r\n console.error(\"[cache-clear] auth-validation-error\", {\r\n traceId,\r\n reason: error instanceof Error ? error.message : \"unknown error\",\r\n });\r\n return NextResponse.json({ error: \"internal error\" }, { status: 500 });\r\n }\r\n\r\n if (!scopes.includes(CACHE_CLEAR_ALLOWED_ADMIN_SCOPE)) {\r\n console.warn(\"[cache-clear] forbidden\", {\r\n traceId,\r\n scopeCount: scopes.length,\r\n });\r\n return NextResponse.json({ error: \"forbidden\" }, { status: 403 });\r\n }\r\n\r\n const payload = (await req.json().catch(() => ({}))) as CacheClearPayload;\r\n const requestedSegments = payload.segments || [CREX_CACHE_SEGMENT_ALL];\r\n const tagsToClear = new Set<string>(resolveCacheTagsForSegments(requestedSegments));\r\n\r\n for (const key of payload.keys || []) {\r\n const normalizedKey = key.trim();\r\n if (normalizedKey.length > 0) {\r\n tagsToClear.add(normalizedKey);\r\n }\r\n }\r\n\r\n if (tagsToClear.size === 0) {\r\n console.warn(\"[cache-clear] no-tags\", {\r\n traceId,\r\n requestedSegments,\r\n keyCount: (payload.keys || []).length,\r\n });\r\n return NextResponse.json(\r\n { error: \"no cache segments/keys to clear\" },\r\n { status: 400 }\r\n );\r\n }\r\n\r\n tagsToClear.forEach((tag) => revalidateTag(tag));\r\n clearProcessLocalRequestCaches();\r\n console.info(\"[cache-clear] revalidated\", {\r\n traceId,\r\n requestedSegments,\r\n clearedTagCount: tagsToClear.size,\r\n clearedTags: Array.from(tagsToClear),\r\n });\r\n\r\n return NextResponse.json({\r\n ok: true,\r\n clearedTags: Array.from(tagsToClear),\r\n appliedSegments: requestedSegments,\r\n supportedSegments: getSupportedCacheSegments(),\r\n });\r\n};\r\n\r\nconst DEBUG_TIMINGS = process.env.CREX_DEBUG_TIMINGS === \"true\";\r\nconst DISABLE_FETCH_CACHE = process.env.CREX_DISABLE_FETCH_CACHE === \"true\";\r\nconst TIMING_LOG_FILE = process.env.CREX_TIMING_LOG_FILE;\r\nconst DEFAULT_REQUESTS_REVALIDATE_SECONDS = 15 * 60;\r\nconst DEFAULT_VCARD_REVALIDATE_SECONDS = 6 * 60 * 60;\r\n\r\nconst readPositiveInt = (rawValue: string | undefined, fallback: number): number => {\r\n const parsed = Number(rawValue);\r\n if (!Number.isFinite(parsed) || parsed <= 0) return fallback;\r\n return Math.floor(parsed);\r\n};\r\n\r\nconst REQUESTS_REVALIDATE_SECONDS = readPositiveInt(\r\n process.env.CREX_CACHE_REVALIDATE_REQUESTS_SECONDS,\r\n DEFAULT_REQUESTS_REVALIDATE_SECONDS\r\n);\r\nconst VCARD_REVALIDATE_SECONDS = readPositiveInt(\r\n process.env.CREX_CACHE_REVALIDATE_VCARD_SECONDS,\r\n DEFAULT_VCARD_REVALIDATE_SECONDS\r\n);\r\n\r\n/**\r\n * Process-local OIDC token cache entry.\r\n * `expiresAtEpochSeconds` is the absolute UNIX timestamp from the token endpoint.\r\n */\r\ntype CachedOidcToken = {\r\n token: string;\r\n expiresAtEpochSeconds: number;\r\n};\r\n\r\n// Reused between requests in the same Node.js process.\r\n// Note: this is the OIDC client-credentials token cache (single process-wide token),\r\n// not a per-end-user session cache.\r\nlet cachedOidcToken: CachedOidcToken | null = null;\r\n// Ensures concurrent requests share one token refresh call instead of N parallel calls.\r\nlet inFlightOidcTokenPromise: Promise<CachedOidcToken | null> | null = null;\r\n// Safety window: refresh slightly before the real `exp` timestamp to avoid edge-expiry races.\r\nconst OIDC_TOKEN_EXPIRY_SAFETY_SECONDS = 30;\r\n\r\nconst getCacheTagsForUrl = (url: string): string[] => {\r\n const normalized = url.toLowerCase();\r\n const tags = [CREX_API_CACHE_TAG];\r\n\r\n if (normalized.includes(\"/vcard/v1/\")) {\r\n tags.push(CREX_API_CACHE_VCARD_TAG);\r\n }\r\n\r\n return tags;\r\n};\r\n\r\n// Collapses concurrent identical GET requests (same URL + auth context)\r\n// so only one outbound IDS call is executed while others await the same promise.\r\nconst INFLIGHT_GET_REQUESTS = new Map<string, Promise<unknown>>();\r\n\r\n/**\r\n * Optional short-lived in-process GET micro-cache.\r\n * Purpose: avoid repeated sequential round-trips for identical requests during fast UI navigation\r\n * (for example page-to-page TOC clicks that trigger the same metadata lookup repeatedly).\r\n *\r\n * This is intentionally tiny and time-based; central tag invalidation remains authoritative.\r\n */\r\nconst GET_MICROCACHE_TTL_MS = readPositiveInt(\r\n process.env.CREX_GET_MICROCACHE_TTL_MS,\r\n 10_000\r\n);\r\nconst GET_MICROCACHE_MAX_ENTRIES = readPositiveInt(\r\n process.env.CREX_GET_MICROCACHE_MAX_ENTRIES,\r\n 1_000\r\n);\r\nconst GET_MICROCACHE_PRUNE_INTERVAL_MS = readPositiveInt(\r\n process.env.CREX_GET_MICROCACHE_PRUNE_INTERVAL_MS,\r\n 30_000\r\n);\r\nconst GET_MICROCACHE_METRICS_EVERY_N_EVENTS = readPositiveInt(\r\n process.env.CREX_GET_MICROCACHE_METRICS_EVERY_N_EVENTS,\r\n 250\r\n);\r\n\r\ntype GetMicrocacheEntry = {\r\n expiresAtEpochMs: number;\r\n value: unknown;\r\n lastAccessEpochMs: number;\r\n};\r\n\r\nconst GET_RESPONSE_MICROCACHE = new Map<string, GetMicrocacheEntry>();\r\nlet getMicrocacheLastPruneEpochMs = 0;\r\nconst getMicrocacheStats = {\r\n hits: 0,\r\n misses: 0,\r\n sets: 0,\r\n expiredPruned: 0,\r\n lruEvicted: 0,\r\n events: 0,\r\n};\r\n\r\n/**\r\n * Clears process-local request caches.\r\n * Used by explicit cache invalidation endpoints so short-lived in-memory caches\r\n * do not serve stale results right after tag revalidation.\r\n */\r\nexport const clearProcessLocalRequestCaches = () => {\r\n INFLIGHT_GET_REQUESTS.clear();\r\n GET_RESPONSE_MICROCACHE.clear();\r\n getMicrocacheLastPruneEpochMs = 0;\r\n getMicrocacheStats.hits = 0;\r\n getMicrocacheStats.misses = 0;\r\n getMicrocacheStats.sets = 0;\r\n getMicrocacheStats.expiredPruned = 0;\r\n getMicrocacheStats.lruEvicted = 0;\r\n getMicrocacheStats.events = 0;\r\n};\r\n\r\nconst maybePruneExpiredMicrocacheEntries = (nowEpochMs: number) => {\r\n if (nowEpochMs - getMicrocacheLastPruneEpochMs < GET_MICROCACHE_PRUNE_INTERVAL_MS) return;\r\n getMicrocacheLastPruneEpochMs = nowEpochMs;\r\n\r\n for (const [key, entry] of GET_RESPONSE_MICROCACHE.entries()) {\r\n if (entry.expiresAtEpochMs <= nowEpochMs) {\r\n GET_RESPONSE_MICROCACHE.delete(key);\r\n getMicrocacheStats.expiredPruned += 1;\r\n }\r\n }\r\n};\r\n\r\nconst enforceMicrocacheMaxSize = () => {\r\n while (GET_RESPONSE_MICROCACHE.size > GET_MICROCACHE_MAX_ENTRIES) {\r\n const oldestKey = GET_RESPONSE_MICROCACHE.keys().next().value as string | undefined;\r\n if (!oldestKey) return;\r\n GET_RESPONSE_MICROCACHE.delete(oldestKey);\r\n getMicrocacheStats.lruEvicted += 1;\r\n }\r\n};\r\n\r\nconst cloneForMicrocache = <T,>(value: T): T => {\r\n try {\r\n if (typeof structuredClone === \"function\") {\r\n return structuredClone(value);\r\n }\r\n } catch {\r\n // fall through to JSON clone\r\n }\r\n\r\n return JSON.parse(JSON.stringify(value)) as T;\r\n};\r\n\r\n/**\r\n * Interface for API call parameters.\r\n */\r\ninterface CallParams {\r\n url: string;\r\n method: HttpMethod;\r\n body?: any;\r\n headers?: Record<string, string>;\r\n params?: Record<string, ParamValue>;\r\n skipCookieTokenLookup?: boolean;\r\n authToken?: string;\r\n}\r\n\r\ntype NextRequestInit = RequestInit & {\r\n next?: {\r\n tags?: string[];\r\n revalidate?: number;\r\n };\r\n};\r\n\r\nconst GET_RETRY_ATTEMPTS = readPositiveInt(\r\n process.env.CREX_GET_RETRY_ATTEMPTS,\r\n 2\r\n);\r\n\r\nconst GET_RETRY_DELAY_MS = readPositiveInt(\r\n process.env.CREX_GET_RETRY_DELAY_MS,\r\n 150\r\n);\r\n\r\nconst sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));\r\n\r\nconst extractNodeErrorCodes = (error: unknown): string[] => {\r\n const maybeError = error as {\r\n code?: string;\r\n cause?: {\r\n code?: string;\r\n errors?: Array<{ code?: string }>;\r\n };\r\n };\r\n\r\n const codes = new Set<string>();\r\n if (maybeError?.code) codes.add(maybeError.code);\r\n if (maybeError?.cause?.code) codes.add(maybeError.cause.code);\r\n if (Array.isArray(maybeError?.cause?.errors)) {\r\n maybeError.cause.errors.forEach((inner) => {\r\n if (inner?.code) codes.add(inner.code);\r\n });\r\n }\r\n return Array.from(codes);\r\n};\r\n\r\nconst isTransientNetworkFetchError = (error: unknown): boolean => {\r\n const codes = extractNodeErrorCodes(error);\r\n return codes.some((code) => code === \"ETIMEDOUT\" || code === \"ENETUNREACH\" || code === \"ECONNRESET\");\r\n};\r\n\r\n/**\r\n * API client class for the CREX application.\r\n * Handles API requests with caching, authentication, and retry logic.\r\n */\r\nexport class CrexApi {\r\n private customerConfig!: ConfigInterface;\r\n private baseUrl!: string;\r\n private logger!: CrexLogger;\r\n\r\n private debugTiming(message: string) {\r\n if (!DEBUG_TIMINGS) return;\r\n const line = `[CrexApi][Timing] ${message}`;\r\n if (TIMING_LOG_FILE) {\r\n try {\r\n mkdirSync(dirname(TIMING_LOG_FILE), { recursive: true });\r\n appendFileSync(TIMING_LOG_FILE, `${new Date().toISOString()} ${line}\\n`, \"utf8\");\r\n } catch {\r\n console.info(line);\r\n }\r\n return;\r\n }\r\n console.info(line);\r\n }\r\n\r\n private resolveLogCategory(url: string): LogCategoriesType {\r\n const normalized = url.toLowerCase();\r\n\r\n if (normalized.includes(\"/search\")) return \"Search\";\r\n if (normalized.includes(\"/notification\")) return \"Notification\";\r\n if (normalized.includes(\"/history\")) return \"History\";\r\n if (normalized.includes(\"/vcard/\")) return \"UserProfile\";\r\n\r\n if (\r\n normalized.includes(\"/informationunits\") ||\r\n normalized.includes(\"/documents\") ||\r\n normalized.includes(\"/topics\") ||\r\n normalized.includes(\"/fragments\") ||\r\n normalized.includes(\"/packages\")\r\n ) {\r\n return \"Document\";\r\n }\r\n\r\n return \"Scenario\";\r\n }\r\n\r\n /**\r\n * Initializes the API client if it hasn't been initialized yet.\r\n * Loads customer configuration and initializes the logger.\r\n * \r\n * @private\r\n */\r\n private async initAPI() {\r\n this.logger = new CrexLogger();\r\n\r\n if (!this.customerConfig) {\r\n const sdk = new CrexSDK();\r\n this.customerConfig = sdk.getServerConfig();\r\n }\r\n\r\n if (!this.baseUrl) {\r\n if (this.customerConfig.baseUrl.length === 0) {\r\n throw new Error(\"CrexAPI.initAPI error: baseUrl is undefined\");\r\n }\r\n\r\n this.baseUrl = this.customerConfig.baseUrl;\r\n }\r\n }\r\n\r\n private async manageToken(options?: { skipCookieTokenLookup?: boolean; authToken?: string }) {\r\n // Reuse OIDC client-credentials token across requests until shortly before expiry.\r\n const startedAt = Date.now();\r\n try {\r\n if (options?.authToken && options.authToken.trim().length > 0) {\r\n this.debugTiming(`manageToken source=explicit durationMs=${Date.now() - startedAt}`);\r\n return options.authToken;\r\n }\r\n\r\n let token = \"\";\r\n const allowCookieLookup = options?.skipCookieTokenLookup !== true;\r\n let hasToken: { value?: string } | undefined;\r\n\r\n if (allowCookieLookup) {\r\n try {\r\n hasToken = cookies().get(CREX_TOKEN_HEADER_KEY);\r\n } catch {\r\n hasToken = undefined;\r\n }\r\n }\r\n\r\n if (hasToken == undefined || hasToken.value === null) {\r\n const nowSeconds = Math.floor(Date.now() / 1000);\r\n const isCachedTokenValid = Boolean(\r\n cachedOidcToken?.token &&\r\n cachedOidcToken.expiresAtEpochSeconds > (nowSeconds + OIDC_TOKEN_EXPIRY_SAFETY_SECONDS)\r\n );\r\n\r\n if (isCachedTokenValid && cachedOidcToken) {\r\n token = cachedOidcToken.token;\r\n } else {\r\n if (!inFlightOidcTokenPromise) {\r\n inFlightOidcTokenPromise = (async () => {\r\n const { token: tokenResult, expiresAt } = await getToken();\r\n if (!tokenResult || tokenResult.length === 0 || !expiresAt) {\r\n return null;\r\n }\r\n return {\r\n token: tokenResult,\r\n expiresAtEpochSeconds: expiresAt,\r\n };\r\n })().finally(() => {\r\n inFlightOidcTokenPromise = null;\r\n });\r\n }\r\n\r\n const resolvedToken = await inFlightOidcTokenPromise;\r\n if (!resolvedToken?.token) throw new Error(\"Token is undefined\");\r\n\r\n cachedOidcToken = resolvedToken;\r\n token = resolvedToken.token;\r\n }\r\n this.debugTiming(`manageToken source=oidc durationMs=${Date.now() - startedAt}`);\r\n } else {\r\n token = hasToken.value || \"\";\r\n if (token.length === 0) throw new Error(\"Token is undefined\");\r\n this.debugTiming(`manageToken source=cookie durationMs=${Date.now() - startedAt}`);\r\n }\r\n\r\n return token;\r\n } catch (error) {\r\n this.debugTiming(`manageToken source=error durationMs=${Date.now() - startedAt}`);\r\n this.logger.log({\r\n level: \"error\",\r\n category: \"Scenario\",\r\n message: `CrexAPI.manageToken error: ${error}`\r\n });\r\n\r\n throw error\r\n }\r\n }\r\n\r\n /**\r\n * Builds the full URL with query parameters.\r\n * Handles arrays by adding repeated parameters (e.g., fields=1&fields=2).\r\n * \r\n * @param url - The endpoint URL\r\n * @param params - Optional query parameters (supports arrays)\r\n * @returns The full URL with query string\r\n */\r\n private buildUrl(url: string, params?: Record<string, ParamValue>): string {\r\n const normalizedUrl = url.replace(/^\\/+/, \"\");\r\n const isAbsoluteUrl = /^https?:\\/\\//i.test(normalizedUrl);\r\n const apiRoot = this.getApiRootUrl();\r\n const shouldResolveAgainstApiRoot = AREA_PREFIX_PATTERN.test(normalizedUrl);\r\n const fullUrl = isAbsoluteUrl\r\n ? new URL(normalizedUrl)\r\n : new URL(normalizedUrl, shouldResolveAgainstApiRoot ? apiRoot : this.baseUrl);\r\n\r\n if (params) {\r\n Object.entries(params).forEach(([key, value]) => {\r\n if (value !== undefined) {\r\n if (Array.isArray(value)) {\r\n value.forEach(v => fullUrl.searchParams.append(key, String(v)));\r\n } else {\r\n fullUrl.searchParams.append(key, String(value));\r\n }\r\n }\r\n });\r\n }\r\n\r\n return fullUrl.toString();\r\n }\r\n\r\n private getApiRootUrl(): string {\r\n const parsed = new URL(this.baseUrl);\r\n const marker = \"/ids/api/\";\r\n const markerIndex = parsed.pathname.toLowerCase().indexOf(marker);\r\n if (markerIndex < 0) {\r\n return this.baseUrl;\r\n }\r\n\r\n const apiRootPath = parsed.pathname.slice(0, markerIndex + marker.length);\r\n return `${parsed.origin}${apiRootPath}`;\r\n }\r\n\r\n /**\r\n * Executes an API request with caching, authentication, and retry logic.\r\n * \r\n * @param options - Request options\r\n * @param options.url - The URL to request\r\n * @param options.method - The HTTP method to use\r\n * @param options.params - Optional query parameters\r\n * @param options.body - Optional request body\r\n * @param options.headers - Optional request headers\r\n * @returns The response data\r\n * @throws Error if the request fails after maximum retries\r\n */\r\n async execute<T>({\r\n url,\r\n method,\r\n params,\r\n body,\r\n headers = {},\r\n skipCookieTokenLookup,\r\n authToken,\r\n }: CallParams): Promise<T> {\r\n const startedAt = Date.now();\r\n const normalizedMethod = method.toUpperCase() as HttpMethod;\r\n try {\r\n await this.initAPI();\r\n\r\n const requestHeaders: Record<string, string> = {\r\n \"Content-Type\": \"application/json\",\r\n ...headers,\r\n };\r\n\r\n if (this.customerConfig.OIDC.client.enabled) {\r\n const token = await this.manageToken({ skipCookieTokenLookup, authToken });\r\n requestHeaders[\"Authorization\"] = `Bearer ${token}`;\r\n }\r\n\r\n const fullUrl = this.buildUrl(url, params);\r\n const category = this.resolveLogCategory(fullUrl);\r\n const requestInit: NextRequestInit = {\r\n method: normalizedMethod,\r\n headers: requestHeaders,\r\n body: body ? JSON.stringify(body) : undefined,\r\n };\r\n if (DISABLE_FETCH_CACHE) {\r\n requestInit.cache = \"no-store\";\r\n } else {\r\n const cacheTags = getCacheTagsForUrl(fullUrl);\r\n const revalidateSeconds = fullUrl.toLowerCase().includes(\"/vcard/v1/\")\r\n ? VCARD_REVALIDATE_SECONDS\r\n : REQUESTS_REVALIDATE_SECONDS;\r\n requestInit.cache = \"force-cache\";\r\n requestInit.next = {\r\n tags: cacheTags,\r\n revalidate: revalidateSeconds,\r\n };\r\n }\r\n const executeRequest = async (): Promise<T> => {\r\n const maxAttempts = normalizedMethod === \"GET\"\r\n ? Math.max(1, GET_RETRY_ATTEMPTS)\r\n : 1;\r\n let lastError: unknown = undefined;\r\n\r\n for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {\r\n try {\r\n this.debugTiming(`execute start method=${normalizedMethod} url=${fullUrl} attempt=${attempt}/${maxAttempts}`);\r\n const response = await fetch(fullUrl, requestInit);\r\n\r\n if (!response.ok) {\r\n const responseText = await response.clone().text().catch(() => \"\");\r\n this.logger.log({\r\n level: \"error\",\r\n category,\r\n message: `CrexAPI.execute error: ${fullUrl} - HTTP ${response.status}${responseText ? ` - ${responseText.slice(0, 300)}` : \"\"}`\r\n });\r\n console.error(`[CrexApi] Request failed: ${response.status} ${response.statusText} - ${fullUrl}`);\r\n throw new Error(`HTTP error! status: ${response.status}`);\r\n }\r\n\r\n this.logger.log({\r\n level: \"debug\",\r\n category,\r\n message: `CrexAPI.execute success: ${fullUrl}`\r\n });\r\n this.debugTiming(`execute success method=${normalizedMethod} url=${fullUrl} status=${response.status} durationMs=${Date.now() - startedAt} attempt=${attempt}/${maxAttempts}`);\r\n\r\n return await response.json() as T;\r\n } catch (error) {\r\n lastError = error;\r\n if (\r\n normalizedMethod !== \"GET\" ||\r\n attempt >= maxAttempts ||\r\n !isTransientNetworkFetchError(error)\r\n ) {\r\n throw error;\r\n }\r\n const delay = GET_RETRY_DELAY_MS * attempt;\r\n this.logger.log({\r\n level: \"info\",\r\n category,\r\n message: `CrexAPI.execute retrying transient GET error: ${fullUrl} attempt=${attempt}/${maxAttempts} delayMs=${delay}`\r\n });\r\n await sleep(delay);\r\n }\r\n }\r\n\r\n throw lastError instanceof Error ? lastError : new Error(\"Request failed\");\r\n };\r\n\r\n const canDedupe = normalizedMethod === \"GET\";\r\n const dedupeKey = canDedupe\r\n ? `${normalizedMethod}:${fullUrl}:${requestHeaders[\"Authorization\"] || \"\"}`\r\n : undefined;\r\n\r\n if (canDedupe && dedupeKey) {\r\n const nowEpochMs = Date.now();\r\n maybePruneExpiredMicrocacheEntries(nowEpochMs);\r\n\r\n const microCached = GET_RESPONSE_MICROCACHE.get(dedupeKey);\r\n if (microCached && microCached.expiresAtEpochMs > nowEpochMs) {\r\n // LRU \"touch\": move key to map tail and update access timestamp.\r\n microCached.lastAccessEpochMs = nowEpochMs;\r\n GET_RESPONSE_MICROCACHE.delete(dedupeKey);\r\n GET_RESPONSE_MICROCACHE.set(dedupeKey, microCached);\r\n getMicrocacheStats.hits += 1;\r\n getMicrocacheStats.events += 1;\r\n if (getMicrocacheStats.events % GET_MICROCACHE_METRICS_EVERY_N_EVENTS === 0) {\r\n this.debugTiming(\r\n `microcache stats hits=${getMicrocacheStats.hits} misses=${getMicrocacheStats.misses} sets=${getMicrocacheStats.sets} expiredPruned=${getMicrocacheStats.expiredPruned} lruEvicted=${getMicrocacheStats.lruEvicted} size=${GET_RESPONSE_MICROCACHE.size}`\r\n );\r\n }\r\n this.debugTiming(`execute microcache hit method=${normalizedMethod} url=${fullUrl}`);\r\n return cloneForMicrocache(microCached.value as T);\r\n }\r\n getMicrocacheStats.misses += 1;\r\n getMicrocacheStats.events += 1;\r\n if (getMicrocacheStats.events % GET_MICROCACHE_METRICS_EVERY_N_EVENTS === 0) {\r\n this.debugTiming(\r\n `microcache stats hits=${getMicrocacheStats.hits} misses=${getMicrocacheStats.misses} sets=${getMicrocacheStats.sets} expiredPruned=${getMicrocacheStats.expiredPruned} lruEvicted=${getMicrocacheStats.lruEvicted} size=${GET_RESPONSE_MICROCACHE.size}`\r\n );\r\n }\r\n\r\n const existing = INFLIGHT_GET_REQUESTS.get(dedupeKey) as Promise<T> | undefined;\r\n if (existing) return await existing;\r\n\r\n const inFlight = executeRequest()\r\n .then((result) => {\r\n const writeNowEpochMs = Date.now();\r\n maybePruneExpiredMicrocacheEntries(writeNowEpochMs);\r\n if (GET_RESPONSE_MICROCACHE.has(dedupeKey)) {\r\n GET_RESPONSE_MICROCACHE.delete(dedupeKey);\r\n }\r\n GET_RESPONSE_MICROCACHE.set(dedupeKey, {\r\n expiresAtEpochMs: writeNowEpochMs + GET_MICROCACHE_TTL_MS,\r\n value: cloneForMicrocache(result),\r\n lastAccessEpochMs: writeNowEpochMs,\r\n });\r\n enforceMicrocacheMaxSize();\r\n getMicrocacheStats.sets += 1;\r\n getMicrocacheStats.events += 1;\r\n if (getMicrocacheStats.events % GET_MICROCACHE_METRICS_EVERY_N_EVENTS === 0) {\r\n this.debugTiming(\r\n `microcache stats hits=${getMicrocacheStats.hits} misses=${getMicrocacheStats.misses} sets=${getMicrocacheStats.sets} expiredPruned=${getMicrocacheStats.expiredPruned} lruEvicted=${getMicrocacheStats.lruEvicted} size=${GET_RESPONSE_MICROCACHE.size}`\r\n );\r\n }\r\n return result;\r\n })\r\n .finally(() => {\r\n INFLIGHT_GET_REQUESTS.delete(dedupeKey);\r\n }) as Promise<unknown>;\r\n\r\n INFLIGHT_GET_REQUESTS.set(dedupeKey, inFlight);\r\n return await inFlight as T;\r\n }\r\n\r\n return await executeRequest();\r\n } catch (error) {\r\n this.debugTiming(`execute error method=${normalizedMethod} url=${url} durationMs=${Date.now() - startedAt}`);\r\n this.logger.log({\r\n level: \"error\",\r\n category: this.resolveLogCategory(url),\r\n message: `CrexAPI.execute error: ${error}`\r\n });\r\n throw error;\r\n }\r\n }\r\n}\r\n","import winston from \"winston\";\r\nimport { MatomoTransport } from \"./transports/matomo\";\r\nimport { GraylogTransport } from \"./transports/graylog\";\r\nimport { ConfigInterface } from \"@c-rex/interfaces\";\r\nimport { LogCategoriesType, LogLevelType } from \"@c-rex/types\";\r\nimport { LOG_LEVELS } from \"@c-rex/constants\";\r\nimport { CrexSDK } from \"./sdk\";\r\n\r\n\r\n/**\r\n * Logger class for the CREX application.\r\n * Provides logging functionality with multiple transports (Console, Matomo, Graylog).\r\n */\r\nexport class CrexLogger {\r\n private customerConfig!: ConfigInterface;\r\n public logger!: winston.Logger;\r\n\r\n /**\r\n * Initializes the logger instance if it hasn't been initialized yet.\r\n * Loads customer configuration and creates the logger with appropriate transports.\r\n * \r\n * @private\r\n */\r\n private async initLogger() {\r\n try {\r\n if (!this.customerConfig) {\r\n const sdk = new CrexSDK();\r\n\r\n this.customerConfig = sdk.getServerConfig();\r\n }\r\n if (!this.logger) {\r\n this.logger = this.createLogger();\r\n }\r\n } catch (error) {\r\n console.log(\"Error initializing logger:\", error);\r\n }\r\n }\r\n\r\n /**\r\n * Logs a message with the specified level and optional category.\r\n * \r\n * @param options - Logging options\r\n * @param options.level - The log level (error, warn, info, etc.)\r\n * @param options.message - The message to log\r\n * @param options.category - Optional category for the log message\r\n */\r\n public async log({ level, message, category }: {\r\n level: LogLevelType,\r\n message: string,\r\n category?: LogCategoriesType\r\n }) {\r\n await this.initLogger();\r\n const timestamp = new Date().toISOString();\r\n const newMessage = `[${timestamp}] ${message}`;\r\n this.logger.log({\r\n level,\r\n message: newMessage,\r\n category,\r\n });\r\n }\r\n\r\n /**\r\n * Creates a new Winston logger instance with configured transports.\r\n * \r\n * @private\r\n * @returns A configured Winston logger instance\r\n */\r\n private createLogger() {\r\n return winston.createLogger({\r\n levels: LOG_LEVELS,\r\n transports: [\r\n new winston.transports.Console({\r\n level: this.customerConfig.logs.console.minimumLevel,\r\n silent: this.customerConfig.logs.console.silent,\r\n }),\r\n new MatomoTransport(this.customerConfig),\r\n new GraylogTransport(this.customerConfig),\r\n ],\r\n });\r\n }\r\n}\r\n","import Transport from \"winston-transport\";\r\nimport axios from \"axios\";\r\nimport https from \"https\";\r\nimport { readFileSync } from \"fs\";\r\nimport { LogCategoriesType, LogLevelType } from \"@c-rex/types\";\r\nimport { ALL } from \"@c-rex/constants\";\r\nimport { ConfigInterface } from \"@c-rex/interfaces\";\r\n\r\n/**\r\n * Winston transport for sending logs to Matomo analytics.\r\n * Extends the base Winston transport with Matomo-specific functionality.\r\n */\r\nexport class MatomoTransport extends Transport {\r\n private configs: ConfigInterface;\r\n private endpointUrl: string;\r\n private httpsAgent: https.Agent;\r\n private enabled: boolean;\r\n\r\n /**\r\n * Creates a new instance of MatomoTransport.\r\n * \r\n * @param configs - The application configuration containing logging settings\r\n */\r\n constructor(configs: ConfigInterface) {\r\n super({\r\n level: configs.logs.matomo.minimumLevel,\r\n silent: configs.logs.matomo.silent,\r\n });\r\n\r\n this.configs = configs;\r\n const rawHost = configs.logs.matomo.hostname?.trim();\r\n this.enabled = !!rawHost;\r\n const normalizedHost = rawHost ? rawHost.replace(/^https?:\\/\\//i, \"\") : \"\";\r\n const hasPort = typeof configs.logs.matomo.port === \"number\" && configs.logs.matomo.port > 0;\r\n this.endpointUrl = this.enabled\r\n ? `https://${normalizedHost}${hasPort ? `:${configs.logs.matomo.port}` : \"\"}/matomo.php`\r\n : \"\";\r\n\r\n const rejectUnauthorized = process.env.LOG_MATOMO_TLS_REJECT_UNAUTHORIZED !== \"false\";\r\n const caFile = process.env.LOG_MATOMO_TLS_CA_FILE?.trim();\r\n this.httpsAgent = new https.Agent({\r\n rejectUnauthorized,\r\n ca: caFile ? readFileSync(caFile) : undefined,\r\n });\r\n }\r\n\r\n /**\r\n * Logs a message to Matomo if the message category is included in the configured categories.\r\n * \r\n * @param info - The log information including level, message, and category\r\n * @param callback - Callback function to execute after logging\r\n */\r\n log(\r\n info: { level: LogLevelType, message: string, category: LogCategoriesType },\r\n callback: () => void,\r\n ): void {\r\n const matomoCategory = this.configs.logs.matomo.categoriesLevel\r\n const category = info.category ?? \"Scenario\";\r\n\r\n // Keep logging usable even if call-sites do not set a category yet.\r\n if (!info.category || matomoCategory.includes(info.category) || matomoCategory.includes(ALL)) {\r\n if (!this.enabled) {\r\n callback();\r\n return;\r\n }\r\n const siteId = this.configs.logs.matomo.siteId ?? 1;\r\n const tokenAuth = this.configs.logs.matomo.tokenAuth;\r\n const requestParams = new URLSearchParams({\r\n idsite: String(siteId),\r\n rec: \"1\",\r\n apiv: \"1\",\r\n action_name: info.message,\r\n e_c: category,\r\n e_a: info.level,\r\n e_n: info.message.slice(0, 120),\r\n url: process.env.NEXT_PUBLIC_API_URL || process.env.NEXT_URL || this.configs.baseUrl,\r\n rand: `${Date.now()}`,\r\n cdh: \"0\",\r\n cdm: \"0\",\r\n cds: \"0\",\r\n });\r\n\r\n if (tokenAuth && tokenAuth.trim().length > 0) {\r\n requestParams.append(\"token_auth\", tokenAuth.trim());\r\n }\r\n\r\n void axios.post(this.endpointUrl, requestParams.toString(), {\r\n timeout: 4000,\r\n httpsAgent: this.httpsAgent,\r\n headers: {\r\n \"Content-Type\": \"application/x-www-form-urlencoded\",\r\n },\r\n }).catch((error) => {\r\n const message = error instanceof Error ? error.message : String(error);\r\n // eslint-disable-next-line no-console\r\n console.error(`[MatomoTransport] Failed to post log to ${this.endpointUrl}: ${message}`);\r\n });\r\n\r\n callback();\r\n return;\r\n }\r\n\r\n callback();\r\n }\r\n}\r\n","import Transport from \"winston-transport\";\r\nimport axios from \"axios\";\r\nimport https from \"https\";\r\nimport { readFileSync } from \"fs\";\r\nimport { LogCategoriesType, LogLevelType } from \"@c-rex/types\";\r\nimport { ALL } from \"@c-rex/constants\";\r\nimport { ConfigInterface } from \"@c-rex/interfaces\";\r\n\r\n/**\r\n * Winston transport for sending logs to Graylog.\r\n * Extends the base Winston transport with Graylog-specific functionality.\r\n */\r\nexport class GraylogTransport extends Transport {\r\n private configs: ConfigInterface\r\n private endpointUrl: string;\r\n private httpsAgent: https.Agent;\r\n private readonly levelToSyslog: Record<string, number> = {\r\n critical: 2,\r\n error: 3,\r\n warning: 4,\r\n info: 6,\r\n debug: 7,\r\n };\r\n\r\n private resolveDomain(): string {\r\n return (\r\n process.env.NEXT_PUBLIC_API_URL?.trim() ||\r\n process.env.NEXT_URL?.trim() ||\r\n this.configs.baseUrl\r\n );\r\n }\r\n\r\n /**\r\n * Creates a new instance of GraylogTransport.\r\n * \r\n * @param configs - The application configuration containing logging settings\r\n */\r\n constructor(configs: ConfigInterface) {\r\n if (!configs.logs.graylog.hostname || configs.logs.graylog.port === undefined) {\r\n throw new Error(\"Graylog hostname and port must be defined\");\r\n }\r\n const normalizedHost = configs.logs.graylog.hostname.replace(/^https?:\\/\\//i, \"\");\r\n\r\n super({\r\n level: configs.logs.graylog.minimumLevel,\r\n silent: configs.logs.graylog.silent,\r\n });\r\n\r\n this.configs = configs;\r\n this.endpointUrl = `https://${normalizedHost}:${configs.logs.graylog.port}/gelf`;\r\n const rejectUnauthorized = process.env.LOG_GRAYLOG_TLS_REJECT_UNAUTHORIZED !== \"false\";\r\n const caFile = process.env.LOG_GRAYLOG_TLS_CA_FILE?.trim();\r\n\r\n this.httpsAgent = new https.Agent({\r\n rejectUnauthorized,\r\n ca: caFile ? readFileSync(caFile) : undefined,\r\n });\r\n }\r\n\r\n /**\r\n * Logs a message to Graylog if the message category is included in the configured categories.\r\n * \r\n * @param info - The log information including level, message, and category\r\n * @param callback - Callback function to execute after logging\r\n */\r\n log(\r\n info: { level: LogLevelType, message: string, category: LogCategoriesType },\r\n callback: () => void,\r\n ): void {\r\n const graylogCategory = this.configs.logs.graylog.categoriesLevel\r\n\r\n // Keep logging usable even if call-sites do not set a category yet.\r\n if (!info.category || graylogCategory.includes(info.category) || graylogCategory.includes(ALL)) {\r\n const timestamp = new Date();\r\n const level = String(info.level).toLowerCase();\r\n const syslogLevel = this.levelToSyslog[level] ?? 6;\r\n const category = info.category ?? \"Scenario\";\r\n\r\n void axios.post(this.endpointUrl, {\r\n // GELF-compatible core fields\r\n version: \"1.1\",\r\n host: this.configs.logs.graylog.app,\r\n short_message: info.message,\r\n full_message: info.message,\r\n timestamp: timestamp.getTime() / 1000,\r\n level: syslogLevel,\r\n facility: this.configs.logs.graylog.app,\r\n // Legacy/classic compatibility fields\r\n message: info.message,\r\n stringLevel: level,\r\n category,\r\n Application: this.configs.logs.graylog.app,\r\n Domain: this.resolveDomain(),\r\n }, {\r\n timeout: 4000,\r\n httpsAgent: this.httpsAgent,\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n },\r\n }).catch((error) => {\r\n const message = error instanceof Error ? error.message : String(error);\r\n // eslint-disable-next-line no-console\r\n console.error(`[GraylogTransport] Failed to post log to ${this.endpointUrl}: ${message}`);\r\n });\r\n callback();\r\n return;\r\n }\r\n\r\n callback();\r\n }\r\n}\r\n","import { WarningVars } from \"@c-rex/types\";\r\nimport { logInfo, OIDCInterface } from \"@c-rex/interfaces\";\r\nimport { LogLevelType } from \"@c-rex/types\";\r\nimport { LogCategoriesType } from \"@c-rex/types\";\r\n\r\nconst formatIssuer = (issuer: string): string => {\r\n let newIssuer = issuer\r\n const lastChar = newIssuer.charAt(newIssuer.length - 1)\r\n if (lastChar !== \"/\") {\r\n newIssuer += \"/\"\r\n }\r\n newIssuer += \".well-known/openid-configuration\"\r\n\r\n return newIssuer;\r\n}\r\nexport const formatApiUrl = (apiUrl: string): string => {\r\n let newApiUrl = apiUrl\r\n const lastChar = newApiUrl.charAt(newApiUrl.length - 1)\r\n if (lastChar !== \"/\") {\r\n newApiUrl += \"/\"\r\n }\r\n if (!newApiUrl.includes(\"iirds/v1/\")) {\r\n newApiUrl += \"iirds/v1/\"\r\n }\r\n\r\n return newApiUrl;\r\n}\r\n\r\nexport const mergeConfigs = <T>(defaultConfig: Partial<T>, envVars: Partial<T>): T => {\r\n const definedEnvVars: T = {} as T;\r\n\r\n for (const key in envVars) {\r\n if (envVars[key] !== undefined) {\r\n definedEnvVars[key] = envVars[key];\r\n }\r\n }\r\n\r\n return {\r\n ...defaultConfig,\r\n ...definedEnvVars,\r\n };\r\n}\r\n\r\nexport const generateWarnings = (vars: WarningVars[]): string[] => {\r\n\r\n const warnings: string[] = []\r\n\r\n vars.forEach((variable) => {\r\n const value = process.env[variable.key];\r\n if (value === undefined) {\r\n warnings.push(`Missing environment variable ${variable.key}, using default value: ${variable.default}`)\r\n }\r\n })\r\n\r\n return warnings;\r\n}\r\n\r\nconst normalizeGraylogHostname = (rawHostname: string | undefined): string | undefined => {\r\n if (!rawHostname) return undefined;\r\n const trimmed = rawHostname.trim();\r\n if (trimmed.length === 0) return undefined;\r\n\r\n // winston-graylog2 expects a plain host value, not a URL with scheme/path.\r\n if (trimmed.includes(\"://\")) {\r\n try {\r\n return new URL(trimmed).hostname;\r\n } catch {\r\n return trimmed;\r\n }\r\n }\r\n\r\n // If someone passes host:port in LOG_GRAYLOG_HOSTNAME, keep only the host part.\r\n const firstColon = trimmed.indexOf(\":\");\r\n if (firstColon > -1 && !trimmed.includes(\"]\")) {\r\n return trimmed.slice(0, firstColon);\r\n }\r\n\r\n return trimmed;\r\n}\r\n\r\nexport const createUserOIDCConfig = (): { user: OIDCInterface, warnings: string[] } => {\r\n const warnings: string[] = []\r\n const userDefaults: Partial<OIDCInterface> = {\r\n secret: \"dummy\",\r\n scope: \"openid profile crex.ids.api crex.ids.api.public\",\r\n enabled: true,\r\n }\r\n const userEnvs: Partial<OIDCInterface> = {\r\n id: process.env.CREX_IDS_CLIENT_ID,\r\n secret: process.env.CREX_IDS_CLIENT_SECRET,\r\n scope: process.env.CREX_IDS_USER_SCOPES,\r\n issuer: process.env.OIDC_ISSUER == undefined ? undefined : formatIssuer(process.env.OIDC_ISSUER),\r\n enabled: process.env.CREX_IDS_USER_LOGIN_ENABLE == undefined ? undefined : process.env.CREX_IDS_USER_LOGIN_ENABLE == \"true\",\r\n }\r\n const user: OIDCInterface = mergeConfigs<OIDCInterface>(userDefaults, userEnvs);\r\n\r\n if (user.enabled) {\r\n const disableOIDCVars = [\r\n { key: \"CREX_IDS_CLIENT_ID\", value: process.env.CREX_IDS_CLIENT_ID },\r\n { key: \"OIDC_ISSUER\", value: process.env.OIDC_ISSUER },\r\n ]\r\n disableOIDCVars.forEach((variable) => {\r\n if (variable.value === undefined) {\r\n user.enabled = false\r\n\r\n warnings.push(`Missing environment variable ${variable.key}, disabling client and login`)\r\n }\r\n })\r\n\r\n }\r\n\r\n if (user.enabled) {\r\n const userWarningVars = [\r\n { key: \"CREX_IDS_USER_SCOPES\", default: user.scope },\r\n { key: \"CREX_IDS_CLIENT_SECRET\", default: user.secret },\r\n { key: \"CREX_IDS_USER_LOGIN_ENABLE\", default: user.enabled }\r\n ]\r\n const aux = generateWarnings(userWarningVars)\r\n warnings.push(...aux);\r\n }\r\n\r\n return { user, warnings }\r\n}\r\n\r\nexport const createClientOIDCConfig = (): { client: OIDCInterface, warnings: string[] } => {\r\n const warnings: string[] = []\r\n const clientDefault: Partial<OIDCInterface> = {\r\n secret: \"dummy\",\r\n enabled: true,\r\n }\r\n const clientEnvs: Partial<OIDCInterface> = {\r\n id: process.env.CREX_IDS_CLIENT_ID,\r\n issuer: process.env.OIDC_ISSUER == undefined ? undefined : formatIssuer(process.env.OIDC_ISSUER),\r\n secret: process.env.CREX_IDS_CLIENT_SECRET,\r\n enabled: process.env.CREX_IDS_CLIENT_LOGIN_ENABLE == undefined ? undefined : process.env.CREX_IDS_CLIENT_LOGIN_ENABLE == \"true\",\r\n }\r\n const client: OIDCInterface = mergeConfigs<OIDCInterface>(clientDefault, clientEnvs);\r\n\r\n if (client.enabled) {\r\n const disableOIDCVars = [\r\n { key: \"CREX_IDS_CLIENT_ID\", value: process.env.CREX_IDS_CLIENT_ID },\r\n { key: \"OIDC_ISSUER\", value: process.env.OIDC_ISSUER },\r\n ]\r\n disableOIDCVars.forEach((variable) => {\r\n if (variable.value === undefined) {\r\n client.enabled = false\r\n warnings.push(`Missing environment variable ${variable.key}, disabling client and login`)\r\n }\r\n })\r\n }\r\n\r\n if (client.enabled) {\r\n const clientWarningVars = [\r\n { key: \"CREX_IDS_CLIENT_SECRET\", default: client.secret },\r\n { key: \"CREX_IDS_CLIENT_LOGIN_ENABLE\", default: client.enabled }\r\n ]\r\n\r\n const aux = generateWarnings(clientWarningVars)\r\n warnings.push(...aux);\r\n }\r\n\r\n return { client, warnings }\r\n}\r\n\r\nexport const createConsoleLoggerConfig = (): { consoleLogger: Omit<logInfo, \"hostname\" | \"app\" | \"categoriesLevel\">, warnings: string[]; } => {\r\n const warnings: string[] = []\r\n\r\n const consoleLoggerDefaults: Partial<logInfo> = {\r\n minimumLevel: \"info\" as LogLevelType,\r\n silent: false,\r\n }\r\n const consoleLoggerEnvs: Partial<logInfo> = {\r\n minimumLevel: process.env.LOG_CONSOLE_LEVEL as LogLevelType,\r\n silent: process.env.LOG_CONSOLE_SILENT == undefined ? undefined : process.env.LOG_CONSOLE_SILENT == \"true\",\r\n }\r\n const consoleLogger: logInfo = mergeConfigs<logInfo>(consoleLoggerDefaults, consoleLoggerEnvs);\r\n\r\n if (consoleLogger.silent == false) {\r\n const consoleWarningsVars = [\r\n { key: \"LOG_CONSOLE_SILENT\", default: consoleLogger.silent },\r\n { key: \"LOG_CONSOLE_LEVEL\", default: consoleLogger.minimumLevel }\r\n ]\r\n const aux = generateWarnings(consoleWarningsVars)\r\n warnings.push(...aux);\r\n }\r\n\r\n return {\r\n consoleLogger,\r\n warnings\r\n }\r\n}\r\n\r\nexport const createGraylogLoggerConfig = (projectName: string): { graylog: logInfo, warnings: string[] } => {\r\n const warnings: string[] = []\r\n\r\n const graylogDefaults: Partial<logInfo> = {\r\n app: `NextJs-Project-${projectName}`,\r\n minimumLevel: \"info\" as LogLevelType,\r\n silent: false,\r\n hostname: \"log.c-rex.net\",\r\n port: 12202,\r\n categoriesLevel: [\"NoLicense\", \"Scenario\", \"Document\", \"Search\", \"Notification\", \"History\", \"UserProfile\"],\r\n }\r\n const graylogEnvs: Partial<logInfo> = {\r\n app: process.env.LOG_GRAYLOG_APP_NAME,\r\n silent: process.env.LOG_GRAYLOG_SILENT == undefined ? undefined : process.env.LOG_GRAYLOG_SILENT == \"true\",\r\n hostname: normalizeGraylogHostname(process.env.LOG_GRAYLOG_HOSTNAME),\r\n port: process.env.LOG_GRAYLOG_PORT == undefined ? undefined : Number(process.env.LOG_GRAYLOG_PORT),\r\n minimumLevel: process.env.LOG_GRAYLOG_LEVEL as any,\r\n categoriesLevel: process.env.LOG_GRAYLOG_CATEGORIES == undefined\r\n ? undefined\r\n : process.env.LOG_GRAYLOG_CATEGORIES\r\n .split(\",\")\r\n .map((entry) => entry.trim())\r\n .filter((entry) => entry.length > 0) as LogCategoriesType[],\r\n }\r\n const graylog: logInfo = mergeConfigs<logInfo>(graylogDefaults, graylogEnvs);\r\n\r\n if (graylog.silent == false) {\r\n const graylogWarningVars = [\r\n { key: \"LOG_GRAYLOG_APP_NAME\", default: graylog.app },\r\n { key: \"LOG_GRAYLOG_HOSTNAME\", default: graylog.hostname },\r\n { key: \"LOG_GRAYLOG_LEVEL\", default: graylog.minimumLevel },\r\n { key: \"LOG_GRAYLOG_SILENT\", default: graylog.silent },\r\n { key: \"LOG_GRAYLOG_CATEGORIES\", default: graylog.categoriesLevel },\r\n { key: \"LOG_GRAYLOG_PORT\", default: graylog.port }\r\n ]\r\n const aux = generateWarnings(graylogWarningVars)\r\n warnings.push(...aux);\r\n }\r\n\r\n return {\r\n graylog,\r\n warnings\r\n }\r\n}\r\n\r\nexport const createMatomoLoggerConfig = (projectName: string): { matomo: logInfo, warnings: string[] } => {\r\n const warnings: string[] = []\r\n\r\n const matomoDefaults: Partial<logInfo> = {\r\n app: `NextJs-Project-${projectName}`,\r\n minimumLevel: \"info\" as LogLevelType,\r\n silent: true,\r\n hostname: \"\",\r\n port: 0,\r\n siteId: 1,\r\n tokenAuth: undefined,\r\n categoriesLevel: [\"NoLicense\", \"Scenario\", \"Document\", \"Search\", \"Notification\", \"History\", \"UserProfile\"],\r\n }\r\n const matomoEnvs: Partial<logInfo> = {\r\n app: process.env.LOG_MATOMO_APP_NAME,\r\n silent: process.env.LOG_MATOMO_SILENT == undefined ? undefined : process.env.LOG_MATOMO_SILENT == \"true\",\r\n hostname: normalizeGraylogHostname(process.env.LOG_MATOMO_HOSTNAME),\r\n port: process.env.LOG_MATOMO_PORT == undefined ? undefined : Number(process.env.LOG_MATOMO_PORT),\r\n siteId: process.env.LOG_MATOMO_SITE_ID == undefined ? undefined : Number(process.env.LOG_MATOMO_SITE_ID),\r\n tokenAuth: process.env.LOG_MATOMO_TOKEN_AUTH,\r\n minimumLevel: process.env.LOG_MATOMO_LEVEL as any,\r\n categoriesLevel: process.env.LOG_MATOMO_CATEGORIES == undefined\r\n ? undefined\r\n : process.env.LOG_MATOMO_CATEGORIES\r\n .split(\",\")\r\n .map((entry) => entry.trim())\r\n .filter((entry) => entry.length > 0) as LogCategoriesType[],\r\n }\r\n const matomo: logInfo = mergeConfigs<logInfo>(matomoDefaults, matomoEnvs);\r\n\r\n\r\n const matomoSilentVars = [\r\n { key: \"LOG_MATOMO_SILENT\", value: process.env.LOG_MATOMO_SILENT },\r\n { key: \"LOG_MATOMO_HOSTNAME\", value: process.env.LOG_MATOMO_HOSTNAME },\r\n { key: \"LOG_MATOMO_PORT\", value: process.env.LOG_MATOMO_PORT },\r\n { key: \"LOG_MATOMO_SITE_ID\", value: process.env.LOG_MATOMO_SITE_ID },\r\n ]\r\n matomoSilentVars.forEach((variable) => {\r\n if (variable.value === undefined) {\r\n matomo.silent = true\r\n warnings.push(`Missing environment variable ${variable.key}, setting matomo logger to silent`)\r\n }\r\n })\r\n\r\n if (matomo.silent == false) {\r\n const matomoWarningVars = [\r\n { key: \"LOG_MATOMO_APP_NAME\", default: matomo.app },\r\n { key: \"LOG_MATOMO_LEVEL\", default: matomo.minimumLevel },\r\n { key: \"LOG_MATOMO_CATEGORIES\", default: matomo.categoriesLevel },\r\n ]\r\n const aux = generateWarnings(matomoWarningVars)\r\n warnings.push(...aux);\r\n }\r\n\r\n return {\r\n matomo,\r\n warnings\r\n }\r\n}\r\n\r\n","import { ConfigInterface, CookiesConfigs, CustomerConfig } from \"@c-rex/interfaces\";\r\nimport {\r\n createClientOIDCConfig,\r\n createConsoleLoggerConfig,\r\n createGraylogLoggerConfig,\r\n createMatomoLoggerConfig,\r\n createUserOIDCConfig,\r\n formatApiUrl\r\n} from \"./utils\";\r\nimport { cookies } from \"next/headers\";\r\nimport { SDK_CONFIG_KEY } from \"@c-rex/constants\";\r\n\r\ndeclare global {\r\n // eslint-disable-next-line no-var\r\n var __GLOBAL_CONFIG__: ConfigInterface | null;\r\n}\r\n\r\n/**\r\n * SDK class for the CREX application.\r\n * Provides configuration and authentication functionality.\r\n */\r\nexport class CrexSDK {\r\n public userAuthConfig!: any;\r\n public customerConfig!: ConfigInterface;\r\n public cookiesConfig!: CookiesConfigs;\r\n\r\n public async getUserAuthConfig() {\r\n if (this.userAuthConfig) {\r\n return this.userAuthConfig;\r\n }\r\n\r\n if (!this.customerConfig) {\r\n this.customerConfig = this.getServerConfig()\r\n }\r\n\r\n const user = this.customerConfig.OIDC.user;\r\n const userInfoEndPoint = this.customerConfig.OIDC.issuerMetadata?.userinfo_endpoint;\r\n if (user.enabled) {\r\n this.userAuthConfig = {\r\n providers: [\r\n {\r\n id: \"crex\",\r\n name: \"CREX\",\r\n type: \"oauth\",\r\n version: \"2.0\",\r\n clientId: user.id,\r\n wellKnown: user.issuer,\r\n clientSecret: user.secret,\r\n authorization: {\r\n params: {\r\n scope: user.scope,\r\n prompt: \"login\"\r\n }\r\n },\r\n idToken: true,\r\n checks: [\"pkce\", \"state\"],\r\n async profile(_: any, tokens: any) {\r\n const res = await fetch(userInfoEndPoint, {\r\n headers: {\r\n Authorization: `Bearer ${tokens.access_token}`,\r\n },\r\n });\r\n\r\n const userinfo = await res.json();\r\n\r\n return {\r\n id: userinfo.sub,\r\n name: userinfo.name,\r\n email: userinfo.email,\r\n };\r\n },\r\n callbacks: {\r\n async jwt({ token, account }: any) {\r\n if (account) {\r\n token.id_token = account.id_token;\r\n }\r\n return token;\r\n },\r\n async session({ session, token }: any) {\r\n session.id_token = token.id_token;\r\n return session;\r\n },\r\n },\r\n },\r\n ]\r\n }\r\n };\r\n\r\n return this.userAuthConfig;\r\n }\r\n\r\n public createCustomerConfig(CUSTOMER_CONFIG: CustomerConfig, shouldLog: boolean): { cookiesConfig: CookiesConfigs, config: ConfigInterface } {\r\n\r\n const requiredEnvVars = [\"CREX_IDS_API_URL\", \"NEXT_PUBLIC_API_URL\"]\r\n const required = requiredEnvVars.map(key => {\r\n const value = process.env[key];\r\n if (value === undefined) {\r\n return `Missing required environment variable: ${key}`;\r\n }\r\n\r\n return \"\"\r\n }).filter(item => item.length > 0)\r\n\r\n const { user, warnings: userWarnings } = createUserOIDCConfig()\r\n const { client, warnings: clientWarnings } = createClientOIDCConfig()\r\n const { matomo, warnings: matomoWarnings } = createMatomoLoggerConfig(CUSTOMER_CONFIG.projectName)\r\n const { graylog, warnings: graylogWarnings } = createGraylogLoggerConfig(CUSTOMER_CONFIG.projectName)\r\n const { consoleLogger, warnings: consoleWarnings } = createConsoleLoggerConfig()\r\n\r\n const warnings = required.concat(\r\n consoleWarnings,\r\n clientWarnings,\r\n userWarnings,\r\n graylogWarnings,\r\n matomoWarnings\r\n )\r\n\r\n if (shouldLog) {\r\n if (warnings.length > 0) console.warn(warnings.join('\\n'));\r\n }\r\n\r\n const cookiesConfig: CookiesConfigs = {\r\n publicNextApiUrl: process.env.NEXT_PUBLIC_API_URL!,\r\n ...CUSTOMER_CONFIG,\r\n OIDC: {\r\n clientEnabled: client.enabled,\r\n userEnabled: user.enabled,\r\n },\r\n }\r\n\r\n const config: ConfigInterface = {\r\n baseUrl: process.env.CREX_IDS_API_URL == undefined ? \"\" : formatApiUrl(process.env.CREX_IDS_API_URL),\r\n OIDC: { client, user },\r\n logs: { console: consoleLogger, graylog, matomo, },\r\n ...CUSTOMER_CONFIG,\r\n }\r\n\r\n return { cookiesConfig, config };\r\n }\r\n\r\n public getClientConfig = (): CookiesConfigs => {\r\n const jsonConfigs = cookies().get(SDK_CONFIG_KEY)?.value;\r\n if (!jsonConfigs) {\r\n throw new Error('Configs not found');\r\n }\r\n\r\n const configs: CookiesConfigs = JSON.parse(jsonConfigs);\r\n\r\n return configs;\r\n }\r\n\r\n public getServerConfig() {\r\n if (!global.__GLOBAL_CONFIG__) {\r\n throw new Error('Server config not initialized');\r\n }\r\n return global.__GLOBAL_CONFIG__;\r\n }\r\n\r\n public initializeConfig(config: ConfigInterface) {\r\n if (global.__GLOBAL_CONFIG__) return global.__GLOBAL_CONFIG__;\r\n global.__GLOBAL_CONFIG__ = config;\r\n return global.__GLOBAL_CONFIG__;\r\n }\r\n\r\n public updateConfigProp(key: keyof ConfigInterface, value: any) {\r\n if (!global.__GLOBAL_CONFIG__) {\r\n throw new Error('Server config not initialized');\r\n }\r\n global.__GLOBAL_CONFIG__[key] = value;\r\n return global.__GLOBAL_CONFIG__;\r\n }\r\n}","import { Issuer } from 'openid-client';\r\nimport { CrexLogger } from './logger';\r\nimport { CrexSDK } from './sdk';\r\n\r\n/**\r\n * Retrieves an access token using client credentials flow from the configured OIDC provider\r\n * \r\n * @returns NextResponse with success status or error message\r\n * @throws Error if token retrieval fails\r\n */\r\nexport const getToken = async (): Promise<{ token: string; expiresAt: number; error?: string }> => {\r\n try {\r\n const sdk = new CrexSDK();\r\n const config = sdk.getServerConfig();\r\n const issuer = await Issuer.discover(config.OIDC.client.issuer);\r\n const client = new issuer.Client({\r\n client_id: config.OIDC.client.id,\r\n client_secret: config.OIDC.client.secret,\r\n });\r\n const tokenSet = await client.grant({ grant_type: 'client_credentials' });\r\n\r\n const token = tokenSet.access_token!;\r\n const expiresAt = tokenSet.expires_at!;\r\n\r\n return { token, expiresAt };\r\n\r\n } catch (error) {\r\n const logger = new CrexLogger()\r\n logger.log({\r\n level: \"error\",\r\n message: `getToken error: ${error}`\r\n })\r\n return { token: '', expiresAt: 0, error: JSON.stringify(error) };\r\n\r\n }\r\n}\r\n\r\nexport const getIssuerMetadata = async (): Promise<any> => {\r\n try {\r\n const sdk = new CrexSDK();\r\n const config = sdk.getServerConfig();\r\n const issuer = await Issuer.discover(config.OIDC.client.issuer);\r\n return issuer.metadata;\r\n } catch (error) {\r\n const logger = new CrexLogger()\r\n logger.log({\r\n level: \"error\",\r\n message: `getIssuerMetadata error: ${error}`\r\n })\r\n return null\r\n }\r\n}\r\n"],"mappings":";AASO,IAAM,oCAAoC;AAAA,EAC7C,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,cAAc;AAAA,EACd,UAAU;AAAA,EACV,UAAU;AAAA,EACV,qBAAqB;AAAA,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