@3sixty/data-json-ld 0.0.0-stage → 0.20.0-next.1
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/LICENSE +201 -0
- package/README.md +24 -2
- package/dist/es/compiled/validators.js +3895 -0
- package/dist/es/compiled/validators.js.map +1 -0
- package/dist/es/dataTypes/jsonLdDataTypes.js +170 -0
- package/dist/es/dataTypes/jsonLdDataTypes.js.map +1 -0
- package/dist/es/helpers/jsonLdAliasKey.js +4 -0
- package/dist/es/helpers/jsonLdAliasKey.js.map +1 -0
- package/dist/es/helpers/jsonLdExistingProperty.js +4 -0
- package/dist/es/helpers/jsonLdExistingProperty.js.map +1 -0
- package/dist/es/helpers/jsonLdExistingPropertyEither.js +2 -0
- package/dist/es/helpers/jsonLdExistingPropertyEither.js.map +1 -0
- package/dist/es/helpers/jsonLdKeys.js +4 -0
- package/dist/es/helpers/jsonLdKeys.js.map +1 -0
- package/dist/es/helpers/jsonLdObjectWithAliases.js +2 -0
- package/dist/es/helpers/jsonLdObjectWithAliases.js.map +1 -0
- package/dist/es/helpers/jsonLdObjectWithAtId.js +2 -0
- package/dist/es/helpers/jsonLdObjectWithAtId.js.map +1 -0
- package/dist/es/helpers/jsonLdObjectWithAtType.js +2 -0
- package/dist/es/helpers/jsonLdObjectWithAtType.js.map +1 -0
- package/dist/es/helpers/jsonLdObjectWithContext.js +2 -0
- package/dist/es/helpers/jsonLdObjectWithContext.js.map +1 -0
- package/dist/es/helpers/jsonLdObjectWithId.js +2 -0
- package/dist/es/helpers/jsonLdObjectWithId.js.map +1 -0
- package/dist/es/helpers/jsonLdObjectWithNoAtId.js +4 -0
- package/dist/es/helpers/jsonLdObjectWithNoAtId.js.map +1 -0
- package/dist/es/helpers/jsonLdObjectWithNoAtType.js +4 -0
- package/dist/es/helpers/jsonLdObjectWithNoAtType.js.map +1 -0
- package/dist/es/helpers/jsonLdObjectWithNoContext.js +4 -0
- package/dist/es/helpers/jsonLdObjectWithNoContext.js.map +1 -0
- package/dist/es/helpers/jsonLdObjectWithNoId.js +4 -0
- package/dist/es/helpers/jsonLdObjectWithNoId.js.map +1 -0
- package/dist/es/helpers/jsonLdObjectWithNoType.js +4 -0
- package/dist/es/helpers/jsonLdObjectWithNoType.js.map +1 -0
- package/dist/es/helpers/jsonLdObjectWithOptionalAtId.js +2 -0
- package/dist/es/helpers/jsonLdObjectWithOptionalAtId.js.map +1 -0
- package/dist/es/helpers/jsonLdObjectWithOptionalAtType.js +2 -0
- package/dist/es/helpers/jsonLdObjectWithOptionalAtType.js.map +1 -0
- package/dist/es/helpers/jsonLdObjectWithOptionalContext.js +2 -0
- package/dist/es/helpers/jsonLdObjectWithOptionalContext.js.map +1 -0
- package/dist/es/helpers/jsonLdObjectWithOptionalId.js +2 -0
- package/dist/es/helpers/jsonLdObjectWithOptionalId.js.map +1 -0
- package/dist/es/helpers/jsonLdObjectWithOptionalType.js +2 -0
- package/dist/es/helpers/jsonLdObjectWithOptionalType.js.map +1 -0
- package/dist/es/helpers/jsonLdObjectWithType.js +2 -0
- package/dist/es/helpers/jsonLdObjectWithType.js.map +1 -0
- package/dist/es/helpers/jsonLdOptionalKeys.js +4 -0
- package/dist/es/helpers/jsonLdOptionalKeys.js.map +1 -0
- package/dist/es/helpers/jsonLdRequiredKeys.js +2 -0
- package/dist/es/helpers/jsonLdRequiredKeys.js.map +1 -0
- package/dist/es/helpers/jsonLdWithAliases.js +2 -0
- package/dist/es/helpers/jsonLdWithAliases.js.map +1 -0
- package/dist/es/index.js +57 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IJsonLdContainerType.js +4 -0
- package/dist/es/models/IJsonLdContainerType.js.map +1 -0
- package/dist/es/models/IJsonLdContainerTypeArray.js +2 -0
- package/dist/es/models/IJsonLdContainerTypeArray.js.map +1 -0
- package/dist/es/models/IJsonLdContextDefinition.js +2 -0
- package/dist/es/models/IJsonLdContextDefinition.js.map +1 -0
- package/dist/es/models/IJsonLdContextDefinitionElement.js +2 -0
- package/dist/es/models/IJsonLdContextDefinitionElement.js.map +1 -0
- package/dist/es/models/IJsonLdContextDefinitionRoot.js +2 -0
- package/dist/es/models/IJsonLdContextDefinitionRoot.js.map +1 -0
- package/dist/es/models/IJsonLdDocument.js +2 -0
- package/dist/es/models/IJsonLdDocument.js.map +1 -0
- package/dist/es/models/IJsonLdExpandedTermDefinition.js +2 -0
- package/dist/es/models/IJsonLdExpandedTermDefinition.js.map +1 -0
- package/dist/es/models/IJsonLdGraphObject.js +2 -0
- package/dist/es/models/IJsonLdGraphObject.js.map +1 -0
- package/dist/es/models/IJsonLdIdMap.js +2 -0
- package/dist/es/models/IJsonLdIdMap.js.map +1 -0
- package/dist/es/models/IJsonLdIncludedBlock.js +2 -0
- package/dist/es/models/IJsonLdIncludedBlock.js.map +1 -0
- package/dist/es/models/IJsonLdIndexMap.js +2 -0
- package/dist/es/models/IJsonLdIndexMap.js.map +1 -0
- package/dist/es/models/IJsonLdIndexMapItem.js +2 -0
- package/dist/es/models/IJsonLdIndexMapItem.js.map +1 -0
- package/dist/es/models/IJsonLdJsonArray.js +2 -0
- package/dist/es/models/IJsonLdJsonArray.js.map +1 -0
- package/dist/es/models/IJsonLdJsonObject.js +2 -0
- package/dist/es/models/IJsonLdJsonObject.js.map +1 -0
- package/dist/es/models/IJsonLdJsonPrimitive.js +4 -0
- package/dist/es/models/IJsonLdJsonPrimitive.js.map +1 -0
- package/dist/es/models/IJsonLdJsonValue.js +2 -0
- package/dist/es/models/IJsonLdJsonValue.js.map +1 -0
- package/dist/es/models/IJsonLdLanguageMap.js +4 -0
- package/dist/es/models/IJsonLdLanguageMap.js.map +1 -0
- package/dist/es/models/IJsonLdListObject.js +2 -0
- package/dist/es/models/IJsonLdListObject.js.map +1 -0
- package/dist/es/models/IJsonLdListOrSetItem.js +2 -0
- package/dist/es/models/IJsonLdListOrSetItem.js.map +1 -0
- package/dist/es/models/IJsonLdNodeObject.js +2 -0
- package/dist/es/models/IJsonLdNodeObject.js.map +1 -0
- package/dist/es/models/IJsonLdNodePrimitive.js +2 -0
- package/dist/es/models/IJsonLdNodePrimitive.js.map +1 -0
- package/dist/es/models/IJsonLdObject.js +2 -0
- package/dist/es/models/IJsonLdObject.js.map +1 -0
- package/dist/es/models/IJsonLdSetObject.js +2 -0
- package/dist/es/models/IJsonLdSetObject.js.map +1 -0
- package/dist/es/models/IJsonLdTypeMap.js +2 -0
- package/dist/es/models/IJsonLdTypeMap.js.map +1 -0
- package/dist/es/models/IJsonLdValueObject.js +2 -0
- package/dist/es/models/IJsonLdValueObject.js.map +1 -0
- package/dist/es/models/jsonLdContexts.js +21 -0
- package/dist/es/models/jsonLdContexts.js.map +1 -0
- package/dist/es/models/jsonLdTypes.js +113 -0
- package/dist/es/models/jsonLdTypes.js.map +1 -0
- package/dist/es/schemas/JsonLdContainerType.json +23 -0
- package/dist/es/schemas/JsonLdContainerTypeArray.json +166 -0
- package/dist/es/schemas/JsonLdContextDefinition.json +134 -0
- package/dist/es/schemas/JsonLdContextDefinitionElement.json +17 -0
- package/dist/es/schemas/JsonLdContextDefinitionRoot.json +17 -0
- package/dist/es/schemas/JsonLdDocument.json +48 -0
- package/dist/es/schemas/JsonLdExpandedTermDefinition.json +148 -0
- package/dist/es/schemas/JsonLdGraphObject.json +44 -0
- package/dist/es/schemas/JsonLdIdMap.json +10 -0
- package/dist/es/schemas/JsonLdIncludedBlock.json +17 -0
- package/dist/es/schemas/JsonLdIndexMap.json +20 -0
- package/dist/es/schemas/JsonLdIndexMapItem.json +32 -0
- package/dist/es/schemas/JsonLdJsonArray.json +10 -0
- package/dist/es/schemas/JsonLdJsonObject.json +10 -0
- package/dist/es/schemas/JsonLdJsonPrimitive.json +20 -0
- package/dist/es/schemas/JsonLdJsonValue.json +17 -0
- package/dist/es/schemas/JsonLdLanguageMap.json +23 -0
- package/dist/es/schemas/JsonLdListObject.json +28 -0
- package/dist/es/schemas/JsonLdListOrSetItem.json +26 -0
- package/dist/es/schemas/JsonLdNodeObject.json +40 -0
- package/dist/es/schemas/JsonLdNodePrimitive.json +35 -0
- package/dist/es/schemas/JsonLdObject.json +76 -0
- package/dist/es/schemas/JsonLdSetObject.json +28 -0
- package/dist/es/schemas/JsonLdTypeMap.json +17 -0
- package/dist/es/schemas/JsonLdValueObject.json +125 -0
- package/dist/es/utils/jsonLdHelper.js +301 -0
- package/dist/es/utils/jsonLdHelper.js.map +1 -0
- package/dist/es/utils/jsonLdProcessor.js +507 -0
- package/dist/es/utils/jsonLdProcessor.js.map +1 -0
- package/dist/types/compiled/validators.d.ts +101 -0
- package/dist/types/dataTypes/jsonLdDataTypes.d.ts +9 -0
- package/dist/types/helpers/jsonLdAliasKey.d.ts +4 -0
- package/dist/types/helpers/jsonLdExistingProperty.d.ts +6 -0
- package/dist/types/helpers/jsonLdExistingPropertyEither.d.ts +6 -0
- package/dist/types/helpers/jsonLdKeys.d.ts +4 -0
- package/dist/types/helpers/jsonLdObjectWithAliases.d.ts +7 -0
- package/dist/types/helpers/jsonLdObjectWithAtId.d.ts +7 -0
- package/dist/types/helpers/jsonLdObjectWithAtType.d.ts +7 -0
- package/dist/types/helpers/jsonLdObjectWithContext.d.ts +7 -0
- package/dist/types/helpers/jsonLdObjectWithId.d.ts +7 -0
- package/dist/types/helpers/jsonLdObjectWithNoAtId.d.ts +4 -0
- package/dist/types/helpers/jsonLdObjectWithNoAtType.d.ts +4 -0
- package/dist/types/helpers/jsonLdObjectWithNoContext.d.ts +5 -0
- package/dist/types/helpers/jsonLdObjectWithNoId.d.ts +4 -0
- package/dist/types/helpers/jsonLdObjectWithNoType.d.ts +4 -0
- package/dist/types/helpers/jsonLdObjectWithOptionalAtId.d.ts +7 -0
- package/dist/types/helpers/jsonLdObjectWithOptionalAtType.d.ts +7 -0
- package/dist/types/helpers/jsonLdObjectWithOptionalContext.d.ts +9 -0
- package/dist/types/helpers/jsonLdObjectWithOptionalId.d.ts +7 -0
- package/dist/types/helpers/jsonLdObjectWithOptionalType.d.ts +7 -0
- package/dist/types/helpers/jsonLdObjectWithType.d.ts +7 -0
- package/dist/types/helpers/jsonLdOptionalKeys.d.ts +6 -0
- package/dist/types/helpers/jsonLdRequiredKeys.d.ts +5 -0
- package/dist/types/helpers/jsonLdWithAliases.d.ts +13 -0
- package/dist/types/index.d.ts +54 -0
- package/dist/types/models/IJsonLdContainerType.d.ts +8 -0
- package/dist/types/models/IJsonLdContainerTypeArray.d.ts +9 -0
- package/dist/types/models/IJsonLdContextDefinition.d.ts +24 -0
- package/dist/types/models/IJsonLdContextDefinitionElement.d.ts +9 -0
- package/dist/types/models/IJsonLdContextDefinitionRoot.d.ts +9 -0
- package/dist/types/models/IJsonLdDocument.d.ts +17 -0
- package/dist/types/models/IJsonLdExpandedTermDefinition.d.ts +29 -0
- package/dist/types/models/IJsonLdGraphObject.d.ts +16 -0
- package/dist/types/models/IJsonLdIdMap.d.ts +12 -0
- package/dist/types/models/IJsonLdIncludedBlock.d.ts +10 -0
- package/dist/types/models/IJsonLdIndexMap.d.ts +13 -0
- package/dist/types/models/IJsonLdIndexMapItem.d.ts +12 -0
- package/dist/types/models/IJsonLdJsonArray.d.ts +9 -0
- package/dist/types/models/IJsonLdJsonObject.d.ts +11 -0
- package/dist/types/models/IJsonLdJsonPrimitive.d.ts +8 -0
- package/dist/types/models/IJsonLdJsonValue.d.ts +11 -0
- package/dist/types/models/IJsonLdLanguageMap.d.ts +11 -0
- package/dist/types/models/IJsonLdListObject.d.ts +13 -0
- package/dist/types/models/IJsonLdListOrSetItem.d.ts +10 -0
- package/dist/types/models/IJsonLdNodeObject.d.ts +19 -0
- package/dist/types/models/IJsonLdNodePrimitive.d.ts +13 -0
- package/dist/types/models/IJsonLdObject.d.ts +25 -0
- package/dist/types/models/IJsonLdSetObject.d.ts +13 -0
- package/dist/types/models/IJsonLdTypeMap.d.ts +12 -0
- package/dist/types/models/IJsonLdValueObject.d.ts +26 -0
- package/dist/types/models/jsonLdContexts.d.ts +21 -0
- package/dist/types/models/jsonLdTypes.d.ts +113 -0
- package/dist/types/utils/jsonLdHelper.d.ts +97 -0
- package/dist/types/utils/jsonLdProcessor.d.ts +117 -0
- package/docs/changelog.md +15 -0
- package/docs/examples.md +214 -0
- package/docs/reference/classes/JsonLdDataTypes.md +25 -0
- package/docs/reference/classes/JsonLdHelper.md +371 -0
- package/docs/reference/classes/JsonLdProcessor.md +400 -0
- package/docs/reference/index.md +93 -0
- package/docs/reference/interfaces/IJsonLdContextDefinition.md +73 -0
- package/docs/reference/interfaces/IJsonLdGraphObject.md +31 -0
- package/docs/reference/interfaces/IJsonLdIdMap.md +11 -0
- package/docs/reference/interfaces/IJsonLdIndexMap.md +12 -0
- package/docs/reference/interfaces/IJsonLdJsonObject.md +7 -0
- package/docs/reference/interfaces/IJsonLdLanguageMap.md +11 -0
- package/docs/reference/interfaces/IJsonLdListObject.md +19 -0
- package/docs/reference/interfaces/IJsonLdNodeObject.md +100 -0
- package/docs/reference/interfaces/IJsonLdObject.md +64 -0
- package/docs/reference/interfaces/IJsonLdSetObject.md +19 -0
- package/docs/reference/interfaces/IJsonLdTypeMap.md +11 -0
- package/docs/reference/type-aliases/IJsonLdContainerType.md +5 -0
- package/docs/reference/type-aliases/IJsonLdContainerTypeArray.md +5 -0
- package/docs/reference/type-aliases/IJsonLdContextDefinitionElement.md +5 -0
- package/docs/reference/type-aliases/IJsonLdContextDefinitionRoot.md +5 -0
- package/docs/reference/type-aliases/IJsonLdDocument.md +11 -0
- package/docs/reference/type-aliases/IJsonLdExpandedTermDefinition.md +41 -0
- package/docs/reference/type-aliases/IJsonLdIncludedBlock.md +9 -0
- package/docs/reference/type-aliases/IJsonLdIndexMapItem.md +5 -0
- package/docs/reference/type-aliases/IJsonLdJsonArray.md +5 -0
- package/docs/reference/type-aliases/IJsonLdJsonPrimitive.md +5 -0
- package/docs/reference/type-aliases/IJsonLdJsonValue.md +5 -0
- package/docs/reference/type-aliases/IJsonLdListOrSetItem.md +5 -0
- package/docs/reference/type-aliases/IJsonLdNodePrimitive.md +5 -0
- package/docs/reference/type-aliases/IJsonLdValueObject.md +20 -0
- package/docs/reference/type-aliases/JsonLdAliasKey.md +15 -0
- package/docs/reference/type-aliases/JsonLdContexts.md +5 -0
- package/docs/reference/type-aliases/JsonLdExistingProperty.md +19 -0
- package/docs/reference/type-aliases/JsonLdExistingPropertyEither.md +24 -0
- package/docs/reference/type-aliases/JsonLdKeys.md +11 -0
- package/docs/reference/type-aliases/JsonLdObjectWithAliases.md +16 -0
- package/docs/reference/type-aliases/JsonLdObjectWithAtId.md +21 -0
- package/docs/reference/type-aliases/JsonLdObjectWithAtType.md +21 -0
- package/docs/reference/type-aliases/JsonLdObjectWithContext.md +21 -0
- package/docs/reference/type-aliases/JsonLdObjectWithId.md +21 -0
- package/docs/reference/type-aliases/JsonLdObjectWithNoAtId.md +11 -0
- package/docs/reference/type-aliases/JsonLdObjectWithNoAtType.md +11 -0
- package/docs/reference/type-aliases/JsonLdObjectWithNoContext.md +12 -0
- package/docs/reference/type-aliases/JsonLdObjectWithNoId.md +11 -0
- package/docs/reference/type-aliases/JsonLdObjectWithNoType.md +11 -0
- package/docs/reference/type-aliases/JsonLdObjectWithOptionalAtId.md +21 -0
- package/docs/reference/type-aliases/JsonLdObjectWithOptionalAtType.md +21 -0
- package/docs/reference/type-aliases/JsonLdObjectWithOptionalContext.md +22 -0
- package/docs/reference/type-aliases/JsonLdObjectWithOptionalId.md +21 -0
- package/docs/reference/type-aliases/JsonLdObjectWithOptionalType.md +21 -0
- package/docs/reference/type-aliases/JsonLdObjectWithType.md +21 -0
- package/docs/reference/type-aliases/JsonLdOptionalKeys.md +11 -0
- package/docs/reference/type-aliases/JsonLdRequiredKeys.md +11 -0
- package/docs/reference/type-aliases/JsonLdTypes.md +5 -0
- package/docs/reference/type-aliases/JsonLdWithAliases.md +17 -0
- package/docs/reference/variables/CompiledJsonLdContainerType.md +5 -0
- package/docs/reference/variables/CompiledJsonLdContainerTypeArray.md +5 -0
- package/docs/reference/variables/CompiledJsonLdContextDefinition.md +5 -0
- package/docs/reference/variables/CompiledJsonLdContextDefinitionElement.md +5 -0
- package/docs/reference/variables/CompiledJsonLdContextDefinitionRoot.md +5 -0
- package/docs/reference/variables/CompiledJsonLdDocument.md +5 -0
- package/docs/reference/variables/CompiledJsonLdExpandedTermDefinition.md +5 -0
- package/docs/reference/variables/CompiledJsonLdGraphObject.md +5 -0
- package/docs/reference/variables/CompiledJsonLdIdMap.md +5 -0
- package/docs/reference/variables/CompiledJsonLdIncludedBlock.md +5 -0
- package/docs/reference/variables/CompiledJsonLdIndexMap.md +5 -0
- package/docs/reference/variables/CompiledJsonLdIndexMapItem.md +5 -0
- package/docs/reference/variables/CompiledJsonLdJsonArray.md +5 -0
- package/docs/reference/variables/CompiledJsonLdJsonObject.md +5 -0
- package/docs/reference/variables/CompiledJsonLdJsonPrimitive.md +5 -0
- package/docs/reference/variables/CompiledJsonLdJsonValue.md +5 -0
- package/docs/reference/variables/CompiledJsonLdLanguageMap.md +5 -0
- package/docs/reference/variables/CompiledJsonLdListObject.md +5 -0
- package/docs/reference/variables/CompiledJsonLdListOrSetItem.md +5 -0
- package/docs/reference/variables/CompiledJsonLdNodeObject.md +5 -0
- package/docs/reference/variables/CompiledJsonLdNodePrimitive.md +5 -0
- package/docs/reference/variables/CompiledJsonLdObject.md +5 -0
- package/docs/reference/variables/CompiledJsonLdSetObject.md +5 -0
- package/docs/reference/variables/CompiledJsonLdTypeMap.md +5 -0
- package/docs/reference/variables/CompiledJsonLdValueObject.md +5 -0
- package/docs/reference/variables/JsonLdContexts.md +25 -0
- package/docs/reference/variables/JsonLdTypes.md +163 -0
- package/locales/.validate-ignore +1 -0
- package/locales/en.json +11 -0
- package/package.json +52 -5
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import { DataTypeHelper } from "@3sixty/data-core";
|
|
4
|
+
import * as CompiledValidators from "../compiled/validators.js";
|
|
5
|
+
import { JsonLdContexts } from "../models/jsonLdContexts.js";
|
|
6
|
+
import { JsonLdTypes } from "../models/jsonLdTypes.js";
|
|
7
|
+
import JsonLdContainerTypeSchema from "../schemas/JsonLdContainerType.json" with { type: "json" };
|
|
8
|
+
import JsonLdContainerTypeArraySchema from "../schemas/JsonLdContainerTypeArray.json" with { type: "json" };
|
|
9
|
+
import JsonLdContextDefinitionSchema from "../schemas/JsonLdContextDefinition.json" with { type: "json" };
|
|
10
|
+
import JsonLdContextDefinitionElementSchema from "../schemas/JsonLdContextDefinitionElement.json" with { type: "json" };
|
|
11
|
+
import JsonLdContextDefinitionRootSchema from "../schemas/JsonLdContextDefinitionRoot.json" with { type: "json" };
|
|
12
|
+
import JsonLdDocumentSchema from "../schemas/JsonLdDocument.json" with { type: "json" };
|
|
13
|
+
import JsonLdExpandedTermDefinitionSchema from "../schemas/JsonLdExpandedTermDefinition.json" with { type: "json" };
|
|
14
|
+
import JsonLdGraphObjectSchema from "../schemas/JsonLdGraphObject.json" with { type: "json" };
|
|
15
|
+
import JsonLdIdMapSchema from "../schemas/JsonLdIdMap.json" with { type: "json" };
|
|
16
|
+
import JsonLdIncludedBlockSchema from "../schemas/JsonLdIncludedBlock.json" with { type: "json" };
|
|
17
|
+
import JsonLdIndexMapSchema from "../schemas/JsonLdIndexMap.json" with { type: "json" };
|
|
18
|
+
import JsonLdIndexMapItemSchema from "../schemas/JsonLdIndexMapItem.json" with { type: "json" };
|
|
19
|
+
import JsonLdJsonArraySchema from "../schemas/JsonLdJsonArray.json" with { type: "json" };
|
|
20
|
+
import JsonLdJsonObjectSchema from "../schemas/JsonLdJsonObject.json" with { type: "json" };
|
|
21
|
+
import JsonLdJsonPrimitiveSchema from "../schemas/JsonLdJsonPrimitive.json" with { type: "json" };
|
|
22
|
+
import JsonLdJsonValueSchema from "../schemas/JsonLdJsonValue.json" with { type: "json" };
|
|
23
|
+
import JsonLdLanguageMapSchema from "../schemas/JsonLdLanguageMap.json" with { type: "json" };
|
|
24
|
+
import JsonLdListObjectSchema from "../schemas/JsonLdListObject.json" with { type: "json" };
|
|
25
|
+
import JsonLdListOrSetItemSchema from "../schemas/JsonLdListOrSetItem.json" with { type: "json" };
|
|
26
|
+
import JsonLdNodeObjectSchema from "../schemas/JsonLdNodeObject.json" with { type: "json" };
|
|
27
|
+
import JsonLdNodePrimitiveSchema from "../schemas/JsonLdNodePrimitive.json" with { type: "json" };
|
|
28
|
+
import JsonLdObjectSchema from "../schemas/JsonLdObject.json" with { type: "json" };
|
|
29
|
+
import JsonLdSetObjectSchema from "../schemas/JsonLdSetObject.json" with { type: "json" };
|
|
30
|
+
import JsonLdTypeMapSchema from "../schemas/JsonLdTypeMap.json" with { type: "json" };
|
|
31
|
+
import JsonLdValueObjectSchema from "../schemas/JsonLdValueObject.json" with { type: "json" };
|
|
32
|
+
/**
|
|
33
|
+
* Handle all the data types for JSON-LD.
|
|
34
|
+
*/
|
|
35
|
+
export class JsonLdDataTypes {
|
|
36
|
+
/**
|
|
37
|
+
* Register all the data types.
|
|
38
|
+
*/
|
|
39
|
+
static registerTypes() {
|
|
40
|
+
const types = [
|
|
41
|
+
{
|
|
42
|
+
type: JsonLdTypes.Document,
|
|
43
|
+
schema: JsonLdDocumentSchema,
|
|
44
|
+
compiledValidator: CompiledValidators.CompiledJsonLdDocument
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: JsonLdTypes.Object,
|
|
48
|
+
schema: JsonLdObjectSchema,
|
|
49
|
+
compiledValidator: CompiledValidators.CompiledJsonLdObject
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
type: JsonLdTypes.NodeObject,
|
|
53
|
+
schema: JsonLdNodeObjectSchema,
|
|
54
|
+
compiledValidator: CompiledValidators.CompiledJsonLdNodeObject
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: JsonLdTypes.NodePrimitive,
|
|
58
|
+
schema: JsonLdNodePrimitiveSchema,
|
|
59
|
+
compiledValidator: CompiledValidators.CompiledJsonLdNodePrimitive
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: JsonLdTypes.GraphObject,
|
|
63
|
+
schema: JsonLdGraphObjectSchema,
|
|
64
|
+
compiledValidator: CompiledValidators.CompiledJsonLdGraphObject
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
type: JsonLdTypes.ValueObject,
|
|
68
|
+
schema: JsonLdValueObjectSchema,
|
|
69
|
+
compiledValidator: CompiledValidators.CompiledJsonLdValueObject
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: JsonLdTypes.ListObject,
|
|
73
|
+
schema: JsonLdListObjectSchema,
|
|
74
|
+
compiledValidator: CompiledValidators.CompiledJsonLdListObject
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: JsonLdTypes.SetObject,
|
|
78
|
+
schema: JsonLdSetObjectSchema,
|
|
79
|
+
compiledValidator: CompiledValidators.CompiledJsonLdSetObject
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: JsonLdTypes.LanguageMap,
|
|
83
|
+
schema: JsonLdLanguageMapSchema,
|
|
84
|
+
compiledValidator: CompiledValidators.CompiledJsonLdLanguageMap
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: JsonLdTypes.IndexMap,
|
|
88
|
+
schema: JsonLdIndexMapSchema,
|
|
89
|
+
compiledValidator: CompiledValidators.CompiledJsonLdIndexMap
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
type: JsonLdTypes.IndexMapItem,
|
|
93
|
+
schema: JsonLdIndexMapItemSchema,
|
|
94
|
+
compiledValidator: CompiledValidators.CompiledJsonLdIndexMapItem
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
type: JsonLdTypes.IdMap,
|
|
98
|
+
schema: JsonLdIdMapSchema,
|
|
99
|
+
compiledValidator: CompiledValidators.CompiledJsonLdIdMap
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
type: JsonLdTypes.TypeMap,
|
|
103
|
+
schema: JsonLdTypeMapSchema,
|
|
104
|
+
compiledValidator: CompiledValidators.CompiledJsonLdTypeMap
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
type: JsonLdTypes.IncludedBlock,
|
|
108
|
+
schema: JsonLdIncludedBlockSchema,
|
|
109
|
+
compiledValidator: CompiledValidators.CompiledJsonLdIncludedBlock
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: JsonLdTypes.ContextDefinition,
|
|
113
|
+
schema: JsonLdContextDefinitionSchema,
|
|
114
|
+
compiledValidator: CompiledValidators.CompiledJsonLdContextDefinition
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
type: JsonLdTypes.ContextDefinitionElement,
|
|
118
|
+
schema: JsonLdContextDefinitionElementSchema,
|
|
119
|
+
compiledValidator: CompiledValidators.CompiledJsonLdContextDefinitionElement
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
type: JsonLdTypes.ContextDefinitionRoot,
|
|
123
|
+
schema: JsonLdContextDefinitionRootSchema,
|
|
124
|
+
compiledValidator: CompiledValidators.CompiledJsonLdContextDefinitionRoot
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
type: JsonLdTypes.ExpandedTermDefinition,
|
|
128
|
+
schema: JsonLdExpandedTermDefinitionSchema,
|
|
129
|
+
compiledValidator: CompiledValidators.CompiledJsonLdExpandedTermDefinition
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
type: JsonLdTypes.ListOrSetItem,
|
|
133
|
+
schema: JsonLdListOrSetItemSchema,
|
|
134
|
+
compiledValidator: CompiledValidators.CompiledJsonLdListOrSetItem
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
type: JsonLdTypes.ContainerType,
|
|
138
|
+
schema: JsonLdContainerTypeSchema,
|
|
139
|
+
compiledValidator: CompiledValidators.CompiledJsonLdContainerType
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
type: JsonLdTypes.ContainerTypeArray,
|
|
143
|
+
schema: JsonLdContainerTypeArraySchema,
|
|
144
|
+
compiledValidator: CompiledValidators.CompiledJsonLdContainerTypeArray
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
type: JsonLdTypes.JsonPrimitive,
|
|
148
|
+
schema: JsonLdJsonPrimitiveSchema,
|
|
149
|
+
compiledValidator: CompiledValidators.CompiledJsonLdJsonPrimitive
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
type: JsonLdTypes.JsonArray,
|
|
153
|
+
schema: JsonLdJsonArraySchema,
|
|
154
|
+
compiledValidator: CompiledValidators.CompiledJsonLdJsonArray
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: JsonLdTypes.JsonObject,
|
|
158
|
+
schema: JsonLdJsonObjectSchema,
|
|
159
|
+
compiledValidator: CompiledValidators.CompiledJsonLdJsonObject
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
type: JsonLdTypes.JsonValue,
|
|
163
|
+
schema: JsonLdJsonValueSchema,
|
|
164
|
+
compiledValidator: CompiledValidators.CompiledJsonLdJsonValue
|
|
165
|
+
}
|
|
166
|
+
];
|
|
167
|
+
DataTypeHelper.registerTypes(JsonLdContexts.Namespace, JsonLdContexts.JsonLdContext, types);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=jsonLdDataTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/jsonLdDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;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EAAE,kBAAkB,CAAC,wBAAwB;aAC9D;YACD;gBACC,IAAI,EAAE,WAAW,CAAC,SAAS;gBAC3B,MAAM,EAAE,qBAAqB;gBAC7B,iBAAiB,EAAE,kBAAkB,CAAC,uBAAuB;aAC7D;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAAC,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;IAC7F,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@3sixty/data-core\";\nimport * as CompiledValidators from \"../compiled/validators.js\";\nimport { JsonLdContexts } from \"../models/jsonLdContexts.js\";\nimport { JsonLdTypes } from \"../models/jsonLdTypes.js\";\nimport JsonLdContainerTypeSchema from \"../schemas/JsonLdContainerType.json\" with { type: \"json\" };\nimport JsonLdContainerTypeArraySchema from \"../schemas/JsonLdContainerTypeArray.json\" with { type: \"json\" };\nimport JsonLdContextDefinitionSchema from \"../schemas/JsonLdContextDefinition.json\" with { type: \"json\" };\nimport JsonLdContextDefinitionElementSchema from \"../schemas/JsonLdContextDefinitionElement.json\" with { type: \"json\" };\nimport JsonLdContextDefinitionRootSchema from \"../schemas/JsonLdContextDefinitionRoot.json\" with { type: \"json\" };\nimport JsonLdDocumentSchema from \"../schemas/JsonLdDocument.json\" with { type: \"json\" };\nimport JsonLdExpandedTermDefinitionSchema from \"../schemas/JsonLdExpandedTermDefinition.json\" with { type: \"json\" };\nimport JsonLdGraphObjectSchema from \"../schemas/JsonLdGraphObject.json\" with { type: \"json\" };\nimport JsonLdIdMapSchema from \"../schemas/JsonLdIdMap.json\" with { type: \"json\" };\nimport JsonLdIncludedBlockSchema from \"../schemas/JsonLdIncludedBlock.json\" with { type: \"json\" };\nimport JsonLdIndexMapSchema from \"../schemas/JsonLdIndexMap.json\" with { type: \"json\" };\nimport JsonLdIndexMapItemSchema from \"../schemas/JsonLdIndexMapItem.json\" with { type: \"json\" };\nimport JsonLdJsonArraySchema from \"../schemas/JsonLdJsonArray.json\" with { type: \"json\" };\nimport JsonLdJsonObjectSchema from \"../schemas/JsonLdJsonObject.json\" with { type: \"json\" };\nimport JsonLdJsonPrimitiveSchema from \"../schemas/JsonLdJsonPrimitive.json\" with { type: \"json\" };\nimport JsonLdJsonValueSchema from \"../schemas/JsonLdJsonValue.json\" with { type: \"json\" };\nimport JsonLdLanguageMapSchema from \"../schemas/JsonLdLanguageMap.json\" with { type: \"json\" };\nimport JsonLdListObjectSchema from \"../schemas/JsonLdListObject.json\" with { type: \"json\" };\nimport JsonLdListOrSetItemSchema from \"../schemas/JsonLdListOrSetItem.json\" with { type: \"json\" };\nimport JsonLdNodeObjectSchema from \"../schemas/JsonLdNodeObject.json\" with { type: \"json\" };\nimport JsonLdNodePrimitiveSchema from \"../schemas/JsonLdNodePrimitive.json\" with { type: \"json\" };\nimport JsonLdObjectSchema from \"../schemas/JsonLdObject.json\" with { type: \"json\" };\nimport JsonLdSetObjectSchema from \"../schemas/JsonLdSetObject.json\" with { type: \"json\" };\nimport JsonLdTypeMapSchema from \"../schemas/JsonLdTypeMap.json\" with { type: \"json\" };\nimport JsonLdValueObjectSchema from \"../schemas/JsonLdValueObject.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for JSON-LD.\n */\nexport class JsonLdDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.Document,\n\t\t\t\tschema: JsonLdDocumentSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdDocument\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.Object,\n\t\t\t\tschema: JsonLdObjectSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdObject\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.NodeObject,\n\t\t\t\tschema: JsonLdNodeObjectSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdNodeObject\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.NodePrimitive,\n\t\t\t\tschema: JsonLdNodePrimitiveSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdNodePrimitive\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.GraphObject,\n\t\t\t\tschema: JsonLdGraphObjectSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdGraphObject\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.ValueObject,\n\t\t\t\tschema: JsonLdValueObjectSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdValueObject\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.ListObject,\n\t\t\t\tschema: JsonLdListObjectSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdListObject\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.SetObject,\n\t\t\t\tschema: JsonLdSetObjectSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdSetObject\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.LanguageMap,\n\t\t\t\tschema: JsonLdLanguageMapSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdLanguageMap\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.IndexMap,\n\t\t\t\tschema: JsonLdIndexMapSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdIndexMap\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.IndexMapItem,\n\t\t\t\tschema: JsonLdIndexMapItemSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdIndexMapItem\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.IdMap,\n\t\t\t\tschema: JsonLdIdMapSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdIdMap\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.TypeMap,\n\t\t\t\tschema: JsonLdTypeMapSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdTypeMap\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.IncludedBlock,\n\t\t\t\tschema: JsonLdIncludedBlockSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdIncludedBlock\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.ContextDefinition,\n\t\t\t\tschema: JsonLdContextDefinitionSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdContextDefinition\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.ContextDefinitionElement,\n\t\t\t\tschema: JsonLdContextDefinitionElementSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdContextDefinitionElement\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.ContextDefinitionRoot,\n\t\t\t\tschema: JsonLdContextDefinitionRootSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdContextDefinitionRoot\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.ExpandedTermDefinition,\n\t\t\t\tschema: JsonLdExpandedTermDefinitionSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdExpandedTermDefinition\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.ListOrSetItem,\n\t\t\t\tschema: JsonLdListOrSetItemSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdListOrSetItem\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.ContainerType,\n\t\t\t\tschema: JsonLdContainerTypeSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdContainerType\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.ContainerTypeArray,\n\t\t\t\tschema: JsonLdContainerTypeArraySchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdContainerTypeArray\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.JsonPrimitive,\n\t\t\t\tschema: JsonLdJsonPrimitiveSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdJsonPrimitive\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.JsonArray,\n\t\t\t\tschema: JsonLdJsonArraySchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdJsonArray\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.JsonObject,\n\t\t\t\tschema: JsonLdJsonObjectSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdJsonObject\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: JsonLdTypes.JsonValue,\n\t\t\t\tschema: JsonLdJsonValueSchema,\n\t\t\t\tcompiledValidator: CompiledValidators.CompiledJsonLdJsonValue\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(JsonLdContexts.Namespace, JsonLdContexts.JsonLdContext, types);\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdAliasKey.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdAliasKey.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Keep JSON-LD keys as-is and prefix non-JSON-LD keys.\n */\nexport type JsonLdAliasKey<K extends string, Prefix extends string> = K extends `@${string}`\n\t? K\n\t: `${Prefix}:${K}`;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdExistingProperty.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdExistingProperty.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Infer an existing property's type from a source type, or fall back to a default.\n */\nexport type JsonLdExistingProperty<T extends object, P extends PropertyKey, D> = T extends {\n\t[K in P]?: infer PropertyType;\n}\n\t? Exclude<PropertyType, undefined>\n\t: D;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdExistingPropertyEither.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdExistingPropertyEither.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { JsonLdExistingProperty } from \"./jsonLdExistingProperty.js\";\n\n/**\n * Infer an existing property's type from either of two source properties,\n * or fall back to a default when neither exists.\n */\nexport type JsonLdExistingPropertyEither<\n\tT extends object,\n\tP1 extends PropertyKey,\n\tP2 extends PropertyKey,\n\tD\n> = [JsonLdExistingProperty<T, P1, never> | JsonLdExistingProperty<T, P2, never>] extends [never]\n\t? D\n\t: JsonLdExistingProperty<T, P1, never> | JsonLdExistingProperty<T, P2, never>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdKeys.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdKeys.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Keep only JSON-LD keys (\"@...\") from a type.\n */\nexport type JsonLdKeys<T extends object> = Pick<T, Extract<keyof T, `@${string}`>>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdObjectWithAliases.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdObjectWithAliases.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { JsonLdKeys } from \"./jsonLdKeys.js\";\nimport type { JsonLdWithAliases } from \"./jsonLdWithAliases.js\";\n\n/**\n * Create a JSON-LD object shape containing only JSON-LD keys plus aliased\n * non-JSON-LD keys.\n */\nexport type JsonLdObjectWithAliases<T extends object, Prefix extends string> = JsonLdKeys<T> &\n\tJsonLdWithAliases<T, Prefix>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdObjectWithAtId.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdObjectWithAtId.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { JsonLdExistingPropertyEither } from \"./jsonLdExistingPropertyEither.js\";\n\n/**\n * Add \"@id\" to a type.\n */\nexport type JsonLdObjectWithAtId<\n\tT extends object,\n\tId = JsonLdExistingPropertyEither<T, \"@id\", \"id\", string>\n> = Omit<T, \"@id\" | \"id\"> & {\n\t\"@id\": Id;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdObjectWithAtType.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdObjectWithAtType.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { JsonLdExistingPropertyEither } from \"./jsonLdExistingPropertyEither.js\";\n\n/**\n * Add \"@type\" to a type.\n */\nexport type JsonLdObjectWithAtType<\n\tT extends object,\n\tTy = JsonLdExistingPropertyEither<T, \"@type\", \"type\", string | string[]>\n> = Omit<T, \"@type\" | \"type\"> & {\n\t\"@type\": Ty;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdObjectWithContext.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdObjectWithContext.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionRoot } from \"../models/IJsonLdContextDefinitionRoot.js\";\n\n/**\n * Add \"@context\" to a type.\n */\nexport type JsonLdObjectWithContext<T extends object, C = IJsonLdContextDefinitionRoot> = Omit<\n\tT,\n\t\"@context\"\n> & {\n\t\"@context\": C;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdObjectWithId.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdObjectWithId.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { JsonLdExistingPropertyEither } from \"./jsonLdExistingPropertyEither.js\";\n\n/**\n * Add \"id\" to a type.\n */\nexport type JsonLdObjectWithId<\n\tT extends object,\n\tId = JsonLdExistingPropertyEither<T, \"id\", \"@id\", string>\n> = Omit<T, \"id\" | \"@id\"> & {\n\tid: Id;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdObjectWithNoAtId.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdObjectWithNoAtId.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Omit \"@id\" from a type.\n */\nexport type JsonLdObjectWithNoAtId<T extends object> = Omit<T, \"@id\">;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdObjectWithNoAtType.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdObjectWithNoAtType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Omit \"@type\" from a type.\n */\nexport type JsonLdObjectWithNoAtType<T extends object> = Omit<T, \"@type\">;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdObjectWithNoContext.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdObjectWithNoContext.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Omit optional \"@context\" from a type, inferring an existing context type from\n * the source type when available, otherwise using the provided default.\n */\nexport type JsonLdObjectWithNoContext<T extends object> = Omit<T, \"@context\">;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdObjectWithNoId.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdObjectWithNoId.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Omit \"id\" from a type.\n */\nexport type JsonLdObjectWithNoId<T extends object> = Omit<T, \"id\">;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdObjectWithNoType.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdObjectWithNoType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Omit \"type\" from a type.\n */\nexport type JsonLdObjectWithNoType<T extends object> = Omit<T, \"type\">;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdObjectWithOptionalAtId.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdObjectWithOptionalAtId.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { JsonLdExistingPropertyEither } from \"./jsonLdExistingPropertyEither.js\";\n\n/**\n * Add optional \"@id\" to a type.\n */\nexport type JsonLdObjectWithOptionalAtId<\n\tT extends object,\n\tId = JsonLdExistingPropertyEither<T, \"@id\", \"id\", string>\n> = Omit<T, \"@id\" | \"id\"> & {\n\t\"@id\"?: Id;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdObjectWithOptionalAtType.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdObjectWithOptionalAtType.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { JsonLdExistingPropertyEither } from \"./jsonLdExistingPropertyEither.js\";\n\n/**\n * Add optional \"@type\" to a type.\n */\nexport type JsonLdObjectWithOptionalAtType<\n\tT extends object,\n\tTy = JsonLdExistingPropertyEither<T, \"@type\", \"type\", string | string[]>\n> = Omit<T, \"@type\" | \"type\"> & {\n\t\"@type\"?: Ty;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdObjectWithOptionalContext.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdObjectWithOptionalContext.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { JsonLdExistingProperty } from \"./jsonLdExistingProperty.js\";\nimport type { IJsonLdContextDefinitionRoot } from \"../models/IJsonLdContextDefinitionRoot.js\";\n\n/**\n * Add optional \"@context\" to a type, inferring an existing context type from\n * the source type when available, otherwise using the provided default.\n */\nexport type JsonLdObjectWithOptionalContext<\n\tT extends object,\n\tC = JsonLdExistingProperty<T, \"@context\", IJsonLdContextDefinitionRoot>\n> = Omit<T, \"@context\"> & {\n\t\"@context\"?: C;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdObjectWithOptionalId.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdObjectWithOptionalId.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { JsonLdExistingPropertyEither } from \"./jsonLdExistingPropertyEither.js\";\n\n/**\n * Add optional \"id\" to a type.\n */\nexport type JsonLdObjectWithOptionalId<\n\tT extends object,\n\tId = JsonLdExistingPropertyEither<T, \"id\", \"@id\", string>\n> = Omit<T, \"id\" | \"@id\"> & {\n\tid?: Id;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdObjectWithOptionalType.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdObjectWithOptionalType.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { JsonLdExistingPropertyEither } from \"./jsonLdExistingPropertyEither.js\";\n\n/**\n * Add optional \"type\" to a type.\n */\nexport type JsonLdObjectWithOptionalType<\n\tT extends object,\n\tTy = JsonLdExistingPropertyEither<T, \"type\", \"@type\", string | string[]>\n> = Omit<T, \"type\" | \"@type\"> & {\n\ttype?: Ty;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdObjectWithType.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdObjectWithType.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { JsonLdExistingPropertyEither } from \"./jsonLdExistingPropertyEither.js\";\n\n/**\n * Add \"type\" to a type.\n */\nexport type JsonLdObjectWithType<\n\tT extends object,\n\tTy = JsonLdExistingPropertyEither<T, \"type\", \"@type\", string | string[]>\n> = Omit<T, \"type\" | \"@type\"> & {\n\ttype: Ty;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdOptionalKeys.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdOptionalKeys.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Extract the optional property names from a type.\n */\nexport type JsonLdOptionalKeys<T> = {\n\t[K in keyof T]-?: {} extends Pick<T, K> ? K : never;\n}[keyof T];\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdRequiredKeys.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdRequiredKeys.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { JsonLdOptionalKeys } from \"./jsonLdOptionalKeys.js\";\n\n/**\n * Extract the required property names from a type.\n */\nexport type JsonLdRequiredKeys<T> = Exclude<keyof T, JsonLdOptionalKeys<T>>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdWithAliases.js","sourceRoot":"","sources":["../../../src/helpers/jsonLdWithAliases.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { JsonLdAliasKey } from \"./jsonLdAliasKey.js\";\nimport type { JsonLdOptionalKeys } from \"./jsonLdOptionalKeys.js\";\nimport type { JsonLdRequiredKeys } from \"./jsonLdRequiredKeys.js\";\n\n/**\n * Remap an object type so JSON-LD keys (\"@...\") are preserved and\n * non-JSON-LD keys are exposed as `Prefix:key` aliases, while preserving\n * each key's original required/optional status.\n */\nexport type JsonLdWithAliases<T extends object, Prefix extends string> = {\n\t[K in Extract<JsonLdRequiredKeys<T>, string> as JsonLdAliasKey<K, Prefix>]: T[K];\n} & {\n\t[K in Extract<JsonLdOptionalKeys<T>, string> as JsonLdAliasKey<K, Prefix>]?: T[K];\n};\n"]}
|
package/dist/es/index.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
export * from "./compiled/validators.js";
|
|
4
|
+
export * from "./dataTypes/jsonLdDataTypes.js";
|
|
5
|
+
export * from "./helpers/jsonLdAliasKey.js";
|
|
6
|
+
export * from "./helpers/jsonLdExistingProperty.js";
|
|
7
|
+
export * from "./helpers/jsonLdExistingPropertyEither.js";
|
|
8
|
+
export * from "./helpers/jsonLdKeys.js";
|
|
9
|
+
export * from "./helpers/jsonLdObjectWithAliases.js";
|
|
10
|
+
export * from "./helpers/jsonLdObjectWithAtId.js";
|
|
11
|
+
export * from "./helpers/jsonLdObjectWithAtType.js";
|
|
12
|
+
export * from "./helpers/jsonLdObjectWithContext.js";
|
|
13
|
+
export * from "./helpers/jsonLdObjectWithId.js";
|
|
14
|
+
export * from "./helpers/jsonLdObjectWithNoAtId.js";
|
|
15
|
+
export * from "./helpers/jsonLdObjectWithNoAtType.js";
|
|
16
|
+
export * from "./helpers/jsonLdObjectWithNoContext.js";
|
|
17
|
+
export * from "./helpers/jsonLdObjectWithNoId.js";
|
|
18
|
+
export * from "./helpers/jsonLdObjectWithNoType.js";
|
|
19
|
+
export * from "./helpers/jsonLdObjectWithOptionalAtId.js";
|
|
20
|
+
export * from "./helpers/jsonLdObjectWithOptionalAtType.js";
|
|
21
|
+
export * from "./helpers/jsonLdObjectWithOptionalContext.js";
|
|
22
|
+
export * from "./helpers/jsonLdObjectWithOptionalId.js";
|
|
23
|
+
export * from "./helpers/jsonLdObjectWithOptionalType.js";
|
|
24
|
+
export * from "./helpers/jsonLdObjectWithType.js";
|
|
25
|
+
export * from "./helpers/jsonLdOptionalKeys.js";
|
|
26
|
+
export * from "./helpers/jsonLdRequiredKeys.js";
|
|
27
|
+
export * from "./helpers/jsonLdWithAliases.js";
|
|
28
|
+
export * from "./models/IJsonLdContainerType.js";
|
|
29
|
+
export * from "./models/IJsonLdContainerTypeArray.js";
|
|
30
|
+
export * from "./models/IJsonLdContextDefinition.js";
|
|
31
|
+
export * from "./models/IJsonLdContextDefinitionElement.js";
|
|
32
|
+
export * from "./models/IJsonLdContextDefinitionRoot.js";
|
|
33
|
+
export * from "./models/IJsonLdDocument.js";
|
|
34
|
+
export * from "./models/IJsonLdExpandedTermDefinition.js";
|
|
35
|
+
export * from "./models/IJsonLdGraphObject.js";
|
|
36
|
+
export * from "./models/IJsonLdIdMap.js";
|
|
37
|
+
export * from "./models/IJsonLdIncludedBlock.js";
|
|
38
|
+
export * from "./models/IJsonLdIndexMap.js";
|
|
39
|
+
export * from "./models/IJsonLdIndexMapItem.js";
|
|
40
|
+
export * from "./models/IJsonLdJsonArray.js";
|
|
41
|
+
export * from "./models/IJsonLdJsonObject.js";
|
|
42
|
+
export * from "./models/IJsonLdJsonPrimitive.js";
|
|
43
|
+
export * from "./models/IJsonLdJsonValue.js";
|
|
44
|
+
export * from "./models/IJsonLdLanguageMap.js";
|
|
45
|
+
export * from "./models/IJsonLdListObject.js";
|
|
46
|
+
export * from "./models/IJsonLdListOrSetItem.js";
|
|
47
|
+
export * from "./models/IJsonLdNodeObject.js";
|
|
48
|
+
export * from "./models/IJsonLdNodePrimitive.js";
|
|
49
|
+
export * from "./models/IJsonLdObject.js";
|
|
50
|
+
export * from "./models/IJsonLdSetObject.js";
|
|
51
|
+
export * from "./models/IJsonLdTypeMap.js";
|
|
52
|
+
export * from "./models/IJsonLdValueObject.js";
|
|
53
|
+
export * from "./models/jsonLdContexts.js";
|
|
54
|
+
export * from "./models/jsonLdTypes.js";
|
|
55
|
+
export * from "./utils/jsonLdHelper.js";
|
|
56
|
+
export * from "./utils/jsonLdProcessor.js";
|
|
57
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,2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/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./compiled/validators.js\";\nexport * from \"./dataTypes/jsonLdDataTypes.js\";\nexport * from \"./helpers/jsonLdAliasKey.js\";\nexport * from \"./helpers/jsonLdExistingProperty.js\";\nexport * from \"./helpers/jsonLdExistingPropertyEither.js\";\nexport * from \"./helpers/jsonLdKeys.js\";\nexport * from \"./helpers/jsonLdObjectWithAliases.js\";\nexport * from \"./helpers/jsonLdObjectWithAtId.js\";\nexport * from \"./helpers/jsonLdObjectWithAtType.js\";\nexport * from \"./helpers/jsonLdObjectWithContext.js\";\nexport * from \"./helpers/jsonLdObjectWithId.js\";\nexport * from \"./helpers/jsonLdObjectWithNoAtId.js\";\nexport * from \"./helpers/jsonLdObjectWithNoAtType.js\";\nexport * from \"./helpers/jsonLdObjectWithNoContext.js\";\nexport * from \"./helpers/jsonLdObjectWithNoId.js\";\nexport * from \"./helpers/jsonLdObjectWithNoType.js\";\nexport * from \"./helpers/jsonLdObjectWithOptionalAtId.js\";\nexport * from \"./helpers/jsonLdObjectWithOptionalAtType.js\";\nexport * from \"./helpers/jsonLdObjectWithOptionalContext.js\";\nexport * from \"./helpers/jsonLdObjectWithOptionalId.js\";\nexport * from \"./helpers/jsonLdObjectWithOptionalType.js\";\nexport * from \"./helpers/jsonLdObjectWithType.js\";\nexport * from \"./helpers/jsonLdOptionalKeys.js\";\nexport * from \"./helpers/jsonLdRequiredKeys.js\";\nexport * from \"./helpers/jsonLdWithAliases.js\";\nexport * from \"./models/IJsonLdContainerType.js\";\nexport * from \"./models/IJsonLdContainerTypeArray.js\";\nexport * from \"./models/IJsonLdContextDefinition.js\";\nexport * from \"./models/IJsonLdContextDefinitionElement.js\";\nexport * from \"./models/IJsonLdContextDefinitionRoot.js\";\nexport * from \"./models/IJsonLdDocument.js\";\nexport * from \"./models/IJsonLdExpandedTermDefinition.js\";\nexport * from \"./models/IJsonLdGraphObject.js\";\nexport * from \"./models/IJsonLdIdMap.js\";\nexport * from \"./models/IJsonLdIncludedBlock.js\";\nexport * from \"./models/IJsonLdIndexMap.js\";\nexport * from \"./models/IJsonLdIndexMapItem.js\";\nexport * from \"./models/IJsonLdJsonArray.js\";\nexport * from \"./models/IJsonLdJsonObject.js\";\nexport * from \"./models/IJsonLdJsonPrimitive.js\";\nexport * from \"./models/IJsonLdJsonValue.js\";\nexport * from \"./models/IJsonLdLanguageMap.js\";\nexport * from \"./models/IJsonLdListObject.js\";\nexport * from \"./models/IJsonLdListOrSetItem.js\";\nexport * from \"./models/IJsonLdNodeObject.js\";\nexport * from \"./models/IJsonLdNodePrimitive.js\";\nexport * from \"./models/IJsonLdObject.js\";\nexport * from \"./models/IJsonLdSetObject.js\";\nexport * from \"./models/IJsonLdTypeMap.js\";\nexport * from \"./models/IJsonLdValueObject.js\";\nexport * from \"./models/jsonLdContexts.js\";\nexport * from \"./models/jsonLdTypes.js\";\nexport * from \"./utils/jsonLdHelper.js\";\nexport * from \"./utils/jsonLdProcessor.js\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdContainerType.js","sourceRoot":"","sources":["../../../src/models/IJsonLdContainerType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * JSON-LD container types.\n */\nexport type IJsonLdContainerType = \"@language\" | \"@index\" | \"@id\" | \"@graph\" | \"@type\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdContainerTypeArray.js","sourceRoot":"","sources":["../../../src/models/IJsonLdContainerTypeArray.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContainerType } from \"./IJsonLdContainerType.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * JSON-LD container type array.\n */\nexport type IJsonLdContainerTypeArray =\n\t| [\"@graph\", \"@id\"]\n\t| [\"@id\", \"@graph\"]\n\t| [\"@set\", \"@graph\", \"@id\"]\n\t| [\"@set\", \"@id\", \"@graph\"]\n\t| [\"@graph\", \"@set\", \"@id\"]\n\t| [\"@id\", \"@set\", \"@graph\"]\n\t| [\"@graph\", \"@id\", \"@set\"]\n\t| [\"@id\", \"@graph\", \"@set\"]\n\t| [\"@set\", IJsonLdContainerType]\n\t| [IJsonLdContainerType, \"@set\"];\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdContextDefinition.js","sourceRoot":"","sources":["../../../src/models/IJsonLdContextDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n/* eslint-disable jsdoc/require-jsdoc */\nimport type { IJsonLdExpandedTermDefinition } from \"./IJsonLdExpandedTermDefinition.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A context definition defines a local context in a node object.\n * @see https://www.w3.org/TR/json-ld11/#context-definitions\n */\nexport interface IJsonLdContextDefinition {\n\t[key: string]:\n\t\t| null\n\t\t| string\n\t\t| IJsonLdExpandedTermDefinition\n\t\t| IJsonLdContextDefinition[keyof IJsonLdContextDefinition];\n\n\t\"@base\"?: string | null | undefined;\n\t\"@direction\"?: \"ltr\" | \"rtl\" | null | undefined;\n\t\"@import\"?: string | undefined;\n\t\"@language\"?: string | undefined;\n\t\"@propagate\"?: boolean | undefined;\n\t\"@protected\"?: boolean | undefined;\n\t\"@type\"?:\n\t\t| {\n\t\t\t\t\"@container\": \"@set\";\n\t\t\t\t\"@protected\"?: boolean | undefined;\n\t\t }\n\t\t| undefined;\n\t\"@version\"?: \"1.1\" | undefined;\n\t\"@vocab\"?: string | null | undefined;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdContextDefinitionElement.js","sourceRoot":"","sources":["../../../src/models/IJsonLdContextDefinitionElement.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinition } from \"./IJsonLdContextDefinition.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A context definition element is used to define the types of a context definition.\n */\nexport type IJsonLdContextDefinitionElement = null | string | IJsonLdContextDefinition;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdContextDefinitionRoot.js","sourceRoot":"","sources":["../../../src/models/IJsonLdContextDefinitionRoot.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"./IJsonLdContextDefinitionElement.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A context definition root is used to define the root of a context definition.\n */\nexport type IJsonLdContextDefinitionRoot =\n\tIJsonLdContextDefinitionElement | IJsonLdContextDefinitionElement[];\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdDocument.js","sourceRoot":"","sources":["../../../src/models/IJsonLdDocument.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionRoot } from \"./IJsonLdContextDefinitionRoot.js\";\nimport type { IJsonLdNodeObject } from \"./IJsonLdNodeObject.js\";\nimport type { IJsonLdValueObject } from \"./IJsonLdValueObject.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A JSON-LD document MUST be valid JSON text as described in [RFC8259],\n * or some format that can be represented in the JSON-LD internal representation\n * that is equivalent to valid JSON text.\n * @see https://www.w3.org/TR/json-ld11/#json-ld-grammar\n */\nexport type IJsonLdDocument =\n\t| IJsonLdNodeObject\n\t| IJsonLdNodeObject[]\n\t| {\n\t\t\t\"@context\"?: IJsonLdContextDefinitionRoot | undefined;\n\t\t\t\"@graph\"?:\n\t\t\t\t| IJsonLdValueObject\n\t\t\t\t| IJsonLdNodeObject\n\t\t\t\t| (IJsonLdValueObject | IJsonLdNodeObject)[]\n\t\t\t\t| undefined;\n\t };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdExpandedTermDefinition.js","sourceRoot":"","sources":["../../../src/models/IJsonLdExpandedTermDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContainerType } from \"./IJsonLdContainerType.js\";\nimport type { IJsonLdContainerTypeArray } from \"./IJsonLdContainerTypeArray.js\";\nimport type { IJsonLdContextDefinition } from \"./IJsonLdContextDefinition.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * An expanded term definition is used to describe the mapping between a term\n * and its expanded identifier, as well as other properties of the value\n * associated with the term when it is used as key in a node object.\n * @see https://www.w3.org/TR/json-ld11/#expanded-term-definition\n */\nexport type IJsonLdExpandedTermDefinition = {\n\t\"@type\"?: \"@id\" | \"@json\" | \"@none\" | \"@vocab\" | string | undefined;\n\t\"@language\"?: string | undefined;\n\t\"@index\"?: string | undefined;\n\t\"@context\"?: IJsonLdContextDefinition | undefined;\n\t\"@prefix\"?: boolean | undefined;\n\t\"@propagate\"?: boolean | undefined;\n\t\"@protected\"?: boolean | undefined;\n} & (\n\t| {\n\t\t\t\"@id\"?: string | string[] | null | undefined;\n\t\t\t\"@nest\"?: \"@nest\" | string | undefined;\n\t\t\t\"@container\"?:\n\t\t\t\t| (\"@list\" | \"@set\" | IJsonLdContainerType)\n\t\t\t\t| (\"@list\" | \"@set\" | IJsonLdContainerType)[]\n\t\t\t\t| IJsonLdContainerTypeArray\n\t\t\t\t| null\n\t\t\t\t| undefined;\n\t }\n\t| {\n\t\t\t\"@reverse\": string;\n\t\t\t\"@container\"?: \"@set\" | \"@index\" | null | undefined;\n\t }\n);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdGraphObject.js","sourceRoot":"","sources":["../../../src/models/IJsonLdGraphObject.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n/* eslint-disable jsdoc/require-jsdoc */\nimport type { IJsonLdContextDefinitionRoot } from \"./IJsonLdContextDefinitionRoot.js\";\nimport type { IJsonLdNodeObject } from \"./IJsonLdNodeObject.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A graph object represents a named graph, which MAY include an explicit graph name.\n * @see https://www.w3.org/TR/json-ld11/#graph-objects\n */\nexport interface IJsonLdGraphObject {\n\t\"@graph\": IJsonLdNodeObject | IJsonLdNodeObject[];\n\t\"@index\"?: string | undefined;\n\t\"@id\"?: string | string[] | undefined;\n\t\"@context\"?: IJsonLdContextDefinitionRoot | undefined;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdIdMap.js","sourceRoot":"","sources":["../../../src/models/IJsonLdIdMap.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"./IJsonLdNodeObject.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * An id map is used to associate an IRI with a value that allows easy programmatic access.\n * @see https://www.w3.org/TR/json-ld11/#id-maps\n */\nexport interface IJsonLdIdMap {\n\t[key: string]: IJsonLdNodeObject;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdIncludedBlock.js","sourceRoot":"","sources":["../../../src/models/IJsonLdIncludedBlock.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"./IJsonLdNodeObject.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * An included block is used to provide a set of node objects.\n * @see https://www.w3.org/TR/json-ld11/#included-blocks\n */\nexport type IJsonLdIncludedBlock = IJsonLdNodeObject | IJsonLdNodeObject[];\n"]}
|