@kfijolek/boardgamegeekclient
Version:
TypeScript client to interact with BoardGameGeek public XML API
61 lines • 3.29 kB
JavaScript
;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BggThingMarketlistingsDto = void 0;
const jackson_js_1 = require("jackson-js");
class BggThingMarketlistingsDto {
}
__decorate([
(0, jackson_js_1.JsonProperty)(),
(0, jackson_js_1.JsonClassType)({ type: () => [String] }),
(0, jackson_js_1.JsonAlias)({ values: ["condition"] }),
(0, jackson_js_1.JsonDeserialize)({
//eslint-disable-next-line @typescript-eslint/no-explicit-any
using: (items) => items.map(item => item['@_value'])[0]
})
], BggThingMarketlistingsDto.prototype, "condition", void 0);
__decorate([
(0, jackson_js_1.JsonProperty)(),
(0, jackson_js_1.JsonClassType)({ type: () => [Object, [String, String]] }),
(0, jackson_js_1.JsonAlias)({ values: ["link"] }),
(0, jackson_js_1.JsonDeserialize)({
// using: (items: any[]) => { const item = items[0]; return { href: item[""] } }
// using: (items: any[]) => items.map(({ foo }) => foo)[0]
using: (items) => items.map(item => ({ href: item['@_href'], title: item['@_title'] }))[0]
})
], BggThingMarketlistingsDto.prototype, "link", void 0);
__decorate([
(0, jackson_js_1.JsonProperty)(),
(0, jackson_js_1.JsonClassType)({ type: () => [String] }),
(0, jackson_js_1.JsonAlias)({ values: ["listdate"] }),
(0, jackson_js_1.JsonDeserialize)({
//eslint-disable-next-line @typescript-eslint/no-explicit-any
using: (items) => items.map(item => item['@_value'])[0]
})
], BggThingMarketlistingsDto.prototype, "listdate", void 0);
__decorate([
(0, jackson_js_1.JsonProperty)(),
(0, jackson_js_1.JsonClassType)({ type: () => [String] }),
(0, jackson_js_1.JsonAlias)({ values: ["notes"] }),
(0, jackson_js_1.JsonDeserialize)({
//eslint-disable-next-line @typescript-eslint/no-explicit-any
using: (items) => items.map(item => item['@_value'])[0]
})
], BggThingMarketlistingsDto.prototype, "notes", void 0);
__decorate([
(0, jackson_js_1.JsonProperty)(),
(0, jackson_js_1.JsonClassType)({ type: () => [Object, [String, Number]] }),
(0, jackson_js_1.JsonAlias)({ values: ["price"] }),
(0, jackson_js_1.JsonDeserialize)({
// using: (items: any[]) => { const item = items[0]; return { href: item[""] } }
// using: (items: any[]) => items.map(({ foo }) => foo)[0]
using: (items) => items.map(item => ({ currency: item['@_currency'], value: item['@_value'] }))[0]
})
], BggThingMarketlistingsDto.prototype, "price", void 0);
exports.BggThingMarketlistingsDto = BggThingMarketlistingsDto;
//# sourceMappingURL=BggThingMarketlistingsDto.js.map