@twin.org/identity-models 0.0.1-next.22 → 0.0.1-next.24

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.
Files changed (58) hide show
  1. package/dist/cjs/index.cjs +29 -5
  2. package/dist/esm/index.mjs +29 -5
  3. package/dist/types/index.d.ts +22 -0
  4. package/dist/types/models/IIdentityComponent.d.ts +22 -22
  5. package/dist/types/models/IIdentityConnector.d.ts +5 -5
  6. package/dist/types/models/api/identity/IIdentityCreateRequest.d.ts +14 -0
  7. package/dist/types/models/api/identity/IIdentityCreateResponse.d.ts +10 -0
  8. package/dist/types/models/api/identity/IIdentityProofCreateRequest.d.ts +27 -0
  9. package/dist/types/models/api/identity/IIdentityProofCreateResponse.d.ts +10 -0
  10. package/dist/types/models/api/identity/IIdentityProofVerifyRequest.d.ts +19 -0
  11. package/dist/types/models/api/identity/IIdentityProofVerifyResponse.d.ts +11 -0
  12. package/dist/types/models/api/identity/IIdentityServiceCreateRequest.d.ts +31 -0
  13. package/dist/types/models/api/identity/IIdentityServiceCreateResponse.d.ts +10 -0
  14. package/dist/types/models/api/identity/IIdentityServiceRemoveRequest.d.ts +18 -0
  15. package/dist/types/models/api/identity/IIdentityVerifiableCredentialCreateRequest.d.ts +36 -0
  16. package/dist/types/models/api/identity/IIdentityVerifiableCredentialCreateResponse.d.ts +19 -0
  17. package/dist/types/models/api/identity/IIdentityVerifiableCredentialRevokeRequest.d.ts +18 -0
  18. package/dist/types/models/api/identity/IIdentityVerifiableCredentialUnrevokeRequest.d.ts +18 -0
  19. package/dist/types/models/api/identity/IIdentityVerifiableCredentialVerifyRequest.d.ts +14 -0
  20. package/dist/types/models/api/identity/IIdentityVerifiableCredentialVerifyResponse.d.ts +19 -0
  21. package/dist/types/models/api/identity/IIdentityVerifiablePresentationCreateRequest.d.ts +45 -0
  22. package/dist/types/models/api/identity/IIdentityVerifiablePresentationCreateResponse.d.ts +19 -0
  23. package/dist/types/models/api/identity/IIdentityVerifiablePresentationVerifyRequest.d.ts +14 -0
  24. package/dist/types/models/api/identity/IIdentityVerifiablePresentationVerifyResponse.d.ts +23 -0
  25. package/dist/types/models/api/identity/IIdentityVerificationMethodCreateRequest.d.ts +28 -0
  26. package/dist/types/models/api/identity/IIdentityVerificationMethodCreateResponse.d.ts +10 -0
  27. package/dist/types/models/api/identity/IIdentityVerificationMethodRemoveRequest.d.ts +18 -0
  28. package/dist/types/models/api/resolver/IIdentityResolveRequest.d.ts +1 -1
  29. package/dist/types/utils/documentHelper.d.ts +9 -2
  30. package/docs/changelog.md +1 -1
  31. package/docs/reference/classes/DocumentHelper.md +32 -4
  32. package/docs/reference/index.md +22 -0
  33. package/docs/reference/interfaces/IIdentityComponent.md +70 -70
  34. package/docs/reference/interfaces/IIdentityConnector.md +9 -9
  35. package/docs/reference/interfaces/IIdentityCreateRequest.md +17 -0
  36. package/docs/reference/interfaces/IIdentityCreateResponse.md +11 -0
  37. package/docs/reference/interfaces/IIdentityProofCreateRequest.md +37 -0
  38. package/docs/reference/interfaces/IIdentityProofCreateResponse.md +11 -0
  39. package/docs/reference/interfaces/IIdentityProofVerifyRequest.md +23 -0
  40. package/docs/reference/interfaces/IIdentityProofVerifyResponse.md +15 -0
  41. package/docs/reference/interfaces/IIdentityResolveRequest.md +2 -2
  42. package/docs/reference/interfaces/IIdentityServiceCreateRequest.md +43 -0
  43. package/docs/reference/interfaces/IIdentityServiceCreateResponse.md +11 -0
  44. package/docs/reference/interfaces/IIdentityServiceRemoveRequest.md +23 -0
  45. package/docs/reference/interfaces/IIdentityVerifiableCredentialCreateRequest.md +49 -0
  46. package/docs/reference/interfaces/IIdentityVerifiableCredentialCreateResponse.md +23 -0
  47. package/docs/reference/interfaces/IIdentityVerifiableCredentialRevokeRequest.md +23 -0
  48. package/docs/reference/interfaces/IIdentityVerifiableCredentialUnrevokeRequest.md +23 -0
  49. package/docs/reference/interfaces/IIdentityVerifiableCredentialVerifyRequest.md +17 -0
  50. package/docs/reference/interfaces/IIdentityVerifiableCredentialVerifyResponse.md +23 -0
  51. package/docs/reference/interfaces/IIdentityVerifiablePresentationCreateRequest.md +61 -0
  52. package/docs/reference/interfaces/IIdentityVerifiablePresentationCreateResponse.md +23 -0
  53. package/docs/reference/interfaces/IIdentityVerifiablePresentationVerifyRequest.md +17 -0
  54. package/docs/reference/interfaces/IIdentityVerifiablePresentationVerifyResponse.md +29 -0
  55. package/docs/reference/interfaces/IIdentityVerificationMethodCreateRequest.md +37 -0
  56. package/docs/reference/interfaces/IIdentityVerificationMethodCreateResponse.md +11 -0
  57. package/docs/reference/interfaces/IIdentityVerificationMethodRemoveRequest.md +23 -0
  58. package/package.json +1 -1
