@hirosystems/token-metadata-api-client 1.0.2 → 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.
Files changed (4) hide show
  1. package/api.ts +48 -48
  2. package/dist/api.d.ts +34 -34
  3. package/dist/api.js +30 -30
  4. package/package.json +1 -1
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
  }
package/dist/api.d.ts CHANGED
@@ -102,7 +102,7 @@ export interface ApiStatusResponse {
102
102
  * @type {string}
103
103
  * @memberof ApiStatusResponse
104
104
  */
105
- serverVersion: string;
105
+ server_version: string;
106
106
  /**
107
107
  *
108
108
  * @type {string}
@@ -120,13 +120,13 @@ export interface ApiStatusResponse {
120
120
  * @type {ApiTokenContractCount}
121
121
  * @memberof ApiStatusResponse
122
122
  */
123
- tokenContracts?: ApiTokenContractCount;
123
+ token_contracts?: ApiTokenContractCount;
124
124
  /**
125
125
  *
126
126
  * @type {ApiJobCount}
127
127
  * @memberof ApiStatusResponse
128
128
  */
129
- jobQueue?: ApiJobCount;
129
+ job_queue?: ApiJobCount;
130
130
  }
131
131
  /**
132
132
  *
@@ -139,19 +139,19 @@ export interface ApiTokenContractCount {
139
139
  * @type {number}
140
140
  * @memberof ApiTokenContractCount
141
141
  */
142
- sip009?: number;
142
+ sip_009?: number;
143
143
  /**
144
144
  *
145
145
  * @type {number}
146
146
  * @memberof ApiTokenContractCount
147
147
  */
148
- sip010?: number;
148
+ sip_010?: number;
149
149
  /**
150
150
  *
151
151
  * @type {number}
152
152
  * @memberof ApiTokenContractCount
153
153
  */
154
- sip013?: number;
154
+ sip_013?: number;
155
155
  }
156
156
  /**
157
157
  *
@@ -207,13 +207,13 @@ export interface FtMetadataResponse {
207
207
  * @type {string}
208
208
  * @memberof FtMetadataResponse
209
209
  */
210
- totalSupply?: string;
210
+ total_supply?: string;
211
211
  /**
212
212
  *
213
213
  * @type {string}
214
214
  * @memberof FtMetadataResponse
215
215
  */
216
- tokenUri?: string;
216
+ token_uri?: string;
217
217
  /**
218
218
  *
219
219
  * @type {string}
@@ -225,25 +225,25 @@ export interface FtMetadataResponse {
225
225
  * @type {string}
226
226
  * @memberof FtMetadataResponse
227
227
  */
228
- imageUri?: string;
228
+ image_uri?: string;
229
229
  /**
230
230
  *
231
231
  * @type {string}
232
232
  * @memberof FtMetadataResponse
233
233
  */
234
- imageCanonicalUri?: string;
234
+ image_canonical_uri?: string;
235
235
  /**
236
236
  *
237
237
  * @type {string}
238
238
  * @memberof FtMetadataResponse
239
239
  */
240
- txId: string;
240
+ tx_id: string;
241
241
  /**
242
242
  *
243
243
  * @type {string}
244
244
  * @memberof FtMetadataResponse
245
245
  */
246
- senderAddress: string;
246
+ sender_address: string;
247
247
  /**
248
248
  *
249
249
  * @type {Metadata}
@@ -286,7 +286,7 @@ export interface Metadata {
286
286
  * @type {string}
287
287
  * @memberof Metadata
288
288
  */
289
- cachedImage?: string;
289
+ cached_image?: string;
290
290
  /**
291
291
  *
292
292
  * @type {Array<MetadataAttribute>}
@@ -319,13 +319,13 @@ export interface MetadataAttribute {
319
319
  * @type {string}
320
320
  * @memberof MetadataAttribute
321
321
  */
322
- traitType: string;
322
+ trait_type: string;
323
323
  /**
324
324
  *
325
325
  * @type {string}
326
326
  * @memberof MetadataAttribute
327
327
  */
328
- displayType?: string;
328
+ display_type?: string;
329
329
  /**
330
330
  *
331
331
  * @type {any}
@@ -369,7 +369,7 @@ export interface NftMetadataResponse {
369
369
  * @type {string}
370
370
  * @memberof NftMetadataResponse
371
371
  */
372
- tokenUri?: string;
372
+ token_uri?: string;
373
373
  /**
374
374
  *
375
375
  * @type {Metadata}
@@ -388,7 +388,7 @@ export interface SftMetadataResponse {
388
388
  * @type {string}
389
389
  * @memberof SftMetadataResponse
390
390
  */
