@twin.org/immutable-proof-service 0.0.3-next.8 → 0.9.0-next.1

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 (30) hide show
  1. package/README.md +1 -1
  2. package/dist/es/entities/immutableProof.js +3 -3
  3. package/dist/es/entities/immutableProof.js.map +1 -1
  4. package/dist/es/immutableProofRoutes.js +98 -14
  5. package/dist/es/immutableProofRoutes.js.map +1 -1
  6. package/dist/es/immutableProofService.js +78 -39
  7. package/dist/es/immutableProofService.js.map +1 -1
  8. package/dist/es/models/IImmutableProofServiceConstructorOptions.js.map +1 -1
  9. package/dist/es/restEntryPoints.js +3 -0
  10. package/dist/es/restEntryPoints.js.map +1 -1
  11. package/dist/types/entities/immutableProof.d.ts +2 -2
  12. package/dist/types/immutableProofRoutes.d.ts +20 -4
  13. package/dist/types/immutableProofService.d.ts +20 -10
  14. package/dist/types/models/IImmutableProofServiceConstructorOptions.d.ts +3 -4
  15. package/dist/types/restEntryPoints.d.ts +3 -0
  16. package/docs/changelog.md +247 -45
  17. package/docs/examples.md +127 -1
  18. package/docs/open-api/spec.json +216 -692
  19. package/docs/reference/classes/ImmutableProof.md +11 -11
  20. package/docs/reference/classes/ImmutableProofService.md +57 -17
  21. package/docs/reference/functions/immutableProofGet.md +1 -1
  22. package/docs/reference/functions/immutableProofRemove.md +31 -0
  23. package/docs/reference/functions/immutableProofRemoveNotarization.md +31 -0
  24. package/docs/reference/functions/immutableProofVerify.md +1 -1
  25. package/docs/reference/index.md +2 -0
  26. package/docs/reference/interfaces/IImmutableProofServiceConfig.md +2 -2
  27. package/docs/reference/interfaces/IImmutableProofServiceConstructorOptions.md +16 -22
  28. package/docs/reference/variables/restEntryPoints.md +2 -0
  29. package/locales/en.json +2 -1
  30. package/package.json +22 -22
@@ -14,7 +14,7 @@ Class describing the immutable proof.
14
14
 
15
15
  ## Properties
16
16
 
17
- ### id
17
+ ### id {#id}
18
18
 
19
19
  > **id**: `string`
20
20
 
@@ -22,7 +22,7 @@ The id of the proof.
22
22
 
23
23
  ***
24
24
 
25
- ### organizationId
25
+ ### organizationId {#organizationid}
26
26
 
27
27
  > **organizationId**: `string`
28
28
 
@@ -30,7 +30,7 @@ The organization id.
30
30
 
31
31
  ***
32
32
 
33
- ### dateCreated
33
+ ### dateCreated {#datecreated}
34
34
 
35
35
  > **dateCreated**: `string`
36
36
 
@@ -38,15 +38,15 @@ The date/time of when the proof was created.
38
38
 
39
39
  ***
40
40
 
41
- ### proofObjectId?
41
+ ### proofObjectId? {#proofobjectid}
42
42
 
43
- > `optional` **proofObjectId**: `string`
43
+ > `optional` **proofObjectId?**: `string`
44
44
 
45
45
  The associated id for the item.
46
46
 
47
47
  ***
48
48
 
49
- ### proofObjectIntegrity
49
+ ### proofObjectIntegrity {#proofobjectintegrity}
50
50
 
51
51
  > **proofObjectIntegrity**: `string`
52
52
 
@@ -54,16 +54,16 @@ The associated integrity for the item.
54
54
 
55
55
  ***
56
56
 
57
- ### verifiableStorageId?
57
+ ### notarizationId? {#notarizationid}
58
58
 
59
- > `optional` **verifiableStorageId**: `string`
59
+ > `optional` **notarizationId?**: `string`
60
60
 
