@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,101 @@
|
|
|
1
|
+
import type { ICompiledValidator } from "@3sixty/data-core";
|
|
2
|
+
/**
|
|
3
|
+
* Compiled validator for the JsonLdDocument schema.
|
|
4
|
+
*/
|
|
5
|
+
export declare const CompiledJsonLdDocument: ICompiledValidator;
|
|
6
|
+
/**
|
|
7
|
+
* Compiled validator for the JsonLdObject schema.
|
|
8
|
+
*/
|
|
9
|
+
export declare const CompiledJsonLdObject: ICompiledValidator;
|
|
10
|
+
/**
|
|
11
|
+
* Compiled validator for the JsonLdNodeObject schema.
|
|
12
|
+
*/
|
|
13
|
+
export declare const CompiledJsonLdNodeObject: ICompiledValidator;
|
|
14
|
+
/**
|
|
15
|
+
* Compiled validator for the JsonLdNodePrimitive schema.
|
|
16
|
+
*/
|
|
17
|
+
export declare const CompiledJsonLdNodePrimitive: ICompiledValidator;
|
|
18
|
+
/**
|
|
19
|
+
* Compiled validator for the JsonLdGraphObject schema.
|
|
20
|
+
*/
|
|
21
|
+
export declare const CompiledJsonLdGraphObject: ICompiledValidator;
|
|
22
|
+
/**
|
|
23
|
+
* Compiled validator for the JsonLdValueObject schema.
|
|
24
|
+
*/
|
|
25
|
+
export declare const CompiledJsonLdValueObject: ICompiledValidator;
|
|
26
|
+
/**
|
|
27
|
+
* Compiled validator for the JsonLdListObject schema.
|
|
28
|
+
*/
|
|
29
|
+
export declare const CompiledJsonLdListObject: ICompiledValidator;
|
|
30
|
+
/**
|
|
31
|
+
* Compiled validator for the JsonLdSetObject schema.
|
|
32
|
+
*/
|
|
33
|
+
export declare const CompiledJsonLdSetObject: ICompiledValidator;
|
|
34
|
+
/**
|
|
35
|
+
* Compiled validator for the JsonLdLanguageMap schema.
|
|
36
|
+
*/
|
|
37
|
+
export declare const CompiledJsonLdLanguageMap: ICompiledValidator;
|
|
38
|
+
/**
|
|
39
|
+
* Compiled validator for the JsonLdIndexMap schema.
|
|
40
|
+
*/
|
|
41
|
+
export declare const CompiledJsonLdIndexMap: ICompiledValidator;
|
|
42
|
+
/**
|
|
43
|
+
* Compiled validator for the JsonLdIndexMapItem schema.
|
|
44
|
+
*/
|
|
45
|
+
export declare const CompiledJsonLdIndexMapItem: ICompiledValidator;
|
|
46
|
+
/**
|
|
47
|
+
* Compiled validator for the JsonLdIdMap schema.
|
|
48
|
+
*/
|
|
49
|
+
export declare const CompiledJsonLdIdMap: ICompiledValidator;
|
|
50
|
+
/**
|
|
51
|
+
* Compiled validator for the JsonLdTypeMap schema.
|
|
52
|
+
*/
|
|
53
|
+
export declare const CompiledJsonLdTypeMap: ICompiledValidator;
|
|
54
|
+
/**
|
|
55
|
+
* Compiled validator for the JsonLdIncludedBlock schema.
|
|
56
|
+
*/
|
|
57
|
+
export declare const CompiledJsonLdIncludedBlock: ICompiledValidator;
|
|
58
|
+
/**
|
|
59
|
+
* Compiled validator for the JsonLdContextDefinition schema.
|
|
60
|
+
*/
|
|
61
|
+
export declare const CompiledJsonLdContextDefinition: ICompiledValidator;
|
|
62
|
+
/**
|
|
63
|
+
* Compiled validator for the JsonLdContextDefinitionRoot schema.
|
|
64
|
+
*/
|
|
65
|
+
export declare const CompiledJsonLdContextDefinitionRoot: ICompiledValidator;
|
|
66
|
+
/**
|
|
67
|
+
* Compiled validator for the JsonLdContextDefinitionElement schema.
|
|
68
|
+
*/
|
|
69
|
+
export declare const CompiledJsonLdContextDefinitionElement: ICompiledValidator;
|
|
70
|
+
/**
|
|
71
|
+
* Compiled validator for the JsonLdExpandedTermDefinition schema.
|
|
72
|
+
*/
|
|
73
|
+
export declare const CompiledJsonLdExpandedTermDefinition: ICompiledValidator;
|
|
74
|
+
/**
|
|
75
|
+
* Compiled validator for the JsonLdListOrSetItem schema.
|
|
76
|
+
*/
|
|
77
|
+
export declare const CompiledJsonLdListOrSetItem: ICompiledValidator;
|
|
78
|
+
/**
|
|
79
|
+
* Compiled validator for the JsonLdContainerType schema.
|
|
80
|
+
*/
|
|
81
|
+
export declare const CompiledJsonLdContainerType: ICompiledValidator;
|
|
82
|
+
/**
|
|
83
|
+
* Compiled validator for the JsonLdContainerTypeArray schema.
|
|
84
|
+
*/
|
|
85
|
+
export declare const CompiledJsonLdContainerTypeArray: ICompiledValidator;
|
|
86
|
+
/**
|
|
87
|
+
* Compiled validator for the JsonLdJsonPrimitive schema.
|
|
88
|
+
*/
|
|
89
|
+
export declare const CompiledJsonLdJsonPrimitive: ICompiledValidator;
|
|
90
|
+
/**
|
|
91
|
+
* Compiled validator for the JsonLdJsonArray schema.
|
|
92
|
+
*/
|
|
93
|
+
export declare const CompiledJsonLdJsonArray: ICompiledValidator;
|
|
94
|
+
/**
|
|
95
|
+
* Compiled validator for the JsonLdJsonObject schema.
|
|
96
|
+
*/
|
|
97
|
+
export declare const CompiledJsonLdJsonObject: ICompiledValidator;
|
|
98
|
+
/**
|
|
99
|
+
* Compiled validator for the JsonLdJsonValue schema.
|
|
100
|
+
*/
|
|
101
|
+
export declare const CompiledJsonLdJsonValue: ICompiledValidator;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { JsonLdExistingProperty } from "./jsonLdExistingProperty.js";
|
|
2
|
+
/**
|
|
3
|
+
* Infer an existing property's type from either of two source properties,
|
|
4
|
+
* or fall back to a default when neither exists.
|
|
5
|
+
*/
|
|
6
|
+
export type JsonLdExistingPropertyEither<T extends object, P1 extends PropertyKey, P2 extends PropertyKey, D> = [JsonLdExistingProperty<T, P1, never> | JsonLdExistingProperty<T, P2, never>] extends [never] ? D : JsonLdExistingProperty<T, P1, never> | JsonLdExistingProperty<T, P2, never>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JsonLdKeys } from "./jsonLdKeys.js";
|
|
2
|
+
import type { JsonLdWithAliases } from "./jsonLdWithAliases.js";
|
|
3
|
+
/**
|
|
4
|
+
* Create a JSON-LD object shape containing only JSON-LD keys plus aliased
|
|
5
|
+
* non-JSON-LD keys.
|
|
6
|
+
*/
|
|
7
|
+
export type JsonLdObjectWithAliases<T extends object, Prefix extends string> = JsonLdKeys<T> & JsonLdWithAliases<T, Prefix>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JsonLdExistingPropertyEither } from "./jsonLdExistingPropertyEither.js";
|
|
2
|
+
/**
|
|
3
|
+
* Add "@id" to a type.
|
|
4
|
+
*/
|
|
5
|
+
export type JsonLdObjectWithAtId<T extends object, Id = JsonLdExistingPropertyEither<T, "@id", "id", string>> = Omit<T, "@id" | "id"> & {
|
|
6
|
+
"@id": Id;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JsonLdExistingPropertyEither } from "./jsonLdExistingPropertyEither.js";
|
|
2
|
+
/**
|
|
3
|
+
* Add "@type" to a type.
|
|
4
|
+
*/
|
|
5
|
+
export type JsonLdObjectWithAtType<T extends object, Ty = JsonLdExistingPropertyEither<T, "@type", "type", string | string[]>> = Omit<T, "@type" | "type"> & {
|
|
6
|
+
"@type": Ty;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IJsonLdContextDefinitionRoot } from "../models/IJsonLdContextDefinitionRoot.js";
|
|
2
|
+
/**
|
|
3
|
+
* Add "@context" to a type.
|
|
4
|
+
*/
|
|
5
|
+
export type JsonLdObjectWithContext<T extends object, C = IJsonLdContextDefinitionRoot> = Omit<T, "@context"> & {
|
|
6
|
+
"@context": C;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JsonLdExistingPropertyEither } from "./jsonLdExistingPropertyEither.js";
|
|
2
|
+
/**
|
|
3
|
+
* Add "id" to a type.
|
|
4
|
+
*/
|
|
5
|
+
export type JsonLdObjectWithId<T extends object, Id = JsonLdExistingPropertyEither<T, "id", "@id", string>> = Omit<T, "id" | "@id"> & {
|
|
6
|
+
id: Id;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JsonLdExistingPropertyEither } from "./jsonLdExistingPropertyEither.js";
|
|
2
|
+
/**
|
|
3
|
+
* Add optional "@id" to a type.
|
|
4
|
+
*/
|
|
5
|
+
export type JsonLdObjectWithOptionalAtId<T extends object, Id = JsonLdExistingPropertyEither<T, "@id", "id", string>> = Omit<T, "@id" | "id"> & {
|
|
6
|
+
"@id"?: Id;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JsonLdExistingPropertyEither } from "./jsonLdExistingPropertyEither.js";
|
|
2
|
+
/**
|
|
3
|
+
* Add optional "@type" to a type.
|
|
4
|
+
*/
|
|
5
|
+
export type JsonLdObjectWithOptionalAtType<T extends object, Ty = JsonLdExistingPropertyEither<T, "@type", "type", string | string[]>> = Omit<T, "@type" | "type"> & {
|
|
6
|
+
"@type"?: Ty;
|
|
7
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { JsonLdExistingProperty } from "./jsonLdExistingProperty.js";
|
|
2
|
+
import type { IJsonLdContextDefinitionRoot } from "../models/IJsonLdContextDefinitionRoot.js";
|
|
3
|
+
/**
|
|
4
|
+
* Add optional "@context" to a type, inferring an existing context type from
|
|
5
|
+
* the source type when available, otherwise using the provided default.
|
|
6
|
+
*/
|
|
7
|
+
export type JsonLdObjectWithOptionalContext<T extends object, C = JsonLdExistingProperty<T, "@context", IJsonLdContextDefinitionRoot>> = Omit<T, "@context"> & {
|
|
8
|
+
"@context"?: C;
|
|
9
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JsonLdExistingPropertyEither } from "./jsonLdExistingPropertyEither.js";
|
|
2
|
+
/**
|
|
3
|
+
* Add optional "id" to a type.
|
|
4
|
+
*/
|
|
5
|
+
export type JsonLdObjectWithOptionalId<T extends object, Id = JsonLdExistingPropertyEither<T, "id", "@id", string>> = Omit<T, "id" | "@id"> & {
|
|
6
|
+
id?: Id;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JsonLdExistingPropertyEither } from "./jsonLdExistingPropertyEither.js";
|
|
2
|
+
/**
|
|
3
|
+
* Add optional "type" to a type.
|
|
4
|
+
*/
|
|
5
|
+
export type JsonLdObjectWithOptionalType<T extends object, Ty = JsonLdExistingPropertyEither<T, "type", "@type", string | string[]>> = Omit<T, "type" | "@type"> & {
|
|
6
|
+
type?: Ty;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JsonLdExistingPropertyEither } from "./jsonLdExistingPropertyEither.js";
|
|
2
|
+
/**
|
|
3
|
+
* Add "type" to a type.
|
|
4
|
+
*/
|
|
5
|
+
export type JsonLdObjectWithType<T extends object, Ty = JsonLdExistingPropertyEither<T, "type", "@type", string | string[]>> = Omit<T, "type" | "@type"> & {
|
|
6
|
+
type: Ty;
|
|
7
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { JsonLdAliasKey } from "./jsonLdAliasKey.js";
|
|
2
|
+
import type { JsonLdOptionalKeys } from "./jsonLdOptionalKeys.js";
|
|
3
|
+
import type { JsonLdRequiredKeys } from "./jsonLdRequiredKeys.js";
|
|
4
|
+
/**
|
|
5
|
+
* Remap an object type so JSON-LD keys ("@...") are preserved and
|
|
6
|
+
* non-JSON-LD keys are exposed as `Prefix:key` aliases, while preserving
|
|
7
|
+
* each key's original required/optional status.
|
|
8
|
+
*/
|
|
9
|
+
export type JsonLdWithAliases<T extends object, Prefix extends string> = {
|
|
10
|
+
[K in Extract<JsonLdRequiredKeys<T>, string> as JsonLdAliasKey<K, Prefix>]: T[K];
|
|
11
|
+
} & {
|
|
12
|
+
[K in Extract<JsonLdOptionalKeys<T>, string> as JsonLdAliasKey<K, Prefix>]?: T[K];
|
|
13
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export * from "./compiled/validators.js";
|
|
2
|
+
export * from "./dataTypes/jsonLdDataTypes.js";
|
|
3
|
+
export * from "./helpers/jsonLdAliasKey.js";
|
|
4
|
+
export * from "./helpers/jsonLdExistingProperty.js";
|
|
5
|
+
export * from "./helpers/jsonLdExistingPropertyEither.js";
|
|
6
|
+
export * from "./helpers/jsonLdKeys.js";
|
|
7
|
+
export * from "./helpers/jsonLdObjectWithAliases.js";
|
|
8
|
+
export * from "./helpers/jsonLdObjectWithAtId.js";
|
|
9
|
+
export * from "./helpers/jsonLdObjectWithAtType.js";
|
|
10
|
+
export * from "./helpers/jsonLdObjectWithContext.js";
|
|
11
|
+
export * from "./helpers/jsonLdObjectWithId.js";
|
|
12
|
+
export * from "./helpers/jsonLdObjectWithNoAtId.js";
|
|
13
|
+
export * from "./helpers/jsonLdObjectWithNoAtType.js";
|
|
14
|
+
export * from "./helpers/jsonLdObjectWithNoContext.js";
|
|
15
|
+
export * from "./helpers/jsonLdObjectWithNoId.js";
|
|
16
|
+
export * from "./helpers/jsonLdObjectWithNoType.js";
|
|
17
|
+
export * from "./helpers/jsonLdObjectWithOptionalAtId.js";
|
|
18
|
+
export * from "./helpers/jsonLdObjectWithOptionalAtType.js";
|
|
19
|
+
export * from "./helpers/jsonLdObjectWithOptionalContext.js";
|
|
20
|
+
export * from "./helpers/jsonLdObjectWithOptionalId.js";
|
|
21
|
+
export * from "./helpers/jsonLdObjectWithOptionalType.js";
|
|
22
|
+
export * from "./helpers/jsonLdObjectWithType.js";
|
|
23
|
+
export * from "./helpers/jsonLdOptionalKeys.js";
|
|
24
|
+
export * from "./helpers/jsonLdRequiredKeys.js";
|
|
25
|
+
export * from "./helpers/jsonLdWithAliases.js";
|
|
26
|
+
export * from "./models/IJsonLdContainerType.js";
|
|
27
|
+
export * from "./models/IJsonLdContainerTypeArray.js";
|
|
28
|
+
export * from "./models/IJsonLdContextDefinition.js";
|
|
29
|
+
export * from "./models/IJsonLdContextDefinitionElement.js";
|
|
30
|
+
export * from "./models/IJsonLdContextDefinitionRoot.js";
|
|
31
|
+
export * from "./models/IJsonLdDocument.js";
|
|
32
|
+
export * from "./models/IJsonLdExpandedTermDefinition.js";
|
|
33
|
+
export * from "./models/IJsonLdGraphObject.js";
|
|
34
|
+
export * from "./models/IJsonLdIdMap.js";
|
|
35
|
+
export * from "./models/IJsonLdIncludedBlock.js";
|
|
36
|
+
export * from "./models/IJsonLdIndexMap.js";
|
|
37
|
+
export * from "./models/IJsonLdIndexMapItem.js";
|
|
38
|
+
export * from "./models/IJsonLdJsonArray.js";
|
|
39
|
+
export * from "./models/IJsonLdJsonObject.js";
|
|
40
|
+
export * from "./models/IJsonLdJsonPrimitive.js";
|
|
41
|
+
export * from "./models/IJsonLdJsonValue.js";
|
|
42
|
+
export * from "./models/IJsonLdLanguageMap.js";
|
|
43
|
+
export * from "./models/IJsonLdListObject.js";
|
|
44
|
+
export * from "./models/IJsonLdListOrSetItem.js";
|
|
45
|
+
export * from "./models/IJsonLdNodeObject.js";
|
|
46
|
+
export * from "./models/IJsonLdNodePrimitive.js";
|
|
47
|
+
export * from "./models/IJsonLdObject.js";
|
|
48
|
+
export * from "./models/IJsonLdSetObject.js";
|
|
49
|
+
export * from "./models/IJsonLdTypeMap.js";
|
|
50
|
+
export * from "./models/IJsonLdValueObject.js";
|
|
51
|
+
export * from "./models/jsonLdContexts.js";
|
|
52
|
+
export * from "./models/jsonLdTypes.js";
|
|
53
|
+
export * from "./utils/jsonLdHelper.js";
|
|
54
|
+
export * from "./utils/jsonLdProcessor.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
3
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* JSON-LD container types.
|
|
7
|
+
*/
|
|
8
|
+
export type IJsonLdContainerType = "@language" | "@index" | "@id" | "@graph" | "@type";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IJsonLdContainerType } from "./IJsonLdContainerType.js";
|
|
2
|
+
/**
|
|
3
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
4
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* JSON-LD container type array.
|
|
8
|
+
*/
|
|
9
|
+
export type IJsonLdContainerTypeArray = ["@graph", "@id"] | ["@id", "@graph"] | ["@set", "@graph", "@id"] | ["@set", "@id", "@graph"] | ["@graph", "@set", "@id"] | ["@id", "@set", "@graph"] | ["@graph", "@id", "@set"] | ["@id", "@graph", "@set"] | ["@set", IJsonLdContainerType] | [IJsonLdContainerType, "@set"];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IJsonLdExpandedTermDefinition } from "./IJsonLdExpandedTermDefinition.js";
|
|
2
|
+
/**
|
|
3
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
4
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A context definition defines a local context in a node object.
|
|
8
|
+
* @see https://www.w3.org/TR/json-ld11/#context-definitions
|
|
9
|
+
*/
|
|
10
|
+
export interface IJsonLdContextDefinition {
|
|
11
|
+
[key: string]: null | string | IJsonLdExpandedTermDefinition | IJsonLdContextDefinition[keyof IJsonLdContextDefinition];
|
|
12
|
+
"@base"?: string | null | undefined;
|
|
13
|
+
"@direction"?: "ltr" | "rtl" | null | undefined;
|
|
14
|
+
"@import"?: string | undefined;
|
|
15
|
+
"@language"?: string | undefined;
|
|
16
|
+
"@propagate"?: boolean | undefined;
|
|
17
|
+
"@protected"?: boolean | undefined;
|
|
18
|
+
"@type"?: {
|
|
19
|
+
"@container": "@set";
|
|
20
|
+
"@protected"?: boolean | undefined;
|
|
21
|
+
} | undefined;
|
|
22
|
+
"@version"?: "1.1" | undefined;
|
|
23
|
+
"@vocab"?: string | null | undefined;
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IJsonLdContextDefinition } from "./IJsonLdContextDefinition.js";
|
|
2
|
+
/**
|
|
3
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
4
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A context definition element is used to define the types of a context definition.
|
|
8
|
+
*/
|
|
9
|
+
export type IJsonLdContextDefinitionElement = null | string | IJsonLdContextDefinition;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IJsonLdContextDefinitionElement } from "./IJsonLdContextDefinitionElement.js";
|
|
2
|
+
/**
|
|
3
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
4
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A context definition root is used to define the root of a context definition.
|
|
8
|
+
*/
|
|
9
|
+
export type IJsonLdContextDefinitionRoot = IJsonLdContextDefinitionElement | IJsonLdContextDefinitionElement[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IJsonLdContextDefinitionRoot } from "./IJsonLdContextDefinitionRoot.js";
|
|
2
|
+
import type { IJsonLdNodeObject } from "./IJsonLdNodeObject.js";
|
|
3
|
+
import type { IJsonLdValueObject } from "./IJsonLdValueObject.js";
|
|
4
|
+
/**
|
|
5
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
6
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* A JSON-LD document MUST be valid JSON text as described in [RFC8259],
|
|
10
|
+
* or some format that can be represented in the JSON-LD internal representation
|
|
11
|
+
* that is equivalent to valid JSON text.
|
|
12
|
+
* @see https://www.w3.org/TR/json-ld11/#json-ld-grammar
|
|
13
|
+
*/
|
|
14
|
+
export type IJsonLdDocument = IJsonLdNodeObject | IJsonLdNodeObject[] | {
|
|
15
|
+
"@context"?: IJsonLdContextDefinitionRoot | undefined;
|
|
16
|
+
"@graph"?: IJsonLdValueObject | IJsonLdNodeObject | (IJsonLdValueObject | IJsonLdNodeObject)[] | undefined;
|
|
17
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IJsonLdContainerType } from "./IJsonLdContainerType.js";
|
|
2
|
+
import type { IJsonLdContainerTypeArray } from "./IJsonLdContainerTypeArray.js";
|
|
3
|
+
import type { IJsonLdContextDefinition } from "./IJsonLdContextDefinition.js";
|
|
4
|
+
/**
|
|
5
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
6
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* An expanded term definition is used to describe the mapping between a term
|
|
10
|
+
* and its expanded identifier, as well as other properties of the value
|
|
11
|
+
* associated with the term when it is used as key in a node object.
|
|
12
|
+
* @see https://www.w3.org/TR/json-ld11/#expanded-term-definition
|
|
13
|
+
*/
|
|
14
|
+
export type IJsonLdExpandedTermDefinition = {
|
|
15
|
+
"@type"?: "@id" | "@json" | "@none" | "@vocab" | string | undefined;
|
|
16
|
+
"@language"?: string | undefined;
|
|
17
|
+
"@index"?: string | undefined;
|
|
18
|
+
"@context"?: IJsonLdContextDefinition | undefined;
|
|
19
|
+
"@prefix"?: boolean | undefined;
|
|
20
|
+
"@propagate"?: boolean | undefined;
|
|
21
|
+
"@protected"?: boolean | undefined;
|
|
22
|
+
} & ({
|
|
23
|
+
"@id"?: string | string[] | null | undefined;
|
|
24
|
+
"@nest"?: "@nest" | string | undefined;
|
|
25
|
+
"@container"?: ("@list" | "@set" | IJsonLdContainerType) | ("@list" | "@set" | IJsonLdContainerType)[] | IJsonLdContainerTypeArray | null | undefined;
|
|
26
|
+
} | {
|
|
27
|
+
"@reverse": string;
|
|
28
|
+
"@container"?: "@set" | "@index" | null | undefined;
|
|
29
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IJsonLdContextDefinitionRoot } from "./IJsonLdContextDefinitionRoot.js";
|
|
2
|
+
import type { IJsonLdNodeObject } from "./IJsonLdNodeObject.js";
|
|
3
|
+
/**
|
|
4
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
5
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* A graph object represents a named graph, which MAY include an explicit graph name.
|
|
9
|
+
* @see https://www.w3.org/TR/json-ld11/#graph-objects
|
|
10
|
+
*/
|
|
11
|
+
export interface IJsonLdGraphObject {
|
|
12
|
+
"@graph": IJsonLdNodeObject | IJsonLdNodeObject[];
|
|
13
|
+
"@index"?: string | undefined;
|
|
14
|
+
"@id"?: string | string[] | undefined;
|
|
15
|
+
"@context"?: IJsonLdContextDefinitionRoot | undefined;
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IJsonLdNodeObject } from "./IJsonLdNodeObject.js";
|
|
2
|
+
/**
|
|
3
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
4
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* An id map is used to associate an IRI with a value that allows easy programmatic access.
|
|
8
|
+
* @see https://www.w3.org/TR/json-ld11/#id-maps
|
|
9
|
+
*/
|
|
10
|
+
export interface IJsonLdIdMap {
|
|
11
|
+
[key: string]: IJsonLdNodeObject;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IJsonLdNodeObject } from "./IJsonLdNodeObject.js";
|
|
2
|
+
/**
|
|
3
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
4
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* An included block is used to provide a set of node objects.
|
|
8
|
+
* @see https://www.w3.org/TR/json-ld11/#included-blocks
|
|
9
|
+
*/
|
|
10
|
+
export type IJsonLdIncludedBlock = IJsonLdNodeObject | IJsonLdNodeObject[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IJsonLdIndexMapItem } from "./IJsonLdIndexMapItem.js";
|
|
2
|
+
/**
|
|
3
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
4
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* An index map allows keys that have no semantic meaning, but should be preserved regardless,
|
|
8
|
+
* to be used in JSON-LD documents.
|
|
9
|
+
* @see https://www.w3.org/TR/json-ld11/#index-maps
|
|
10
|
+
*/
|
|
11
|
+
export interface IJsonLdIndexMap {
|
|
12
|
+
[key: string]: IJsonLdIndexMapItem | IJsonLdIndexMapItem[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IJsonLdListObject } from "./IJsonLdListObject.js";
|
|
2
|
+
import type { IJsonLdNodeObject } from "./IJsonLdNodeObject.js";
|
|
3
|
+
import type { IJsonLdSetObject } from "./IJsonLdSetObject.js";
|
|
4
|
+
import type { IJsonLdValueObject } from "./IJsonLdValueObject.js";
|
|
5
|
+
/**
|
|
6
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
7
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The items that can be stored in an index map.
|
|
11
|
+
*/
|
|
12
|
+
export type IJsonLdIndexMapItem = null | boolean | number | string | IJsonLdNodeObject | IJsonLdValueObject | IJsonLdListObject | IJsonLdSetObject;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IJsonLdJsonValue } from "./IJsonLdJsonValue.js";
|
|
2
|
+
/**
|
|
3
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
4
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* JSON Type for array.
|
|
8
|
+
*/
|
|
9
|
+
export type IJsonLdJsonArray = IJsonLdJsonValue[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IJsonLdJsonValue } from "./IJsonLdJsonValue.js";
|
|
2
|
+
/**
|
|
3
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
4
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* JSON Type for object.
|
|
8
|
+
*/
|
|
9
|
+
export interface IJsonLdJsonObject {
|
|
10
|
+
[key: string]: IJsonLdJsonValue | undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
3
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* JSON Primitive.
|
|
7
|
+
*/
|
|
8
|
+
export type IJsonLdJsonPrimitive = string | number | boolean | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IJsonLdJsonArray } from "./IJsonLdJsonArray.js";
|
|
2
|
+
import type { IJsonLdJsonObject } from "./IJsonLdJsonObject.js";
|
|
3
|
+
import type { IJsonLdJsonPrimitive } from "./IJsonLdJsonPrimitive.js";
|
|
4
|
+
/**
|
|
5
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
6
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* JSON Value.
|
|
10
|
+
*/
|
|
11
|
+
export type IJsonLdJsonValue = IJsonLdJsonPrimitive | IJsonLdJsonArray | IJsonLdJsonObject;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
3
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* A language map is used to associate a language with a value in a way that allows easy programmatic access.
|
|
7
|
+
* @see https://www.w3.org/TR/json-ld11/#language-maps
|
|
8
|
+
*/
|
|
9
|
+
export interface IJsonLdLanguageMap {
|
|
10
|
+
[key: string]: null | string | string[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IJsonLdListOrSetItem } from "./IJsonLdListOrSetItem.js";
|
|
2
|
+
/**
|
|
3
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
4
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A list represents an ordered set of values.
|
|
8
|
+
* @see https://www.w3.org/TR/json-ld11/#lists-and-sets
|
|
9
|
+
*/
|
|
10
|
+
export interface IJsonLdListObject {
|
|
11
|
+
"@list": IJsonLdListOrSetItem | IJsonLdListOrSetItem[];
|
|
12
|
+
"@index"?: string | undefined;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IJsonLdNodeObject } from "./IJsonLdNodeObject.js";
|
|
2
|
+
import type { IJsonLdValueObject } from "./IJsonLdValueObject.js";
|
|
3
|
+
/**
|
|
4
|
+
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
5
|
+
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* A list or set item can be a null, boolean, number, string, node object, or value object.
|
|
9
|
+
*/
|
|
10
|
+
export type IJsonLdListOrSetItem = null | boolean | number | string | IJsonLdNodeObject | IJsonLdValueObject;
|