@hirosystems/token-metadata-api-client 1.0.1 → 1.0.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.
package/api.ts CHANGED
@@ -119,7 +119,7 @@ export interface ApiStatusResponse {
119
119
  * @type {string}
120
120
  * @memberof ApiStatusResponse
121
121
  */
122
- serverVersion: string;
122
+ server_version: string;
123
123
  /**
124
124
  *
125
125
  * @type {string}
@@ -137,13 +137,13 @@ export interface ApiStatusResponse {
137
137
  * @type {ApiTokenContractCount}
138
138
  * @memberof ApiStatusResponse
139
139
  */
140
- tokenContracts?: ApiTokenContractCount;
140
+ token_contracts?: ApiTokenContractCount;
141
141
  /**
142
142
  *
143
143
  * @type {ApiJobCount}
144
144
  * @memberof ApiStatusResponse
145
145
  */
146
- jobQueue?: ApiJobCount;
146
+ job_queue?: ApiJobCount;
147
147
  }
148
148
  /**
149
149
  *
@@ -156,19 +156,19 @@ export interface ApiTokenContractCount {
156
156
  * @type {number}
157
157
  * @memberof ApiTokenContractCount
158
158
  */
159
- sip009?: number;
159
+ sip_009?: number;
160
160
  /**
161
161
  *
162
162
  * @type {number}
163
163
  * @memberof ApiTokenContractCount
164
164
  */
165
- sip010?: number;
165
+ sip_010?: number;
166
166
  /**
167
167
  *
168
168
  * @type {number}
169
169
  * @memberof ApiTokenContractCount
170
170
  */
171
- sip013?: number;
171
+ sip_013?: number;
172
172
  }
173
173
  /**
174
174
  *
@@ -224,13 +224,13 @@ export interface FtMetadataResponse {
224
224
  * @type {string}
225
225
  * @memberof FtMetadataResponse
226
226
  */
227
- totalSupply?: string;
227
+ total_supply?: string;
228
228
  /**
229
229
  *
230
230
  * @type {string}
231
231
  * @memberof FtMetadataResponse
232
232
  */
233
- tokenUri?: string;
233
+ token_uri?: string;
234
234
  /**
235
235
  *
236
236
  * @type {string}
@@ -242,25 +242,25 @@ export interface FtMetadataResponse {
242
242
  * @type {string}
243
243
  * @memberof FtMetadataResponse
244
244
  */
245
- imageUri?: string;
245
+ image_uri?: string;
246
246
  /**
247
247
  *
248
248
  * @type {string}
249
249
  * @memberof FtMetadataResponse
250
250
  */
251
- imageCanonicalUri?: string;
251
+ image_canonical_uri?: string;
252
252
  /**
253
253
  *
254
254
  * @type {string}
255
255
  * @memberof FtMetadataResponse
256
256
  */
257
- txId: string;
257
+ tx_id: string;
258
258
  /**
259
259
  *
260
260
  * @type {string}
261
261
  * @memberof FtMetadataResponse
262
262
  */
263
- senderAddress: string;
263
+ sender_address: string;
264
264
  /**
265
265
  *
266
266
  * @type {Metadata}
@@ -303,7 +303,7 @@ export interface Metadata {
303
303
  * @type {string}
304
304
  * @memberof Metadata
305
305
  */
306
- cachedImage?: string;
306
+ cached_image?: string;
307
307
  /**
308
308
  *
309
309
  * @type {Array<MetadataAttribute>}
@@ -334,13 +334,13 @@ export interface MetadataAttribute {
334
334
  * @type {string}
335
335
  * @memberof MetadataAttribute
336
336
  */
337
- traitType: string;
337
+ trait_type: string;
338
338
  /**
339
339
  *
340
340
  * @type {string}
341
341
  * @memberof MetadataAttribute
342
342
  */
343
- displayType?: string;
343
+ display_type?: string;
344
344
  /**
345
345
  *
346
346
  * @type {any}
@@ -384,7 +384,7 @@ export interface NftMetadataResponse {
384
384
  * @type {string}
385
385
  * @memberof NftMetadataResponse
386
386
  */