61
- The verifiable storage id.
61
+ The notarization id.
62
62
 
63
63
  ***
64
64
 
65
- ### vcContext?
65
+ ### vcContext? {#vccontext}
66
66
 
67
- > `optional` **vcContext**: `"https://www.w3.org/2018/credentials/v1"` \| `"https://www.w3.org/ns/credentials/v2"`
67
+ > `optional` **vcContext?**: `"https://www.w3.org/2018/credentials/v1"` \| `"https://www.w3.org/ns/credentials/v2"`
68
68
 
69
69
  The verifiable credential context.
@@ -12,7 +12,7 @@ Class for performing immutable proof operations.
12
12
 
13
13
  > **new ImmutableProofService**(`options?`): `ImmutableProofService`
14
14
 
15
- Create a new instance of ImmutableProofService.
15
+ Creates an instance of ImmutableProofService.
16
16
 
17
17
  #### Parameters
18
18
 
@@ -28,7 +28,7 @@ The dependencies for the immutable proof connector.
28
28
 
29
29
  ## Properties
30
30
 
31
- ### CLASS\_NAME
31
+ ### CLASS\_NAME {#class_name}
32
32
 
33
33
  > `readonly` `static` **CLASS\_NAME**: `string`
34
34
 
@@ -36,7 +36,7 @@ Runtime name for the class.
36
36
 
37
37
  ## Methods
38
38
 
39
- ### className()
39
+ ### className() {#classname}
40
40
 
41
41
  > **className**(): `string`
42
42
 
@@ -54,7 +54,7 @@ The class name of the component.
54
54
 
55
55
  ***
56
56
 
57
- ### start()
57
+ ### start() {#start}
58
58
 
59
59
  > **start**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
60
60
 
@@ -72,7 +72,7 @@ The node logging component type.
72
72
 
73
73
  `Promise`\<`void`\>
74
74
 
75
- Nothing.
75
+ A promise that resolves when the background task handler has been registered.
76
76
 
77
77
  #### Implementation of
78
78
 
@@ -80,9 +80,9 @@ Nothing.
80
80
 
81
81
  ***
82
82
 
83
- ### create()
83
+ ### create() {#create}
84
84
 
85
- > **create**(`document`): `Promise`\<`string`\>
85
+ > **create**(`document`, `options?`): `Promise`\<`string`\>
86
86
 
87
87
  Create a new proof.
88
88
 
@@ -94,6 +94,16 @@ Create a new proof.
94
94
 
95
95
  The document to create the proof for.
96
96
 
97
+ ##### options?
98
+
99
+ Optional settings for the proof.
100
+
101
+ ###### deleteLock?
102
+
103
+ `string`
104
+
105
+ An ISO 8601 date-time string specifying when the notarization lock expires; if omitted no lock is applied.
106
+
97
107
  #### Returns
98
108
 
99
109
  `Promise`\<`string`\>
@@ -106,9 +116,9 @@ The id of the new proof.
106
116
 
107
117
  ***
108
118
 
109
- ### get()
119
+ ### get() {#get}
110
120
 
111
- > **get**(`id`): `Promise`\<`IDidVerifiableCredential`\>
121
+ > **get**(`id`): `Promise`\<`IImmutableProofCredential`\>
112
122
 
113
123
  Get a proof.
114
124
 
@@ -122,7 +132,7 @@ The id of the proof to get.
122
132
 
123
133
  #### Returns
124
134
 
125
- `Promise`\<`IDidVerifiableCredential`\>
135
+ `Promise`\<`IImmutableProofCredential`\>
126
136
 
127
137
  The proof.
128
138
 
@@ -136,7 +146,7 @@ NotFoundError if the proof is not found.
136
146
 
137
147
  ***
138
148
 
139
- ### verify()
149
+ ### verify() {#verify}
140
150
 
141
151
  > **verify**(`id`): `Promise`\<`IImmutableProofVerification`\>
142
152
 
