@twin.org/immutable-proof-rest-client 0.0.3-next.14 → 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.
@@ -1,7 +1,7 @@
1
1
  // Copyright 2024 IOTA Stiftung.
2
2
  // SPDX-License-Identifier: Apache-2.0.
3
3
  import { BaseRestClient } from "@twin.org/api-core";
4
- import { Guards, NotSupportedError } from "@twin.org/core";
4
+ import { Guards } from "@twin.org/core";
5
5
  import { HeaderTypes, MimeTypes } from "@twin.org/web";
6
6
  /**
7
7
  * Client for performing immutable proof through to REST endpoints.
@@ -79,14 +79,31 @@ export class ImmutableProofRestClient extends BaseRestClient {
79
79
  return response.body;
80
80
  }
81
81
  /**
82
- * Remove the verifiable storage for the proof.
83
- * @param id The id of the proof to remove the storage from.
82
+ * Remove the proof and its notarization.
83
+ * @param id The id of the proof to remove.
84
84
  * @returns Nothing.
85
85
  * @throws NotFoundError if the proof is not found.
86
86
  */
87
- async removeVerifiable(id) {
88
- throw new NotSupportedError(ImmutableProofRestClient.CLASS_NAME, "notSupportedOnClient", {
89
- methodName: "removeVerifiable"
87
+ async remove(id) {
88
+ Guards.stringValue(ImmutableProofRestClient.CLASS_NAME, "id", id);
89
+ await this.fetch("/:id", "DELETE", {
90
+ pathParams: {
91
+ id
92
+ }
93
+ });
94
+ }
95
+ /**
96
+ * Remove only the notarization for the proof, keeping the proof entity.
97
+ * @param id The id of the proof to remove the notarization from.
98
+ * @returns Nothing.
99
+ * @throws NotFoundError if the proof is not found.
100
+ */
101
+ async removeNotarization(id) {
102
+ Guards.stringValue(ImmutableProofRestClient.CLASS_NAME, "id", id);
103
+ await this.fetch("/:id/notarization", "DELETE", {
104
+ pathParams: {
105
+ id
106
+ }
90
107
  });
91
108
  }
92
109
  }
@@ -1 +1 @@
1
- {"version":3,"file":"immutableProofRestClient.js","sourceRoot":"","sources":["../../src/immutableProofRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;A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;OAKG;IACI,KAAK,CAAC,MAAM,CAAC,EAAU;QAC7B,MAAM,CAAC,WAAW,CAAC,wBAAwB,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAExE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAChC,aAAa,EACb,KAAK,EACL;YACC,OAAO,EAAE;gBACR,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,MAAM;aACtC;YACD,UAAU,EAAE;gBACX,EAAE;aACF;SACD,CACD,CAAC;QAEF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACtB,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,gBAAgB,CAAC,EAAU;QACvC,MAAM,IAAI,iBAAiB,CAAC,wBAAwB,CAAC,UAAU,EAAE,sBAAsB,EAAE;YACxF,UAAU,EAAE,kBAAkB;SAC9B,CAAC,CAAC;IACJ,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { BaseRestClient } from \"@twin.org/api-core\";\nimport type { IBaseRestClientConfig, ICreatedResponse } from \"@twin.org/api-models\";\nimport { Guards, NotSupportedError } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type {\n\tIImmutableProofComponent,\n\tIImmutableProofCreateRequest,\n\tIImmutableProofGetRequest,\n\tIImmutableProofGetResponse,\n\tIImmutableProofVerification,\n\tIImmutableProofVerifyRequest,\n\tIImmutableProofVerifyResponse\n} from \"@twin.org/immutable-proof-models\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type { IDidVerifiableCredential } from \"@twin.org/standards-w3c-did\";\nimport { HeaderTypes, MimeTypes } from \"@twin.org/web\";\n\n/**\n * Client for performing immutable proof through to REST endpoints.\n */\nexport class ImmutableProofRestClient extends BaseRestClient implements IImmutableProofComponent {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<ImmutableProofRestClient>();\n\n\t/**\n\t * Create a new instance of ImmutableProofRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(nameof<ImmutableProofRestClient>(), config, \"immutable-proof\");\n\t}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The class name of the component.\n\t */\n\tpublic className(): string {\n\t\treturn ImmutableProofRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Create a new proof.\n\t * @param document The document to create the proof for.\n\t * @param options Optional settings for the proof.\n\t * @param options.deleteLock An ISO 8601 date-time string specifying when the notarization lock expires; if omitted no lock is applied.\n\t * @returns The id of the new proof.\n\t */\n\tpublic async create(\n\t\tdocument: IJsonLdNodeObject,\n\t\toptions?: { deleteLock?: string }\n\t): Promise<string> {\n\t\tGuards.object(ImmutableProofRestClient.CLASS_NAME, nameof(document), document);\n\n\t\tconst response = await this.fetch<IImmutableProofCreateRequest, ICreatedResponse>(\"/\", \"POST\", {\n\t\t\tbody: {\n\t\t\t\tdocument,\n\t\t\t\toptions\n\t\t\t}\n\t\t});\n\n\t\treturn response.headers[HeaderTypes.Location];\n\t}\n\n\t/**\n\t * Get a proof.\n\t * @param id The id of the proof to get.\n\t * @returns The proof.\n\t * @throws NotFoundError if the proof is not found.\n\t */\n\tpublic async get(id: string): Promise<IDidVerifiableCredential> {\n\t\tGuards.stringValue(ImmutableProofRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tconst response = await this.fetch<IImmutableProofGetRequest, IImmutableProofGetResponse>(\n\t\t\t\"/:id\",\n\t\t\t\"GET\",\n\t\t\t{\n\t\t\t\theaders: {\n\t\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t\t},\n\t\t\t\tpathParams: {\n\t\t\t\t\tid\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Verify a proof.\n\t * @param id The id of the proof to verify.\n\t * @returns The result of the verification and any failures.\n\t * @throws NotFoundError if the proof is not found.\n\t */\n\tpublic async verify(id: string): Promise<IImmutableProofVerification> {\n\t\tGuards.stringValue(ImmutableProofRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tconst response = await this.fetch<IImmutableProofVerifyRequest, IImmutableProofVerifyResponse>(\n\t\t\t\"/:id/verify\",\n\t\t\t\"GET\",\n\t\t\t{\n\t\t\t\theaders: {\n\t\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t\t},\n\t\t\t\tpathParams: {\n\t\t\t\t\tid\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Remove the verifiable storage for the proof.\n\t * @param id The id of the proof to remove the storage from.\n\t * @returns Nothing.\n\t * @throws NotFoundError if the proof is not found.\n\t */\n\tpublic async removeVerifiable(id: string): Promise<void> {\n\t\tthrow new NotSupportedError(ImmutableProofRestClient.CLASS_NAME, \"notSupportedOnClient\", {\n\t\t\tmethodName: \"removeVerifiable\"\n\t\t});\n\t}\n}\n"]}
1
+ {"version":3,"file":"immutableProofRestClient.js","sourceRoot":"","sources":["../../src/immutableProofRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMpD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAexC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAEvD;;GAEG;AACH,MAAM,OAAO,wBAAyB,SAAQ,cAAc;IAC3D;;OAEG;IACI,MAAM,CAAU,UAAU,8BAA8C;IAE/E;;;OAGG;IACH,YAAY,MAA6B;QACxC,KAAK,6BAAqC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACtE,CAAC;IAED;;;OAGG;IACI,SAAS;QACf,OAAO,wBAAwB,CAAC,UAAU,CAAC;IAC5C,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,CAClB,QAA2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,IAAI,CAAC,KAAK,CAAmD,MAAM,EAAE,QAAQ,EAAE;YACpF,UAAU,EAAE;gBACX,EAAE;aACF;SACD,CAAC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,kBAAkB,CAAC,EAAU;QACzC,MAAM,CAAC,WAAW,CAAC,wBAAwB,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAExE,MAAM,IAAI,CAAC,KAAK,CACf,mBAAmB,EACnB,QAAQ,EACR;YACC,UAAU,EAAE;gBACX,EAAE;aACF;SACD,CACD,CAAC;IACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { BaseRestClient } from \"@twin.org/api-core\";\nimport type {\n\tIBaseRestClientConfig,\n\tICreatedResponse,\n\tINoContentResponse\n} from \"@twin.org/api-models\";\nimport { Guards } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type {\n\tIImmutableProofComponent,\n\tIImmutableProofCreateRequest,\n\tIImmutableProofCredential,\n\tIImmutableProofGetRequest,\n\tIImmutableProofGetResponse,\n\tIImmutableProofRemoveNotarizationRequest,\n\tIImmutableProofRemoveRequest,\n\tIImmutableProofVerification,\n\tIImmutableProofVerifyRequest,\n\tIImmutableProofVerifyResponse\n} from \"@twin.org/immutable-proof-models\";\nimport { nameof } from \"@twin.org/nameof\";\nimport { HeaderTypes, MimeTypes } from \"@twin.org/web\";\n\n/**\n * Client for performing immutable proof through to REST endpoints.\n */\nexport class ImmutableProofRestClient extends BaseRestClient implements IImmutableProofComponent {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<ImmutableProofRestClient>();\n\n\t/**\n\t * Create a new instance of ImmutableProofRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(nameof<ImmutableProofRestClient>(), config, \"immutable-proof\");\n\t}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The class name of the component.\n\t */\n\tpublic className(): string {\n\t\treturn ImmutableProofRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Create a new proof.\n\t * @param document The document to create the proof for.\n\t * @param options Optional settings for the proof.\n\t * @param options.deleteLock An ISO 8601 date-time string specifying when the notarization lock expires; if omitted no lock is applied.\n\t * @returns The id of the new proof.\n\t */\n\tpublic async create(\n\t\tdocument: IJsonLdNodeObject,\n\t\toptions?: { deleteLock?: string }\n\t): Promise<string> {\n\t\tGuards.object(ImmutableProofRestClient.CLASS_NAME, nameof(document), document);\n\n\t\tconst response = await this.fetch<IImmutableProofCreateRequest, ICreatedResponse>(\"/\", \"POST\", {\n\t\t\tbody: {\n\t\t\t\tdocument,\n\t\t\t\toptions\n\t\t\t}\n\t\t});\n\n\t\treturn response.headers[HeaderTypes.Location];\n\t}\n\n\t/**\n\t * Get a proof.\n\t * @param id The id of the proof to get.\n\t * @returns The proof.\n\t * @throws NotFoundError if the proof is not found.\n\t */\n\tpublic async get(id: string): Promise<IImmutableProofCredential> {\n\t\tGuards.stringValue(ImmutableProofRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tconst response = await this.fetch<IImmutableProofGetRequest, IImmutableProofGetResponse>(\n\t\t\t\"/:id\",\n\t\t\t\"GET\",\n\t\t\t{\n\t\t\t\theaders: {\n\t\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t\t},\n\t\t\t\tpathParams: {\n\t\t\t\t\tid\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Verify a proof.\n\t * @param id The id of the proof to verify.\n\t * @returns The result of the verification and any failures.\n\t * @throws NotFoundError if the proof is not found.\n\t */\n\tpublic async verify(id: string): Promise<IImmutableProofVerification> {\n\t\tGuards.stringValue(ImmutableProofRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tconst response = await this.fetch<IImmutableProofVerifyRequest, IImmutableProofVerifyResponse>(\n\t\t\t\"/:id/verify\",\n\t\t\t\"GET\",\n\t\t\t{\n\t\t\t\theaders: {\n\t\t\t\t\t[HeaderTypes.Accept]: MimeTypes.JsonLd\n\t\t\t\t},\n\t\t\t\tpathParams: {\n\t\t\t\t\tid\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn response.body;\n\t}\n\n\t/**\n\t * Remove the proof and its notarization.\n\t * @param id The id of the proof to remove.\n\t * @returns Nothing.\n\t * @throws NotFoundError if the proof is not found.\n\t */\n\tpublic async remove(id: string): Promise<void> {\n\t\tGuards.stringValue(ImmutableProofRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tawait this.fetch<IImmutableProofRemoveRequest, INoContentResponse>(\"/:id\", \"DELETE\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Remove only the notarization for the proof, keeping the proof entity.\n\t * @param id The id of the proof to remove the notarization from.\n\t * @returns Nothing.\n\t * @throws NotFoundError if the proof is not found.\n\t */\n\tpublic async removeNotarization(id: string): Promise<void> {\n\t\tGuards.stringValue(ImmutableProofRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tawait this.fetch<IImmutableProofRemoveNotarizationRequest, INoContentResponse>(\n\t\t\t\"/:id/notarization\",\n\t\t\t\"DELETE\",\n\t\t\t{\n\t\t\t\tpathParams: {\n\t\t\t\t\tid\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n}\n"]}
@@ -1,8 +1,7 @@
1
1
  import { BaseRestClient } from "@twin.org/api-core";
2
2
  import type { IBaseRestClientConfig } from "@twin.org/api-models";
3
3
  import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
4
- import type { IImmutableProofComponent, IImmutableProofVerification } from "@twin.org/immutable-proof-models";
5
- import type { IDidVerifiableCredential } from "@twin.org/standards-w3c-did";
4
+ import type { IImmutableProofComponent, IImmutableProofCredential, IImmutableProofVerification } from "@twin.org/immutable-proof-models";
6
5
  /**
7
6
  * Client for performing immutable proof through to REST endpoints.
8
7
  */
@@ -37,7 +36,7 @@ export declare class ImmutableProofRestClient extends BaseRestClient implements
37
36
  * @returns The proof.
38
37
  * @throws NotFoundError if the proof is not found.
39
38
  */
40
- get(id: string): Promise<IDidVerifiableCredential>;
39
+ get(id: string): Promise<IImmutableProofCredential>;
41
40
  /**
42
41
  * Verify a proof.
43
42
  * @param id The id of the proof to verify.
@@ -46,10 +45,17 @@ export declare class ImmutableProofRestClient extends BaseRestClient implements
46
45
  */
47
46
  verify(id: string): Promise<IImmutableProofVerification>;
48
47
  /**
49
- * Remove the verifiable storage for the proof.
50
- * @param id The id of the proof to remove the storage from.
48
+ * Remove the proof and its notarization.
49
+ * @param id The id of the proof to remove.
51
50
  * @returns Nothing.
52
51
  * @throws NotFoundError if the proof is not found.
53
52
  */
54
- removeVerifiable(id: string): Promise<void>;
53
+ remove(id: string): Promise<void>;
54
+ /**
55
+ * Remove only the notarization for the proof, keeping the proof entity.
56
+ * @param id The id of the proof to remove the notarization from.
57
+ * @returns Nothing.
58
+ * @throws NotFoundError if the proof is not found.
59
+ */
60
+ removeNotarization(id: string): Promise<void>;
55
61
  }
package/docs/changelog.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.3-next.16](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-rest-client-v0.0.3-next.15...immutable-proof-rest-client-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 validate-locales ([d6a7c07](https://github.com/iotaledger/twin-immutable-proof/commit/d6a7c0794a1922981a42f56cc24724d7cee727f6))
10
+ * eslint migration to flat config ([c8536f2](https://github.com/iotaledger/twin-immutable-proof/commit/c8536f219c7709c6c08b9266e537831f9054dda9))
11
+ * immutable proof as vc ([#31](https://github.com/iotaledger/twin-immutable-proof/issues/31)) ([79cdb03](https://github.com/iotaledger/twin-immutable-proof/commit/79cdb03eb86c4f6d2ab1d5bf235f74ff74e8b877))
12
+ * 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))
13
+ * typescript 6 update ([34d8aea](https://github.com/iotaledger/twin-immutable-proof/commit/34d8aea0ea0c1e1252de1882517abb1683d98313))
14
+ * update dependencies ([7d6b321](https://github.com/iotaledger/twin-immutable-proof/commit/7d6b321928ca0434ee530816b1440f1687b94a6e))
15
+ * update framework core ([e708d4d](https://github.com/iotaledger/twin-immutable-proof/commit/e708d4dd3febcfbcd64663d5be004eab1d26c0fb))
16
+ * update remove methods ([#45](https://github.com/iotaledger/twin-immutable-proof/issues/45)) ([9db19bb](https://github.com/iotaledger/twin-immutable-proof/commit/9db19bb4c8e6f5d66139755e8b8a8071a77c4887))
17
+ * use shared store mechanism ([#3](https://github.com/iotaledger/twin-immutable-proof/issues/3)) ([7042a40](https://github.com/iotaledger/twin-immutable-proof/commit/7042a40f0ef8b01463f07aeb1efae4f417162fa1))
18
+
19
+
20
+ ### Dependencies
21
+
22
+ * The following workspace dependencies were updated
23
+ * dependencies
24
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.15 to 0.0.3-next.16
25
+
26
+ ## [0.0.3-next.15](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-rest-client-v0.0.3-next.14...immutable-proof-rest-client-v0.0.3-next.15) (2026-05-29)
27
+
28
+
29
+ ### Features
30
+
31
+ * update remove methods ([#45](https://github.com/iotaledger/twin-immutable-proof/issues/45)) ([9db19bb](https://github.com/iotaledger/twin-immutable-proof/commit/9db19bb4c8e6f5d66139755e8b8a8071a77c4887))
32
+
33
+
34
+ ### Dependencies
35
+
36
+ * The following workspace dependencies were updated
37
+ * dependencies
38
+ * @twin.org/immutable-proof-models bumped from 0.0.3-next.14 to 0.0.3-next.15
39
+
3
40
  ## [0.0.3-next.14](https://github.com/iotaledger/twin-immutable-proof/compare/immutable-proof-rest-client-v0.0.3-next.13...immutable-proof-rest-client-v0.0.3-next.14) (2026-05-28)
4
41
 
5
42
 
@@ -100,7 +100,7 @@ The id of the new proof.
100
100
 
101
101
  ### get() {#get}
102
102
 
103
- > **get**(`id`): `Promise`\<`IDidVerifiableCredential`\>
103
+ > **get**(`id`): `Promise`\<`IImmutableProofCredential`\>
104
104
 
105
105
  Get a proof.
106
106
 
@@ -114,7 +114,7 @@ The id of the proof to get.
114
114
 
115
115
  #### Returns
116
116
 
117
- `Promise`\<`IDidVerifiableCredential`\>
117
+ `Promise`\<`IImmutableProofCredential`\>
118
118
 
119
119
  The proof.
120
120
 
@@ -158,11 +158,11 @@ NotFoundError if the proof is not found.
158
158
 
159
159
  ***
160
160
 
161
- ### removeVerifiable() {#removeverifiable}
161
+ ### remove() {#remove}
162
162
 
163
- > **removeVerifiable**(`id`): `Promise`\<`void`\>
163
+ > **remove**(`id`): `Promise`\<`void`\>
164
164
 
165
- Remove the verifiable storage for the proof.
165
+ Remove the proof and its notarization.
166
166
 
167
167
  #### Parameters
168
168
 
@@ -170,7 +170,7 @@ Remove the verifiable storage for the proof.
170
170
 
171
171
  `string`
172
172
 
173
- The id of the proof to remove the storage from.
173
+ The id of the proof to remove.
174
174
 
175
175
  #### Returns
176
176
 
@@ -184,4 +184,34 @@ NotFoundError if the proof is not found.
184
184
 
185
185
  #### Implementation of
186
186
 
187
- `IImmutableProofComponent.removeVerifiable`
187
+ `IImmutableProofComponent.remove`
188
+
189
+ ***
190
+
191
+ ### removeNotarization() {#removenotarization}
192
+
193
+ > **removeNotarization**(`id`): `Promise`\<`void`\>
194
+
195
+ Remove only the notarization for the proof, keeping the proof entity.
196
+
197
+ #### Parameters
198
+
199
+ ##### id
200
+
201
+ `string`
202
+
203
+ The id of the proof to remove the notarization from.
204
+
205
+ #### Returns
206
+
207
+ `Promise`\<`void`\>
208
+
209
+ Nothing.
210
+
211
+ #### Throws
212
+
213
+ NotFoundError if the proof is not found.
214
+
215
+ #### Implementation of
216
+
217
+ `IImmutableProofComponent.removeNotarization`
package/locales/en.json CHANGED
@@ -1,7 +1 @@
1
- {
2
- "error": {
3
- "immutableProofRestClient": {
4
- "notSupportedOnClient": "The method \"{methodName}\" is not supported on the REST client, it can only be used on a server side component"
5
- }
6
- }
7
- }
1
+ {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/immutable-proof-rest-client",
3
- "version": "0.0.3-next.14",
3
+ "version": "0.0.3-next.16",
4
4
  "description": "HTTP client for calling immutable proof service endpoints from external components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,7 +19,7 @@
19
19
  "@twin.org/core": "next",
20
20
  "@twin.org/data-json-ld": "next",
21
21
  "@twin.org/entity": "next",
22
- "@twin.org/immutable-proof-models": "0.0.3-next.14",
22
+ "@twin.org/immutable-proof-models": "0.0.3-next.16",
23
23
  "@twin.org/nameof": "next",
24
24
  "@twin.org/web": "next"
25
25
  },