387
- tokenUri?: string;
387
+ token_uri?: string;
388
388
  /**
389
389
  *
390
390
  * @type {Metadata}
@@ -403,7 +403,7 @@ export interface SftMetadataResponse {
403
403
  * @type {string}
404
404
  * @memberof SftMetadataResponse
405
405
  */
406
- tokenUri?: string;
406
+ token_uri?: string;
407
407
  /**
408
408
  *
409
409
  * @type {number}
@@ -415,7 +415,7 @@ export interface SftMetadataResponse {
415
415
  * @type {string}
416
416
  * @memberof SftMetadataResponse
417
417
  */
418
- totalSupply?: string;
418
+ total_supply?: string;
419
419
  /**
420
420
  *
421
421
  * @type {Metadata}
@@ -597,23 +597,23 @@ export const TokensApiFetchParamCreator = function (configuration?: Configuratio
597
597
  * Retrieves metadata for a SIP-009 Non-Fungible Token
598
598
  * @summary Non-Fungible Token Metadata
599
599
  * @param {string} principal SIP-009 compliant smart contract principal
600
- * @param {number} tokenId Token ID to retrieve
600
+ * @param {number} token_id Token ID to retrieve
601
601
  * @param {string} [locale] Metadata localization to retrieve
602
602
  * @param {*} [options] Override http request option.
603
603
  * @throws {RequiredError}
604
604
  */