391
- tokenUri?: string;
391
+ token_uri?: string;
392
392
  /**
393
393
  *
394
394
  * @type {number}
@@ -400,7 +400,7 @@ export interface SftMetadataResponse {
400
400
  * @type {string}
401
401
  * @memberof SftMetadataResponse
402
402
  */
403
- totalSupply?: string;
403
+ total_supply?: string;
404
404
  /**
405
405
  *
406
406
  * @type {Metadata}
@@ -514,22 +514,22 @@ export declare const TokensApiFetchParamCreator: (configuration?: Configuration)
514
514
  * Retrieves metadata for a SIP-009 Non-Fungible Token
515
515
  * @summary Non-Fungible Token Metadata
516
516
  * @param {string} principal SIP-009 compliant smart contract principal
517
- * @param {number} tokenId Token ID to retrieve
517
+ * @param {number} token_id Token ID to retrieve
518
518
  * @param {string} [locale] Metadata localization to retrieve
519
519
  * @param {*} [options] Override http request option.
520
520
  * @throws {RequiredError}
521
521
  */
522
- getNftMetadata(principal: string, tokenId: number, locale?: string, options?: any): FetchArgs;
522
+ getNftMetadata(principal: string, token_id: number, locale?: string, options?: any): FetchArgs;
523
523
  /**
524
524
  * Retrieves metadata for a SIP-013 Semi-Fungible Token
525
525
  * @summary Semi-Fungible Token Metadata
526
526
  * @param {string} principal SIP-013 compliant smart contract principal
527
- * @param {number} tokenId Token ID to retrieve
527
+ * @param {number} token_id Token ID to retrieve
528
528
  * @param {string} [locale] Metadata localization to retrieve
529
529
  * @param {*} [options] Override http request option.
530
530
  * @throws {RequiredError}
531
531
  */
532
- getSftMetadata(principal: string, tokenId: number, locale?: string, options?: any): FetchArgs;
532
+ getSftMetadata(principal: string, token_id: number, locale?: string, options?: any): FetchArgs;
533
533
  };
534
534
  /**
535
535
  * TokensApi - functional programming interface
@@ -549,22 +549,22 @@ export declare const TokensApiFp: (configuration?: Configuration) => {
549
549
  * Retrieves metadata for a SIP-009 Non-Fungible Token
550
550
  * @summary Non-Fungible Token Metadata
551
551
  * @param {string} principal SIP-009 compliant smart contract principal
552
- * @param {number} tokenId Token ID to retrieve
552
+ * @param {number} token_id Token ID to retrieve
553
553
  * @param {string} [locale] Metadata localization to retrieve
554
554
  * @param {*} [options] Override http request option.
555
555
  * @throws {RequiredError}
556
556
  */
