@twin.org/auditable-item-graph-models 0.0.1-next.39 → 0.0.1-next.40
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 +29 -23
- package/dist/esm/index.mjs +29 -23
- package/docs/changelog.md +7 -0
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
var dataCore = require('@twin.org/data-core');
|
|
4
4
|
|
|
5
|
+
// Copyright 2024 IOTA Stiftung.
|
|
6
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
7
|
+
/**
|
|
8
|
+
* The contexts of auditable item graph data.
|
|
9
|
+
*/
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11
|
+
const AuditableItemGraphContexts = {
|
|
12
|
+
/**
|
|
13
|
+
* The context root for the auditable item graph types.
|
|
14
|
+
*/
|
|
15
|
+
ContextRoot: "https://schema.twindev.org/aig/",
|
|
16
|
+
/**
|
|
17
|
+
* The context root for the common types.
|
|
18
|
+
*/
|
|
19
|
+
ContextRootCommon: "https://schema.twindev.org/common/"
|
|
20
|
+
};
|
|
21
|
+
|
|
5
22
|
// Copyright 2024 IOTA Stiftung.
|
|
6
23
|
// SPDX-License-Identifier: Apache-2.0.
|
|
7
24
|
/**
|
|
@@ -488,32 +505,38 @@ class AuditableItemGraphDataTypes {
|
|
|
488
505
|
* Register all the data types.
|
|
489
506
|
*/
|
|
490
507
|
static registerTypes() {
|
|
491
|
-
dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.Vertex
|
|
508
|
+
dataCore.DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.ContextRoot}${AuditableItemGraphTypes.Vertex}`, () => ({
|
|
509
|
+
context: AuditableItemGraphContexts.ContextRoot,
|
|
492
510
|
type: AuditableItemGraphTypes.Vertex,
|
|
493
511
|
defaultValue: {},
|
|
494
512
|
jsonSchema: async () => AuditableItemGraphVertexSchema
|
|
495
513
|
}));
|
|
496
|
-
dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.Alias
|
|
514
|
+
dataCore.DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.ContextRoot}${AuditableItemGraphTypes.Alias}`, () => ({
|
|
515
|
+
context: AuditableItemGraphContexts.ContextRoot,
|
|
497
516
|
type: AuditableItemGraphTypes.Alias,
|
|
498
517
|
defaultValue: {},
|
|
499
518
|
jsonSchema: async () => AuditableItemGraphAliasSchema
|
|
500
519
|
}));
|
|
501
|
-
dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.Resource
|
|
520
|
+
dataCore.DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.ContextRoot}${AuditableItemGraphTypes.Resource}`, () => ({
|
|
521
|
+
context: AuditableItemGraphContexts.ContextRoot,
|
|
502
522
|
type: AuditableItemGraphTypes.Resource,
|
|
503
523
|
defaultValue: {},
|
|
504
524
|
jsonSchema: async () => AuditableItemGraphResourceSchema
|
|
505
525
|
}));
|
|
506
|
-
dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.Edge
|
|
526
|
+
dataCore.DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.ContextRoot}${AuditableItemGraphTypes.Edge}`, () => ({
|
|
527
|
+
context: AuditableItemGraphContexts.ContextRoot,
|
|
507
528
|
type: AuditableItemGraphTypes.Edge,
|
|
508
529
|
defaultValue: {},
|
|
509
530
|
jsonSchema: async () => AuditableItemGraphEdgeSchema
|
|
510
531
|
}));
|
|
511
|
-
dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.Changeset
|
|
532
|
+
dataCore.DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.ContextRoot}${AuditableItemGraphTypes.Changeset}`, () => ({
|
|
533
|
+
context: AuditableItemGraphContexts.ContextRoot,
|
|
512
534
|
type: AuditableItemGraphTypes.Changeset,
|
|
513
535
|
defaultValue: {},
|
|
514
536
|
jsonSchema: async () => AuditableItemGraphChangesetSchema
|
|
515
537
|
}));
|
|
516
|
-
dataCore.DataTypeHandlerFactory.register(AuditableItemGraphTypes.PatchOperation
|
|
538
|
+
dataCore.DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.ContextRoot}${AuditableItemGraphTypes.PatchOperation}`, () => ({
|
|
539
|
+
context: AuditableItemGraphContexts.ContextRoot,
|
|
517
540
|
type: AuditableItemGraphTypes.PatchOperation,
|
|
518
541
|
defaultValue: {},
|
|
519
542
|
jsonSchema: async () => AuditableItemGraphPatchOperationSchema
|
|
@@ -521,23 +544,6 @@ class AuditableItemGraphDataTypes {
|
|
|
521
544
|
}
|
|
522
545
|
}
|
|
523
546
|
|
|
524
|
-
// Copyright 2024 IOTA Stiftung.
|
|
525
|
-
// SPDX-License-Identifier: Apache-2.0.
|
|
526
|
-
/**
|
|
527
|
-
* The contexts of auditable item graph data.
|
|
528
|
-
*/
|
|
529
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
530
|
-
const AuditableItemGraphContexts = {
|
|
531
|
-
/**
|
|
532
|
-
* The context root for the auditable item graph types.
|
|
533
|
-
*/
|
|
534
|
-
ContextRoot: "https://schema.twindev.org/aig/",
|
|
535
|
-
/**
|
|
536
|
-
* The context root for the common types.
|
|
537
|
-
*/
|
|
538
|
-
ContextRootCommon: "https://schema.twindev.org/common/"
|
|
539
|
-
};
|
|
540
|
-
|
|
541
547
|
// Copyright 2024 IOTA Stiftung.
|
|
542
548
|
// SPDX-License-Identifier: Apache-2.0.
|
|
543
549
|
/**
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import { DataTypeHandlerFactory } from '@twin.org/data-core';
|
|
2
2
|
|
|
3
|
+
// Copyright 2024 IOTA Stiftung.
|
|
4
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
5
|
+
/**
|
|
6
|
+
* The contexts of auditable item graph data.
|
|
7
|
+
*/
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
|
+
const AuditableItemGraphContexts = {
|
|
10
|
+
/**
|
|
11
|
+
* The context root for the auditable item graph types.
|
|
12
|
+
*/
|
|
13
|
+
ContextRoot: "https://schema.twindev.org/aig/",
|
|
14
|
+
/**
|
|
15
|
+
* The context root for the common types.
|
|
16
|
+
*/
|
|
17
|
+
ContextRootCommon: "https://schema.twindev.org/common/"
|
|
18
|
+
};
|
|
19
|
+
|
|
3
20
|
// Copyright 2024 IOTA Stiftung.
|
|
4
21
|
// SPDX-License-Identifier: Apache-2.0.
|
|
5
22
|
/**
|
|
@@ -486,32 +503,38 @@ class AuditableItemGraphDataTypes {
|
|
|
486
503
|
* Register all the data types.
|
|
487
504
|
*/
|
|
488
505
|
static registerTypes() {
|
|
489
|
-
DataTypeHandlerFactory.register(AuditableItemGraphTypes.Vertex
|
|
506
|
+
DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.ContextRoot}${AuditableItemGraphTypes.Vertex}`, () => ({
|
|
507
|
+
context: AuditableItemGraphContexts.ContextRoot,
|
|
490
508
|
type: AuditableItemGraphTypes.Vertex,
|
|
491
509
|
defaultValue: {},
|
|
492
510
|
jsonSchema: async () => AuditableItemGraphVertexSchema
|
|
493
511
|
}));
|
|
494
|
-
DataTypeHandlerFactory.register(AuditableItemGraphTypes.Alias
|
|
512
|
+
DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.ContextRoot}${AuditableItemGraphTypes.Alias}`, () => ({
|
|
513
|
+
context: AuditableItemGraphContexts.ContextRoot,
|
|
495
514
|
type: AuditableItemGraphTypes.Alias,
|
|
496
515
|
defaultValue: {},
|
|
497
516
|
jsonSchema: async () => AuditableItemGraphAliasSchema
|
|
498
517
|
}));
|
|
499
|
-
DataTypeHandlerFactory.register(AuditableItemGraphTypes.Resource
|
|
518
|
+
DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.ContextRoot}${AuditableItemGraphTypes.Resource}`, () => ({
|
|
519
|
+
context: AuditableItemGraphContexts.ContextRoot,
|
|
500
520
|
type: AuditableItemGraphTypes.Resource,
|
|
501
521
|
defaultValue: {},
|
|
502
522
|
jsonSchema: async () => AuditableItemGraphResourceSchema
|
|
503
523
|
}));
|
|
504
|
-
DataTypeHandlerFactory.register(AuditableItemGraphTypes.Edge
|
|
524
|
+
DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.ContextRoot}${AuditableItemGraphTypes.Edge}`, () => ({
|
|
525
|
+
context: AuditableItemGraphContexts.ContextRoot,
|
|
505
526
|
type: AuditableItemGraphTypes.Edge,
|
|
506
527
|
defaultValue: {},
|
|
507
528
|
jsonSchema: async () => AuditableItemGraphEdgeSchema
|
|
508
529
|
}));
|
|
509
|
-
DataTypeHandlerFactory.register(AuditableItemGraphTypes.Changeset
|
|
530
|
+
DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.ContextRoot}${AuditableItemGraphTypes.Changeset}`, () => ({
|
|
531
|
+
context: AuditableItemGraphContexts.ContextRoot,
|
|
510
532
|
type: AuditableItemGraphTypes.Changeset,
|
|
511
533
|
defaultValue: {},
|
|
512
534
|
jsonSchema: async () => AuditableItemGraphChangesetSchema
|
|
513
535
|
}));
|
|
514
|
-
DataTypeHandlerFactory.register(AuditableItemGraphTypes.PatchOperation
|
|
536
|
+
DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.ContextRoot}${AuditableItemGraphTypes.PatchOperation}`, () => ({
|
|
537
|
+
context: AuditableItemGraphContexts.ContextRoot,
|
|
515
538
|
type: AuditableItemGraphTypes.PatchOperation,
|
|
516
539
|
defaultValue: {},
|
|
517
540
|
jsonSchema: async () => AuditableItemGraphPatchOperationSchema
|
|
@@ -519,23 +542,6 @@ class AuditableItemGraphDataTypes {
|
|
|
519
542
|
}
|
|
520
543
|
}
|
|
521
544
|
|
|
522
|
-
// Copyright 2024 IOTA Stiftung.
|
|
523
|
-
// SPDX-License-Identifier: Apache-2.0.
|
|
524
|
-
/**
|
|
525
|
-
* The contexts of auditable item graph data.
|
|
526
|
-
*/
|
|
527
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
528
|
-
const AuditableItemGraphContexts = {
|
|
529
|
-
/**
|
|
530
|
-
* The context root for the auditable item graph types.
|
|
531
|
-
*/
|
|
532
|
-
ContextRoot: "https://schema.twindev.org/aig/",
|
|
533
|
-
/**
|
|
534
|
-
* The context root for the common types.
|
|
535
|
-
*/
|
|
536
|
-
ContextRootCommon: "https://schema.twindev.org/common/"
|
|
537
|
-
};
|
|
538
|
-
|
|
539
545
|
// Copyright 2024 IOTA Stiftung.
|
|
540
546
|
// SPDX-License-Identifier: Apache-2.0.
|
|
541
547
|
/**
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @twin.org/auditable-item-graph-models - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.1-next.40](https://github.com/twinfoundation/auditable-item-graph/compare/auditable-item-graph-models-v0.0.1-next.39...auditable-item-graph-models-v0.0.1-next.40) (2025-05-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add data types with fully qualified name ([93e1ee7](https://github.com/twinfoundation/auditable-item-graph/commit/93e1ee7c0f7bad81f003787f797f363864e201af))
|
|
9
|
+
|
|
3
10
|
## [0.0.1-next.39](https://github.com/twinfoundation/auditable-item-graph/compare/auditable-item-graph-models-v0.0.1-next.38...auditable-item-graph-models-v0.0.1-next.39) (2025-05-08)
|
|
4
11
|
|
|
5
12
|
|
package/package.json
CHANGED