@kfijolek/boardgamegeekclient
Version:
TypeScript client to interact with BoardGameGeek public XML API
57 lines • 2.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;
};
import { JsonAlias, JsonClassType, JsonDeserialize, JsonFormat, JsonFormatShape, JsonIgnoreProperties, JsonProperty } from "jackson-js";
let BggGuildDto = class BggGuildDto {
};
__decorate([
JsonProperty(),
JsonClassType({ type: () => [Number] }),
JsonAlias({ values: ["@_id"] })
], BggGuildDto.prototype, "id", void 0);
__decorate([
JsonProperty(),
JsonClassType({ type: () => [String] }),
JsonAlias({ values: ["@_name"] })
], BggGuildDto.prototype, "name", void 0);
__decorate([
JsonProperty(),
JsonClassType({ type: () => [String] }),
JsonAlias({ values: ["@_created"] })
], BggGuildDto.prototype, "created", void 0);
__decorate([
JsonProperty(),
JsonClassType({ type: () => [String] })
], BggGuildDto.prototype, "category", void 0);
__decorate([
JsonProperty(),
JsonClassType({ type: () => [String] })
], BggGuildDto.prototype, "website", void 0);
__decorate([
JsonProperty(),
JsonClassType({ type: () => [String] })
], BggGuildDto.prototype, "manager", void 0);
__decorate([
JsonProperty(),
JsonClassType({ type: () => [String] })
], BggGuildDto.prototype, "description", void 0);
__decorate([
JsonProperty(),
JsonClassType({ type: () => [Array, [Object]] }),
JsonFormat({
shape: JsonFormatShape.ARRAY
}),
JsonDeserialize({
// eslint-disable-next-line @typescript-eslint/no-explicit-any
using: (array) => array[0].member.map((item) => ({ name: item['@_name'], date: item['@_date'] }))
}),
JsonAlias({ values: ["members"] })
], BggGuildDto.prototype, "members", void 0);
BggGuildDto = __decorate([
JsonIgnoreProperties({ value: ['@_termsofuse', 'location'] })
], BggGuildDto);
export { BggGuildDto };
//# sourceMappingURL=BggGuildDto.js.map