boardgamegeekclient
Version:
Javascript client to interact with BoardGameGeek public XML API
152 lines • 6.4 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.BggThingDto = void 0;
const jackson_js_1 = require("jackson-js");
const BggPollDto_1 = require("./subdto/BggPollDto");
const paginated_1 = require("./paginated");
const subdto_1 = require("./subdto");
class BggThingDto {
}
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [Number] }),
jackson_js_1.JsonAlias({ values: ["@_id"] })
], BggThingDto.prototype, "id", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [String] }),
jackson_js_1.JsonDeserialize({
using: (value) => value.map(item => item['@_value'])[0]
})
], BggThingDto.prototype, "name", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [String] }),
jackson_js_1.JsonAlias({ values: ["@_type"] })
], BggThingDto.prototype, "type", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [String] })
], BggThingDto.prototype, "description", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [String] })
], BggThingDto.prototype, "thumbnail", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [String] })
], BggThingDto.prototype, "image", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [Number] }),
jackson_js_1.JsonDeserialize({
using: (value) => value.map(item => item['@_value'])[0]
})
], BggThingDto.prototype, "yearpublished", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [Number] }),
jackson_js_1.JsonDeserialize({
using: (value) => value.map(item => item['@_value'])[0]
})
], BggThingDto.prototype, "minplayers", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [Number] }),
jackson_js_1.JsonDeserialize({
using: (value) => value.map(item => item['@_value'])[0]
})
], BggThingDto.prototype, "maxplayers", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [Number] }),
jackson_js_1.JsonDeserialize({
using: (value) => value.map(item => item['@_value'])[0]
})
], BggThingDto.prototype, "playingtime", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [Number] }),
jackson_js_1.JsonDeserialize({
using: (value) => value.map(item => item['@_value'])[0]
})
], BggThingDto.prototype, "minplaytime", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [Number] }),
jackson_js_1.JsonDeserialize({
using: (value) => value.map(item => item['@_value'])[0]
})
], BggThingDto.prototype, "maxplaytime", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [Number] }),
jackson_js_1.JsonDeserialize({
using: (value) => value.map(item => item['@_value'])[0]
})
], BggThingDto.prototype, "minage", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [Array, [subdto_1.BggLinkDto]] }),
jackson_js_1.JsonManagedReference(),
jackson_js_1.JsonAlias({ values: ["link"] })
], BggThingDto.prototype, "links", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [paginated_1.BggStatisticsPaginatedDto] }),
jackson_js_1.JsonManagedReference(),
jackson_js_1.JsonDeserialize({
//eslint-disable-next-line @typescript-eslint/no-explicit-any
using: (items) => items[0]
})
], BggThingDto.prototype, "statistics", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [paginated_1.BggThingVideoPaginatedDto] }),
jackson_js_1.JsonManagedReference(),
jackson_js_1.JsonDeserialize({
//eslint-disable-next-line @typescript-eslint/no-explicit-any
using: (items) => items[0]
})
], BggThingDto.prototype, "videos", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [paginated_1.BggThingCommentPaginatedDto] }),
jackson_js_1.JsonManagedReference(),
jackson_js_1.JsonDeserialize({
//eslint-disable-next-line @typescript-eslint/no-explicit-any
using: (items) => items[0]
})
], BggThingDto.prototype, "comments", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [Array, [subdto_1.BggThingMarketlistingsDto]] }),
jackson_js_1.JsonManagedReference(),
jackson_js_1.JsonDeserialize({
//eslint-disable-next-line @typescript-eslint/no-explicit-any
using: (items) => { var _a; return (_a = items[0]) === null || _a === void 0 ? void 0 : _a.listing; }
})
], BggThingDto.prototype, "marketplacelistings", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [Array, [BggPollDto_1.BggPollDto]] }),
jackson_js_1.JsonManagedReference(),
jackson_js_1.JsonAlias({ values: ["poll"] })
], BggThingDto.prototype, "polls", void 0);
__decorate([
jackson_js_1.JsonProperty(),
jackson_js_1.JsonClassType({ type: () => [Array, [subdto_1.BggThingVersionDto]] }),
jackson_js_1.JsonManagedReference(),
jackson_js_1.JsonDeserialize({
//eslint-disable-next-line @typescript-eslint/no-explicit-any
using: (items) => { var _a; return (_a = items[0]) === null || _a === void 0 ? void 0 : _a.item; }
})
], BggThingDto.prototype, "versions", void 0);
exports.BggThingDto = BggThingDto;
//# sourceMappingURL=BggThingDto.js.map