@@ -0,0 +1,37 @@
1
+ # Interface: IIdentityProofCreateRequest
2
+
3
+ Request to create a proof.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters.
12
+
13
+ #### identity
14
+
15
+ > **identity**: `string`
16
+
17
+ The identity to create the proof for.
18
+
19
+ #### verificationMethodId
20
+
21
+ > **verificationMethodId**: `string`
22
+
23
+ The verification method id to use.
24
+
25
+ ***
26
+
27
+ ### body
28
+
29
+ > **body**: `object`
30
+
31
+ The data for the request.
32
+
33
+ #### bytes
34
+
35
+ > **bytes**: `string`
36
+
37
+ The data bytes base64 encoded.
@@ -0,0 +1,11 @@
1
+ # Interface: IIdentityProofCreateResponse
2
+
3
+ Response to creating a proof.
4
+
5
+ ## Properties
6
+
7
+ ### body
8
+
9
+ > **body**: `IDidProof`
10
+
11
+ The response payload.
@@ -0,0 +1,23 @@
1
+ # Interface: IIdentityProofVerifyRequest
2
+
3
+ Request to verify a proof.
4
+
5
+ ## Properties
6
+
7
+ ### body
8
+
9
+ > **body**: `object`
10
+
11
+ The data for the request.
12
+
13
+ #### bytes
14
+
15
+ > **bytes**: `string`
16
+
17
+ The data bytes base64 encoded.
18
+
19
+ #### proof
20
+
21
+ > **proof**: `IDidProof`
22
+
23
+ The proof to verify.
@@ -0,0 +1,15 @@
1
+ # Interface: IIdentityProofVerifyResponse
2
+
3
+ Response to verifying a proof.
4
+
5
+ ## Properties
6
+
7
+ ### body
8
+
9
+ > **body**: `object`
10
+
11
+ The response payload.
12
+
13
+ #### verified
14
+
15
+ > **verified**: `boolean`
@@ -10,8 +10,8 @@ Resolve an identity.
10
10
 
11
11
  The path parameters.
12
12
 
13
- #### id
13
+ #### identity
14
14
 
15
- > **id**: `string`
15
+ > **identity**: `string`
16
16
 
17
17
  The identity to resolve.
