@twin.org/identity-service 0.0.2-next.9 → 0.0.3-next.2

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 (40) hide show
  1. package/dist/es/identityProfileRoutes.js +389 -0
  2. package/dist/es/identityProfileRoutes.js.map +1 -0
  3. package/dist/es/identityProfileService.js +165 -0
  4. package/dist/es/identityProfileService.js.map +1 -0
  5. package/dist/es/identityResolverRoutes.js +87 -0
  6. package/dist/es/identityResolverRoutes.js.map +1 -0
  7. package/dist/es/identityResolverService.js +98 -0
  8. package/dist/es/identityResolverService.js.map +1 -0
  9. package/dist/es/identityRoutes.js +946 -0
  10. package/dist/es/identityRoutes.js.map +1 -0
  11. package/dist/es/identityService.js +391 -0
  12. package/dist/es/identityService.js.map +1 -0
  13. package/dist/es/index.js +15 -0
  14. package/dist/es/index.js.map +1 -0
  15. package/dist/es/models/IIdentityProfileServiceConstructorOptions.js +2 -0
  16. package/dist/es/models/IIdentityProfileServiceConstructorOptions.js.map +1 -0
  17. package/dist/es/models/IIdentityResolverServiceConfig.js +4 -0
  18. package/dist/es/models/IIdentityResolverServiceConfig.js.map +1 -0
  19. package/dist/es/models/IIdentityResolverServiceConstructorOptions.js +2 -0
  20. package/dist/es/models/IIdentityResolverServiceConstructorOptions.js.map +1 -0
  21. package/dist/es/models/IIdentityServiceConfig.js +4 -0
  22. package/dist/es/models/IIdentityServiceConfig.js.map +1 -0
  23. package/dist/es/models/IIdentityServiceConstructorOptions.js +2 -0
  24. package/dist/es/models/IIdentityServiceConstructorOptions.js.map +1 -0
  25. package/dist/es/restEntryPoints.js +24 -0
  26. package/dist/es/restEntryPoints.js.map +1 -0
  27. package/dist/types/identityProfileService.d.ts +6 -1
  28. package/dist/types/identityResolverService.d.ts +6 -1
  29. package/dist/types/identityService.d.ts +6 -1
  30. package/dist/types/index.d.ts +12 -12
  31. package/dist/types/models/IIdentityResolverServiceConstructorOptions.d.ts +1 -1
  32. package/dist/types/models/IIdentityServiceConstructorOptions.d.ts +1 -1
  33. package/docs/changelog.md +66 -0
  34. package/docs/open-api/spec.json +115 -130
  35. package/docs/reference/classes/IdentityProfileService.md +18 -0
  36. package/docs/reference/classes/IdentityResolverService.md +18 -0
  37. package/docs/reference/classes/IdentityService.md +22 -4
  38. package/package.json +7 -8
  39. package/dist/cjs/index.cjs +0 -2071
  40. package/dist/esm/index.mjs +0 -2039
@@ -765,7 +765,7 @@
765
765
  }
766
766
  }
767
767
  },
768
- "/identity/{identity}/verifiable-credential": {
768
+ "/identity/{identity}/verifiable-credential/{verificationMethodId}": {
769
769
  "post": {
770
770
  "operationId": "identityVerifiableCredentialCreate",
771
771
  "summary": "Create an identity verifiable credential",
@@ -783,6 +783,17 @@
783
783
  },
784
784
  "style": "simple",
785
785
  "example": "did:entity-storage:0x879c31386f992cfa29b77fe31e37256d69f6a57653cee4eb60ad4c4613c5515a"
786
+ },
787
+ {
788
+ "name": "verificationMethodId",
789
+ "description": "The verification method id to use.",
790
+ "in": "path",
791
+ "required": true,
792
+ "schema": {
793
+ "type": "string"
794
+ },
795
+ "style": "simple",
796
+ "example": "my-assertion"
786
797
  }
787
798
  ],
788
799
  "security": [
@@ -1216,7 +1227,7 @@
1216
1227
  }
1217
1228
  }
1218
1229
  },
1219
- "/identity/{identity}/verifiable-presentation": {
1230
+ "/identity/{identity}/verifiable-presentation/{verificationMethodId}": {
1220
1231
  "post": {
1221
1232
  "operationId": "identityVerifiablePresentationCreate",
1222
1233
  "summary": "Create an identity verifiable presentation",
@@ -1234,6 +1245,17 @@
1234
1245
  },
1235
1246
  "style": "simple",
1236
1247
  "example": "did:entity-storage:0x879c31386f992cfa29b77fe31e37256d69f6a57653cee4eb60ad4c4613c5515a"
1248
+ },
1249
+ {
1250
+ "name": "verificationMethodId",
1251
+ "description": "The verification method id to use.",
1252
+ "in": "path",
1253
+ "required": true,
1254
+ "schema": {
1255
+ "type": "string"
1256
+ },
1257
+ "style": "simple",
1258
+ "example": "my-assertion"
1237
1259
  }
1238
1260
  ],