605
- getNftMetadata(principal: string, tokenId: number, locale?: string, options: any = {}): FetchArgs {
605
+ getNftMetadata(principal: string, token_id: number, locale?: string, options: any = {}): FetchArgs {
606
606
  // verify required parameter 'principal' is not null or undefined
607
607
  if (principal === null || principal === undefined) {
608
608
  throw new RequiredError('principal','Required parameter principal was null or undefined when calling getNftMetadata.');
609
609
  }
610
- // verify required parameter 'tokenId' is not null or undefined
611
- if (tokenId === null || tokenId === undefined) {
612
- throw new RequiredError('tokenId','Required parameter tokenId was null or undefined when calling getNftMetadata.');
610
+ // verify required parameter 'token_id' is not null or undefined
611
+ if (token_id === null || token_id === undefined) {
612
+ throw new RequiredError('token_id','Required parameter token_id was null or undefined when calling getNftMetadata.');
613
613
  }
614
614
  const localVarPath = `/metadata/v1/nft/{principal}/{token_id}`
615
615
  .replace(`{${"principal"}}`, encodeURIComponent(String(principal)))
616
- .replace(`{${"token_id"}}`, encodeURIComponent(String(tokenId)));
616
+ .replace(`{${"token_id"}}`, encodeURIComponent(String(token_id)));
617
617
  const localVarUrlObj = url.parse(localVarPath, true);
618
618
  const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
619
619
  const localVarHeaderParameter = {} as any;
@@ -637,23 +637,23 @@ export const TokensApiFetchParamCreator = function (configuration?: Configuratio
637
637
  * Retrieves metadata for a SIP-013 Semi-Fungible Token
638
638
  * @summary Semi-Fungible Token Metadata
639
639
  * @param {string} principal SIP-013 compliant smart contract principal
640
- * @param {number} tokenId Token ID to retrieve
640
+ * @param {number} token_id Token ID to retrieve
641
641
  * @param {string} [locale] Metadata localization to retrieve
642
642
  * @param {*} [options] Override http request option.
643
643
  * @throws {RequiredError}
644
644
  */
645
- getSftMetadata(principal: string, tokenId: number, locale?: string, options: any = {}): FetchArgs {
645
+ getSftMetadata(principal: string, token_id: number, locale?: string, options: any = {}): FetchArgs {
646
646
  // verify required parameter 'principal' is not null or undefined
647
647
  if (principal === null || principal === undefined) {
648
648
  throw new RequiredError('principal','Required parameter principal was null or undefined when calling getSftMetadata.');
649
649
  }
650
- // verify required parameter 'tokenId' is not null or undefined
651
- if (tokenId === null || tokenId === undefined) {
652
- throw new RequiredError('tokenId','Required parameter tokenId was null or undefined when calling getSftMetadata.');
650
+ // verify required parameter 'token_id' is not null or undefined
651
+ if (token_id === null || token_id === undefined) {
652
+ throw new RequiredError('token_id','Required parameter token_id was null or undefined when calling getSftMetadata.');
653
653
  }
654
654
  const localVarPath = `/metadata/v1/sft/{principal}/{token_id}`
655
655
  .replace(`{${"principal"}}`, encodeURIComponent(String(principal)))
656
- .replace(`{${"token_id"}}`, encodeURIComponent(String(tokenId)));
656
+ .replace(`{${"token_id"}}`, encodeURIComponent(String(token_id)));
657
657
  const localVarUrlObj = url.parse(localVarPath, true);
658
658
  const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
659
659
  const localVarHeaderParameter = {} as any;
@@ -706,13 +706,13 @@ export const TokensApiFp = function(configuration?: Configuration) {
706
706
  * Retrieves metadata for a SIP-009 Non-Fungible Token
707
707
  * @summary Non-Fungible Token Metadata
708
708
  * @param {string} principal SIP-009 compliant smart contract principal
709
- * @param {number} tokenId Token ID to retrieve
709
+ * @param {number} token_id Token ID to retrieve
710
710
  * @param {string} [locale] Metadata localization to retrieve
711
711
  * @param {*} [options] Override http request option.
712
712
  * @throws {RequiredError}
713
713
  */
714
- getNftMetadata(principal: string, tokenId: number, locale?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<NftMetadataResponse> {
715
- const localVarFetchArgs = TokensApiFetchParamCreator(configuration).getNftMetadata(principal, tokenId, locale, options);
714
+ getNftMetadata(principal: string, token_id: number, locale?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<NftMetadataResponse> {
715
+ const localVarFetchArgs = TokensApiFetchParamCreator(configuration).getNftMetadata(principal, token_id, locale, options);
716
716
  return (fetch: FetchAPI = isomorphicFetch, basePath: string = BASE_PATH) => {
717
717
  return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
718
718
  if (response.status >= 200 && response.status < 300) {
@@ -727,13 +727,13 @@ export const TokensApiFp = function(configuration?: Configuration) {
727
727
  * Retrieves metadata for a SIP-013 Semi-Fungible Token
728
728
  * @summary Semi-Fungible Token Metadata
729
729
  * @param {string} principal SIP-013 compliant smart contract principal
730
- * @param {number} tokenId Token ID to retrieve
730
+ * @param {number} token_id Token ID to retrieve
731
731
  * @param {string} [locale] Metadata localization to retrieve
732
732
  * @param {*} [options] Override http request option.
733
733
  * @throws {RequiredError}
734
734
  */
735
- getSftMetadata(principal: string, tokenId: number, locale?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<SftMetadataResponse> {
736
- const localVarFetchArgs = TokensApiFetchParamCreator(configuration).getSftMetadata(principal, tokenId, locale, options);
735
+ getSftMetadata(principal: string, token_id: number, locale?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<SftMetadataResponse> {
736
+ const localVarFetchArgs = TokensApiFetchParamCreator(configuration).getSftMetadata(principal, token_id, locale, options);
737
737
  return (fetch: FetchAPI = isomorphicFetch, basePath: string = BASE_PATH) => {
738
738
  return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
739
739
  if (response.status >= 200 && response.status < 300) {
@@ -768,25 +768,25 @@ export const TokensApiFactory = function (configuration?: Configuration, fetch?:
768
768
  * Retrieves metadata for a SIP-009 Non-Fungible Token
769
769
  * @summary Non-Fungible Token Metadata
770
770
  * @param {string} principal SIP-009 compliant smart contract principal
771
- * @param {number} tokenId Token ID to retrieve
771
+ * @param {number} token_id Token ID to retrieve
772
772
  * @param {string} [locale] Metadata localization to retrieve
773
773
  * @param {*} [options] Override http request option.
774
774
  * @throws {RequiredError}
775
775
  */
776
- getNftMetadata(principal: string, tokenId: number, locale?: string, options?: any) {
777
- return TokensApiFp(configuration).getNftMetadata(principal, tokenId, locale, options)(fetch, basePath);
776
+ getNftMetadata(principal: string, token_id: number, locale?: string, options?: any) {
777
+ return TokensApiFp(configuration).getNftMetadata(principal, token_id, locale, options)(fetch, basePath);
778
778
  },
779
779
  /**
780
780
  * Retrieves metadata for a SIP-013 Semi-Fungible Token
781
781
  * @summary Semi-Fungible Token Metadata
782
782
  * @param {string} principal SIP-013 compliant smart contract principal
783
- * @param {number} tokenId Token ID to retrieve
783
+ * @param {number} token_id Token ID to retrieve
784
784
  * @param {string} [locale] Metadata localization to retrieve
785
785
  * @param {*} [options] Override http request option.
786
786
  * @throws {RequiredError}
787
787
  */
788
- getSftMetadata(principal: string, tokenId: number, locale?: string, options?: any) {
789
- return TokensApiFp(configuration).getSftMetadata(principal, tokenId, locale, options)(fetch, basePath);
788
+ getSftMetadata(principal: string, token_id: number, locale?: string, options?: any) {
789
+ return TokensApiFp(configuration).getSftMetadata(principal, token_id, locale, options)(fetch, basePath);
790
790
  },
791
791
  };
792
792
  };
@@ -815,28 +815,28 @@ export class TokensApi extends BaseAPI {
815
815
  * Retrieves metadata for a SIP-009 Non-Fungible Token
816
816
  * @summary Non-Fungible Token Metadata
817
817
  * @param {string} principal SIP-009 compliant smart contract principal
818
- * @param {number} tokenId Token ID to retrieve
818
+ * @param {number} token_id Token ID to retrieve
819
819
  * @param {string} [locale] Metadata localization to retrieve
820
820
  * @param {*} [options] Override http request option.
821
821
  * @throws {RequiredError}
822
822
  * @memberof TokensApi
823
823
  */
824
- public getNftMetadata(principal: string, tokenId: number, locale?: string, options?: any) {
825
- return TokensApiFp(this.configuration).getNftMetadata(principal, tokenId, locale, options)(this.fetch, this.basePath);
824
+ public getNftMetadata(principal: string, token_id: number, locale?: string, options?: any) {
825
+ return TokensApiFp(this.configuration).getNftMetadata(principal, token_id, locale, options)(this.fetch, this.basePath);
826
826
  }
827
827
 
828
828
  /**
829
829
  * Retrieves metadata for a SIP-013 Semi-Fungible Token
830
830
  * @summary Semi-Fungible Token Metadata
831
831
  * @param {string} principal SIP-013 compliant smart contract principal
832
- * @param {number} tokenId Token ID to retrieve
832
+ * @param {number} token_id Token ID to retrieve
833
833
  * @param {string} [locale] Metadata localization to retrieve
834
834
  * @param {*} [options] Override http request option.
835
835
  * @throws {RequiredError}
836
836
  * @memberof TokensApi
837
837
  */
838
- public getSftMetadata(principal: string, tokenId: number, locale?: string, options?: any) {
839
- return TokensApiFp(this.configuration).getSftMetadata(principal, tokenId, locale, options)(this.fetch, this.basePath);
838
+ public getSftMetadata(principal: string, token_id: number, locale?: string, options?: any) {
839
+ return TokensApiFp(this.configuration).getSftMetadata(principal, token_id, locale, options)(this.fetch, this.basePath);
840
840
  }
841
841
 
842
842
  }