@twin.org/nft-rest-client 0.9.1-next.1 → 0.9.1-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.
@@ -1,8 +1,9 @@
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 { HttpHeaderHelper } from "@twin.org/api-models";
4
5
  import { Guards, Urn } from "@twin.org/core";
5
- import { HeaderTypes } from "@twin.org/web";
6
+ import { HttpMethod } from "@twin.org/web";
6
7
  /**
7
8
  * Client for performing NFT operations via REST endpoints.
8
9
  */
@@ -35,7 +36,7 @@ export class NftRestClient extends BaseRestClient {
35
36
  */
36
37
  async mint(tag, immutableMetadata, metadata, namespace) {
37
38
  Guards.stringValue(NftRestClient.CLASS_NAME, "tag", tag);
38
- const response = await this.fetch("/", "POST", {
39
+ const response = await this.fetch("/", HttpMethod.POST, {
39
40
  body: {
40
41
  tag,
41
42
  immutableMetadata,
@@ -43,7 +44,7 @@ export class NftRestClient extends BaseRestClient {
43
44
  namespace
44
45
  }
45
46
  });
46
- return response.headers[HeaderTypes.Location];
47
+ return HttpHeaderHelper.extractId(response.headers);
47
48
  }
48
49
  /**
49
50
  * Resolve an NFT.
@@ -52,7 +53,7 @@ export class NftRestClient extends BaseRestClient {
52
53
  */
53
54
  async resolve(id) {
54
55
  Guards.stringValue(NftRestClient.CLASS_NAME, "id", id);
55
- const response = await this.fetch("/:id", "GET", {
56
+ const response = await this.fetch("/:id", HttpMethod.GET, {
56
57
  pathParams: {
57
58
  id
58
59
  }
@@ -66,7 +67,7 @@ export class NftRestClient extends BaseRestClient {
66
67
  */
67
68
  async burn(id) {
68
69
  Urn.guard(NftRestClient.CLASS_NAME, "id", id);
69
- await this.fetch("/:id", "DELETE", {
70
+ await this.fetch("/:id", HttpMethod.DELETE, {
70
71
  pathParams: {
71
72
  id
72
73
  }
@@ -82,7 +83,7 @@ export class NftRestClient extends BaseRestClient {
82
83
  async transfer(id, recipientAddress, metadata) {
83
84
  Guards.stringValue(NftRestClient.CLASS_NAME, "id", id);
84
85
  Guards.stringValue(NftRestClient.CLASS_NAME, "recipientAddress", recipientAddress);
85
- await this.fetch("/:id/transfer", "POST", {
86
+ await this.fetch("/:id/transfer", HttpMethod.POST, {
86
87
  pathParams: {
87
88
  id
88
89
  },
@@ -101,7 +102,7 @@ export class NftRestClient extends BaseRestClient {
101
102
  async update(id, metadata) {
102
103
  Guards.stringValue(NftRestClient.CLASS_NAME, "id", id);
103
104
  Guards.object(NftRestClient.CLASS_NAME, "metadata", metadata);
104
- await this.fetch("/:id", "PUT", {
105
+ await this.fetch("/:id", HttpMethod.PUT, {
105
106
  pathParams: {
106
107
  id
107
108
  },
@@ -1 +1 @@
1
- {"version":3,"file":"nftRestClient.js","sourceRoot":"","sources":["../../src/nftRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAW7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,cAAc;IAChD;;OAEG;IACI,MAAM,CAAU,UAAU,mBAAmC;IAEpE;;;OAGG;IACH,YAAY,MAA6B;QACxC,KAAK,kBAA0B,MAAM,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACI,SAAS;QACf,OAAO,aAAa,CAAC,UAAU,CAAC;IACjC,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,IAAI,CAChB,GAAW,EACX,iBAAqB,EACrB,QAAY,EACZ,SAAkB;QAElB,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,SAAe,GAAG,CAAC,CAAC;QAE/D,MAAM,QAAQ,GAAG,MAAM,IA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,EAAE,QAAW;QACvD,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAC7D,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,cAAoB,QAAQ,CAAC,CAAC;QAEpE,MAAM,IAAI,CAAC,KAAK,CAA2B,MAAM,EAAE,KAAK,EAAE;YACzD,UAAU,EAAE;gBACX,EAAE;aACF;YACD,IAAI,EAAE;gBACL,QAAQ;aACR;SACD,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, Urn } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type {\n\tINftBurnRequest,\n\tINftComponent,\n\tINftMintRequest,\n\tINftResolveRequest,\n\tINftResolveResponse,\n\tINftTransferRequest,\n\tINftUpdateRequest\n} from \"@twin.org/nft-models\";\nimport { HeaderTypes } from \"@twin.org/web\";\n\n/**\n * Client for performing NFT operations via REST endpoints.\n */\nexport class NftRestClient extends BaseRestClient implements INftComponent {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<NftRestClient>();\n\n\t/**\n\t * Create a new instance of NftRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(nameof<NftRestClient>(), config, \"nft\");\n\t}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The class name.\n\t */\n\tpublic className(): string {\n\t\treturn NftRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Mint an NFT.\n\t * @param tag The tag for the NFT.\n\t * @param immutableMetadata The immutable metadata for the NFT.\n\t * @param metadata The metadata for the NFT.\n\t * @param namespace The namespace of the connector to use for the NFT, defaults to component configured namespace.\n\t * @returns The id of the created NFT in urn format.\n\t */\n\tpublic async mint<T = unknown, U = unknown>(\n\t\ttag: string,\n\t\timmutableMetadata?: T,\n\t\tmetadata?: U,\n\t\tnamespace?: string\n\t): Promise<string> {\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(tag), tag);\n\n\t\tconst response = await this.fetch<INftMintRequest, ICreatedResponse>(\"/\", \"POST\", {\n\t\t\tbody: {\n\t\t\t\ttag,\n\t\t\t\timmutableMetadata,\n\t\t\t\tmetadata,\n\t\t\t\tnamespace\n\t\t\t}\n\t\t});\n\n\t\treturn response.headers[HeaderTypes.Location];\n\t}\n\n\t/**\n\t * Resolve an NFT.\n\t * @param id The id of the NFT to resolve.\n\t * @returns The data for the NFT.\n\t */\n\tpublic async resolve<T = unknown, U = unknown>(\n\t\tid: string\n\t): Promise<{\n\t\tissuer: string;\n\t\tissuerIdentityId: string;\n\t\ttag: string;\n\t\timmutableMetadata?: T;\n\t\tmetadata?: U;\n\t}> {\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tconst response = await this.fetch<INftResolveRequest, INftResolveResponse>(\"/:id\", \"GET\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t}\n\t\t});\n\n\t\treturn response.body as {\n\t\t\tissuer: string;\n\t\t\tissuerIdentityId: string;\n\t\t\ttag: string;\n\t\t\timmutableMetadata?: T;\n\t\t\tmetadata?: U;\n\t\t};\n\t}\n\n\t/**\n\t * Burn an NFT.\n\t * @param id The id of the NFT to burn in urn format.\n\t * @returns A promise that resolves when the NFT has been permanently destroyed.\n\t */\n\tpublic async burn(id: string): Promise<void> {\n\t\tUrn.guard(NftRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tawait this.fetch<INftBurnRequest, never>(\"/: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 * Transfer an NFT.\n\t * @param id The id of the NFT to transfer in urn format.\n\t * @param recipientAddress The recipient address for the NFT.\n\t * @param metadata Optional mutable data to include during the transfer.\n\t * @returns A promise that resolves when the NFT ownership has been transferred.\n\t */\n\tpublic async transfer<T = unknown>(\n\t\tid: string,\n\t\trecipientAddress: string,\n\t\tmetadata?: T\n\t): Promise<void> {\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(id), id);\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(recipientAddress), recipientAddress);\n\n\t\tawait this.fetch<INftTransferRequest, never>(\"/:id/transfer\", \"POST\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t},\n\t\t\tbody: {\n\t\t\t\trecipientAddress,\n\t\t\t\tmetadata\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Update the mutable data of the NFT.\n\t * @param id The id of the NFT to update in urn format.\n\t * @param metadata The mutable data to update.\n\t * @returns A promise that resolves when the NFT metadata has been updated.\n\t */\n\tpublic async update<U = unknown>(id: string, metadata: U): Promise<void> {\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(id), id);\n\t\tGuards.object(NftRestClient.CLASS_NAME, nameof(metadata), metadata);\n\n\t\tawait this.fetch<INftUpdateRequest, never>(\"/:id\", \"PUT\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t},\n\t\t\tbody: {\n\t\t\t\tmetadata\n\t\t\t}\n\t\t});\n\t}\n}\n"]}
1
+ {"version":3,"file":"nftRestClient.js","sourceRoot":"","sources":["../../src/nftRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAqD,MAAM,sBAAsB,CAAC;AAC3G,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAW7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,cAAc;IAChD;;OAE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,CAAC,QAAQ,CACpB,EAAU,EACV,gBAAwB,EACxB,QAAY;QAEZ,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAC7D,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,sBAA4B,gBAAgB,CAAC,CAAC;QAEzF,MAAM,IAAI,CAAC,KAAK,CAA6B,eAAe,EAAE,UAAU,CAAC,IAAI,EAAE;YAC9E,UAAU,EAAE;gBACX,EAAE;aACF;YACD,IAAI,EAAE;gBACL,gBAAgB;gBAChB,QAAQ;aACR;SACD,CAAC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,MAAM,CAAc,EAAU,EAAE,QAAW;QACvD,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAC7D,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,cAAoB,QAAQ,CAAC,CAAC;QAEpE,MAAM,IAAI,CAAC,KAAK,CAA2B,MAAM,EAAE,UAAU,CAAC,GAAG,EAAE;YAClE,UAAU,EAAE;gBACX,EAAE;aACF;YACD,IAAI,EAAE;gBACL,QAAQ;aACR;SACD,CAAC,CAAC;IACJ,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { BaseRestClient } from \"@twin.org/api-core\";\nimport { HttpHeaderHelper, type IBaseRestClientConfig, type ICreatedResponse } from \"@twin.org/api-models\";\nimport { Guards, Urn } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type {\n\tINftBurnRequest,\n\tINftComponent,\n\tINftMintRequest,\n\tINftResolveRequest,\n\tINftResolveResponse,\n\tINftTransferRequest,\n\tINftUpdateRequest\n} from \"@twin.org/nft-models\";\nimport { HttpMethod } from \"@twin.org/web\";\n\n/**\n * Client for performing NFT operations via REST endpoints.\n */\nexport class NftRestClient extends BaseRestClient implements INftComponent {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<NftRestClient>();\n\n\t/**\n\t * Create a new instance of NftRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(nameof<NftRestClient>(), config, \"nft\");\n\t}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The class name.\n\t */\n\tpublic className(): string {\n\t\treturn NftRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Mint an NFT.\n\t * @param tag The tag for the NFT.\n\t * @param immutableMetadata The immutable metadata for the NFT.\n\t * @param metadata The metadata for the NFT.\n\t * @param namespace The namespace of the connector to use for the NFT, defaults to component configured namespace.\n\t * @returns The id of the created NFT in urn format.\n\t */\n\tpublic async mint<T = unknown, U = unknown>(\n\t\ttag: string,\n\t\timmutableMetadata?: T,\n\t\tmetadata?: U,\n\t\tnamespace?: string\n\t): Promise<string> {\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(tag), tag);\n\n\t\tconst response = await this.fetch<INftMintRequest, ICreatedResponse>(\"/\", HttpMethod.POST, {\n\t\t\tbody: {\n\t\t\t\ttag,\n\t\t\t\timmutableMetadata,\n\t\t\t\tmetadata,\n\t\t\t\tnamespace\n\t\t\t}\n\t\t});\n\n\t\treturn HttpHeaderHelper.extractId(response.headers);\n\t}\n\n\t/**\n\t * Resolve an NFT.\n\t * @param id The id of the NFT to resolve.\n\t * @returns The data for the NFT.\n\t */\n\tpublic async resolve<T = unknown, U = unknown>(\n\t\tid: string\n\t): Promise<{\n\t\tissuer: string;\n\t\tissuerIdentityId: string;\n\t\ttag: string;\n\t\timmutableMetadata?: T;\n\t\tmetadata?: U;\n\t}> {\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tconst response = await this.fetch<INftResolveRequest, INftResolveResponse>(\n\t\t\t\"/:id\",\n\t\t\tHttpMethod.GET,\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\n\t\treturn response.body as {\n\t\t\tissuer: string;\n\t\t\tissuerIdentityId: string;\n\t\t\ttag: string;\n\t\t\timmutableMetadata?: T;\n\t\t\tmetadata?: U;\n\t\t};\n\t}\n\n\t/**\n\t * Burn an NFT.\n\t * @param id The id of the NFT to burn in urn format.\n\t * @returns A promise that resolves when the NFT has been permanently destroyed.\n\t */\n\tpublic async burn(id: string): Promise<void> {\n\t\tUrn.guard(NftRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tawait this.fetch<INftBurnRequest, never>(\"/:id\", HttpMethod.DELETE, {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Transfer an NFT.\n\t * @param id The id of the NFT to transfer in urn format.\n\t * @param recipientAddress The recipient address for the NFT.\n\t * @param metadata Optional mutable data to include during the transfer.\n\t * @returns A promise that resolves when the NFT ownership has been transferred.\n\t */\n\tpublic async transfer<T = unknown>(\n\t\tid: string,\n\t\trecipientAddress: string,\n\t\tmetadata?: T\n\t): Promise<void> {\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(id), id);\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(recipientAddress), recipientAddress);\n\n\t\tawait this.fetch<INftTransferRequest, never>(\"/:id/transfer\", HttpMethod.POST, {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t},\n\t\t\tbody: {\n\t\t\t\trecipientAddress,\n\t\t\t\tmetadata\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Update the mutable data of the NFT.\n\t * @param id The id of the NFT to update in urn format.\n\t * @param metadata The mutable data to update.\n\t * @returns A promise that resolves when the NFT metadata has been updated.\n\t */\n\tpublic async update<U = unknown>(id: string, metadata: U): Promise<void> {\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(id), id);\n\t\tGuards.object(NftRestClient.CLASS_NAME, nameof(metadata), metadata);\n\n\t\tawait this.fetch<INftUpdateRequest, never>(\"/:id\", HttpMethod.PUT, {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t},\n\t\t\tbody: {\n\t\t\t\tmetadata\n\t\t\t}\n\t\t});\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { BaseRestClient } from "@twin.org/api-core";
2
- import type { IBaseRestClientConfig } from "@twin.org/api-models";
2
+ import { type IBaseRestClientConfig } from "@twin.org/api-models";
3
3
  import type { INftComponent } from "@twin.org/nft-models";
4
4
  /**
5
5
  * Client for performing NFT operations via REST endpoints.
package/docs/changelog.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.1-next.2](https://github.com/iotaledger/twin-nft/compare/nft-rest-client-v0.9.1-next.1...nft-rest-client-v0.9.1-next.2) (2026-06-29)
4
+
5
+
6
+ ### Features
7
+
8
+ * enhanced rest testing ([5030a88](https://github.com/iotaledger/twin-nft/commit/5030a88163c2756c64467be36004c1a9ea028779))
9
+ * enhanced rest testing ([#84](https://github.com/iotaledger/twin-nft/issues/84)) ([52065cc](https://github.com/iotaledger/twin-nft/commit/52065cca50e9ca5a6ddd50e155e23e29df33246f))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * The following workspace dependencies were updated
15
+ * dependencies
16
+ * @twin.org/nft-models bumped from 0.9.1-next.1 to 0.9.1-next.2
17
+
3
18
  ## [0.9.1-next.1](https://github.com/iotaledger/twin-nft/compare/nft-rest-client-v0.9.1-next.0...nft-rest-client-v0.9.1-next.1) (2026-06-26)
4
19
 
5
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/nft-rest-client",
3
- "version": "0.9.1-next.1",
3
+ "version": "0.9.1-next.2",
4
4
  "description": "HTTP client for calling NFT service endpoints from applications.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,7 +19,7 @@
19
19
  "@twin.org/core": "next",
20
20
  "@twin.org/entity": "next",
21
21
  "@twin.org/nameof": "next",
22
- "@twin.org/nft-models": "0.9.1-next.1",
22
+ "@twin.org/nft-models": "0.9.1-next.2",
23
23
  "@twin.org/web": "next"
24
24
  },
25
25
  "main": "./dist/es/index.js",