@twin.org/identity-models 0.0.1-next.3 → 0.0.1-next.5

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.
@@ -1,4 +1,5 @@
1
1
  import type { IComponent } from "@twin.org/core";
2
+ import type { IJsonLdContextDefinitionRoot } from "@twin.org/data-json-ld";
2
3
  import type { DidVerificationMethodType, IDidDocument, IDidDocumentVerificationMethod, IDidService, IDidVerifiableCredential, IDidVerifiablePresentation } from "@twin.org/standards-w3c-did";
3
4
  /**
4
5
  * Interface describing an identity connector.
@@ -68,7 +69,7 @@ export interface IIdentityConnector extends IComponent {
68
69
  * @returns The created verifiable credential and its token.
69
70
  * @throws NotFoundError if the id can not be resolved.
70
71
  */
71
- createVerifiableCredential<T>(controller: string, verificationMethodId: string, credentialId: string | undefined, types: string | string[] | undefined, subject: T | T[], contexts?: string | string[], revocationIndex?: number): Promise<{
72
+ createVerifiableCredential<T>(controller: string, verificationMethodId: string, credentialId: string | undefined, types: string | string[] | undefined, subject: T | T[], contexts?: IJsonLdContextDefinitionRoot, revocationIndex?: number): Promise<{
72
73
  verifiableCredential: IDidVerifiableCredential<T>;
73
74
  jwt: string;
74
75
  }>;
@@ -108,7 +109,7 @@ export interface IIdentityConnector extends IComponent {
108
109
  * @returns The created verifiable presentation and its token.
109
110
  * @throws NotFoundError if the id can not be resolved.
110
111
  */
111
- createVerifiablePresentation(controller: string, presentationMethodId: string, types: string | string[] | undefined, verifiableCredentials: string[], contexts?: string | string[], expiresInMinutes?: number): Promise<{
112
+ createVerifiablePresentation(controller: string, presentationMethodId: string, types: string | string[] | undefined, verifiableCredentials: string[], contexts?: IJsonLdContextDefinitionRoot, expiresInMinutes?: number): Promise<{
112
113
  verifiablePresentation: IDidVerifiablePresentation;
113
114
  jwt: string;
114
115
  }>;
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/identity-service-models - Changelog
2
2
 
3
- ## v0.0.1-next.3
3
+ ## v0.0.1-next.5
4
4
 
5
5
  - Initial Release
@@ -224,7 +224,7 @@ The type for the data stored in the verifiable credential.
224
224
 
225
225
  The subject data to store for the credential.
226
226
 
227
- • **contexts?**: `string` \| `string`[]
227
+ • **contexts?**: `IJsonLdContextDefinitionRoot`
228
228
 
229
229
  Additional contexts to include in the credential.
230
230
 
@@ -364,7 +364,7 @@ The types for the data stored in the verifiable credential.
364
364
 
365
365
  The credentials to use for creating the presentation in jwt format.
366
366
 
367
- • **contexts?**: `string` \| `string`[]
367
+ • **contexts?**: `IJsonLdContextDefinitionRoot`
368
368
 
369
369
  Additional contexts to include in the presentation.
370
370
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/identity-models",
3
- "version": "0.0.1-next.3",
3
+ "version": "0.0.1-next.5",
4
4
  "description": "Models which define the structure of the contracts and connectors",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,19 +13,6 @@
13
13
  "engines": {
14
14
  "node": ">=20.0.0"
15
15
  },
16
- "scripts": {
17
- "clean": "rimraf dist coverage docs/reference",
18
- "build": "tspc",
19
- "test": "vitest --run --config ./vitest.config.ts --no-cache",
20
- "coverage": "vitest --run --coverage --config ./vitest.config.ts --no-cache",
21
- "bundle:esm": "rollup --config rollup.config.mjs --environment MODULE:esm",
22
- "bundle:cjs": "rollup --config rollup.config.mjs --environment MODULE:cjs",
23
- "bundle": "npm run bundle:esm && npm run bundle:cjs",
24
- "docs:clean": "rimraf docs/reference",
25
- "docs:generate": "typedoc",
26
- "docs": "npm run docs:clean && npm run docs:generate",
27
- "dist": "npm run clean && npm run build && npm run test && npm run bundle && npm run docs"
28
- },
29
16
  "dependencies": {
30
17
  "@twin.org/core": "next",
31
18
  "@twin.org/data-core": "next",
@@ -34,19 +21,6 @@
34
21
  "@twin.org/standards-w3c-did": "next",
35
22
  "@twin.org/web": "next"
36
23
  },
37
- "devDependencies": {
38
- "@twin.org/nameof-transformer": "next",
39
- "@vitest/coverage-v8": "2.1.1",
40
- "copyfiles": "2.4.1",
41
- "rimraf": "6.0.1",
42
- "rollup": "4.22.0",
43
- "rollup-plugin-typescript2": "0.36.0",
44
- "ts-patch": "3.2.1",
45
- "typedoc": "0.26.7",
46
- "typedoc-plugin-markdown": "4.2.7",
47
- "typescript": "5.6.2",
48
- "vitest": "2.1.1"
49
- },
50
24
  "main": "./dist/cjs/index.cjs",
51
25
  "module": "./dist/esm/index.mjs",
52
26
  "types": "./dist/types/index.d.ts",