@twin.org/data-json-ld 0.0.1-next.34 → 0.0.1-next.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +173 -316
- package/dist/esm/index.mjs +173 -316
- package/dist/types/index.d.ts +0 -1
- package/dist/types/models/IJsonLdContextDefinition.d.ts +9 -10
- package/dist/types/models/IJsonLdDocument.d.ts +4 -3
- package/dist/types/models/IJsonLdExpandedTermDefinition.d.ts +10 -9
- package/dist/types/models/IJsonLdGraphObject.d.ts +4 -4
- package/dist/types/models/IJsonLdListObject.d.ts +3 -3
- package/dist/types/models/IJsonLdObject.d.ts +8 -7
- package/dist/types/models/IJsonLdSetObject.d.ts +3 -3
- package/dist/types/models/IJsonLdValueObject.d.ts +9 -9
- package/docs/changelog.md +28 -0
- package/docs/reference/index.md +0 -1
- package/docs/reference/interfaces/IJsonLdContextDefinition.md +1 -1
- package/docs/reference/interfaces/IJsonLdNodeObject.md +1 -1
- package/docs/reference/type-aliases/IJsonLdDocument.md +1 -1
- package/docs/reference/type-aliases/IJsonLdExpandedTermDefinition.md +6 -6
- package/docs/reference/type-aliases/IJsonLdValueObject.md +3 -3
- package/package.json +2 -3
- package/dist/types/models/IJsonLdKeyword.d.ts +0 -42
- package/docs/reference/type-aliases/IJsonLdKeyword.md +0 -149
package/dist/types/index.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ export * from "./models/IJsonLdJsonArray";
|
|
|
15
15
|
export * from "./models/IJsonLdJsonObject";
|
|
16
16
|
export * from "./models/IJsonLdJsonPrimitive";
|
|
17
17
|
export * from "./models/IJsonLdJsonValue";
|
|
18
|
-
export * from "./models/IJsonLdKeyword";
|
|
19
18
|
export * from "./models/IJsonLdLanguageMap";
|
|
20
19
|
export * from "./models/IJsonLdListObject";
|
|
21
20
|
export * from "./models/IJsonLdListOrSetItem";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { IJsonLdExpandedTermDefinition } from "./IJsonLdExpandedTermDefinition";
|
|
2
|
-
import type { IJsonLdKeyword } from "./IJsonLdKeyword";
|
|
3
2
|
/**
|
|
4
3
|
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
5
4
|
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
@@ -10,16 +9,16 @@ import type { IJsonLdKeyword } from "./IJsonLdKeyword";
|
|
|
10
9
|
*/
|
|
11
10
|
export interface IJsonLdContextDefinition {
|
|
12
11
|
[key: string]: null | string | IJsonLdExpandedTermDefinition | IJsonLdContextDefinition[keyof IJsonLdContextDefinition];
|
|
13
|
-
"@base"?:
|
|
14
|
-
"@direction"?:
|
|
15
|
-
"@import"?:
|
|
16
|
-
"@language"?:
|
|
17
|
-
"@propagate"?:
|
|
18
|
-
"@protected"?:
|
|
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;
|
|
19
18
|
"@type"?: {
|
|
20
19
|
"@container": "@set";
|
|
21
|
-
"@protected"?:
|
|
20
|
+
"@protected"?: boolean | undefined;
|
|
22
21
|
} | undefined;
|
|
23
|
-
"@version"?:
|
|
24
|
-
"@vocab"?:
|
|
22
|
+
"@version"?: "1.1" | undefined;
|
|
23
|
+
"@vocab"?: string | null | undefined;
|
|
25
24
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IJsonLdContextDefinitionRoot } from "./IJsonLdContextDefinitionRoot";
|
|
2
2
|
import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
|
|
3
|
+
import type { IJsonLdValueObject } from "./IJsonLdValueObject";
|
|
3
4
|
/**
|
|
4
5
|
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
5
6
|
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
@@ -15,6 +16,6 @@ import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
|
|
|
15
16
|
* @see https://www.w3.org/TR/json-ld11/#json-ld-grammar
|
|
16
17
|
*/
|
|
17
18
|
export type IJsonLdDocument = IJsonLdNodeObject | IJsonLdNodeObject[] | {
|
|
18
|
-
"@context"?:
|
|
19
|
-
"@graph"?:
|
|
19
|
+
"@context"?: IJsonLdContextDefinitionRoot | undefined;
|
|
20
|
+
"@graph"?: IJsonLdValueObject | IJsonLdNodeObject | (IJsonLdValueObject | IJsonLdNodeObject)[] | undefined;
|
|
20
21
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { IJsonLdContainerType } from "./IJsonLdContainerType";
|
|
2
|
+
import type { IJsonLdContainerTypeArray } from "./IJsonLdContainerTypeArray";
|
|
1
3
|
import type { IJsonLdContextDefinition } from "./IJsonLdContextDefinition";
|
|
2
|
-
import type { IJsonLdKeyword } from "./IJsonLdKeyword";
|
|
3
4
|
/**
|
|
4
5
|
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
5
6
|
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
@@ -12,17 +13,17 @@ import type { IJsonLdKeyword } from "./IJsonLdKeyword";
|
|
|
12
13
|
*/
|
|
13
14
|
export type IJsonLdExpandedTermDefinition = {
|
|
14
15
|
"@type"?: "@id" | "@json" | "@none" | "@vocab" | string | undefined;
|
|
15
|
-
"@language"?:
|
|
16
|
-
"@index"?:
|
|
16
|
+
"@language"?: string | undefined;
|
|
17
|
+
"@index"?: string | undefined;
|
|
17
18
|
"@context"?: IJsonLdContextDefinition | undefined;
|
|
18
|
-
"@prefix"?:
|
|
19
|
-
"@propagate"?:
|
|
20
|
-
"@protected"?:
|
|
19
|
+
"@prefix"?: boolean | undefined;
|
|
20
|
+
"@propagate"?: boolean | undefined;
|
|
21
|
+
"@protected"?: boolean | undefined;
|
|
21
22
|
} & ({
|
|
22
|
-
"@id"?:
|
|
23
|
+
"@id"?: string | string[] | null | undefined;
|
|
23
24
|
"@nest"?: "@nest" | string | undefined;
|
|
24
|
-
"@container"?:
|
|
25
|
+
"@container"?: ("@list" | "@set" | IJsonLdContainerType) | ("@list" | "@set" | IJsonLdContainerType)[] | IJsonLdContainerTypeArray | null | undefined;
|
|
25
26
|
} | {
|
|
26
|
-
"@reverse":
|
|
27
|
+
"@reverse": string;
|
|
27
28
|
"@container"?: "@set" | "@index" | null | undefined;
|
|
28
29
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IJsonLdContextDefinitionRoot } from "./IJsonLdContextDefinitionRoot";
|
|
2
2
|
import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
|
|
3
3
|
/**
|
|
4
4
|
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
@@ -10,7 +10,7 @@ import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
|
|
|
10
10
|
*/
|
|
11
11
|
export interface IJsonLdGraphObject {
|
|
12
12
|
"@graph": IJsonLdNodeObject | IJsonLdNodeObject[];
|
|
13
|
-
"@index"?:
|
|
14
|
-
"@id"?:
|
|
15
|
-
"@context"?:
|
|
13
|
+
"@index"?: string | undefined;
|
|
14
|
+
"@id"?: string | string[] | undefined;
|
|
15
|
+
"@context"?: IJsonLdContextDefinitionRoot | undefined;
|
|
16
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IJsonLdListOrSetItem } from "./IJsonLdListOrSetItem";
|
|
2
2
|
/**
|
|
3
3
|
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
4
4
|
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
@@ -8,6 +8,6 @@ import type { IJsonLdKeyword } from "./IJsonLdKeyword";
|
|
|
8
8
|
* @see https://www.w3.org/TR/json-ld11/#lists-and-sets
|
|
9
9
|
*/
|
|
10
10
|
export interface IJsonLdListObject {
|
|
11
|
-
"@list":
|
|
12
|
-
"@index"?:
|
|
11
|
+
"@list": IJsonLdListOrSetItem | IJsonLdListOrSetItem[];
|
|
12
|
+
"@index"?: string | undefined;
|
|
13
13
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { IJsonLdContextDefinitionRoot } from "./IJsonLdContextDefinitionRoot";
|
|
2
|
+
import type { IJsonLdIncludedBlock } from "./IJsonLdIncludedBlock";
|
|
1
3
|
import type { IJsonLdJsonObject } from "./IJsonLdJsonObject";
|
|
2
|
-
import type { IJsonLdKeyword } from "./IJsonLdKeyword";
|
|
3
4
|
import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
|
|
4
5
|
/**
|
|
5
6
|
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
@@ -11,14 +12,14 @@ import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
|
|
|
11
12
|
* @see https://www.w3.org/TR/json-ld11/#node-objects
|
|
12
13
|
*/
|
|
13
14
|
export interface IJsonLdObject {
|
|
14
|
-
"@context"?:
|
|
15
|
-
"@id"?:
|
|
16
|
-
"@included"?:
|
|
15
|
+
"@context"?: IJsonLdContextDefinitionRoot | undefined;
|
|
16
|
+
"@id"?: string | string[] | undefined;
|
|
17
|
+
"@included"?: IJsonLdIncludedBlock | undefined;
|
|
17
18
|
"@graph"?: IJsonLdNodeObject | IJsonLdNodeObject[] | undefined;
|
|
18
19
|
"@nest"?: IJsonLdJsonObject | IJsonLdJsonObject[] | undefined;
|
|
19
|
-
"@type"?:
|
|
20
|
+
"@type"?: string | string[] | undefined;
|
|
20
21
|
"@reverse"?: {
|
|
21
|
-
[key: string]:
|
|
22
|
+
[key: string]: string;
|
|
22
23
|
} | undefined;
|
|
23
|
-
"@index"?:
|
|
24
|
+
"@index"?: string | undefined;
|
|
24
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IJsonLdListOrSetItem } from "./IJsonLdListOrSetItem";
|
|
2
2
|
/**
|
|
3
3
|
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
4
4
|
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
@@ -8,6 +8,6 @@ import type { IJsonLdKeyword } from "./IJsonLdKeyword";
|
|
|
8
8
|
* @see https://www.w3.org/TR/json-ld11/#lists-and-sets
|
|
9
9
|
*/
|
|
10
10
|
export interface IJsonLdSetObject {
|
|
11
|
-
"@set":
|
|
12
|
-
"@index"?:
|
|
11
|
+
"@set": IJsonLdListOrSetItem | IJsonLdListOrSetItem[];
|
|
12
|
+
"@index"?: string | undefined;
|
|
13
13
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { IJsonLdContextDefinitionRoot } from "./IJsonLdContextDefinitionRoot";
|
|
1
2
|
import type { IJsonLdJsonArray } from "./IJsonLdJsonArray";
|
|
2
3
|
import type { IJsonLdJsonObject } from "./IJsonLdJsonObject";
|
|
3
|
-
import type { IJsonLdKeyword } from "./IJsonLdKeyword";
|
|
4
4
|
/**
|
|
5
5
|
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
6
6
|
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
@@ -11,16 +11,16 @@ import type { IJsonLdKeyword } from "./IJsonLdKeyword";
|
|
|
11
11
|
* @see https://www.w3.org/TR/json-ld11/#value-objects
|
|
12
12
|
*/
|
|
13
13
|
export type IJsonLdValueObject = {
|
|
14
|
-
"@index"?:
|
|
15
|
-
"@context"?:
|
|
14
|
+
"@index"?: string | undefined;
|
|
15
|
+
"@context"?: IJsonLdContextDefinitionRoot | undefined;
|
|
16
16
|
} & ({
|
|
17
|
-
"@value":
|
|
18
|
-
"@language"?:
|
|
19
|
-
"@direction"?:
|
|
17
|
+
"@value": null | boolean | number | string;
|
|
18
|
+
"@language"?: string | undefined;
|
|
19
|
+
"@direction"?: "ltr" | "rtl" | null | undefined;
|
|
20
20
|
} | {
|
|
21
|
-
"@value":
|
|
22
|
-
"@type":
|
|
21
|
+
"@value": null | boolean | number | string;
|
|
22
|
+
"@type": string;
|
|
23
23
|
} | {
|
|
24
|
-
"@value":
|
|
24
|
+
"@value": null | boolean | number | string | IJsonLdJsonObject | IJsonLdJsonArray;
|
|
25
25
|
"@type": "@json";
|
|
26
26
|
});
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @twin.org/data-json-ld - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.1-next.36](https://github.com/twinfoundation/data/compare/data-json-ld-v0.0.1-next.35...data-json-ld-v0.0.1-next.36) (2025-06-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* expand Json LD Keyword ([70632d1](https://github.com/twinfoundation/data/commit/70632d1e11ad85cf3c57e118476b125a673f1681))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/data-core bumped from 0.0.1-next.35 to 0.0.1-next.36
|
|
16
|
+
|
|
17
|
+
## [0.0.1-next.35](https://github.com/twinfoundation/data/compare/data-json-ld-v0.0.1-next.34...data-json-ld-v0.0.1-next.35) (2025-06-03)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* update ts-to-schema ([8c3cd91](https://github.com/twinfoundation/data/commit/8c3cd9131113f2d609f6e709562402e5c7766c1a))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* The following workspace dependencies were updated
|
|
28
|
+
* dependencies
|
|
29
|
+
* @twin.org/data-core bumped from 0.0.1-next.34 to 0.0.1-next.35
|
|
30
|
+
|
|
3
31
|
## [0.0.1-next.34](https://github.com/twinfoundation/data/compare/data-json-ld-v0.0.1-next.33...data-json-ld-v0.0.1-next.34) (2025-06-02)
|
|
4
32
|
|
|
5
33
|
|
package/docs/reference/index.md
CHANGED
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
- [IJsonLdJsonArray](type-aliases/IJsonLdJsonArray.md)
|
|
34
34
|
- [IJsonLdJsonPrimitive](type-aliases/IJsonLdJsonPrimitive.md)
|
|
35
35
|
- [IJsonLdJsonValue](type-aliases/IJsonLdJsonValue.md)
|
|
36
|
-
- [IJsonLdKeyword](type-aliases/IJsonLdKeyword.md)
|
|
37
36
|
- [IJsonLdListOrSetItem](type-aliases/IJsonLdListOrSetItem.md)
|
|
38
37
|
- [IJsonLdNodePrimitive](type-aliases/IJsonLdNodePrimitive.md)
|
|
39
38
|
- [IJsonLdValueObject](type-aliases/IJsonLdValueObject.md)
|
|
@@ -8,7 +8,7 @@ https://www.w3.org/TR/json-ld11/#context-definitions
|
|
|
8
8
|
|
|
9
9
|
## Indexable
|
|
10
10
|
|
|
11
|
-
\[`key`: `string`\]: `undefined` \| `null` \| `string` \| `boolean` \| [`IJsonLdExpandedTermDefinition`](../type-aliases/IJsonLdExpandedTermDefinition.md) \| \{ `@container`: `"@set"`; `@protected
|
|
11
|
+
\[`key`: `string`\]: `undefined` \| `null` \| `string` \| `boolean` \| [`IJsonLdExpandedTermDefinition`](../type-aliases/IJsonLdExpandedTermDefinition.md) \| \{ `@container`: `"@set"`; `@protected?`: `boolean`; \}
|
|
12
12
|
|
|
13
13
|
## Properties
|
|
14
14
|
|
|
@@ -13,7 +13,7 @@ https://www.w3.org/TR/json-ld11/#node-objects
|
|
|
13
13
|
|
|
14
14
|
## Indexable
|
|
15
15
|
|
|
16
|
-
\[`key`: `string`\]: `undefined` \| `null` \| `string` \| `number` \| `boolean` \| `string`[] \| [`IJsonLdContextDefinition`](IJsonLdContextDefinition.md) \| [`IJsonLdContextDefinitionElement`](../type-aliases/IJsonLdContextDefinitionElement.md)[] \| [`IJsonLdIdMap`](IJsonLdIdMap.md) \| `IJsonLdNodeObject` \| [`
|
|
16
|
+
\[`key`: `string`\]: `undefined` \| `null` \| `string` \| `number` \| `boolean` \| `string`[] \| [`IJsonLdContextDefinition`](IJsonLdContextDefinition.md) \| [`IJsonLdContextDefinitionElement`](../type-aliases/IJsonLdContextDefinitionElement.md)[] \| [`IJsonLdIdMap`](IJsonLdIdMap.md) \| `IJsonLdNodeObject` \| `IJsonLdNodeObject`[] \| [`IJsonLdJsonObject`](IJsonLdJsonObject.md) \| `object` & `object` \| `object` & `object` \| `object` & `object` \| [`IJsonLdListObject`](IJsonLdListObject.md) \| [`IJsonLdSetObject`](IJsonLdSetObject.md) \| [`IJsonLdIndexMap`](IJsonLdIndexMap.md) \| [`IJsonLdLanguageMap`](IJsonLdLanguageMap.md) \| [`IJsonLdGraphObject`](IJsonLdGraphObject.md) \| [`IJsonLdJsonObject`](IJsonLdJsonObject.md)[] \| \{[`key`: `string`]: `string`; \} \| [`IJsonLdTypeMap`](IJsonLdTypeMap.md) \| [`IJsonLdNodePrimitive`](../type-aliases/IJsonLdNodePrimitive.md)[]
|
|
17
17
|
|
|
18
18
|
## Properties
|
|
19
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Type Alias: IJsonLdDocument
|
|
2
2
|
|
|
3
|
-
> **IJsonLdDocument** = [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md) \| [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md)[] \| \{ `@context
|
|
3
|
+
> **IJsonLdDocument** = [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md) \| [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md)[] \| \{ `@context?`: [`IJsonLdContextDefinitionRoot`](IJsonLdContextDefinitionRoot.md); `@graph?`: [`IJsonLdValueObject`](IJsonLdValueObject.md) \| [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md) \| ([`IJsonLdValueObject`](IJsonLdValueObject.md) \| [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md))[]; \}
|
|
4
4
|
|
|
5
5
|
A JSON-LD document MUST be valid JSON text as described in [RFC8259],
|
|
6
6
|
or some format that can be represented in the JSON-LD internal representation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Type Alias: IJsonLdExpandedTermDefinition
|
|
2
2
|
|
|
3
|
-
> **IJsonLdExpandedTermDefinition** = `object` & \{ `@id
|
|
3
|
+
> **IJsonLdExpandedTermDefinition** = `object` & \{ `@id?`: `string` \| `string`[] \| `null`; `@nest?`: `"@nest"` \| `string`; `@container?`: `"@list"` \| `"@set"` \| [`IJsonLdContainerType`](IJsonLdContainerType.md) \| (`"@list"` \| `"@set"` \| [`IJsonLdContainerType`](IJsonLdContainerType.md))[] \| [`IJsonLdContainerTypeArray`](IJsonLdContainerTypeArray.md) \| `null`; \} \| \{ `@reverse`: `string`; `@container?`: `"@set"` \| `"@index"` \| `null`; \}
|
|
4
4
|
|
|
5
5
|
An expanded term definition is used to describe the mapping between a term
|
|
6
6
|
and its expanded identifier, as well as other properties of the value
|
|
@@ -14,11 +14,11 @@ associated with the term when it is used as key in a node object.
|
|
|
14
14
|
|
|
15
15
|
### @language?
|
|
16
16
|
|
|
17
|
-
> `optional` **@language**:
|
|
17
|
+
> `optional` **@language**: `string`
|
|
18
18
|
|
|
19
19
|
### @index?
|
|
20
20
|
|
|
21
|
-
> `optional` **@index**:
|
|
21
|
+
> `optional` **@index**: `string`
|
|
22
22
|
|
|
23
23
|
### @context?
|
|
24
24
|
|
|
@@ -26,15 +26,15 @@ associated with the term when it is used as key in a node object.
|
|
|
26
26
|
|
|
27
27
|
### @prefix?
|
|
28
28
|
|
|
29
|
-
> `optional` **@prefix**:
|
|
29
|
+
> `optional` **@prefix**: `boolean`
|
|
30
30
|
|
|
31
31
|
### @propagate?
|
|
32
32
|
|
|
33
|
-
> `optional` **@propagate**:
|
|
33
|
+
> `optional` **@propagate**: `boolean`
|
|
34
34
|
|
|
35
35
|
### @protected?
|
|
36
36
|
|
|
37
|
-
> `optional` **@protected**:
|
|
37
|
+
> `optional` **@protected**: `boolean`
|
|
38
38
|
|
|
39
39
|
## See
|
|
40
40
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Type Alias: IJsonLdValueObject
|
|
2
2
|
|
|
3
|
-
> **IJsonLdValueObject** = `object` & \{ `@value`:
|
|
3
|
+
> **IJsonLdValueObject** = `object` & \{ `@value`: `null` \| `boolean` \| `number` \| `string`; `@language?`: `string`; `@direction?`: `"ltr"` \| `"rtl"` \| `null`; \} \| \{ `@value`: `null` \| `boolean` \| `number` \| `string`; `@type`: `string`; \} \| \{ `@value`: `null` \| `boolean` \| `number` \| `string` \| [`IJsonLdJsonObject`](../interfaces/IJsonLdJsonObject.md) \| [`IJsonLdJsonArray`](IJsonLdJsonArray.md); `@type`: `"@json"`; \}
|
|
4
4
|
|
|
5
5
|
A value object is used to explicitly associate a type or a language with a value
|
|
6
6
|
to create a typed value or a language-tagged string and possibly associate a base direction.
|
|
@@ -9,11 +9,11 @@ to create a typed value or a language-tagged string and possibly associate a bas
|
|
|
9
9
|
|
|
10
10
|
### @index?
|
|
11
11
|
|
|
12
|
-
> `optional` **@index**:
|
|
12
|
+
> `optional` **@index**: `string`
|
|
13
13
|
|
|
14
14
|
### @context?
|
|
15
15
|
|
|
16
|
-
> `optional` **@context**: [`
|
|
16
|
+
> `optional` **@context**: [`IJsonLdContextDefinitionRoot`](IJsonLdContextDefinitionRoot.md)
|
|
17
17
|
|
|
18
18
|
## See
|
|
19
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/data-json-ld",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.36",
|
|
4
4
|
"description": "Models which define the structure of JSON LD",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,11 +15,10 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@twin.org/core": "next",
|
|
18
|
-
"@twin.org/data-core": "0.0.1-next.
|
|
18
|
+
"@twin.org/data-core": "0.0.1-next.36",
|
|
19
19
|
"@twin.org/entity": "next",
|
|
20
20
|
"@twin.org/nameof": "next",
|
|
21
21
|
"@twin.org/web": "next",
|
|
22
|
-
"@types/json-schema": "7.0.15",
|
|
23
22
|
"@types/jsonld": "1.5.15",
|
|
24
23
|
"jsonld": "8.3.3"
|
|
25
24
|
},
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { IJsonLdContainerType } from "./IJsonLdContainerType";
|
|
2
|
-
import type { IJsonLdContainerTypeArray } from "./IJsonLdContainerTypeArray";
|
|
3
|
-
import type { IJsonLdContextDefinitionRoot } from "./IJsonLdContextDefinitionRoot";
|
|
4
|
-
import type { IJsonLdIncludedBlock } from "./IJsonLdIncludedBlock";
|
|
5
|
-
import type { IJsonLdListOrSetItem } from "./IJsonLdListOrSetItem";
|
|
6
|
-
import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
|
|
7
|
-
import type { IJsonLdValueObject } from "./IJsonLdValueObject";
|
|
8
|
-
/**
|
|
9
|
-
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
10
|
-
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* A list of keywords and their types.
|
|
14
|
-
* Only used for internal reference; not an actual interface.
|
|
15
|
-
* Not for export.
|
|
16
|
-
* @see https://www.w3.org/TR/json-ld/#keywords
|
|
17
|
-
*/
|
|
18
|
-
export type IJsonLdKeyword = {
|
|
19
|
-
"@base": string | null;
|
|
20
|
-
"@container": ("@list" | "@set" | IJsonLdContainerType) | ("@list" | "@set" | IJsonLdContainerType)[] | IJsonLdContainerTypeArray | null;
|
|
21
|
-
"@context": IJsonLdContextDefinitionRoot;
|
|
22
|
-
"@direction": "ltr" | "rtl" | null;
|
|
23
|
-
"@graph": IJsonLdValueObject | IJsonLdNodeObject | (IJsonLdValueObject | IJsonLdNodeObject)[];
|
|
24
|
-
"@id": string | string[];
|
|
25
|
-
"@import": string;
|
|
26
|
-
"@included": IJsonLdIncludedBlock;
|
|
27
|
-
"@index": string;
|
|
28
|
-
"@json": "@json";
|
|
29
|
-
"@language": string;
|
|
30
|
-
"@list": IJsonLdListOrSetItem | IJsonLdListOrSetItem[];
|
|
31
|
-
"@nest": object;
|
|
32
|
-
"@none": "@none";
|
|
33
|
-
"@prefix": boolean;
|
|
34
|
-
"@propagate": boolean;
|
|
35
|
-
"@protected": boolean;
|
|
36
|
-
"@reverse": string;
|
|
37
|
-
"@set": IJsonLdListOrSetItem | IJsonLdListOrSetItem[];
|
|
38
|
-
"@type": string;
|
|
39
|
-
"@value": null | boolean | number | string;
|
|
40
|
-
"@version": "1.1";
|
|
41
|
-
"@vocab": string | null;
|
|
42
|
-
};
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
# Type Alias: IJsonLdKeyword
|
|
2
|
-
|
|
3
|
-
> **IJsonLdKeyword** = `object`
|
|
4
|
-
|
|
5
|
-
A list of keywords and their types.
|
|
6
|
-
Only used for internal reference; not an actual interface.
|
|
7
|
-
Not for export.
|
|
8
|
-
|
|
9
|
-
## See
|
|
10
|
-
|
|
11
|
-
https://www.w3.org/TR/json-ld/#keywords
|
|
12
|
-
|
|
13
|
-
## Properties
|
|
14
|
-
|
|
15
|
-
### @base
|
|
16
|
-
|
|
17
|
-
> **@base**: `string` \| `null`
|
|
18
|
-
|
|
19
|
-
***
|
|
20
|
-
|
|
21
|
-
### @container
|
|
22
|
-
|
|
23
|
-
> **@container**: `"@list"` \| `"@set"` \| [`IJsonLdContainerType`](IJsonLdContainerType.md) \| (`"@list"` \| `"@set"` \| [`IJsonLdContainerType`](IJsonLdContainerType.md))[] \| [`IJsonLdContainerTypeArray`](IJsonLdContainerTypeArray.md) \| `null`
|
|
24
|
-
|
|
25
|
-
***
|
|
26
|
-
|
|
27
|
-
### @context
|
|
28
|
-
|
|
29
|
-
> **@context**: [`IJsonLdContextDefinitionRoot`](IJsonLdContextDefinitionRoot.md)
|
|
30
|
-
|
|
31
|
-
***
|
|
32
|
-
|
|
33
|
-
### @direction
|
|
34
|
-
|
|
35
|
-
> **@direction**: `"ltr"` \| `"rtl"` \| `null`
|
|
36
|
-
|
|
37
|
-
***
|
|
38
|
-
|
|
39
|
-
### @graph
|
|
40
|
-
|
|
41
|
-
> **@graph**: [`IJsonLdValueObject`](IJsonLdValueObject.md) \| [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md) \| ([`IJsonLdValueObject`](IJsonLdValueObject.md) \| [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md))[]
|
|
42
|
-
|
|
43
|
-
***
|
|
44
|
-
|
|
45
|
-
### @id
|
|
46
|
-
|
|
47
|
-
> **@id**: `string` \| `string`[]
|
|
48
|
-
|
|
49
|
-
***
|
|
50
|
-
|
|
51
|
-
### @import
|
|
52
|
-
|
|
53
|
-
> **@import**: `string`
|
|
54
|
-
|
|
55
|
-
***
|
|
56
|
-
|
|
57
|
-
### @included
|
|
58
|
-
|
|
59
|
-
> **@included**: [`IJsonLdIncludedBlock`](IJsonLdIncludedBlock.md)
|
|
60
|
-
|
|
61
|
-
***
|
|
62
|
-
|
|
63
|
-
### @index
|
|
64
|
-
|
|
65
|
-
> **@index**: `string`
|
|
66
|
-
|
|
67
|
-
***
|
|
68
|
-
|
|
69
|
-
### @json
|
|
70
|
-
|
|
71
|
-
> **@json**: `"@json"`
|
|
72
|
-
|
|
73
|
-
***
|
|
74
|
-
|
|
75
|
-
### @language
|
|
76
|
-
|
|
77
|
-
> **@language**: `string`
|
|
78
|
-
|
|
79
|
-
***
|
|
80
|
-
|
|
81
|
-
### @list
|
|
82
|
-
|
|
83
|
-
> **@list**: [`IJsonLdListOrSetItem`](IJsonLdListOrSetItem.md) \| [`IJsonLdListOrSetItem`](IJsonLdListOrSetItem.md)[]
|
|
84
|
-
|
|
85
|
-
***
|
|
86
|
-
|
|
87
|
-
### @nest
|
|
88
|
-
|
|
89
|
-
> **@nest**: `object`
|
|
90
|
-
|
|
91
|
-
***
|
|
92
|
-
|
|
93
|
-
### @none
|
|
94
|
-
|
|
95
|
-
> **@none**: `"@none"`
|
|
96
|
-
|
|
97
|
-
***
|
|
98
|
-
|
|
99
|
-
### @prefix
|
|
100
|
-
|
|
101
|
-
> **@prefix**: `boolean`
|
|
102
|
-
|
|
103
|
-
***
|
|
104
|
-
|
|
105
|
-
### @propagate
|
|
106
|
-
|
|
107
|
-
> **@propagate**: `boolean`
|
|
108
|
-
|
|
109
|
-
***
|
|
110
|
-
|
|
111
|
-
### @protected
|
|
112
|
-
|
|
113
|
-
> **@protected**: `boolean`
|
|
114
|
-
|
|
115
|
-
***
|
|
116
|
-
|
|
117
|
-
### @reverse
|
|
118
|
-
|
|
119
|
-
> **@reverse**: `string`
|
|
120
|
-
|
|
121
|
-
***
|
|
122
|
-
|
|
123
|
-
### @set
|
|
124
|
-
|
|
125
|
-
> **@set**: [`IJsonLdListOrSetItem`](IJsonLdListOrSetItem.md) \| [`IJsonLdListOrSetItem`](IJsonLdListOrSetItem.md)[]
|
|
126
|
-
|
|
127
|
-
***
|
|
128
|
-
|
|
129
|
-
### @type
|
|
130
|
-
|
|
131
|
-
> **@type**: `string`
|
|
132
|
-
|
|
133
|
-
***
|
|
134
|
-
|
|
135
|
-
### @value
|
|
136
|
-
|
|
137
|
-
> **@value**: `null` \| `boolean` \| `number` \| `string`
|
|
138
|
-
|
|
139
|
-
***
|
|
140
|
-
|
|
141
|
-
### @version
|
|
142
|
-
|
|
143
|
-
> **@version**: `"1.1"`
|
|
144
|
-
|
|
145
|
-
***
|
|
146
|
-
|
|
147
|
-
### @vocab
|
|
148
|
-
|
|
149
|
-
> **@vocab**: `string` \| `null`
|