@@ -166,11 +176,41 @@ NotFoundError if the proof is not found.
166
176
 
167
177
  ***
168
178
 
169
- ### removeVerifiable()
179
+ ### remove() {#remove}
180
+
181
+ > **remove**(`id`): `Promise`\<`void`\>
182
+
183
+ Remove the proof and its notarization.
184
+
185
+ #### Parameters
186
+
187
+ ##### id
188
+
189
+ `string`
190
+
191
+ The id of the proof to remove.
192
+
193
+ #### Returns
194
+
195
+ `Promise`\<`void`\>
196
+
197
+ A promise that resolves when the proof and its notarization have been removed.
198
+
199
+ #### Throws
200
+
201
+ NotFoundError if the proof is not found.
202
+
203
+ #### Implementation of
204
+
205
+ `IImmutableProofComponent.remove`
206
+
207
+ ***
208
+
209
+ ### removeNotarization() {#removenotarization}
170
210
 
171
- > **removeVerifiable**(`id`): `Promise`\<`void`\>
211
+ > **removeNotarization**(`id`): `Promise`\<`void`\>
172
212
 
173
- Remove the verifiable storage for the proof.
213
+ Remove only the notarization for the proof, keeping the proof entity.
174
214
 
175
215
  #### Parameters
176
216
 
@@ -178,13 +218,13 @@ Remove the verifiable storage for the proof.
178
218
 
179
219
  `string`
180
220
 
181
- The id of the proof to remove the storage from.
221
+ The id of the proof to remove the notarization from.
182
222
 
183
223
  #### Returns
184
224
 
185
225
  `Promise`\<`void`\>
186
226
 
187
- Nothing.
227
+ A promise that resolves when the notarization has been removed.
188
228
 
189
229
  #### Throws
190
230
 
@@ -192,4 +232,4 @@ NotFoundError if the proof is not found.
192
232
 
193
233
  #### Implementation of
194
234
 
195
- `IImmutableProofComponent.removeVerifiable`
235
+ `IImmutableProofComponent.removeNotarization`
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **immutableProofGet**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`IImmutableProofGetResponse`\>
4
4
 
5
- Get the proof.
5
+ Get a proof.
6
6
 
7
7
  ## Parameters
8
8
 
@@ -0,0 +1,31 @@
1
+ # Function: immutableProofRemove()
2
+
3
+ > **immutableProofRemove**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse`\>
4
+
5
+ Remove the proof and its notarization.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ `IImmutableProofRemoveRequest`
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`INoContentResponse`\>
30
+
31
+ The response object with additional http response properties.
@@ -0,0 +1,31 @@
1
+ # Function: immutableProofRemoveNotarization()
2
+
3
+ > **immutableProofRemoveNotarization**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`INoContentResponse`\>
4
+
5
+ Remove the notarization for a proof, keeping the proof entity.
6
+
7
+ ## Parameters
8
+
9
+ ### httpRequestContext
10
+
11
+ `IHttpRequestContext`
12
+
13
+ The request context for the API.
14
+
15
+ ### componentName
16
+
17
+ `string`
18
+
19
+ The name of the component to use in the routes.
20
+
21
+ ### request
22
+
23
+ `IImmutableProofRemoveNotarizationRequest`
24
+
25
+ The request.
26
+
27
+ ## Returns
28
+
29
+ `Promise`\<`INoContentResponse`\>
30
+
31
+ The response object with additional http response properties.
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **immutableProofVerify**(`httpRequestContext`, `componentName`, `request`): `Promise`\<`IImmutableProofVerifyResponse`\>
4
4
 
5
- Verify the proof.
5
+ Verify a proof.
6
6
 
7
7
  ## Parameters
8
8
 
@@ -21,4 +21,6 @@
21
21
  - [immutableProofCreate](functions/immutableProofCreate.md)
22
22
  - [immutableProofGet](functions/immutableProofGet.md)
23
23
  - [immutableProofVerify](functions/immutableProofVerify.md)
24
+ - [immutableProofRemove](functions/immutableProofRemove.md)
25
+ - [immutableProofRemoveNotarization](functions/immutableProofRemoveNotarization.md)
24
26
  - [initSchema](functions/initSchema.md)
@@ -4,9 +4,9 @@ Configuration for the immutable proof service.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### verificationMethodId?
7
+ ### verificationMethodId? {#verificationmethodid}
8
8
 
9
- > `optional` **verificationMethodId**: `string`
9
+ > `optional` **verificationMethodId?**: `string`
10
10
 
11
11
  The verification method id to use for the proof.
12
12
 
@@ -4,9 +4,9 @@ Options for the immutable proof service constructor.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### immutableProofEntityStorageType?
7
+ ### immutableProofEntityStorageType? {#immutableproofentitystoragetype}
8
8
 
9
- > `optional` **immutableProofEntityStorageType**: `string`
9
+ > `optional` **immutableProofEntityStorageType?**: `string`
10
10
 
11
11
  The entity storage for proofs.
12
12
 
@@ -18,37 +18,31 @@ immutable-proof
18
18
 
19
19
  ***
20
20
 
21
- ### verifiableStorageType?
21
+ ### notarizationConnectorType? {#notarizationconnectortype}
22
22
 
23
- > `optional` **verifiableStorageType**: `string`
23
+ > `optional` **notarizationConnectorType?**: `string`
24
24
 
25
- The verifiable storage.
25
+ The notarization connector type.
26
26
 
27
27
  #### Default
28
28
 
29
29
  ```ts