1239
1261
  "security": [
@@ -1449,7 +1471,7 @@
1449
1471
  }
1450
1472
  }
1451
1473
  },
1452
- "/identity/{identity}/proof": {
1474
+ "/identity/{identity}/proof/{verificationMethodId}": {
1453
1475
  "post": {
1454
1476
  "operationId": "identityProofCreate",
1455
1477
  "summary": "Create an identity proof",
@@ -1467,6 +1489,17 @@
1467
1489
  },
1468
1490
  "style": "simple",
1469
1491
  "example": "did:entity-storage:0xda2df3ebc91ee0d5229d6532ffd0f4426952a94f34988b0ca906694dfd366a6a"
1492
+ },
1493
+ {
1494
+ "name": "verificationMethodId",
1495
+ "description": "The verification method id to use.",
1496
+ "in": "path",
1497
+ "required": true,
1498
+ "schema": {
1499
+ "type": "string"
1500
+ },
1501
+ "style": "simple",
1502
+ "example": "my-verification-id"
1470
1503
  }
1471
1504
  ],
1472
1505
  "security": [
@@ -2463,13 +2496,10 @@
2463
2496
  "properties": {
2464
2497
  "conflicts": {
2465
2498
  "type": "array",
2466
- "items": false,
2467
- "description": "The conflicting items.",
2468
- "prefixItems": [
2469
- {
2470
- "type": "string"
2471
- }
2472
- ]
2499
+ "items": {
2500
+ "type": "string"
2501
+ },
2502
+ "description": "The conflicting items."
2473
2503
  },
2474
2504
  "name": {
2475
2505
  "type": "string",
@@ -2587,26 +2617,23 @@
2587
2617
  "properties": {
2588
2618
  "items": {
2589
2619
  "type": "array",
2590
- "items": false,
2591
- "description": "The identities.",
2592
- "prefixItems": [
2593
- {
2594
- "type": "object",
2595
- "properties": {
2596
- "identity": {
2597
- "type": "string",
2598
- "description": "The identity."
2599
- },
2600
- "publicProfile": {
2601
- "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
2602
- }
2603
- },
2604
- "required": [
2605
- "identity"
2606
- ],
2607
- "additionalProperties": false
2608
- }
2609
- ]
2620
+ "items": {
2621
+ "type": "object",
2622
+ "properties": {
2623
+ "identity": {
2624
+ "type": "string",
2625
+ "description": "The identity."
2626
+ },
2627
+ "publicProfile": {
2628
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdDocument"
2629
+ }
2630
+ },
2631
+ "required": [
2632
+ "identity"
2633
+ ],
2634
+ "additionalProperties": false
2635
+ },
2636
+ "description": "The identities."
2610
2637
  },
2611
2638
  "cursor": {
2612
2639
  "type": "string",
@@ -2693,12 +2720,9 @@
2693
2720
  },
2694
2721
  {
2695
2722
  "type": "array",
2696
- "items": false,
2697
- "prefixItems": [
2698
- {
2699
- "type": "string"
2700
- }
2701
- ]
2723
+ "items": {
2724
+ "type": "string"
2725
+ }
2702
2726
  }
2703
2727
  ],
2704
2728
  "description": "The type of the service."
@@ -2710,12 +2734,9 @@
2710
2734
  },
2711
2735
  {
2712
2736
  "type": "array",
2713
- "items": false,
2714
- "prefixItems": [
2715
- {
2716
- "type": "string"
2717
- }
2718
- ]
2737
+ "items": {
2738
+ "type": "string"
2739
+ }
2719
2740
  }
2720
2741
  ],
2721
2742
  "description": "The endpoint for the service."
@@ -2806,32 +2827,26 @@
2806
2827
  },
2807
2828
  {
2808
2829
  "type": "array",
2809
- "items": false,
2810
- "prefixItems": [
2811
- {
2812
- "type": "string"
2813
- }
2814
- ]
2830
+ "items": {
2831
+ "type": "string"
2832
+ }
2815
2833
  }
2816
2834
  ],
2817
2835
  "description": "The types of the presentation."
2818
2836
  },
