@twin.org/immutable-proof-rest-client 0.0.2-next.2 → 0.0.2-next.3

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.
@@ -9,17 +9,17 @@ var web = require('@twin.org/web');
9
9
  /**
10
10
  * Client for performing immutable proof through to REST endpoints.
11
11
  */
12
- class ImmutableProofClient extends apiCore.BaseRestClient {
12
+ class ImmutableProofRestClient extends apiCore.BaseRestClient {
13
13
  /**
14
14
  * Runtime name for the class.
15
15
  */
16
- CLASS_NAME = "ImmutableProofClient";
16
+ static CLASS_NAME = "ImmutableProofRestClient";
17
17
  /**
18
- * Create a new instance of ImmutableProofClient.
18
+ * Create a new instance of ImmutableProofRestClient.
19
19
  * @param config The configuration for the client.
20
20
  */
21
21
  constructor(config) {
22
- super("ImmutableProofClient", config, "immutable-proof");
22
+ super("ImmutableProofRestClient", config, "immutable-proof");
23
23
  }
24
24
  /**
25
25
  * Create a new proof.
@@ -27,7 +27,7 @@ class ImmutableProofClient extends apiCore.BaseRestClient {
27
27
  * @returns The id of the new proof.
28
28
  */
29
29
  async create(document) {
30
- core.Guards.object(this.CLASS_NAME, "document", document);
30
+ core.Guards.object(ImmutableProofRestClient.CLASS_NAME, "document", document);
31
31
  const response = await this.fetch("/", "POST", {
32
32
  body: {
33
33
  document
@@ -42,7 +42,7 @@ class ImmutableProofClient extends apiCore.BaseRestClient {
42
42
  * @throws NotFoundError if the proof is not found.
43
43
  */
44
44
  async get(id) {
45
- core.Guards.stringValue(this.CLASS_NAME, "id", id);
45
+ core.Guards.stringValue(ImmutableProofRestClient.CLASS_NAME, "id", id);
46
46
  const response = await this.fetch("/:id", "GET", {
47
47
  headers: {
48
48
  [web.HeaderTypes.Accept]: web.MimeTypes.JsonLd
@@ -60,7 +60,7 @@ class ImmutableProofClient extends apiCore.BaseRestClient {
60
60
  * @throws NotFoundError if the proof is not found.
61
61
  */
62
62
  async verify(id) {
63
- core.Guards.stringValue(this.CLASS_NAME, "id", id);
63
+ core.Guards.stringValue(ImmutableProofRestClient.CLASS_NAME, "id", id);
64
64
  const response = await this.fetch("/:id/verify", "GET", {
65
65
  headers: {
66
66
  [web.HeaderTypes.Accept]: web.MimeTypes.JsonLd
@@ -78,8 +78,10 @@ class ImmutableProofClient extends apiCore.BaseRestClient {
78
78
  * @throws NotFoundError if the proof is not found.
79
79
  */
80
80
  async removeVerifiable(id) {
81
- throw new core.NotSupportedError(this.CLASS_NAME, "removeVerifiable");
81
+ throw new core.NotSupportedError(ImmutableProofRestClient.CLASS_NAME, "notSupportedOnClient", {
82
+ methodName: "removeVerifiable"
83
+ });
82
84
  }
83
85
  }
84
86
 
85
- exports.ImmutableProofClient = ImmutableProofClient;
87
+ exports.ImmutableProofRestClient = ImmutableProofRestClient;
@@ -7,17 +7,17 @@ import { HeaderTypes, MimeTypes } from '@twin.org/web';
7
7
  /**
8
8
  * Client for performing immutable proof through to REST endpoints.
9
9
  */
10
- class ImmutableProofClient extends BaseRestClient {
10
+ class ImmutableProofRestClient extends BaseRestClient {
11
11
  /**
12
12
  * Runtime name for the class.
13
13
  */
14
- CLASS_NAME = "ImmutableProofClient";
14
+ static CLASS_NAME = "ImmutableProofRestClient";
15
15
  /**
16
- * Create a new instance of ImmutableProofClient.
16
+ * Create a new instance of ImmutableProofRestClient.
17
17
  * @param config The configuration for the client.
18
18
  */
19
19
  constructor(config) {
20
- super("ImmutableProofClient", config, "immutable-proof");
20
+ super("ImmutableProofRestClient", config, "immutable-proof");
21
21
  }
22
22
  /**
23
23
  * Create a new proof.
@@ -25,7 +25,7 @@ class ImmutableProofClient extends BaseRestClient {
25
25
  * @returns The id of the new proof.
26
26
  */
27
27
  async create(document) {
28
- Guards.object(this.CLASS_NAME, "document", document);
28
+ Guards.object(ImmutableProofRestClient.CLASS_NAME, "document", document);
29
29
  const response = await this.fetch("/", "POST", {
30
30
  body: {
31
31
  document
@@ -40,7 +40,7 @@ class ImmutableProofClient extends BaseRestClient {
40
40
  * @throws NotFoundError if the proof is not found.
41
41
  */
42
42
  async get(id) {
43
- Guards.stringValue(this.CLASS_NAME, "id", id);
43
+ Guards.stringValue(ImmutableProofRestClient.CLASS_NAME, "id", id);
44
44
  const response = await this.fetch("/:id", "GET", {
45
45
  headers: {
46
46
  [HeaderTypes.Accept]: MimeTypes.JsonLd
@@ -58,7 +58,7 @@ class ImmutableProofClient extends BaseRestClient {
58
58
  * @throws NotFoundError if the proof is not found.
59
59
  */
60
60
  async verify(id) {
61
- Guards.stringValue(this.CLASS_NAME, "id", id);
61
+ Guards.stringValue(ImmutableProofRestClient.CLASS_NAME, "id", id);
62
62
  const response = await this.fetch("/:id/verify", "GET", {
63
63
  headers: {
64
64
  [HeaderTypes.Accept]: MimeTypes.JsonLd
@@ -76,8 +76,10 @@ class ImmutableProofClient extends BaseRestClient {
76
76
  * @throws NotFoundError if the proof is not found.
77
77
  */
78
78
  async removeVerifiable(id) {
79
- throw new NotSupportedError(this.CLASS_NAME, "removeVerifiable");
79
+ throw new NotSupportedError(ImmutableProofRestClient.CLASS_NAME, "notSupportedOnClient", {
80
+ methodName: "removeVerifiable"
81
+ });
80
82
  }
81
83
  }
82
84
 
83
- export { ImmutableProofClient };
85
+ export { ImmutableProofRestClient };
@@ -5,13 +5,13 @@ import type { IImmutableProof, IImmutableProofComponent, IImmutableProofVerifica
5
5
  /**
6
6
  * Client for performing immutable proof through to REST endpoints.
7
7
  */
8
- export declare class ImmutableProofClient extends BaseRestClient implements IImmutableProofComponent {
8
+ export declare class ImmutableProofRestClient extends BaseRestClient implements IImmutableProofComponent {
9
9
  /**
10
10
  * Runtime name for the class.
11
11
  */
12
- readonly CLASS_NAME: string;
12
+ static readonly CLASS_NAME: string;
13
13
  /**
14
- * Create a new instance of ImmutableProofClient.
14
+ * Create a new instance of ImmutableProofRestClient.
15
15
  * @param config The configuration for the client.
16
16
  */
17
17
  constructor(config: IBaseRestClientConfig);
@@ -1 +1 @@
1
- export * from "./immutableProofClient";
1
+ export * from "./immutableProofRestClient";
package/docs/changelog.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @twin.org/immutable-proof-rest-client - Changelog
2
2
 
3
+ ## [0.0.2-next.3](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-rest-client-v0.0.2-next.2...immutable-proof-rest-client-v0.0.2-next.3) (2025-10-09)
4
+
5
+
6
+ ### Features
7
+
8
+ * add validate-locales ([d6a7c07](https://github.com/twinfoundation/immutable-proof/commit/d6a7c0794a1922981a42f56cc24724d7cee727f6))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/immutable-proof-models bumped from 0.0.2-next.2 to 0.0.2-next.3
16
+
3
17
  ## [0.0.2-next.2](https://github.com/twinfoundation/immutable-proof/compare/immutable-proof-rest-client-v0.0.2-next.1...immutable-proof-rest-client-v0.0.2-next.2) (2025-08-29)
4
18
 
5
19
 
@@ -1,4 +1,4 @@
1
- # Class: ImmutableProofClient
1
+ # Class: ImmutableProofRestClient
2
2
 
3
3
  Client for performing immutable proof through to REST endpoints.
4
4
 
@@ -14,9 +14,9 @@ Client for performing immutable proof through to REST endpoints.
14
14
 
15
15
  ### Constructor
16
16
 
17
- > **new ImmutableProofClient**(`config`): `ImmutableProofClient`
17
+ > **new ImmutableProofRestClient**(`config`): `ImmutableProofRestClient`
18
18
 
19
- Create a new instance of ImmutableProofClient.
19
+ Create a new instance of ImmutableProofRestClient.
20
20
 
21
21
  #### Parameters
22
22
 
@@ -28,7 +28,7 @@ The configuration for the client.
28
28
 
29
29
  #### Returns
30
30
 
31
- `ImmutableProofClient`
31
+ `ImmutableProofRestClient`
32
32
 
33
33
  #### Overrides
34
34
 
@@ -38,14 +38,10 @@ The configuration for the client.
38
38
 
39
39
  ### CLASS\_NAME
40
40
 
41
- > `readonly` **CLASS\_NAME**: `string`
41
+ > `readonly` `static` **CLASS\_NAME**: `string`
42
42
 
43
43
  Runtime name for the class.
44
44
 
45
- #### Implementation of
46
-
47
- `IImmutableProofComponent.CLASS_NAME`
48
-
49
45
  ## Methods
50
46
 
51
47
  ### create()
@@ -2,4 +2,4 @@
2
2
 
3
3
  ## Classes
4
4
 
5
- - [ImmutableProofClient](classes/ImmutableProofClient.md)
5
+ - [ImmutableProofRestClient](classes/ImmutableProofRestClient.md)
package/locales/en.json CHANGED
@@ -1 +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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/immutable-proof-rest-client",
3
- "version": "0.0.2-next.2",
3
+ "version": "0.0.2-next.3",
4
4
  "description": "Immutable Proof contract implementation which can connect to REST endpoints",
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.2-next.2",
22
+ "@twin.org/immutable-proof-models": "0.0.2-next.3",
23
23
  "@twin.org/nameof": "next",
24
24
  "@twin.org/web": "next"
25
25
  },
@@ -40,5 +40,17 @@
40
40
  "dist/types",
41
41
  "locales",
42
42
  "docs"
43
- ]
43
+ ],
44
+ "keywords": [
45
+ "twin",
46
+ "trade",
47
+ "iota",
48
+ "framework",
49
+ "blockchain",
50
+ "immutable-proof"
51
+ ],
52
+ "bugs": {
53
+ "url": "git+https://github.com/twinfoundation/immutable-proof/issues"
54
+ },
55
+ "homepage": "https://twindev.org"
44
56
  }