30
- verifiable-storage
30
+ notarization
31
31
  ```
32
32
 
33
33
  ***
34
34
 
35
- ### loggingComponentType?
35
+ ### loggingComponentType? {#loggingcomponenttype}
36
36
 
37
- > `optional` **loggingComponentType**: `string`
37
+ > `optional` **loggingComponentType?**: `string`
38
38
 
39
39
  The logging component type.
40
40
 
41
- #### Default
42
-
43
- ```ts
44
- logging
45
- ```
46
-
47
41
  ***
48
42
 
49
- ### identityConnectorType?
43
+ ### identityConnectorType? {#identityconnectortype}
50
44
 
51
- > `optional` **identityConnectorType**: `string`
45
+ > `optional` **identityConnectorType?**: `string`
52
46
 
53
47
  The identity connector type.
54
48
 
@@ -60,9 +54,9 @@ identity
60
54
 
61
55
  ***
62
56
 
63
- ### backgroundTaskComponentType?
57
+ ### backgroundTaskComponentType? {#backgroundtaskcomponenttype}
64
58
 
65
- > `optional` **backgroundTaskComponentType**: `string`
59
+ > `optional` **backgroundTaskComponentType?**: `string`
66
60
 
67
61
  The background task component type.
68
62
 
@@ -74,16 +68,16 @@ background-task
74
68
 
75
69
  ***
76
70
 
77
- ### eventBusComponentType?
71
+ ### eventBusComponentType? {#eventbuscomponenttype}
78
72
 
79
- > `optional` **eventBusComponentType**: `string`
73
+ > `optional` **eventBusComponentType?**: `string`
80
74
 
81
75
  The event bus component type, defaults to no event bus.
82
76
 
83
77
  ***
84
78
 
85
- ### config?
79
+ ### config? {#config}
86
80
 
87
- > `optional` **config**: [`IImmutableProofServiceConfig`](IImmutableProofServiceConfig.md)
81
+ > `optional` **config?**: [`IImmutableProofServiceConfig`](IImmutableProofServiceConfig.md)
88
82
 
89
83
  The configuration for the connector.
@@ -1,3 +1,5 @@
1
1
  # Variable: restEntryPoints
2
2
 
3
3
  > `const` **restEntryPoints**: `IRestRouteEntryPoint`[]
4
+
5
+ The REST entry points for the immutable proof service.
package/locales/en.json CHANGED
@@ -5,7 +5,8 @@
5
5
  "createFailed": "Creating the proof failed",
6
6
  "getFailed": "Getting the proof failed",
7
7
  "verifyFailed": "Verifying the proof failed",
8
- "removeVerifiableFailed": "Removing verifiable entry from the Immutable Proof failed",
8
+ "removeFailed": "Removing the Immutable Proof failed",
9
+ "removeNotarizationFailed": "Removing notarization entry from the Immutable Proof failed",
9
10
  "proofNotFound": "The proof with the Id \"{notFoundId}\" was not found",
10
11
  "createProofFailed": "Creating the immutable proof failed"
11
12
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@twin.org/immutable-proof-service",
3
- "version": "0.0.3-next.8",
4
- "description": "Immutable proof contract implementation and REST endpoint definitions",
3
+ "version": "0.9.0-next.1",
4
+ "description": "Core proof lifecycle service with route helpers for create, get, and verify operations",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/twinfoundation/immutable-proof.git",
7
+ "url": "git+https://github.com/iotaledger/twin-immutable-proof.git",
8
8
  "directory": "packages/immutable-proof-service"
9
9
  },
10
10
  "author": "martyn.janes@iota.org",
@@ -14,24 +14,24 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/api-models": "next",
18
- "@twin.org/background-task-models": "next",
19
- "@twin.org/context": "next",
20
- "@twin.org/core": "next",
21
- "@twin.org/crypto": "next",
22
- "@twin.org/data-json-ld": "next",
23
- "@twin.org/entity": "next",
24
- "@twin.org/entity-storage-models": "next",
25
- "@twin.org/event-bus-models": "next",
26
- "@twin.org/identity-models": "next",
27
- "@twin.org/immutable-proof-models": "0.0.3-next.8",
28
- "@twin.org/immutable-proof-task": "0.0.3-next.8",
29
- "@twin.org/logging-models": "next",
30
- "@twin.org/nameof": "next",
31
- "@twin.org/standards-w3c-did": "next",
32
- "@twin.org/vault-models": "next",
33
- "@twin.org/verifiable-storage-models": "next",
34
- "@twin.org/web": "next"
17
+ "@twin.org/api-models": "0.9.0-next.1",
18
+ "@twin.org/background-task-models": "0.9.0-next.1",
19
+ "@twin.org/context": "0.9.0-next.1",
20
+ "@twin.org/core": "0.9.0-next.1",
21
+ "@twin.org/crypto": "0.9.0-next.1",
22
+ "@twin.org/data-json-ld": "0.9.0-next.1",
23
+ "@twin.org/entity": "0.9.0-next.1",
24
+ "@twin.org/entity-storage-models": "0.9.0-next.1",
25
+ "@twin.org/event-bus-models": "0.9.0-next.1",
26
+ "@twin.org/identity-models": "0.9.0-next.1",
27
+ "@twin.org/immutable-proof-models": "0.9.0-next.1",
28
+ "@twin.org/immutable-proof-task": "0.9.0-next.1",
29
+ "@twin.org/logging-models": "0.9.0-next.1",
30
+ "@twin.org/nameof": "0.9.0-next.1",
31
+ "@twin.org/notarization-models": "0.9.0-next.1",
32
+ "@twin.org/standards-w3c-did": "0.9.0-next.1",
33
+ "@twin.org/vault-models": "0.9.0-next.1",
34
+ "@twin.org/web": "0.9.0-next.1"
35
35
  },
36
36
  "main": "./dist/es/index.js",
37
37
  "types": "./dist/types/index.d.ts",
@@ -61,7 +61,7 @@
61
61
  "business-logic"
62
62
  ],
63
63
  "bugs": {
64
- "url": "git+https://github.com/twinfoundation/immutable-proof/issues"
64
+ "url": "git+https://github.com/iotaledger/twin-immutable-proof/issues"
65
65
  },
66
66
  "homepage": "https://twindev.org"
67
67
  }