2819
2837
  "verifiableCredentials": {
2820
2838
  "type": "array",
2821
- "items": false,
2822
- "description": "The verifiable credentials to include in the presentation.",
2823
- "prefixItems": [
2824
- {
2825
- "anyOf": [
2826
- {
2827
- "type": "string"
2828
- },
2829
- {
2830
- "$ref": "https://schema.twindev.org/w3c-did/DidVerifiableCredential"
2831
- }
2832
- ]
2833
- }
2834
- ]
2839
+ "items": {
2840
+ "anyOf": [
2841
+ {
2842
+ "type": "string"
2843
+ },
2844
+ {
2845
+ "$ref": "https://schema.twindev.org/w3c-did/DidVerifiableCredential"
2846
+ }
2847
+ ]
2848
+ },
2849
+ "description": "The verifiable credentials to include in the presentation."
2835
2850
  },
2836
2851
  "expiresInMinutes": {
2837
2852
  "type": "number",
@@ -2874,13 +2889,10 @@
2874
2889
  },
2875
2890
  "issuers": {
2876
2891
  "type": "array",
2877
- "items": false,
2878
- "description": "The issuers of the presentation.",
2879
- "prefixItems": [
2880
- {
2881
- "$ref": "https://schema.twindev.org/w3c-did/DidDocument"
2882
- }
2883
- ]
2892
+ "items": {
2893
+ "$ref": "https://schema.twindev.org/w3c-did/DidDocument"
2894
+ },
2895
+ "description": "The issuers of the presentation."
2884
2896
  }
2885
2897
  },
2886
2898
  "required": [
@@ -2916,12 +2928,9 @@
2916
2928
  },
2917
2929
  {
2918
2930
  "type": "array",
2919
- "items": false,
2920
- "prefixItems": [
2921
- {
2922
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
2923
- }
2924
- ]
2931
+ "items": {
2932
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
2933
+ }
2925
2934
  },
2926
2935
  {
2927
2936
  "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
@@ -2950,12 +2959,9 @@
2950
2959
  },
2951
2960
  {
2952
2961
  "type": "array",
2953
- "items": false,
2954
- "prefixItems": [
2955
- {
2956
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
2957
- }
2958
- ]
2962
+ "items": {
2963
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
2964
+ }
2959
2965
  },
2960
2966
  {
2961
2967
  "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
@@ -2981,12 +2987,9 @@
2981
2987
  },
2982
2988
  {
2983
2989
  "type": "array",
2984
- "items": false,
2985
- "prefixItems": [
2986
- {
2987
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
2988
- }
2989
- ]
2990
+ "items": {
2991
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
2992
+ }
2990
2993
  },
2991
2994
  {
2992
2995
  "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
@@ -3012,12 +3015,9 @@
3012
3015
  },
3013
3016
  {
3014
3017
  "type": "array",
3015
- "items": false,
3016
- "prefixItems": [
3017
- {
3018
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
3019
- }
3020
- ]
3018
+ "items": {
3019
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
3020
+ }
3021
3021
  },
3022
3022
  {
3023
3023
  "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
@@ -3042,19 +3042,16 @@
3042
3042
  },
3043
3043
  {
3044
3044
  "type": "array",
3045
- "items": false,
3046
- "prefixItems": [
3047
- {
3048
- "anyOf": [
3049
- {
3050
- "$ref": "https://schema.twindev.org/json-ld/JsonLdValueObject"
3051
- },
3052
- {
3053
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
3054
- }
3055
- ]
3056
- }
3057
- ]
3045
+ "items": {
3046
+ "anyOf": [
3047
+ {
3048
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdValueObject"
3049
+ },
3050
+ {
3051
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
3052
+ }
3053
+ ]
3054
+ }
3058
3055
  }
3059
3056
  ]
3060
3057
  },
@@ -3065,12 +3062,9 @@
3065
3062
  },
3066
3063
  {
3067
3064
  "type": "array",
3068
- "items": false,
3069
- "prefixItems": [
3070
- {
3071
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
3072
- }
3073
- ]
3065
+ "items": {
3066
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
3067
+ }
3074
3068
  },
3075
3069
  {
3076
3070
  "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
@@ -3096,12 +3090,9 @@
3096
3090
  },
3097
3091
  {
3098
3092
  "type": "array",
3099
- "items": false,
3100
- "prefixItems": [
3101
- {
3102
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
3103
- }
3104
- ]
3093
+ "items": {
3094
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
3095
+ }
3105
3096
  },
3106
3097
  {
3107
3098
  "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
@@ -3127,12 +3118,9 @@
3127
3118
  },
3128
3119
  {
3129
3120
  "type": "array",
3130
- "items": false,
3131
- "prefixItems": [
3132
- {
3133
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
3134
- }
3135
- ]
3121
+ "items": {
3122
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
3123
+ }
3136
3124
  },
3137
3125
  {
3138
3126
  "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
@@ -3158,12 +3146,9 @@
3158
3146
  },
3159
3147
  {
3160
3148
  "type": "array",
3161
- "items": false,
3162
- "prefixItems": [
3163
- {
3164
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
3165
- }
3166
- ]
3149
+ "items": {
3150
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
3151
+ }
3167
3152
  },
