@hirosystems/token-metadata-api-client 1.0.0 → 1.0.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.
package/dist/api.js ADDED
@@ -0,0 +1,483 @@
1
+ "use strict";
2
+ /// <reference path="./custom.d.ts" />
3
+ // tslint:disable
4
+ /**
5
+ * Token Metadata API
6
+ * Service that indexes metadata for every SIP-009, SIP-010, and SIP-013 Token in the Stacks blockchain and exposes it via REST API endpoints.
7
+ *
8
+ * OpenAPI spec version: v0.1.0
9
+ *
10
+ *
11
+ * NOTE: This file is auto generated by the swagger code generator program.
12
+ * https://github.com/swagger-api/swagger-codegen.git
13
+ * Do not edit the file manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ extendStatics(d, b);
24
+ function __() { this.constructor = d; }
25
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
26
+ };
27
+ })();
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.TokensApi = exports.TokensApiFactory = exports.TokensApiFp = exports.TokensApiFetchParamCreator = exports.StatusApi = exports.StatusApiFactory = exports.StatusApiFp = exports.StatusApiFetchParamCreator = exports.TokenNotFoundResponse = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = void 0;
30
+ var url = require("url");
31
+ var isomorphicFetch = require("isomorphic-fetch");
32
+ var BASE_PATH = "https://api.hiro.so/".replace(/\/+$/, "");
33
+ /**
34
+ *
35
+ * @export
36
+ */
37
+ exports.COLLECTION_FORMATS = {
38
+ csv: ",",
39
+ ssv: " ",
40
+ tsv: "\t",
41
+ pipes: "|",
42
+ };
43
+ /**
44
+ *
45
+ * @export
46
+ * @class BaseAPI
47
+ */
48
+ var BaseAPI = /** @class */ (function () {
49
+ function BaseAPI(configuration, basePath, fetch) {
50
+ if (basePath === void 0) { basePath = BASE_PATH; }
51
+ if (fetch === void 0) { fetch = isomorphicFetch; }
52
+ this.basePath = basePath;
53
+ this.fetch = fetch;
54
+ if (configuration) {
55
+ this.configuration = configuration;
56
+ this.basePath = configuration.basePath || this.basePath;
57
+ }
58
+ }
59
+ return BaseAPI;
60
+ }());
61
+ exports.BaseAPI = BaseAPI;
62
+ ;
63
+ /**
64
+ *
65
+ * @export
66
+ * @class RequiredError
67
+ * @extends {Error}
68
+ */
69
+ var RequiredError = /** @class */ (function (_super) {
70
+ __extends(RequiredError, _super);
71
+ function RequiredError(field, msg) {
72
+ var _this = _super.call(this, msg) || this;
73
+ _this.field = field;
74
+ return _this;
75
+ }
76
+ return RequiredError;
77
+ }(Error));
78
+ exports.RequiredError = RequiredError;
79
+ /**
80
+ * @export
81
+ * @namespace TokenNotFoundResponse
82
+ */
83
+ var TokenNotFoundResponse;
84
+ (function (TokenNotFoundResponse) {
85
+ /**
86
+ * @export
87
+ * @enum {string}
88
+ */
89
+ var ErrorEnum;
90
+ (function (ErrorEnum) {
91
+ ErrorEnum[ErrorEnum["TokenNotFound"] = 'Token not found'] = "TokenNotFound";
92
+ })(ErrorEnum = TokenNotFoundResponse.ErrorEnum || (TokenNotFoundResponse.ErrorEnum = {}));
93
+ })(TokenNotFoundResponse = exports.TokenNotFoundResponse || (exports.TokenNotFoundResponse = {}));
94
+ /**
95
+ * StatusApi - fetch parameter creator
96
+ * @export
97
+ */
98
+ exports.StatusApiFetchParamCreator = function (configuration) {
99
+ return {
100
+ /**
101
+ * Displays the status of the API and its current workload
102
+ * @summary API Status
103
+ * @param {*} [options] Override http request option.
104
+ * @throws {RequiredError}
105
+ */
106
+ getApiStatus: function (options) {
107
+ if (options === void 0) { options = {}; }
108
+ var localVarPath = "/metadata/v1/";
109
+ var localVarUrlObj = url.parse(localVarPath, true);
110
+ var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
111
+ var localVarHeaderParameter = {};
112
+ var localVarQueryParameter = {};
113
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
114
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
115
+ delete localVarUrlObj.search;
116
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
117
+ return {
118
+ url: url.format(localVarUrlObj),
119
+ options: localVarRequestOptions,
120
+ };
121
+ },
122
+ };
123
+ };
124
+ /**
125
+ * StatusApi - functional programming interface
126
+ * @export
127
+ */
128
+ exports.StatusApiFp = function (configuration) {
129
+ return {
130
+ /**
131
+ * Displays the status of the API and its current workload
132
+ * @summary API Status
133
+ * @param {*} [options] Override http request option.
134
+ * @throws {RequiredError}
135
+ */
136
+ getApiStatus: function (options) {
137
+ var localVarFetchArgs = exports.StatusApiFetchParamCreator(configuration).getApiStatus(options);
138
+ return function (fetch, basePath) {
139
+ if (fetch === void 0) { fetch = isomorphicFetch; }
140
+ if (basePath === void 0) { basePath = BASE_PATH; }
141
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
142
+ if (response.status >= 200 && response.status < 300) {
143
+ return response.json();
144
+ }
145
+ else {
146
+ throw response;
147
+ }
148
+ });
149
+ };
150
+ },
151
+ };
152
+ };
153
+ /**
154
+ * StatusApi - factory interface
155
+ * @export
156
+ */
157
+ exports.StatusApiFactory = function (configuration, fetch, basePath) {
158
+ return {
159
+ /**
160
+ * Displays the status of the API and its current workload
161
+ * @summary API Status
162
+ * @param {*} [options] Override http request option.
163
+ * @throws {RequiredError}
164
+ */
165
+ getApiStatus: function (options) {
166
+ return exports.StatusApiFp(configuration).getApiStatus(options)(fetch, basePath);
167
+ },
168
+ };
169
+ };
170
+ /**
171
+ * StatusApi - object-oriented interface
172
+ * @export
173
+ * @class StatusApi
174
+ * @extends {BaseAPI}
175
+ */
176
+ var StatusApi = /** @class */ (function (_super) {
177
+ __extends(StatusApi, _super);
178
+ function StatusApi() {
179
+ return _super !== null && _super.apply(this, arguments) || this;
180
+ }
181
+ /**
182
+ * Displays the status of the API and its current workload
183
+ * @summary API Status
184
+ * @param {*} [options] Override http request option.
185
+ * @throws {RequiredError}
186
+ * @memberof StatusApi
187
+ */
188
+ StatusApi.prototype.getApiStatus = function (options) {
189
+ return exports.StatusApiFp(this.configuration).getApiStatus(options)(this.fetch, this.basePath);
190
+ };
191
+ return StatusApi;
192
+ }(BaseAPI));
193
+ exports.StatusApi = StatusApi;
194
+ /**
195
+ * TokensApi - fetch parameter creator
196
+ * @export
197
+ */
198
+ exports.TokensApiFetchParamCreator = function (configuration) {
199
+ return {
200
+ /**
201
+ * Retrieves metadata for a SIP-010 Fungible Token
202
+ * @summary Fungible Token Metadata
203
+ * @param {string} principal Principal for the contract which owns the SIP-010 token
204
+ * @param {string} [locale] Metadata localization to retrieve
205
+ * @param {*} [options] Override http request option.
206
+ * @throws {RequiredError}
207
+ */
208
+ getFtMetadata: function (principal, locale, options) {
209
+ if (options === void 0) { options = {}; }
210
+ // verify required parameter 'principal' is not null or undefined
211
+ if (principal === null || principal === undefined) {
212
+ throw new RequiredError('principal', 'Required parameter principal was null or undefined when calling getFtMetadata.');
213
+ }
214
+ var localVarPath = "/metadata/v1/ft/{principal}"
215
+ .replace("{" + "principal" + "}", encodeURIComponent(String(principal)));
216
+ var localVarUrlObj = url.parse(localVarPath, true);
217
+ var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
218
+ var localVarHeaderParameter = {};
219
+ var localVarQueryParameter = {};
220
+ if (locale !== undefined) {
221
+ localVarQueryParameter['locale'] = locale;
222
+ }
223
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
224
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
225
+ delete localVarUrlObj.search;
226
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
227
+ return {
228
+ url: url.format(localVarUrlObj),
229
+ options: localVarRequestOptions,
230
+ };
231
+ },
232
+ /**
233
+ * Retrieves metadata for a SIP-009 Non-Fungible Token
234
+ * @summary Non-Fungible Token Metadata
235
+ * @param {string} principal SIP-009 compliant smart contract principal
236
+ * @param {number} tokenId Token ID to retrieve
237
+ * @param {string} [locale] Metadata localization to retrieve
238
+ * @param {*} [options] Override http request option.
239
+ * @throws {RequiredError}
240
+ */
241
+ getNftMetadata: function (principal, tokenId, locale, options) {
242
+ if (options === void 0) { options = {}; }
243
+ // verify required parameter 'principal' is not null or undefined
244
+ if (principal === null || principal === undefined) {
245
+ throw new RequiredError('principal', 'Required parameter principal was null or undefined when calling getNftMetadata.');
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.');
250
+ }
251
+ var localVarPath = "/metadata/v1/nft/{principal}/{token_id}"
252
+ .replace("{" + "principal" + "}", encodeURIComponent(String(principal)))
253
+ .replace("{" + "token_id" + "}", encodeURIComponent(String(tokenId)));
254
+ var localVarUrlObj = url.parse(localVarPath, true);
255
+ var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
256
+ var localVarHeaderParameter = {};
257
+ var localVarQueryParameter = {};
258
+ if (locale !== undefined) {
259
+ localVarQueryParameter['locale'] = locale;
260
+ }
261
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
262
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
263
+ delete localVarUrlObj.search;
264
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
265
+ return {
266
+ url: url.format(localVarUrlObj),
267
+ options: localVarRequestOptions,
268
+ };
269
+ },
270
+ /**
271
+ * Retrieves metadata for a SIP-013 Semi-Fungible Token
272
+ * @summary Semi-Fungible Token Metadata
273
+ * @param {string} principal SIP-013 compliant smart contract principal
274
+ * @param {number} tokenId Token ID to retrieve
275
+ * @param {string} [locale] Metadata localization to retrieve
276
+ * @param {*} [options] Override http request option.
277
+ * @throws {RequiredError}
278
+ */
279
+ getSftMetadata: function (principal, tokenId, locale, options) {
280
+ if (options === void 0) { options = {}; }
281
+ // verify required parameter 'principal' is not null or undefined
282
+ if (principal === null || principal === undefined) {
283
+ throw new RequiredError('principal', 'Required parameter principal was null or undefined when calling getSftMetadata.');
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.');
288
+ }
289
+ var localVarPath = "/metadata/v1/sft/{principal}/{token_id}"
290
+ .replace("{" + "principal" + "}", encodeURIComponent(String(principal)))
291
+ .replace("{" + "token_id" + "}", encodeURIComponent(String(tokenId)));
292
+ var localVarUrlObj = url.parse(localVarPath, true);
293
+ var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
294
+ var localVarHeaderParameter = {};
295
+ var localVarQueryParameter = {};
296
+ if (locale !== undefined) {
297
+ localVarQueryParameter['locale'] = locale;
298
+ }
299
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
300
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
301
+ delete localVarUrlObj.search;
302
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
303
+ return {
304
+ url: url.format(localVarUrlObj),
305
+ options: localVarRequestOptions,
306
+ };
307
+ },
308
+ };
309
+ };
310
+ /**
311
+ * TokensApi - functional programming interface
312
+ * @export
313
+ */
314
+ exports.TokensApiFp = function (configuration) {
315
+ return {
316
+ /**
317
+ * Retrieves metadata for a SIP-010 Fungible Token
318
+ * @summary Fungible Token Metadata
319
+ * @param {string} principal Principal for the contract which owns the SIP-010 token
320
+ * @param {string} [locale] Metadata localization to retrieve
321
+ * @param {*} [options] Override http request option.
322
+ * @throws {RequiredError}
323
+ */
324
+ getFtMetadata: function (principal, locale, options) {
325
+ var localVarFetchArgs = exports.TokensApiFetchParamCreator(configuration).getFtMetadata(principal, locale, options);
326
+ return function (fetch, basePath) {
327
+ if (fetch === void 0) { fetch = isomorphicFetch; }
328
+ if (basePath === void 0) { basePath = BASE_PATH; }
329
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
330
+ if (response.status >= 200 && response.status < 300) {
331
+ return response.json();
332
+ }
333
+ else {
334
+ throw response;
335
+ }
336
+ });
337
+ };
338
+ },
339
+ /**
340
+ * Retrieves metadata for a SIP-009 Non-Fungible Token
341
+ * @summary Non-Fungible Token Metadata
342
+ * @param {string} principal SIP-009 compliant smart contract principal
343
+ * @param {number} tokenId Token ID to retrieve
344
+ * @param {string} [locale] Metadata localization to retrieve
345
+ * @param {*} [options] Override http request option.
346
+ * @throws {RequiredError}
347
+ */
348
+ getNftMetadata: function (principal, tokenId, locale, options) {
349
+ var localVarFetchArgs = exports.TokensApiFetchParamCreator(configuration).getNftMetadata(principal, tokenId, locale, options);
350
+ return function (fetch, basePath) {
351
+ if (fetch === void 0) { fetch = isomorphicFetch; }
352
+ if (basePath === void 0) { basePath = BASE_PATH; }
353
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
354
+ if (response.status >= 200 && response.status < 300) {
355
+ return response.json();
356
+ }
357
+ else {
358
+ throw response;
359
+ }
360
+ });
361
+ };
362
+ },
363
+ /**
364
+ * Retrieves metadata for a SIP-013 Semi-Fungible Token
365
+ * @summary Semi-Fungible Token Metadata
366
+ * @param {string} principal SIP-013 compliant smart contract principal
367
+ * @param {number} tokenId Token ID to retrieve
368
+ * @param {string} [locale] Metadata localization to retrieve
369
+ * @param {*} [options] Override http request option.
370
+ * @throws {RequiredError}
371
+ */
372
+ getSftMetadata: function (principal, tokenId, locale, options) {
373
+ var localVarFetchArgs = exports.TokensApiFetchParamCreator(configuration).getSftMetadata(principal, tokenId, locale, options);
374
+ return function (fetch, basePath) {
375
+ if (fetch === void 0) { fetch = isomorphicFetch; }
376
+ if (basePath === void 0) { basePath = BASE_PATH; }
377
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
378
+ if (response.status >= 200 && response.status < 300) {
379
+ return response.json();
380
+ }
381
+ else {
382
+ throw response;
383
+ }
384
+ });
385
+ };
386
+ },
387
+ };
388
+ };
389
+ /**
390
+ * TokensApi - factory interface
391
+ * @export
392
+ */
393
+ exports.TokensApiFactory = function (configuration, fetch, basePath) {
394
+ return {
395
+ /**
396
+ * Retrieves metadata for a SIP-010 Fungible Token
397
+ * @summary Fungible Token Metadata
398
+ * @param {string} principal Principal for the contract which owns the SIP-010 token
399
+ * @param {string} [locale] Metadata localization to retrieve
400
+ * @param {*} [options] Override http request option.
401
+ * @throws {RequiredError}
402
+ */
403
+ getFtMetadata: function (principal, locale, options) {
404
+ return exports.TokensApiFp(configuration).getFtMetadata(principal, locale, options)(fetch, basePath);
405
+ },
406
+ /**
407
+ * Retrieves metadata for a SIP-009 Non-Fungible Token
408
+ * @summary Non-Fungible Token Metadata
409
+ * @param {string} principal SIP-009 compliant smart contract principal
410
+ * @param {number} tokenId Token ID to retrieve
411
+ * @param {string} [locale] Metadata localization to retrieve
412
+ * @param {*} [options] Override http request option.
413
+ * @throws {RequiredError}
414
+ */
415
+ getNftMetadata: function (principal, tokenId, locale, options) {
416
+ return exports.TokensApiFp(configuration).getNftMetadata(principal, tokenId, locale, options)(fetch, basePath);
417
+ },
418
+ /**
419
+ * Retrieves metadata for a SIP-013 Semi-Fungible Token
420
+ * @summary Semi-Fungible Token Metadata
421
+ * @param {string} principal SIP-013 compliant smart contract principal
422
+ * @param {number} tokenId Token ID to retrieve
423
+ * @param {string} [locale] Metadata localization to retrieve
424
+ * @param {*} [options] Override http request option.
425
+ * @throws {RequiredError}
426
+ */
427
+ getSftMetadata: function (principal, tokenId, locale, options) {
428
+ return exports.TokensApiFp(configuration).getSftMetadata(principal, tokenId, locale, options)(fetch, basePath);
429
+ },
430
+ };
431
+ };
432
+ /**
433
+ * TokensApi - object-oriented interface
434
+ * @export
435
+ * @class TokensApi
436
+ * @extends {BaseAPI}
437
+ */
438
+ var TokensApi = /** @class */ (function (_super) {
439
+ __extends(TokensApi, _super);
440
+ function TokensApi() {
441
+ return _super !== null && _super.apply(this, arguments) || this;
442
+ }
443
+ /**
444
+ * Retrieves metadata for a SIP-010 Fungible Token
445
+ * @summary Fungible Token Metadata
446
+ * @param {string} principal Principal for the contract which owns the SIP-010 token
447
+ * @param {string} [locale] Metadata localization to retrieve
448
+ * @param {*} [options] Override http request option.
449
+ * @throws {RequiredError}
450
+ * @memberof TokensApi
451
+ */
452
+ TokensApi.prototype.getFtMetadata = function (principal, locale, options) {
453
+ return exports.TokensApiFp(this.configuration).getFtMetadata(principal, locale, options)(this.fetch, this.basePath);
454
+ };
455
+ /**
456
+ * Retrieves metadata for a SIP-009 Non-Fungible Token
457
+ * @summary Non-Fungible Token Metadata
458
+ * @param {string} principal SIP-009 compliant smart contract principal
459
+ * @param {number} tokenId Token ID to retrieve
460
+ * @param {string} [locale] Metadata localization to retrieve
461
+ * @param {*} [options] Override http request option.
462
+ * @throws {RequiredError}
463
+ * @memberof TokensApi
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);
467
+ };
468
+ /**
469
+ * Retrieves metadata for a SIP-013 Semi-Fungible Token
470
+ * @summary Semi-Fungible Token Metadata
471
+ * @param {string} principal SIP-013 compliant smart contract principal
472
+ * @param {number} tokenId Token ID to retrieve
473
+ * @param {string} [locale] Metadata localization to retrieve
474
+ * @param {*} [options] Override http request option.
475
+ * @throws {RequiredError}
476
+ * @memberof TokensApi
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);
480
+ };
481
+ return TokensApi;
482
+ }(BaseAPI));
483
+ exports.TokensApi = TokensApi;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Token Metadata API
3
+ * Service that indexes metadata for every SIP-009, SIP-010, and SIP-013 Token in the Stacks blockchain and exposes it via REST API endpoints.
4
+ *
5
+ * OpenAPI spec version: v0.1.0
6
+ *
7
+ *
8
+ * NOTE: This file is auto generated by the swagger code generator program.
9
+ * https://github.com/swagger-api/swagger-codegen.git
10
+ * Do not edit the file manually.
11
+ */
12
+ export interface ConfigurationParameters {
13
+ apiKey?: string | ((name: string) => string);
14
+ username?: string;
15
+ password?: string;
16
+ accessToken?: string | ((name: string, scopes?: string[]) => string);
17
+ basePath?: string;
18
+ }
19
+ export declare class Configuration {
20
+ /**
21
+ * parameter for apiKey security
22
+ * @param name security name
23
+ * @memberof Configuration
24
+ */
25
+ apiKey?: string | ((name: string) => string);
26
+ /**
27
+ * parameter for basic security
28
+ *
29
+ * @type {string}
30
+ * @memberof Configuration
31
+ */
32
+ username?: string;
33
+ /**
34
+ * parameter for basic security
35
+ *
36
+ * @type {string}
37
+ * @memberof Configuration
38
+ */
39
+ password?: string;
40
+ /**
41
+ * parameter for oauth2 security
42
+ * @param name security name
43
+ * @param scopes oauth2 scope
44
+ * @memberof Configuration
45
+ */
46
+ accessToken?: string | ((name: string, scopes?: string[]) => string);
47
+ /**
48
+ * override base path
49
+ *
50
+ * @type {string}
51
+ * @memberof Configuration
52
+ */
53
+ basePath?: string;
54
+ constructor(param?: ConfigurationParameters);
55
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ // tslint:disable
3
+ /**
4
+ * Token Metadata API
5
+ * Service that indexes metadata for every SIP-009, SIP-010, and SIP-013 Token in the Stacks blockchain and exposes it via REST API endpoints.
6
+ *
7
+ * OpenAPI spec version: v0.1.0
8
+ *
9
+ *
10
+ * NOTE: This file is auto generated by the swagger code generator program.
11
+ * https://github.com/swagger-api/swagger-codegen.git
12
+ * Do not edit the file manually.
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.Configuration = void 0;
16
+ var Configuration = /** @class */ (function () {
17
+ function Configuration(param) {
18
+ if (param === void 0) { param = {}; }
19
+ this.apiKey = param.apiKey;
20
+ this.username = param.username;
21
+ this.password = param.password;
22
+ this.accessToken = param.accessToken;
23
+ this.basePath = param.basePath;
24
+ }
25
+ return Configuration;
26
+ }());
27
+ exports.Configuration = Configuration;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Token Metadata API
3
+ * Service that indexes metadata for every SIP-009, SIP-010, and SIP-013 Token in the Stacks blockchain and exposes it via REST API endpoints.
4
+ *
5
+ * OpenAPI spec version: v0.1.0
6
+ *
7
+ *
8
+ * NOTE: This file is auto generated by the swagger code generator program.
9
+ * https://github.com/swagger-api/swagger-codegen.git
10
+ * Do not edit the file manually.
11
+ */
12
+ export * from "./api";
13
+ export * from "./configuration";
package/dist/index.js ADDED
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ // tslint:disable
3
+ /**
4
+ * Token Metadata API
5
+ * Service that indexes metadata for every SIP-009, SIP-010, and SIP-013 Token in the Stacks blockchain and exposes it via REST API endpoints.
6
+ *
7
+ * OpenAPI spec version: v0.1.0
8
+ *
9
+ *
10
+ * NOTE: This file is auto generated by the swagger code generator program.
11
+ * https://github.com/swagger-api/swagger-codegen.git
12
+ * Do not edit the file manually.
13
+ */
14
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
+ for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ __exportStar(require("./api"), exports);
26
+ __exportStar(require("./configuration"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hirosystems/token-metadata-api-client",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Client for @hirosystems/token-metadata-api",
5
5
  "author": "Hiro Systems PBC <engineering@hiro.so> (https://hiro.so)",
6
6
  "keywords": [
@@ -12,7 +12,14 @@
12
12
  "license": "GPL-3.0",
13
13
  "main": "./dist/index.js",
14
14
  "typings": "./dist/index.d.ts",
15
- "scripts" : {
15
+ "files": [
16
+ "dist/",
17
+ "api.ts",
18
+ "configuration.ts",
19
+ "custom.d.ts",
20
+ "index.ts"
21
+ ],
22
+ "scripts": {
16
23
  "build": "tsc --outDir dist/",
17
24
  "test": "jest",
18
25
  "prepublishOnly": "npm run build"
@@ -34,5 +41,13 @@
34
41
  "^.+\\.tsx?$": "ts-jest"
35
42
  },
36
43
  "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
37
- "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"]
38
- }}
44
+ "moduleFileExtensions": [
45
+ "ts",
46
+ "tsx",
47
+ "js",
48
+ "jsx",
49
+ "json",
50
+ "node"
51
+ ]
52
+ }
53
+ }
@@ -1 +0,0 @@
1
- 3.0.41
@@ -1,24 +0,0 @@
1
- # Swagger Codegen Ignore
2
- # Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
3
-
4
- # Use this file to prevent files from being overwritten by the generator.
5
- # The patterns follow closely to .gitignore or .dockerignore.
6
-
7
- # As an example, the C# client generator defines ApiClient.cs.
8
- # You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
9
- #ApiClient.cs
10
-
11
- # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12
- #foo/*/qux
13
- # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14
-
15
- # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16
- #foo/**/qux
17
- # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18
-
19
- # You can also negate patterns with an exclamation (!).
20
- # For example, you can ignore all files in a docs folder with the file extension .md:
21
- #docs/*.md
22
- # Then explicitly reverse the ignore rule for a single file:
23
- #!docs/README.md
24
- package.json