@twin.org/attestation-models 0.0.1-next.23 → 0.0.1-next.25
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 +18 -8
- package/dist/esm/index.mjs +18 -9
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/IAttestationInformation.d.ts +5 -4
- package/dist/types/models/IAttestationJwtProof.d.ts +2 -1
- package/dist/types/models/attestationContexts.d.ts +17 -0
- package/dist/types/models/attestationTypes.d.ts +0 -8
- package/docs/changelog.md +8 -1
- package/docs/reference/index.md +2 -0
- package/docs/reference/type-aliases/AttestationContexts.md +5 -0
- package/docs/reference/variables/AttestationContexts.md +19 -0
- package/docs/reference/variables/AttestationTypes.md +0 -12
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
@@ -10,14 +10,6 @@ var core = require('@twin.org/core');
|
|
10
10
|
*/
|
11
11
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
12
12
|
const AttestationTypes = {
|
13
|
-
/**
|
14
|
-
* The context root for the attestation types.
|
15
|
-
*/
|
16
|
-
ContextRoot: "https://schema.twindev.org/attestation/",
|
17
|
-
/**
|
18
|
-
* The context root for the common types.
|
19
|
-
*/
|
20
|
-
ContextRootCommon: "https://schema.twindev.org/common/",
|
21
13
|
/**
|
22
14
|
* Represents attestation information.
|
23
15
|
*/
|
@@ -192,6 +184,24 @@ class AttestationDataTypes {
|
|
192
184
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
193
185
|
const AttestationConnectorFactory = core.Factory.createFactory("attestation");
|
194
186
|
|
187
|
+
// Copyright 2024 IOTA Stiftung.
|
188
|
+
// SPDX-License-Identifier: Apache-2.0.
|
189
|
+
/**
|
190
|
+
* The contexts of attestation data.
|
191
|
+
*/
|
192
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
193
|
+
const AttestationContexts = {
|
194
|
+
/**
|
195
|
+
* The context root for the attestation types.
|
196
|
+
*/
|
197
|
+
ContextRoot: "https://schema.twindev.org/attestation/",
|
198
|
+
/**
|
199
|
+
* The context root for the common types.
|
200
|
+
*/
|
201
|
+
ContextRootCommon: "https://schema.twindev.org/common/"
|
202
|
+
};
|
203
|
+
|
195
204
|
exports.AttestationConnectorFactory = AttestationConnectorFactory;
|
205
|
+
exports.AttestationContexts = AttestationContexts;
|
196
206
|
exports.AttestationDataTypes = AttestationDataTypes;
|
197
207
|
exports.AttestationTypes = AttestationTypes;
|
package/dist/esm/index.mjs
CHANGED
@@ -8,14 +8,6 @@ import { Factory } from '@twin.org/core';
|
|
8
8
|
*/
|
9
9
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
10
10
|
const AttestationTypes = {
|
11
|
-
/**
|
12
|
-
* The context root for the attestation types.
|
13
|
-
*/
|
14
|
-
ContextRoot: "https://schema.twindev.org/attestation/",
|
15
|
-
/**
|
16
|
-
* The context root for the common types.
|
17
|
-
*/
|
18
|
-
ContextRootCommon: "https://schema.twindev.org/common/",
|
19
11
|
/**
|
20
12
|
* Represents attestation information.
|
21
13
|
*/
|
@@ -190,4 +182,21 @@ class AttestationDataTypes {
|
|
190
182
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
191
183
|
const AttestationConnectorFactory = Factory.createFactory("attestation");
|
192
184
|
|
193
|
-
|
185
|
+
// Copyright 2024 IOTA Stiftung.
|
186
|
+
// SPDX-License-Identifier: Apache-2.0.
|
187
|
+
/**
|
188
|
+
* The contexts of attestation data.
|
189
|
+
*/
|
190
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
191
|
+
const AttestationContexts = {
|
192
|
+
/**
|
193
|
+
* The context root for the attestation types.
|
194
|
+
*/
|
195
|
+
ContextRoot: "https://schema.twindev.org/attestation/",
|
196
|
+
/**
|
197
|
+
* The context root for the common types.
|
198
|
+
*/
|
199
|
+
ContextRootCommon: "https://schema.twindev.org/common/"
|
200
|
+
};
|
201
|
+
|
202
|
+
export { AttestationConnectorFactory, AttestationContexts, AttestationDataTypes, AttestationTypes };
|
package/dist/types/index.d.ts
CHANGED
@@ -5,6 +5,7 @@ export * from "./models/api/IAttestationDestroyRequest";
|
|
5
5
|
export * from "./models/api/IAttestationGetRequest";
|
6
6
|
export * from "./models/api/IAttestationGetResponse";
|
7
7
|
export * from "./models/api/IAttestationTransferRequest";
|
8
|
+
export * from "./models/attestationContexts";
|
8
9
|
export * from "./models/attestationTypes";
|
9
10
|
export * from "./models/IAttestationComponent";
|
10
11
|
export * from "./models/IAttestationConnector";
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
2
|
-
import type {
|
2
|
+
import type { SchemaOrgContexts } from "@twin.org/standards-schema-org";
|
3
|
+
import type { AttestationContexts } from "./attestationContexts";
|
3
4
|
import type { AttestationTypes } from "./attestationTypes";
|
4
5
|
/**
|
5
6
|
* Interface describing the collated attestation information.
|
@@ -9,9 +10,9 @@ export interface IAttestationInformation {
|
|
9
10
|
* JSON-LD Context.
|
10
11
|
*/
|
11
12
|
"@context": [
|
12
|
-
typeof
|
13
|
-
typeof
|
14
|
-
typeof
|
13
|
+
typeof AttestationContexts.ContextRoot,
|
14
|
+
typeof AttestationContexts.ContextRootCommon,
|
15
|
+
typeof SchemaOrgContexts.ContextRoot,
|
15
16
|
...IJsonLdContextDefinitionElement[]
|
16
17
|
];
|
17
18
|
/**
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
|
2
|
+
import type { AttestationContexts } from "./attestationContexts";
|
2
3
|
import type { AttestationTypes } from "./attestationTypes";
|
3
4
|
/**
|
4
5
|
* Interface describing an attestation proof.
|
@@ -7,7 +8,7 @@ export interface IAttestationJwtProof {
|
|
7
8
|
/**
|
8
9
|
* JSON-LD Context.
|
9
10
|
*/
|
10
|
-
"@context": typeof
|
11
|
+
"@context": typeof AttestationContexts.ContextRoot | [typeof AttestationContexts.ContextRoot, ...IJsonLdContextDefinitionElement[]];
|
11
12
|
/**
|
12
13
|
* The type of the proof.
|
13
14
|
*/
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* The contexts of attestation data.
|
3
|
+
*/
|
4
|
+
export declare const AttestationContexts: {
|
5
|
+
/**
|
6
|
+
* The context root for the attestation types.
|
7
|
+
*/
|
8
|
+
readonly ContextRoot: "https://schema.twindev.org/attestation/";
|
9
|
+
/**
|
10
|
+
* The context root for the common types.
|
11
|
+
*/
|
12
|
+
readonly ContextRootCommon: "https://schema.twindev.org/common/";
|
13
|
+
};
|
14
|
+
/**
|
15
|
+
* The contexts of attestation data.
|
16
|
+
*/
|
17
|
+
export type AttestationContexts = (typeof AttestationContexts)[keyof typeof AttestationContexts];
|
@@ -2,14 +2,6 @@
|
|
2
2
|
* The types of attestation data.
|
3
3
|
*/
|
4
4
|
export declare const AttestationTypes: {
|
5
|
-
/**
|
6
|
-
* The context root for the attestation types.
|
7
|
-
*/
|
8
|
-
readonly ContextRoot: "https://schema.twindev.org/attestation/";
|
9
|
-
/**
|
10
|
-
* The context root for the common types.
|
11
|
-
*/
|
12
|
-
readonly ContextRootCommon: "https://schema.twindev.org/common/";
|
13
5
|
/**
|
14
6
|
* Represents attestation information.
|
15
7
|
*/
|
package/docs/changelog.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# @twin.org/attestation-models - Changelog
|
2
2
|
|
3
|
-
## v0.0.1-next.
|
3
|
+
## [0.0.1-next.25](https://github.com/twinfoundation/attestation/compare/attestation-models-v0.0.1-next.24...attestation-models-v0.0.1-next.25) (2025-03-28)
|
4
|
+
|
5
|
+
|
6
|
+
### Miscellaneous Chores
|
7
|
+
|
8
|
+
* **attestation-models:** Synchronize repo versions
|
9
|
+
|
10
|
+
## v0.0.1-next.24
|
4
11
|
|
5
12
|
- Initial Release
|
package/docs/reference/index.md
CHANGED
@@ -18,9 +18,11 @@
|
|
18
18
|
|
19
19
|
## Type Aliases
|
20
20
|
|
21
|
+
- [AttestationContexts](type-aliases/AttestationContexts.md)
|
21
22
|
- [AttestationTypes](type-aliases/AttestationTypes.md)
|
22
23
|
|
23
24
|
## Variables
|
24
25
|
|
25
26
|
- [AttestationConnectorFactory](variables/AttestationConnectorFactory.md)
|
27
|
+
- [AttestationContexts](variables/AttestationContexts.md)
|
26
28
|
- [AttestationTypes](variables/AttestationTypes.md)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Variable: AttestationContexts
|
2
|
+
|
3
|
+
> `const` **AttestationContexts**: `object`
|
4
|
+
|
5
|
+
The contexts of attestation data.
|
6
|
+
|
7
|
+
## Type declaration
|
8
|
+
|
9
|
+
### ContextRoot
|
10
|
+
|
11
|
+
> `readonly` **ContextRoot**: `"https://schema.twindev.org/attestation/"` = `"https://schema.twindev.org/attestation/"`
|
12
|
+
|
13
|
+
The context root for the attestation types.
|
14
|
+
|
15
|
+
### ContextRootCommon
|
16
|
+
|
17
|
+
> `readonly` **ContextRootCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
|
18
|
+
|
19
|
+
The context root for the common types.
|
@@ -6,18 +6,6 @@ The types of attestation data.
|
|
6
6
|
|
7
7
|
## Type declaration
|
8
8
|
|
9
|
-
### ContextRoot
|
10
|
-
|
11
|
-
> `readonly` **ContextRoot**: `"https://schema.twindev.org/attestation/"` = `"https://schema.twindev.org/attestation/"`
|
12
|
-
|
13
|
-
The context root for the attestation types.
|
14
|
-
|
15
|
-
### ContextRootCommon
|
16
|
-
|
17
|
-
> `readonly` **ContextRootCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
|
18
|
-
|
19
|
-
The context root for the common types.
|
20
|
-
|
21
9
|
### Information
|
22
10
|
|
23
11
|
> `readonly` **Information**: `"Information"` = `"Information"`
|