3168
3153
  {
3169
3154
  "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
@@ -46,6 +46,24 @@ Runtime name for the class.
46
46
 
47
47
  ## Methods
48
48
 
49
+ ### className()
50
+
51
+ > **className**(): `string`
52
+
53
+ Returns the class name of the component.
54
+
55
+ #### Returns
56
+
57
+ `string`
58
+
59
+ The class name of the component.
60
+
61
+ #### Implementation of
62
+
63
+ `IIdentityProfileComponent.className`
64
+
65
+ ***
66
+
49
67
  ### create()
50
68
 
51
69
  > **create**(`publicProfile?`, `privateProfile?`, `identity?`): `Promise`\<`void`\>
@@ -36,6 +36,24 @@ Runtime name for the class.
36
36
 
37
37
  ## Methods
38
38
 
39
+ ### className()
40
+
41
+ > **className**(): `string`
42
+
43
+ Returns the class name of the component.
44
+
45
+ #### Returns
46
+
47
+ `string`
48
+
49
+ The class name of the component.
50
+
51
+ #### Implementation of
52
+
53
+ `IIdentityResolverComponent.className`
54
+
55
+ ***
56
+
39
57
  ### identityResolve()
40
58
 
41
59
  > **identityResolve**(`identity`): `Promise`\<`IDidDocument`\>
@@ -36,6 +36,24 @@ Runtime name for the class.
36
36
 
37
37
  ## Methods
38
38
 
39
+ ### className()
40
+
41
+ > **className**(): `string`
42
+
43
+ Returns the class name of the component.
44
+
45
+ #### Returns
46
+
47
+ `string`
48
+
49
+ The class name of the component.
50
+
51
+ #### Implementation of
52
+
53
+ `IIdentityComponent.className`
54
+
55
+ ***
56
+
39
57
  ### identityCreate()
40
58
 
41
59
  > **identityCreate**(`namespace?`, `controller?`): `Promise`\<`IDidDocument`\>
@@ -300,7 +318,7 @@ The verification method id to use.
300
318
 
301
319
  The id of the credential.
302
320
 
303
- `undefined` | `string`
321
+ `string` | `undefined`
304
322
 
305
323
  ##### subject
306
324
 
@@ -466,19 +484,19 @@ The method to associate with the presentation.
466
484
 
467
485
  The id of the presentation.
468
486
 
469
- `undefined` | `string`
487
+ `string` | `undefined`
470
488
 
471
489
  ##### contexts
472
490
 
473
491
  The contexts for the data stored in the verifiable credential.
474
492
 
475
- `undefined` | `IJsonLdContextDefinitionRoot`
493
+ `IJsonLdContextDefinitionRoot` | `undefined`
476
494
 
477
495
  ##### types
478
496
 
479
497
  The types for the data stored in the verifiable credential.
480
498
 
481
- `undefined` | `string` | `string`[]
499
+ `string` | `string`[] | `undefined`
482
500
 
483
501
  ##### verifiableCredentials
484
502
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/identity-service",
3
- "version": "0.0.2-next.9",
3
+ "version": "0.0.3-next.2",
4
4
  "description": "Identity contract implementation and REST endpoint definitions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,31 +15,30 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@twin.org/api-models": "next",
18
+ "@twin.org/context": "next",
18
19
  "@twin.org/core": "next",
19
20
  "@twin.org/crypto": "next",
20
21
  "@twin.org/data-core": "next",
21
22
  "@twin.org/data-json-ld": "next",
22
23
  "@twin.org/entity": "next",
23
24
  "@twin.org/entity-storage-models": "next",
24
- "@twin.org/identity-models": "0.0.2-next.9",
25
+ "@twin.org/identity-models": "0.0.3-next.2",
25
26
  "@twin.org/standards-w3c-did": "next",
26
27
  "@twin.org/vault-models": "next",
27
28
  "@twin.org/web": "next"
28
29
  },
29
- "main": "./dist/cjs/index.cjs",
30
- "module": "./dist/esm/index.mjs",
30
+ "main": "./dist/es/index.js",
31
31
  "types": "./dist/types/index.d.ts",
32
32
  "exports": {
33
33
  ".": {
34
34
  "types": "./dist/types/index.d.ts",
35
- "require": "./dist/cjs/index.cjs",
36
- "import": "./dist/esm/index.mjs"
35
+ "import": "./dist/es/index.js",
36
+ "default": "./dist/es/index.js"
37
37
  },
38
38
  "./locales/*.json": "./locales/*.json"
39
39
  },
40
40
  "files": [
41
- "dist/cjs",
42
- "dist/esm",
41
+ "dist/es",
43
42
  "dist/types",
44
43
  "locales",
45
44
  "docs"