@@ -0,0 +1,43 @@
1
+ # Interface: IIdentityServiceCreateRequest
2
+
3
+ Request to create a service.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters.
12
+
13
+ #### identity
14
+
15
+ > **identity**: `string`
16
+
17
+ The identity to create the service for.
18
+
19
+ ***
20
+
21
+ ### body
22
+
23
+ > **body**: `object`
24
+
25
+ The data for the request.
26
+
27
+ #### serviceId
28
+
29
+ > **serviceId**: `string`
30
+
31
+ The id of the service.
32
+
33
+ #### type
34
+
35
+ > **type**: `string` \| `string`[]
36
+
37
+ The type of the service.
38
+
39
+ #### endpoint
40
+
41
+ > **endpoint**: `string` \| `string`[]
42
+
43
+ The endpoint for the service.
@@ -0,0 +1,11 @@
1
+ # Interface: IIdentityServiceCreateResponse
2
+
3
+ Response to creating a service.
4
+
5
+ ## Properties
6
+
7
+ ### body
8
+
9
+ > **body**: `IDidService`
10
+
11
+ The response payload.
@@ -0,0 +1,23 @@
1
+ # Interface: IIdentityServiceRemoveRequest
2
+
3
+ Request to remove a service.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters.
12
+
13
+ #### identity
14
+
15
+ > **identity**: `string`
16
+
17
+ The identity to remove the service from.
18
+
19
+ #### serviceId
20
+
21
+ > **serviceId**: `string`
22
+
23
+ The service to remove.
@@ -0,0 +1,49 @@
1
+ # Interface: IIdentityVerifiableCredentialCreateRequest
2
+
3
+ Request to create a verifiable credential.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters.
12
+
13
+ #### identity
14
+
15
+ > **identity**: `string`
16
+
17
+ The identity to create the verification credential for.
18
+
19
+ #### verificationMethodId
20
+
21
+ > **verificationMethodId**: `string`
22
+
23
+ The verification method id to use.
24
+
25
+ ***
26
+
27
+ ### body
28
+
29
+ > **body**: `object`
30
+
31
+ The data for the request.
32
+
33
+ #### credentialId?
34
+
35
+ > `optional` **credentialId**: `string`
36
+
37
+ The id of the credential.
38
+
39
+ #### subject
40
+
41
+ > **subject**: `IJsonLdNodeObject`
42
+
43
+ The credential subject to store in the verifiable credential.
44
+
45
+ #### revocationIndex?
46
+
47
+ > `optional` **revocationIndex**: `number`
48
+
49
+ The bitmap revocation index of the credential, if undefined will not have revocation status.
@@ -0,0 +1,23 @@
1
+ # Interface: IIdentityVerifiableCredentialCreateResponse
2
+
3
+ Response to creating a verifiable credential.
4
+
5
+ ## Properties
6
+
7
+ ### body
8
+
9
+ > **body**: `object`
10
+
11
+ The response payload.
12
+
13
+ #### verifiableCredential
14
+
15
+ > **verifiableCredential**: `IDidVerifiableCredential`
16
+
17
+ The verifiable credential that was created.
18
+
19
+ #### jwt
20
+
21
+ > **jwt**: `string`
22
+
23
+ The JWT token for the verifiable credential.
@@ -0,0 +1,23 @@
1
+ # Interface: IIdentityVerifiableCredentialRevokeRequest
2
+
3
+ Request to revoke a verifiable credential.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters.
12
+
13
+ #### identity
14
+
15
+ > **identity**: `string`
16
+
17
+ The identity to revoke the verification credential for.
18
+
19
+ #### revocationIndex
20
+
21
+ > **revocationIndex**: `number`
22
+
23
+ The revocation index to revoke.
@@ -0,0 +1,23 @@
1
+ # Interface: IIdentityVerifiableCredentialUnrevokeRequest
2
+
3
+ Request to unrevoke a verifiable credential.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters.
12
+
13
+ #### identity
14
+
15
+ > **identity**: `string`
16
+
17
+ The identity to unrevoke the verification credential for.
18
+
19
+ #### revocationIndex
20
+
21
+ > **revocationIndex**: `number`
22
+
23
+ The revocation index to unrevoke.
@@ -0,0 +1,17 @@
1
+ # Interface: IIdentityVerifiableCredentialVerifyRequest
2
+
3
+ Request to verify a verifiable credential.
4
+
5
+ ## Properties
6
+
7
+ ### query
8
+
9
+ > **query**: `object`
10
+
11
+ The path parameters.
12
+
13
+ #### jwt
14
+
15
+ > **jwt**: `string`
16
+
17
+ The jwt to verify.
@@ -0,0 +1,23 @@
1
+ # Interface: IIdentityVerifiableCredentialVerifyResponse
2
+
3
+ Response to verifying a verifiable credential.
4
+
5
+ ## Properties
6
+
7
+ ### body
8
+
9
+ > **body**: `object`
10
+
11
+ The response payload.
12
+
13
+ #### revoked
14
+
15
+ > **revoked**: `boolean`
16
+
17
+ Has the credential been revoked.
18
+
19
+ #### verifiableCredential?
20
+
21
+ > `optional` **verifiableCredential**: `IDidVerifiableCredential`
22
+
23
+ The verifiable credential that was verified.
@@ -0,0 +1,61 @@
1
+ # Interface: IIdentityVerifiablePresentationCreateRequest
2
+
3
+ Request to create a verifiable presentation.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters.
12
+
13
+ #### identity
14
+
15
+ > **identity**: `string`
16
+
17
+ The identity to create the verification presentation for.
18
+
19
+ #### verificationMethodId
20
+
21
+ > **verificationMethodId**: `string`
22
+
23
+ The verification method id to use.
24
+
25
+ ***
26
+
27
+ ### body
28
+
29
+ > **body**: `object`
30
+
31
+ The data for the request.
32
+
33
+ #### presentationId?
34
+
35
+ > `optional` **presentationId**: `string`
36
+
37
+ The id of the presentation.
38
+
39
+ #### contexts?
40
+
41
+ > `optional` **contexts**: `IJsonLdContextDefinitionRoot`
42
+
43
+ The context to use for the presentation.
44
+
45
+ #### types?
46
+
47
+ > `optional` **types**: `string` \| `string`[]
48
+
49
+ The types of the presentation.
50
+
51
+ #### verifiableCredentials
52
+
53
+ > **verifiableCredentials**: (`string` \| `IDidVerifiableCredential`)[]
54
+
55
+ The verifiable credentials to include in the presentation.
56
+
57
+ #### expiresInMinutes?
58
+
59
+ > `optional` **expiresInMinutes**: `number`
60
+
61
+ The expiration time for the presentation.
@@ -0,0 +1,23 @@
1
+ # Interface: IIdentityVerifiablePresentationCreateResponse
2
+
3
+ Response to creating a verifiable presentation.
4
+
5
+ ## Properties
6
+
7
+ ### body
8
+
9
+ > **body**: `object`
10
+
11
+ The response payload.
12
+
13
+ #### verifiablePresentation
14
+
15
+ > **verifiablePresentation**: `IDidVerifiablePresentation`
16
+
17
+ The verifiable presentation that was created.
18
+
19
+ #### jwt
20
+
21
+ > **jwt**: `string`
22
+
23
+ The JWT token for the verifiable presentation.
@@ -0,0 +1,17 @@
1
+ # Interface: IIdentityVerifiablePresentationVerifyRequest
2
+
3
+ Request to verify a verifiable presentation.
4
+
5
+ ## Properties
6
+
7
+ ### query
8
+
9
+ > **query**: `object`
10
+
11
+ The path parameters.
12
+
13
+ #### jwt
14
+
15
+ > **jwt**: `string`
16
+
17
+ The jwt to verify.
@@ -0,0 +1,29 @@
1
+ # Interface: IIdentityVerifiablePresentationVerifyResponse
2
+
3
+ Response to verifying a verifiable presentation.
4
+
5
+ ## Properties
6
+
7
+ ### body
8
+
9
+ > **body**: `object`
10
+
11
+ The response payload.
12
+
13
+ #### revoked
14
+
15
+ > **revoked**: `boolean`
16
+
17
+ Has the presentation been revoked.
18
+
19
+ #### verifiablePresentation?
20
+
21
+ > `optional` **verifiablePresentation**: `IDidVerifiablePresentation`
22
+
23
+ The verifiable presentation that was verified.
24
+
25
+ #### issuers?
26
+
27
+ > `optional` **issuers**: `IDidDocument`[]
28
+
29
+ The issuers of the presentation.
@@ -0,0 +1,37 @@
1
+ # Interface: IIdentityVerificationMethodCreateRequest
2
+
3
+ Request to create a verification method.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters.
12
+
13
+ #### identity
14
+
15
+ > **identity**: `string`
16
+
17
+ The identity to create the verification method for.
18
+
19
+ ***
20
+
21
+ ### body
22
+
23
+ > **body**: `object`
24
+
25
+ The data for the request.
26
+
27
+ #### verificationMethodType
28
+
29
+ > **verificationMethodType**: `DidVerificationMethodType`
30
+
31
+ The type of the verification method to create.
32
+
33
+ #### verificationMethodId?
34
+
35
+ > `optional` **verificationMethodId**: `string`
36
+
37
+ The optional id for the verification method, will be allocated if not supplied.
@@ -0,0 +1,11 @@
1
+ # Interface: IIdentityVerificationMethodCreateResponse
2
+
3
+ Response to creating a verification method.
4
+
5
+ ## Properties
6
+
7
+ ### body
8
+
9
+ > **body**: `IDidDocumentVerificationMethod`
10
+
11
+ The response payload.
@@ -0,0 +1,23 @@
1
+ # Interface: IIdentityVerificationMethodRemoveRequest
2
+
3
+ Request to remove a verification method.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters.
12
+
13
+ #### identity
14
+
15
+ > **identity**: `string`
16
+
17
+ The identity to remove the verification method from.
18
+
19
+ #### verificationMethodId
20
+
21
+ > **verificationMethodId**: `string`
22
+
23
+ The verification method to remove.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/identity-models",
3
- "version": "0.0.1-next.22",
3
+ "version": "0.0.1-next.24",
4
4
  "description": "Models which define the structure of the contracts and connectors",
5
5
  "repository": {
6
6
  "type": "git",