@twin.org/immutable-proof-service 0.0.3-next.13 → 0.0.3-next.16
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/es/entities/immutableProof.js +3 -3
- package/dist/es/entities/immutableProof.js.map +1 -1
- package/dist/es/immutableProofRoutes.js +96 -12
- package/dist/es/immutableProofRoutes.js.map +1 -1
- package/dist/es/immutableProofService.js +72 -37
- package/dist/es/immutableProofService.js.map +1 -1
- package/dist/es/models/IImmutableProofServiceConstructorOptions.js.map +1 -1
- package/dist/types/entities/immutableProof.d.ts +2 -2
- package/dist/types/immutableProofRoutes.d.ts +18 -2
- package/dist/types/immutableProofService.d.ts +17 -7
- package/dist/types/models/IImmutableProofServiceConstructorOptions.d.ts +3 -3
- package/docs/changelog.md +69 -0
- package/docs/examples.md +1 -1
- package/docs/open-api/spec.json +232 -12
- package/docs/reference/classes/ImmutableProof.md +3 -3
- package/docs/reference/classes/ImmutableProofService.md +48 -8
- package/docs/reference/functions/immutableProofRemove.md +31 -0
- package/docs/reference/functions/immutableProofRemoveNotarization.md +31 -0
- package/docs/reference/index.md +2 -0
- package/docs/reference/interfaces/IImmutableProofServiceConstructorOptions.md +4 -4
- package/locales/en.json +2 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IImmutableProofServiceConstructorOptions.js","sourceRoot":"","sources":["../../../src/models/IImmutableProofServiceConstructorOptions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IImmutableProofServiceConfig } from \"./IImmutableProofServiceConfig.js\";\n\n/**\n * Options for the immutable proof service constructor.\n */\nexport interface IImmutableProofServiceConstructorOptions {\n\t/**\n\t * The entity storage for proofs.\n\t * @default immutable-proof\n\t */\n\timmutableProofEntityStorageType?: string;\n\n\t/**\n\t * The
|
|
1
|
+
{"version":3,"file":"IImmutableProofServiceConstructorOptions.js","sourceRoot":"","sources":["../../../src/models/IImmutableProofServiceConstructorOptions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IImmutableProofServiceConfig } from \"./IImmutableProofServiceConfig.js\";\n\n/**\n * Options for the immutable proof service constructor.\n */\nexport interface IImmutableProofServiceConstructorOptions {\n\t/**\n\t * The entity storage for proofs.\n\t * @default immutable-proof\n\t */\n\timmutableProofEntityStorageType?: string;\n\n\t/**\n\t * The notarization connector type.\n\t * @default notarization\n\t */\n\tnotarizationConnectorType?: string;\n\n\t/**\n\t * The logging component type.\n\t * @default logging\n\t */\n\tloggingComponentType?: string;\n\n\t/**\n\t * The identity connector type.\n\t * @default identity\n\t */\n\tidentityConnectorType?: string;\n\n\t/**\n\t * The background task component type.\n\t * @default background-task\n\t */\n\tbackgroundTaskComponentType?: string;\n\n\t/**\n\t * The event bus component type, defaults to no event bus.\n\t */\n\teventBusComponentType?: string;\n\n\t/**\n\t * The configuration for the connector.\n\t */\n\tconfig?: IImmutableProofServiceConfig;\n}\n"]}
|
|
@@ -24,9 +24,9 @@ export declare class ImmutableProof {
|
|
|
24
24
|
*/
|
|
25
25
|
proofObjectIntegrity: string;
|
|
26
26
|
/**
|
|
27
|
-
* The
|
|
27
|
+
* The notarization id.
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
notarizationId?: string;
|
|
30
30
|
/**
|
|
31
31
|
* The verifiable credential context.
|
|
32
32
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ICreatedResponse, IHttpRequestContext, IRestRoute, ITag } from "@twin.org/api-models";
|
|
2
|
-
import { type IImmutableProofCreateRequest, type IImmutableProofGetRequest, type IImmutableProofGetResponse, type IImmutableProofVerifyRequest, type IImmutableProofVerifyResponse } from "@twin.org/immutable-proof-models";
|
|
1
|
+
import type { ICreatedResponse, IHttpRequestContext, INoContentResponse, IRestRoute, ITag } from "@twin.org/api-models";
|
|
2
|
+
import { type IImmutableProofCreateRequest, type IImmutableProofGetRequest, type IImmutableProofGetResponse, type IImmutableProofRemoveNotarizationRequest, type IImmutableProofRemoveRequest, type IImmutableProofVerifyRequest, type IImmutableProofVerifyResponse } from "@twin.org/immutable-proof-models";
|
|
3
3
|
/**
|
|
4
4
|
* The tag to associate with the routes.
|
|
5
5
|
*/
|
|
@@ -35,3 +35,19 @@ export declare function immutableProofGet(httpRequestContext: IHttpRequestContex
|
|
|
35
35
|
* @returns The response object with additional http response properties.
|
|
36
36
|
*/
|
|
37
37
|
export declare function immutableProofVerify(httpRequestContext: IHttpRequestContext, componentName: string, request: IImmutableProofVerifyRequest): Promise<IImmutableProofVerifyResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Remove the proof and its notarization.
|
|
40
|
+
* @param httpRequestContext The request context for the API.
|
|
41
|
+
* @param componentName The name of the component to use in the routes.
|
|
42
|
+
* @param request The request.
|
|
43
|
+
* @returns The response object with additional http response properties.
|
|
44
|
+
*/
|
|
45
|
+
export declare function immutableProofRemove(httpRequestContext: IHttpRequestContext, componentName: string, request: IImmutableProofRemoveRequest): Promise<INoContentResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* Remove the notarization for a proof, keeping the proof entity.
|
|
48
|
+
* @param httpRequestContext The request context for the API.
|
|
49
|
+
* @param componentName The name of the component to use in the routes.
|
|
50
|
+
* @param request The request.
|
|
51
|
+
* @returns The response object with additional http response properties.
|
|
52
|
+
*/
|
|
53
|
+
export declare function immutableProofRemoveNotarization(httpRequestContext: IHttpRequestContext, componentName: string, request: IImmutableProofRemoveNotarizationRequest): Promise<INoContentResponse>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
|
-
import { type IImmutableProofComponent, type IImmutableProofVerification } from "@twin.org/immutable-proof-models";
|
|
3
|
-
import { type IDidVerifiableCredential } from "@twin.org/standards-w3c-did";
|
|
2
|
+
import { type IImmutableProofComponent, type IImmutableProofCredential, type IImmutableProofVerification } from "@twin.org/immutable-proof-models";
|
|
4
3
|
import type { IImmutableProofServiceConstructorOptions } from "./models/IImmutableProofServiceConstructorOptions.js";
|
|
5
4
|
/**
|
|
6
5
|
* Class for performing immutable proof operations.
|
|
@@ -29,16 +28,20 @@ export declare class ImmutableProofService implements IImmutableProofComponent {
|
|
|
29
28
|
/**
|
|
30
29
|
* Create a new proof.
|
|
31
30
|
* @param document The document to create the proof for.
|
|
31
|
+
* @param options Optional settings for the proof.
|
|
32
|
+
* @param options.deleteLock An ISO 8601 date-time string specifying when the notarization lock expires; if omitted no lock is applied.
|
|
32
33
|
* @returns The id of the new proof.
|
|
33
34
|
*/
|
|
34
|
-
create(document: IJsonLdNodeObject
|
|
35
|
+
create(document: IJsonLdNodeObject, options?: {
|
|
36
|
+
deleteLock?: string;
|
|
37
|
+
}): Promise<string>;
|
|
35
38
|
/**
|
|
36
39
|
* Get a proof.
|
|
37
40
|
* @param id The id of the proof to get.
|
|
38
41
|
* @returns The proof.
|
|
39
42
|
* @throws NotFoundError if the proof is not found.
|
|
40
43
|
*/
|
|
41
|
-
get(id: string): Promise<
|
|
44
|
+
get(id: string): Promise<IImmutableProofCredential>;
|
|
42
45
|
/**
|
|
43
46
|
* Verify a proof.
|
|
44
47
|
* @param id The id of the proof to verify.
|
|
@@ -47,10 +50,17 @@ export declare class ImmutableProofService implements IImmutableProofComponent {
|
|
|
47
50
|
*/
|
|
48
51
|
verify(id: string): Promise<IImmutableProofVerification>;
|
|
49
52
|
/**
|
|
50
|
-
* Remove the
|
|
51
|
-
* @param id The id of the proof to remove
|
|
53
|
+
* Remove the proof and its notarization.
|
|
54
|
+
* @param id The id of the proof to remove.
|
|
52
55
|
* @returns Nothing.
|
|
53
56
|
* @throws NotFoundError if the proof is not found.
|
|
54
57
|
*/
|
|
55
|
-
|
|
58
|
+
remove(id: string): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Remove only the notarization for the proof, keeping the proof entity.
|
|
61
|
+
* @param id The id of the proof to remove the notarization from.
|
|
62
|
+
* @returns Nothing.
|
|
63
|
+
* @throws NotFoundError if the proof is not found.
|
|
64
|
+
*/
|
|
65
|
+
removeNotarization(id: string): Promise<void>;
|
|
56
66
|
}
|
|
@@ -9,10 +9,10 @@ export interface IImmutableProofServiceConstructorOptions {
|
|
|
9
9
|
*/
|
|
10
10
|
immutableProofEntityStorageType?: string;
|
|
11
11
|
/**
|
|
12
|
-
* The
|
|
13
|
-
* @default
|
|
12
|
+
* The notarization connector type.
|
|
13
|
+
* @default notarization
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
notarizationConnectorType?: string;
|
|
16
16
|
/**
|
|
17
17
|
* The logging component type.
|
|
18
18
|
* @default logging
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,74 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.16](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-service-v0.0.3-next.15...immutable-proof-service-v0.0.3-next.16) (2026-05-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add context id features ([#14](https://github.com/iotaledger/twin-immutable-proof/issues/14)) ([ed5a594](https://github.com/iotaledger/twin-immutable-proof/commit/ed5a594eaa7d50f74b1c09a7a560d48b33a4ecd1))
|
|
9
|
+
* add logging ([#18](https://github.com/iotaledger/twin-immutable-proof/issues/18)) ([e331ce8](https://github.com/iotaledger/twin-immutable-proof/commit/e331ce843393554750c2708ebce1273056b6399a))
|
|
10
|
+
* add validate-locales ([d6a7c07](https://github.com/iotaledger/twin-immutable-proof/commit/d6a7c0794a1922981a42f56cc24724d7cee727f6))
|
|
11
|
+
* eslint migration to flat config ([c8536f2](https://github.com/iotaledger/twin-immutable-proof/commit/c8536f219c7709c6c08b9266e537831f9054dda9))
|
|
12
|
+
* immutable proof as vc ([#31](https://github.com/iotaledger/twin-immutable-proof/issues/31)) ([79cdb03](https://github.com/iotaledger/twin-immutable-proof/commit/79cdb03eb86c4f6d2ab1d5bf235f74ff74e8b877))
|
|
13
|
+
* remove unused namespace ([a39864c](https://github.com/iotaledger/twin-immutable-proof/commit/a39864c0b2ca8753334a34028b8e5823a14162b4))
|
|
14
|
+
* remove vm linkage in on chain proof ([4034336](https://github.com/iotaledger/twin-immutable-proof/commit/4034336177261dcf3b017524a56f3f6537545227))
|
|
15
|
+
* replace verifiable storage with notarization as immutable proof ([#41](https://github.com/iotaledger/twin-immutable-proof/issues/41)) ([54f2154](https://github.com/iotaledger/twin-immutable-proof/commit/54f215469b0bdc9ea94cad572ca13b8533144104))
|
|
16
|
+
* typescript 6 update ([34d8aea](https://github.com/iotaledger/twin-immutable-proof/commit/34d8aea0ea0c1e1252de1882517abb1683d98313))
|
|
17
|
+
* update background tasks ([f25741c](https://github.com/iotaledger/twin-immutable-proof/commit/f25741c704e2c8311bc98bc69d4d926c523c781e))
|
|
18
|
+
* update contexts ([#22](https://github.com/iotaledger/twin-immutable-proof/issues/22)) ([645b880](https://github.com/iotaledger/twin-immutable-proof/commit/645b8803540408c74e3891b2c5ff9aefd5908d9f))
|
|
19
|
+
* update contexts and namespaces ([#20](https://github.com/iotaledger/twin-immutable-proof/issues/20)) ([d38aa69](https://github.com/iotaledger/twin-immutable-proof/commit/d38aa696c73e4fcc304f08fb458d5900109abcb4))
|
|
20
|
+
* update data types to use fully qualified names ([e94d0f5](https://github.com/iotaledger/twin-immutable-proof/commit/e94d0f5db93856b5b59cfd34e55252fa13a7f4e0))
|
|
21
|
+
* update dependencies ([1ec6b18](https://github.com/iotaledger/twin-immutable-proof/commit/1ec6b18e93198a8fc4935700863cdab1c3df7b64))
|
|
22
|
+
* update dependencies ([7d6b321](https://github.com/iotaledger/twin-immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
|
|
23
|
+
* update framework core ([e708d4d](https://github.com/iotaledger/twin-immutable-proof/commit/e708d4dd3febcfbcd64663d5be004eab1d26c0fb))
|
|
24
|
+
* update remove methods ([#45](https://github.com/iotaledger/twin-immutable-proof/issues/45)) ([9db19bb](https://github.com/iotaledger/twin-immutable-proof/commit/9db19bb4c8e6f5d66139755e8b8a8071a77c4887))
|
|
25
|
+
* update schemas ([ab0569a](https://github.com/iotaledger/twin-immutable-proof/commit/ab0569adf3419beefd8aef7793fdbe5b2fe2d93e))
|
|
26
|
+
* use shared store mechanism ([#3](https://github.com/iotaledger/twin-immutable-proof/issues/3)) ([7042a40](https://github.com/iotaledger/twin-immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* constructor component name ([06ea7c3](https://github.com/iotaledger/twin-immutable-proof/commit/06ea7c3602a7b465870300bf02f358d95312d49a))
|
|
32
|
+
* Missing user and node identity on create ([#1](https://github.com/iotaledger/twin-immutable-proof/issues/1)) ([80ea2f9](https://github.com/iotaledger/twin-immutable-proof/commit/80ea2f901afc7531f4a522227a61e6fa1482484d))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Dependencies
|
|
36
|
+
|
|
37
|
+
* The following workspace dependencies were updated
|
|
38
|
+
* dependencies
|
|
39
|
+
* @twin.org/immutable-proof-models bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
40
|
+
* @twin.org/immutable-proof-task bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
41
|
+
|
|
42
|
+
## [0.0.3-next.15](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-service-v0.0.3-next.14...immutable-proof-service-v0.0.3-next.15) (2026-05-29)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Features
|
|
46
|
+
|
|
47
|
+
* update remove methods ([#45](https://github.com/iotaledger/twin-immutable-proof/issues/45)) ([9db19bb](https://github.com/iotaledger/twin-immutable-proof/commit/9db19bb4c8e6f5d66139755e8b8a8071a77c4887))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Dependencies
|
|
51
|
+
|
|
52
|
+
* The following workspace dependencies were updated
|
|
53
|
+
* dependencies
|
|
54
|
+
* @twin.org/immutable-proof-models bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
55
|
+
* @twin.org/immutable-proof-task bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
56
|
+
|
|
57
|
+
## [0.0.3-next.14](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-service-v0.0.3-next.13...immutable-proof-service-v0.0.3-next.14) (2026-05-28)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### Features
|
|
61
|
+
|
|
62
|
+
* replace verifiable storage with notarization as immutable proof ([#41](https://github.com/iotaledger/twin-immutable-proof/issues/41)) ([54f2154](https://github.com/iotaledger/twin-immutable-proof/commit/54f215469b0bdc9ea94cad572ca13b8533144104))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Dependencies
|
|
66
|
+
|
|
67
|
+
* The following workspace dependencies were updated
|
|
68
|
+
* dependencies
|
|
69
|
+
* @twin.org/immutable-proof-models bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
70
|
+
* @twin.org/immutable-proof-task bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
71
|
+
|
|
3
72
|
## [0.0.3-next.13](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-service-v0.0.3-next.12...immutable-proof-service-v0.0.3-next.13) (2026-05-20)
|
|
4
73
|
|
|
5
74
|
|
package/docs/examples.md
CHANGED
|
@@ -68,7 +68,7 @@ const entity: ImmutableProof = {
|
|
|
68
68
|
dateCreated: '2026-03-10T09:30:00.000Z',
|
|
69
69
|
proofObjectId: 'https://example.org/documents/100',
|
|
70
70
|
proofObjectIntegrity: 'yEr9VvYCGDh2Ww1YwQMehUy4LlW35mLhX8j8R8U6x0g=',
|
|
71
|
-
|
|
71
|
+
notarizationId: 'notarization:01JABCDE'
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
console.log(entity.organizationId); // did:iota:tst:issuer
|
package/docs/open-api/spec.json
CHANGED
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"content": {
|
|
190
190
|
"application/json": {
|
|
191
191
|
"schema": {
|
|
192
|
-
"$ref": "https://schema.twindev.org/
|
|
192
|
+
"$ref": "https://schema.twindev.org/immutable-proof/ImmutableProofCredential"
|
|
193
193
|
},
|
|
194
194
|
"examples": {
|
|
195
195
|
"immutableProofGetResponseExample": {
|
|
@@ -215,11 +215,7 @@
|
|
|
215
215
|
"proofPurpose": "assertionMethod",
|
|
216
216
|
"proofValue": "7DdiPPYtxLjCD3wA1po2rv...",
|
|
217
217
|
"verificationMethod": "did:iota:testnet:0xcb07cabaa2f23b7e53d8cdc4228efb351ebb270554d13bc382e4f94ca8d3136b#immutable-proof-assertion",
|
|
218
|
-
"
|
|
219
|
-
"immutableReceipt": {
|
|
220
|
-
"id": "immutable-receipt:1234567890",
|
|
221
|
-
"type": "ImmutableReceipt"
|
|
222
|
-
}
|
|
218
|
+
"notarizationId": "notarization:iota:0xabcdef1234567890"
|
|
223
219
|
}
|
|
224
220
|
}
|
|
225
221
|
}
|
|
@@ -227,7 +223,7 @@
|
|
|
227
223
|
},
|
|
228
224
|
"application/ld+json": {
|
|
229
225
|
"schema": {
|
|
230
|
-
"$ref": "https://schema.twindev.org/
|
|
226
|
+
"$ref": "https://schema.twindev.org/immutable-proof/ImmutableProofCredential"
|
|
231
227
|
},
|
|
232
228
|
"examples": {
|
|
233
229
|
"immutableProofJsonLdGetResponseExample": {
|
|
@@ -253,11 +249,7 @@
|
|
|
253
249
|
"proofPurpose": "assertionMethod",
|
|
254
250
|
"proofValue": "7DdiPPYtxLjCD3wA1po2rv...",
|
|
255
251
|
"verificationMethod": "did:iota:testnet:0xcb07cabaa2f23b7e53d8cdc4228efb351ebb270554d13bc382e4f94ca8d3136b#immutable-proof-assertion",
|
|
256
|
-
"
|
|
257
|
-
"immutableReceipt": {
|
|
258
|
-
"id": "immutable-receipt:1234567890",
|
|
259
|
-
"type": "ImmutableReceipt"
|
|
260
|
-
}
|
|
252
|
+
"notarizationId": "notarization:iota:0xabcdef1234567890"
|
|
261
253
|
}
|
|
262
254
|
}
|
|
263
255
|
}
|
|
@@ -352,6 +344,114 @@
|
|
|
352
344
|
}
|
|
353
345
|
}
|
|
354
346
|
}
|
|
347
|
+
},
|
|
348
|
+
"delete": {
|
|
349
|
+
"operationId": "immutableProofRemove",
|
|
350
|
+
"summary": "Remove a proof",
|
|
351
|
+
"tags": [
|
|
352
|
+
"Immutable Proof"
|
|
353
|
+
],
|
|
354
|
+
"parameters": [
|
|
355
|
+
{
|
|
356
|
+
"name": "id",
|
|
357
|
+
"description": "The id of the immutable proof to remove.",
|
|
358
|
+
"in": "path",
|
|
359
|
+
"required": true,
|
|
360
|
+
"schema": {
|
|
361
|
+
"type": "string"
|
|
362
|
+
},
|
|
363
|
+
"style": "simple",
|
|
364
|
+
"example": "immutable-proof:1234567890"
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
"security": [
|
|
368
|
+
{
|
|
369
|
+
"jwtBearerAuthScheme": []
|
|
370
|
+
}
|
|
371
|
+
],
|
|
372
|
+
"responses": {
|
|
373
|
+
"204": {
|
|
374
|
+
"description": "The rest request ended in success with no data."
|
|
375
|
+
},
|
|
376
|
+
"400": {
|
|
377
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
378
|
+
"content": {
|
|
379
|
+
"application/json": {
|
|
380
|
+
"schema": {
|
|
381
|
+
"$ref": "#/components/schemas/Error"
|
|
382
|
+
},
|
|
383
|
+
"examples": {
|
|
384
|
+
"exampleResponse": {
|
|
385
|
+
"value": {
|
|
386
|
+
"name": "GeneralError",
|
|
387
|
+
"message": "errorMessage",
|
|
388
|
+
"properties": {
|
|
389
|
+
"foo": "bar"
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"401": {
|
|
398
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
399
|
+
"content": {
|
|
400
|
+
"application/json": {
|
|
401
|
+
"schema": {
|
|
402
|
+
"$ref": "#/components/schemas/Error"
|
|
403
|
+
},
|
|
404
|
+
"examples": {
|
|
405
|
+
"exampleResponse": {
|
|
406
|
+
"value": {
|
|
407
|
+
"name": "UnauthorizedError",
|
|
408
|
+
"message": "errorMessage"
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"404": {
|
|
416
|
+
"description": "The resource you tried to access does not exist, see the content for more details.",
|
|
417
|
+
"content": {
|
|
418
|
+
"application/json": {
|
|
419
|
+
"schema": {
|
|
420
|
+
"$ref": "#/components/schemas/NotFoundResponse"
|
|
421
|
+
},
|
|
422
|
+
"examples": {
|
|
423
|
+
"exampleResponse": {
|
|
424
|
+
"value": {
|
|
425
|
+
"name": "NotFoundError",
|
|
426
|
+
"message": "errorMessage",
|
|
427
|
+
"properties": {
|
|
428
|
+
"notFoundId": "1"
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"500": {
|
|
437
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
438
|
+
"content": {
|
|
439
|
+
"application/json": {
|
|
440
|
+
"schema": {
|
|
441
|
+
"$ref": "#/components/schemas/Error"
|
|
442
|
+
},
|
|
443
|
+
"examples": {
|
|
444
|
+
"exampleResponse": {
|
|
445
|
+
"value": {
|
|
446
|
+
"name": "InternalServerError",
|
|
447
|
+
"message": "errorMessage"
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
355
455
|
}
|
|
356
456
|
},
|
|
357
457
|
"/immutable-proof/{id}/verify": {
|
|
@@ -496,6 +596,116 @@
|
|
|
496
596
|
}
|
|
497
597
|
}
|
|
498
598
|
}
|
|
599
|
+
},
|
|
600
|
+
"/immutable-proof/{id}/notarization": {
|
|
601
|
+
"delete": {
|
|
602
|
+
"operationId": "immutableProofRemoveNotarization",
|
|
603
|
+
"summary": "Remove the notarization for a proof",
|
|
604
|
+
"tags": [
|
|
605
|
+
"Immutable Proof"
|
|
606
|
+
],
|
|
607
|
+
"parameters": [
|
|
608
|
+
{
|
|
609
|
+
"name": "id",
|
|
610
|
+
"description": "The id of the immutable proof to remove the notarization from.",
|
|
611
|
+
"in": "path",
|
|
612
|
+
"required": true,
|
|
613
|
+
"schema": {
|
|
614
|
+
"type": "string"
|
|
615
|
+
},
|
|
616
|
+
"style": "simple",
|
|
617
|
+
"example": "immutable-proof:1234567890"
|
|
618
|
+
}
|
|
619
|
+
],
|
|
620
|
+
"security": [
|
|
621
|
+
{
|
|
622
|
+
"jwtBearerAuthScheme": []
|
|
623
|
+
}
|
|
624
|
+
],
|
|
625
|
+
"responses": {
|
|
626
|
+
"204": {
|
|
627
|
+
"description": "The rest request ended in success with no data."
|
|
628
|
+
},
|
|
629
|
+
"400": {
|
|
630
|
+
"description": "The server cannot process the request, see the content for more details.",
|
|
631
|
+
"content": {
|
|
632
|
+
"application/json": {
|
|
633
|
+
"schema": {
|
|
634
|
+
"$ref": "#/components/schemas/Error"
|
|
635
|
+
},
|
|
636
|
+
"examples": {
|
|
637
|
+
"exampleResponse": {
|
|
638
|
+
"value": {
|
|
639
|
+
"name": "GeneralError",
|
|
640
|
+
"message": "errorMessage",
|
|
641
|
+
"properties": {
|
|
642
|
+
"foo": "bar"
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
"401": {
|
|
651
|
+
"description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
|
|
652
|
+
"content": {
|
|
653
|
+
"application/json": {
|
|
654
|
+
"schema": {
|
|
655
|
+
"$ref": "#/components/schemas/Error"
|
|
656
|
+
},
|
|
657
|
+
"examples": {
|
|
658
|
+
"exampleResponse": {
|
|
659
|
+
"value": {
|
|
660
|
+
"name": "UnauthorizedError",
|
|
661
|
+
"message": "errorMessage"
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
"404": {
|
|
669
|
+
"description": "The resource you tried to access does not exist, see the content for more details.",
|
|
670
|
+
"content": {
|
|
671
|
+
"application/json": {
|
|
672
|
+
"schema": {
|
|
673
|
+
"$ref": "#/components/schemas/NotFoundResponse"
|
|
674
|
+
},
|
|
675
|
+
"examples": {
|
|
676
|
+
"exampleResponse": {
|
|
677
|
+
"value": {
|
|
678
|
+
"name": "NotFoundError",
|
|
679
|
+
"message": "errorMessage",
|
|
680
|
+
"properties": {
|
|
681
|
+
"notFoundId": "1"
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
},
|
|
689
|
+
"500": {
|
|
690
|
+
"description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
|
|
691
|
+
"content": {
|
|
692
|
+
"application/json": {
|
|
693
|
+
"schema": {
|
|
694
|
+
"$ref": "#/components/schemas/Error"
|
|
695
|
+
},
|
|
696
|
+
"examples": {
|
|
697
|
+
"exampleResponse": {
|
|
698
|
+
"value": {
|
|
699
|
+
"name": "InternalServerError",
|
|
700
|
+
"message": "errorMessage"
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
499
709
|
}
|
|
500
710
|
},
|
|
501
711
|
"components": {
|
|
@@ -539,6 +749,16 @@
|
|
|
539
749
|
"properties": {
|
|
540
750
|
"document": {
|
|
541
751
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
752
|
+
},
|
|
753
|
+
"options": {
|
|
754
|
+
"type": "object",
|
|
755
|
+
"properties": {
|
|
756
|
+
"deleteLock": {
|
|
757
|
+
"type": "string",
|
|
758
|
+
"description": "An ISO 8601 date-time string specifying when the notarization lock expires.\nIf omitted, no deletion lock is applied."
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
"description": "Optional settings for the proof."
|
|
542
762
|
}
|
|
543
763
|
},
|
|
544
764
|
"required": [
|
|
@@ -54,11 +54,11 @@ The associated integrity for the item.
|
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
-
###
|
|
57
|
+
### notarizationId? {#notarizationid}
|
|
58
58
|
|
|
59
|
-
> `optional` **
|
|
59
|
+
> `optional` **notarizationId?**: `string`
|
|
60
60
|
|
|
61
|
-
The
|
|
61
|
+
The notarization id.
|
|
62
62
|
|
|
63
63
|
***
|
|
64
64
|
|
|
@@ -82,7 +82,7 @@ Nothing.
|
|
|
82
82
|
|
|
83
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`\>
|
|
@@ -108,7 +118,7 @@ The id of the new proof.
|
|
|
108
118
|
|
|
109
119
|
### get() {#get}
|
|
110
120
|
|
|
111
|
-
> **get**(`id`): `Promise`\<`
|
|
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`\<`
|
|
135
|
+
`Promise`\<`IImmutableProofCredential`\>
|
|
126
136
|
|
|
127
137
|
The proof.
|
|
128
138
|
|
|
@@ -166,11 +176,41 @@ NotFoundError if the proof is not found.
|
|
|
166
176
|
|
|
167
177
|
***
|
|
168
178
|
|
|
169
|
-
###
|
|
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
|
+
Nothing.
|
|
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
|
-
> **
|
|
211
|
+
> **removeNotarization**(`id`): `Promise`\<`void`\>
|
|
172
212
|
|
|
173
|
-
Remove the
|
|
213
|
+
Remove only the notarization for the proof, keeping the proof entity.
|
|
174
214
|
|
|
175
215
|
#### Parameters
|
|
176
216
|
|
|
@@ -178,7 +218,7 @@ Remove the verifiable storage for the proof.
|
|
|
178
218
|
|
|
179
219
|
`string`
|
|
180
220
|
|
|
181
|
-
The id of the proof to remove the
|
|
221
|
+
The id of the proof to remove the notarization from.
|
|
182
222
|
|
|
183
223
|
#### Returns
|
|
184
224
|
|
|
@@ -192,4 +232,4 @@ NotFoundError if the proof is not found.
|
|
|
192
232
|
|
|
193
233
|
#### Implementation of
|
|
194
234
|
|
|
195
|
-
`IImmutableProofComponent.
|
|
235
|
+
`IImmutableProofComponent.removeNotarization`
|
|
@@ -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.
|