557
- getNftMetadata(principal: string, tokenId: number, locale?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<NftMetadataResponse>;
557
+ getNftMetadata(principal: string, token_id: number, locale?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<NftMetadataResponse>;
558
558
  /**
559
559
  * Retrieves metadata for a SIP-013 Semi-Fungible Token
560
560
  * @summary Semi-Fungible Token Metadata
561
561
  * @param {string} principal SIP-013 compliant smart contract principal
562
- * @param {number} tokenId Token ID to retrieve
562
+ * @param {number} token_id Token ID to retrieve
563
563
  * @param {string} [locale] Metadata localization to retrieve
564
564
  * @param {*} [options] Override http request option.
565
565
  * @throws {RequiredError}
566
566
  */
567
- getSftMetadata(principal: string, tokenId: number, locale?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<SftMetadataResponse>;
567
+ getSftMetadata(principal: string, token_id: number, locale?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<SftMetadataResponse>;
568
568
  };
569
569
  /**
570
570
  * TokensApi - factory interface
@@ -584,22 +584,22 @@ export declare const TokensApiFactory: (configuration?: Configuration, fetch?: F
584
584
  * Retrieves metadata for a SIP-009 Non-Fungible Token
585
585
  * @summary Non-Fungible Token Metadata
586
586
  * @param {string} principal SIP-009 compliant smart contract principal
587
- * @param {number} tokenId Token ID to retrieve
587
+ * @param {number} token_id Token ID to retrieve
588
588
  * @param {string} [locale] Metadata localization to retrieve
589
589
  * @param {*} [options] Override http request option.
590
590
  * @throws {RequiredError}
591
591
  */
592
- getNftMetadata(principal: string, tokenId: number, locale?: string, options?: any): Promise<NftMetadataResponse>;
592
+ getNftMetadata(principal: string, token_id: number, locale?: string, options?: any): Promise<NftMetadataResponse>;
593
593
  /**
594
594
  * Retrieves metadata for a SIP-013 Semi-Fungible Token
595
595
  * @summary Semi-Fungible Token Metadata
596
596
  * @param {string} principal SIP-013 compliant smart contract principal
597
- * @param {number} tokenId Token ID to retrieve
597
+ * @param {number} token_id Token ID to retrieve
598
598
  * @param {string} [locale] Metadata localization to retrieve
599
599
  * @param {*} [options] Override http request option.
600
600
  * @throws {RequiredError}
601
601
  */
602
- getSftMetadata(principal: string, tokenId: number, locale?: string, options?: any): Promise<SftMetadataResponse>;
602
+ getSftMetadata(principal: string, token_id: number, locale?: string, options?: any): Promise<SftMetadataResponse>;
603
603
  };
604
604
  /**
605
605
  * TokensApi - object-oriented interface
@@ -622,22 +622,22 @@ export declare class TokensApi extends BaseAPI {
622
622
  * Retrieves metadata for a SIP-009 Non-Fungible Token
623
623
  * @summary Non-Fungible Token Metadata
624
624
  * @param {string} principal SIP-009 compliant smart contract principal
625
- * @param {number} tokenId Token ID to retrieve
625
+ * @param {number} token_id Token ID to retrieve
626
626
  * @param {string} [locale] Metadata localization to retrieve
627
627
  * @param {*} [options] Override http request option.
628
628
  * @throws {RequiredError}
629
629
  * @memberof TokensApi
630
630
  */
631
- getNftMetadata(principal: string, tokenId: number, locale?: string, options?: any): Promise<NftMetadataResponse>;
631
+ getNftMetadata(principal: string, token_id: number, locale?: string, options?: any): Promise<NftMetadataResponse>;
632
632
  /**
633
633
  * Retrieves metadata for a SIP-013 Semi-Fungible Token
634
634
  * @summary Semi-Fungible Token Metadata
635
635
  * @param {string} principal SIP-013 compliant smart contract principal
636
- * @param {number} tokenId Token ID to retrieve
636
+ * @param {number} token_id Token ID to retrieve
637
637
  * @param {string} [locale] Metadata localization to retrieve
638
638
  * @param {*} [options] Override http request option.
639
639
  * @throws {RequiredError}
640
640
  * @memberof TokensApi
641
641
  */
642
- getSftMetadata(principal: string, tokenId: number, locale?: string, options?: any): Promise<SftMetadataResponse>;
642
+ getSftMetadata(principal: string, token_id: number, locale?: string, options?: any): Promise<SftMetadataResponse>;
643
643
  }
package/dist/api.js CHANGED
@@ -233,24 +233,24 @@ exports.TokensApiFetchParamCreator = function (configuration) {
233
233
  * Retrieves metadata for a SIP-009 Non-Fungible Token
234
234
  * @summary Non-Fungible Token Metadata
235
235
  * @param {string} principal SIP-009 compliant smart contract principal
236
- * @param {number} tokenId Token ID to retrieve
236
+ * @param {number} token_id Token ID to retrieve
237
237
  * @param {string} [locale] Metadata localization to retrieve
238
238
  * @param {*} [options] Override http request option.
239
239
  * @throws {RequiredError}
240
240
  */
241
- getNftMetadata: function (principal, tokenId, locale, options) {
241
+ getNftMetadata: function (principal, token_id, locale, options) {
242
242
  if (options === void 0) { options = {}; }
243
243
  // verify required parameter 'principal' is not null or undefined
244
244
  if (principal === null || principal === undefined) {
245
245
  throw new RequiredError('principal', 'Required parameter principal was null or undefined when calling getNftMetadata.');
246
246
  }
247
- // verify required parameter 'tokenId' is not null or undefined
248
- if (tokenId === null || tokenId === undefined) {
249
- throw new RequiredError('tokenId', 'Required parameter tokenId was null or undefined when calling getNftMetadata.');
247
+ // verify required parameter 'token_id' is not null or undefined
248
+ if (token_id === null || token_id === undefined) {
249
+ throw new RequiredError('token_id', 'Required parameter token_id was null or undefined when calling getNftMetadata.');
250
250
  }
251
251
  var localVarPath = "/metadata/v1/nft/{principal}/{token_id}"
252
252
  .replace("{" + "principal" + "}", encodeURIComponent(String(principal)))
253
- .replace("{" + "token_id" + "}", encodeURIComponent(String(tokenId)));
253
+ .replace("{" + "token_id" + "}", encodeURIComponent(String(token_id)));
254
254
  var localVarUrlObj = url.parse(localVarPath, true);
255
255
  var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
256
256
  var localVarHeaderParameter = {};
@@ -271,24 +271,24 @@ exports.TokensApiFetchParamCreator = function (configuration) {
271
271
  * Retrieves metadata for a SIP-013 Semi-Fungible Token
272
272
  * @summary Semi-Fungible Token Metadata
273
273
  * @param {string} principal SIP-013 compliant smart contract principal
274
- * @param {number} tokenId Token ID to retrieve
274
+ * @param {number} token_id Token ID to retrieve
275
275
  * @param {string} [locale] Metadata localization to retrieve
276
276
  * @param {*} [options] Override http request option.
277
277
  * @throws {RequiredError}
278
278
  */
279
- getSftMetadata: function (principal, tokenId, locale, options) {
279
+ getSftMetadata: function (principal, token_id, locale, options) {
280
280
  if (options === void 0) { options = {}; }
281
281
  // verify required parameter 'principal' is not null or undefined
282
282
  if (principal === null || principal === undefined) {
283
283
  throw new RequiredError('principal', 'Required parameter principal was null or undefined when calling getSftMetadata.');
284
284
  }
285
- // verify required parameter 'tokenId' is not null or undefined
286
- if (tokenId === null || tokenId === undefined) {
287
- throw new RequiredError('tokenId', 'Required parameter tokenId was null or undefined when calling getSftMetadata.');
285
+ // verify required parameter 'token_id' is not null or undefined
286
+ if (token_id === null || token_id === undefined) {
287
+ throw new RequiredError('token_id', 'Required parameter token_id was null or undefined when calling getSftMetadata.');
288
288
  }
289
289
  var localVarPath = "/metadata/v1/sft/{principal}/{token_id}"
290
290
  .replace("{" + "principal" + "}", encodeURIComponent(String(principal)))
291
- .replace("{" + "token_id" + "}", encodeURIComponent(String(tokenId)));
291
+ .replace("{" + "token_id" + "}", encodeURIComponent(String(token_id)));
292
292
  var localVarUrlObj = url.parse(localVarPath, true);
293
293
  var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
294
294
  var localVarHeaderParameter = {};
@@ -340,13 +340,13 @@ exports.TokensApiFp = function (configuration) {
340
340
  * Retrieves metadata for a SIP-009 Non-Fungible Token
341
341
  * @summary Non-Fungible Token Metadata
342
342
  * @param {string} principal SIP-009 compliant smart contract principal
343
- * @param {number} tokenId Token ID to retrieve
343
+ * @param {number} token_id Token ID to retrieve
344
344
  * @param {string} [locale] Metadata localization to retrieve
345
345
  * @param {*} [options] Override http request option.
346
346
  * @throws {RequiredError}
347
347
  */
348
- getNftMetadata: function (principal, tokenId, locale, options) {
349
- var localVarFetchArgs = exports.TokensApiFetchParamCreator(configuration).getNftMetadata(principal, tokenId, locale, options);
348
+ getNftMetadata: function (principal, token_id, locale, options) {
349
+ var localVarFetchArgs = exports.TokensApiFetchParamCreator(configuration).getNftMetadata(principal, token_id, locale, options);
350
350
  return function (fetch, basePath) {
351
351
  if (fetch === void 0) { fetch = isomorphicFetch; }
352
352
  if (basePath === void 0) { basePath = BASE_PATH; }
@@ -364,13 +364,13 @@ exports.TokensApiFp = function (configuration) {
364
364
  * Retrieves metadata for a SIP-013 Semi-Fungible Token
365
365
  * @summary Semi-Fungible Token Metadata
366
366
  * @param {string} principal SIP-013 compliant smart contract principal
367
- * @param {number} tokenId Token ID to retrieve
367
+ * @param {number} token_id Token ID to retrieve
368
368
  * @param {string} [locale] Metadata localization to retrieve
369
369
  * @param {*} [options] Override http request option.
370
370
  * @throws {RequiredError}
371
371
  */
372
- getSftMetadata: function (principal, tokenId, locale, options) {
373
- var localVarFetchArgs = exports.TokensApiFetchParamCreator(configuration).getSftMetadata(principal, tokenId, locale, options);
372
+ getSftMetadata: function (principal, token_id, locale, options) {
373
+ var localVarFetchArgs = exports.TokensApiFetchParamCreator(configuration).getSftMetadata(principal, token_id, locale, options);
374
374
  return function (fetch, basePath) {
375
375
  if (fetch === void 0) { fetch = isomorphicFetch; }
376
376
  if (basePath === void 0) { basePath = BASE_PATH; }
@@ -407,25 +407,25 @@ exports.TokensApiFactory = function (configuration, fetch, basePath) {
407
407
  * Retrieves metadata for a SIP-009 Non-Fungible Token
408
408
  * @summary Non-Fungible Token Metadata
409
409
  * @param {string} principal SIP-009 compliant smart contract principal
410
- * @param {number} tokenId Token ID to retrieve
410
+ * @param {number} token_id Token ID to retrieve
411
411
  * @param {string} [locale] Metadata localization to retrieve
412
412
  * @param {*} [options] Override http request option.
413
413
  * @throws {RequiredError}
414
414
  */
415
- getNftMetadata: function (principal, tokenId, locale, options) {
416
- return exports.TokensApiFp(configuration).getNftMetadata(principal, tokenId, locale, options)(fetch, basePath);
415
+ getNftMetadata: function (principal, token_id, locale, options) {
416
+ return exports.TokensApiFp(configuration).getNftMetadata(principal, token_id, locale, options)(fetch, basePath);
417
417
  },
418
418
  /**
419
419
  * Retrieves metadata for a SIP-013 Semi-Fungible Token
420
420
  * @summary Semi-Fungible Token Metadata
421
421
  * @param {string} principal SIP-013 compliant smart contract principal
422
- * @param {number} tokenId Token ID to retrieve
422
+ * @param {number} token_id Token ID to retrieve
423
423
  * @param {string} [locale] Metadata localization to retrieve
424
424
  * @param {*} [options] Override http request option.
425
425
  * @throws {RequiredError}
426
426
  */
427
- getSftMetadata: function (principal, tokenId, locale, options) {
428
- return exports.TokensApiFp(configuration).getSftMetadata(principal, tokenId, locale, options)(fetch, basePath);
427
+ getSftMetadata: function (principal, token_id, locale, options) {
428
+ return exports.TokensApiFp(configuration).getSftMetadata(principal, token_id, locale, options)(fetch, basePath);
429
429
  },
430
430
  };
431
431
  };
@@ -456,27 +456,27 @@ var TokensApi = /** @class */ (function (_super) {
456
456
  * Retrieves metadata for a SIP-009 Non-Fungible Token
457
457
  * @summary Non-Fungible Token Metadata
458
458
  * @param {string} principal SIP-009 compliant smart contract principal
459
- * @param {number} tokenId Token ID to retrieve
459
+ * @param {number} token_id Token ID to retrieve
460
460
  * @param {string} [locale] Metadata localization to retrieve
461
461
  * @param {*} [options] Override http request option.
462
462
  * @throws {RequiredError}
463
463
  * @memberof TokensApi
464
464
  */
465
- TokensApi.prototype.getNftMetadata = function (principal, tokenId, locale, options) {
466
- return exports.TokensApiFp(this.configuration).getNftMetadata(principal, tokenId, locale, options)(this.fetch, this.basePath);
465
+ TokensApi.prototype.getNftMetadata = function (principal, token_id, locale, options) {
466
+ return exports.TokensApiFp(this.configuration).getNftMetadata(principal, token_id, locale, options)(this.fetch, this.basePath);
467
467
  };
468
468
  /**
469
469
  * Retrieves metadata for a SIP-013 Semi-Fungible Token
470
470
  * @summary Semi-Fungible Token Metadata
471
471
  * @param {string} principal SIP-013 compliant smart contract principal
472
- * @param {number} tokenId Token ID to retrieve
472
+ * @param {number} token_id Token ID to retrieve
473
473
  * @param {string} [locale] Metadata localization to retrieve
474
474
  * @param {*} [options] Override http request option.
475
475
  * @throws {RequiredError}
476
476
  * @memberof TokensApi
477
477
  */
478
- TokensApi.prototype.getSftMetadata = function (principal, tokenId, locale, options) {
479
- return exports.TokensApiFp(this.configuration).getSftMetadata(principal, tokenId, locale, options)(this.fetch, this.basePath);
478
+ TokensApi.prototype.getSftMetadata = function (principal, token_id, locale, options) {
479
+ return exports.TokensApiFp(this.configuration).getSftMetadata(principal, token_id, locale, options)(this.fetch, this.basePath);
480
480
  };
481
481
  return TokensApi;
482
482
  }(BaseAPI));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hirosystems/token-metadata-api-client",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Client for @hirosystems/token-metadata-api",
5
5
  "author": "Hiro Systems PBC <engineering@hiro.so> (https://hiro.so)",
6
6
  "keywords": [