gastromemories-api-client
Advanced tools
Comparing version 1.0.22 to 1.0.23
@@ -179,3 +179,3 @@ export declare class ImagesClient { | ||
image?: ImageDto; | ||
tags?: MemoryTag[]; | ||
tags?: MemoryTagDto[]; | ||
title?: string; | ||
@@ -195,3 +195,3 @@ note?: string | undefined; | ||
image?: ImageDto; | ||
tags?: MemoryTag[]; | ||
tags?: MemoryTagDto[]; | ||
title?: string; | ||
@@ -203,94 +203,16 @@ note?: string | undefined; | ||
} | ||
export declare abstract class BaseEntity implements IBaseEntity { | ||
export declare class MemoryTagDto implements IMemoryTagDto { | ||
id?: string; | ||
domainEvents?: BaseEvent[]; | ||
constructor(data?: IBaseEntity); | ||
created?: Date; | ||
name?: string; | ||
constructor(data?: IMemoryTagDto); | ||
init(_data?: any): void; | ||
static fromJS(data: any): BaseEntity; | ||
static fromJS(data: any): MemoryTagDto; | ||
toJSON(data?: any): any; | ||
} | ||
export interface IBaseEntity { | ||
export interface IMemoryTagDto { | ||
id?: string; | ||
domainEvents?: BaseEvent[]; | ||
} | ||
export declare abstract class BaseAuditableEntity extends BaseEntity implements IBaseAuditableEntity { | ||
created?: Date; | ||
createdBy?: string | undefined; | ||
lastModified?: Date; | ||
lastModifiedBy?: string | undefined; | ||
constructor(data?: IBaseAuditableEntity); | ||
init(_data?: any): void; | ||
static fromJS(data: any): BaseAuditableEntity; | ||
toJSON(data?: any): any; | ||
} | ||
export interface IBaseAuditableEntity extends IBaseEntity { | ||
created?: Date; | ||
createdBy?: string | undefined; | ||
lastModified?: Date; | ||
lastModifiedBy?: string | undefined; | ||
} | ||
export declare class MemoryTag extends BaseAuditableEntity implements IMemoryTag { | ||
ownerId?: string; | ||
name?: string; | ||
memories?: Memory[]; | ||
constructor(data?: IMemoryTag); | ||
init(_data?: any): void; | ||
static fromJS(data: any): MemoryTag; | ||
toJSON(data?: any): any; | ||
} | ||
export interface IMemoryTag extends IBaseAuditableEntity { | ||
ownerId?: string; | ||
name?: string; | ||
memories?: Memory[]; | ||
} | ||
export declare class Memory extends BaseAuditableEntity implements IMemory { | ||
ownerId?: string; | ||
imageId?: string; | ||
image?: Image; | ||
tags?: MemoryTag[]; | ||
title?: string; | ||
note?: string | undefined; | ||
latitude?: number | undefined; | ||
longitude?: number | undefined; | ||
tastinessScore?: number; | ||
constructor(data?: IMemory); | ||
init(_data?: any): void; | ||
static fromJS(data: any): Memory; | ||
toJSON(data?: any): any; | ||
} | ||
export interface IMemory extends IBaseAuditableEntity { | ||
ownerId?: string; | ||
imageId?: string; | ||
image?: Image; | ||
tags?: MemoryTag[]; | ||
title?: string; | ||
note?: string | undefined; | ||
latitude?: number | undefined; | ||
longitude?: number | undefined; | ||
tastinessScore?: number; | ||
} | ||
export declare class Image extends BaseAuditableEntity implements IImage { | ||
ownerId?: string; | ||
url?: string; | ||
type?: ImageTypeEnum; | ||
suggestedTags?: string[] | undefined; | ||
constructor(data?: IImage); | ||
init(_data?: any): void; | ||
static fromJS(data: any): Image; | ||
toJSON(data?: any): any; | ||
} | ||
export interface IImage extends IBaseAuditableEntity { | ||
ownerId?: string; | ||
url?: string; | ||
type?: ImageTypeEnum; | ||
suggestedTags?: string[] | undefined; | ||
} | ||
export declare abstract class BaseEvent implements IBaseEvent { | ||
constructor(data?: IBaseEvent); | ||
init(_data?: any): void; | ||
static fromJS(data: any): BaseEvent; | ||
toJSON(data?: any): any; | ||
} | ||
export interface IBaseEvent { | ||
} | ||
export declare class PaginatedListOfMemoryDto implements IPaginatedListOfMemoryDto { | ||
@@ -336,16 +258,2 @@ items?: MemoryDto[]; | ||
} | ||
export declare class MemoryTagDto implements IMemoryTagDto { | ||
id?: string; | ||
created?: Date; | ||
name?: string; | ||
constructor(data?: IMemoryTagDto); | ||
init(_data?: any): void; | ||
static fromJS(data: any): MemoryTagDto; | ||
toJSON(data?: any): any; | ||
} | ||
export interface IMemoryTagDto { | ||
id?: string; | ||
created?: Date; | ||
name?: string; | ||
} | ||
export declare class PaginatedListOfTodoItemBriefDto implements IPaginatedListOfTodoItemBriefDto { | ||
@@ -352,0 +260,0 @@ items?: TodoItemBriefDto[]; |
@@ -23,3 +23,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ApiException = exports.PriorityLevel = exports.UpdateTodoItemDetailCommand = exports.UpdateTodoItemCommand = exports.CreateTodoItemCommand = exports.TodoItemBriefDto = exports.PaginatedListOfTodoItemBriefDto = exports.MemoryTagDto = exports.PaginatedListOfMemoryTagDto = exports.PaginatedListOfMemoryDto = exports.BaseEvent = exports.Image = exports.Memory = exports.MemoryTag = exports.BaseAuditableEntity = exports.BaseEntity = exports.MemoryDto = exports.MemoryImageUploadUrlDto = exports.UpdateMemoryCommand = exports.CreateOrUpdateMemoryTagDto = exports.CreateMemoryCommand = exports.ImageDto = exports.ImageUploadUrlDto = exports.ImageTypeEnum = exports.CreateImageCommand = exports.TodoItemsClient = exports.MemoryTagsClient = exports.MemoriesClient = exports.ImagesClient = void 0; | ||
exports.ApiException = exports.PriorityLevel = exports.UpdateTodoItemDetailCommand = exports.UpdateTodoItemCommand = exports.CreateTodoItemCommand = exports.TodoItemBriefDto = exports.PaginatedListOfTodoItemBriefDto = exports.PaginatedListOfMemoryTagDto = exports.PaginatedListOfMemoryDto = exports.MemoryTagDto = exports.MemoryDto = exports.MemoryImageUploadUrlDto = exports.UpdateMemoryCommand = exports.CreateOrUpdateMemoryTagDto = exports.CreateMemoryCommand = exports.ImageDto = exports.ImageUploadUrlDto = exports.ImageTypeEnum = exports.CreateImageCommand = exports.TodoItemsClient = exports.MemoryTagsClient = exports.MemoriesClient = exports.ImagesClient = void 0; | ||
/* tslint:disable */ | ||
@@ -1006,3 +1006,3 @@ /* eslint-disable */ | ||
var item = _a[_i]; | ||
this.tags.push(MemoryTag.fromJS(item)); | ||
this.tags.push(MemoryTagDto.fromJS(item)); | ||
} | ||
@@ -1045,4 +1045,4 @@ } | ||
exports.MemoryDto = MemoryDto; | ||
var BaseEntity = /** @class */ (function () { | ||
function BaseEntity(data) { | ||
var MemoryTagDto = /** @class */ (function () { | ||
function MemoryTagDto(data) { | ||
if (data) { | ||
@@ -1055,225 +1055,25 @@ for (var property in data) { | ||
} | ||
BaseEntity.prototype.init = function (_data) { | ||
MemoryTagDto.prototype.init = function (_data) { | ||
if (_data) { | ||
this.id = _data["id"]; | ||
if (Array.isArray(_data["domainEvents"])) { | ||
this.domainEvents = []; | ||
for (var _i = 0, _a = _data["domainEvents"]; _i < _a.length; _i++) { | ||
var item = _a[_i]; | ||
this.domainEvents.push(BaseEvent.fromJS(item)); | ||
} | ||
} | ||
} | ||
}; | ||
BaseEntity.fromJS = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
throw new Error("The abstract class 'BaseEntity' cannot be instantiated."); | ||
}; | ||
BaseEntity.prototype.toJSON = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
data["id"] = this.id; | ||
if (Array.isArray(this.domainEvents)) { | ||
data["domainEvents"] = []; | ||
for (var _i = 0, _a = this.domainEvents; _i < _a.length; _i++) { | ||
var item = _a[_i]; | ||
data["domainEvents"].push(item.toJSON()); | ||
} | ||
} | ||
return data; | ||
}; | ||
return BaseEntity; | ||
}()); | ||
exports.BaseEntity = BaseEntity; | ||
var BaseAuditableEntity = /** @class */ (function (_super) { | ||
__extends(BaseAuditableEntity, _super); | ||
function BaseAuditableEntity(data) { | ||
return _super.call(this, data) || this; | ||
} | ||
BaseAuditableEntity.prototype.init = function (_data) { | ||
_super.prototype.init.call(this, _data); | ||
if (_data) { | ||
this.created = _data["created"] ? new Date(_data["created"].toString()) : undefined; | ||
this.createdBy = _data["createdBy"]; | ||
this.lastModified = _data["lastModified"] ? new Date(_data["lastModified"].toString()) : undefined; | ||
this.lastModifiedBy = _data["lastModifiedBy"]; | ||
} | ||
}; | ||
BaseAuditableEntity.fromJS = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
throw new Error("The abstract class 'BaseAuditableEntity' cannot be instantiated."); | ||
}; | ||
BaseAuditableEntity.prototype.toJSON = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
data["created"] = this.created ? this.created.toISOString() : undefined; | ||
data["createdBy"] = this.createdBy; | ||
data["lastModified"] = this.lastModified ? this.lastModified.toISOString() : undefined; | ||
data["lastModifiedBy"] = this.lastModifiedBy; | ||
_super.prototype.toJSON.call(this, data); | ||
return data; | ||
}; | ||
return BaseAuditableEntity; | ||
}(BaseEntity)); | ||
exports.BaseAuditableEntity = BaseAuditableEntity; | ||
var MemoryTag = /** @class */ (function (_super) { | ||
__extends(MemoryTag, _super); | ||
function MemoryTag(data) { | ||
return _super.call(this, data) || this; | ||
} | ||
MemoryTag.prototype.init = function (_data) { | ||
_super.prototype.init.call(this, _data); | ||
if (_data) { | ||
this.ownerId = _data["ownerId"]; | ||
this.name = _data["name"]; | ||
if (Array.isArray(_data["memories"])) { | ||
this.memories = []; | ||
for (var _i = 0, _a = _data["memories"]; _i < _a.length; _i++) { | ||
var item = _a[_i]; | ||
this.memories.push(Memory.fromJS(item)); | ||
} | ||
} | ||
} | ||
}; | ||
MemoryTag.fromJS = function (data) { | ||
MemoryTagDto.fromJS = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
var result = new MemoryTag(); | ||
var result = new MemoryTagDto(); | ||
result.init(data); | ||
return result; | ||
}; | ||
MemoryTag.prototype.toJSON = function (data) { | ||
MemoryTagDto.prototype.toJSON = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
data["ownerId"] = this.ownerId; | ||
data["id"] = this.id; | ||
data["created"] = this.created ? this.created.toISOString() : undefined; | ||
data["name"] = this.name; | ||
if (Array.isArray(this.memories)) { | ||
data["memories"] = []; | ||
for (var _i = 0, _a = this.memories; _i < _a.length; _i++) { | ||
var item = _a[_i]; | ||
data["memories"].push(item.toJSON()); | ||
} | ||
} | ||
_super.prototype.toJSON.call(this, data); | ||
return data; | ||
}; | ||
return MemoryTag; | ||
}(BaseAuditableEntity)); | ||
exports.MemoryTag = MemoryTag; | ||
var Memory = /** @class */ (function (_super) { | ||
__extends(Memory, _super); | ||
function Memory(data) { | ||
return _super.call(this, data) || this; | ||
} | ||
Memory.prototype.init = function (_data) { | ||
_super.prototype.init.call(this, _data); | ||
if (_data) { | ||
this.ownerId = _data["ownerId"]; | ||
this.imageId = _data["imageId"]; | ||
this.image = _data["image"] ? Image.fromJS(_data["image"]) : undefined; | ||
if (Array.isArray(_data["tags"])) { | ||
this.tags = []; | ||
for (var _i = 0, _a = _data["tags"]; _i < _a.length; _i++) { | ||
var item = _a[_i]; | ||
this.tags.push(MemoryTag.fromJS(item)); | ||
} | ||
} | ||
this.title = _data["title"]; | ||
this.note = _data["note"]; | ||
this.latitude = _data["latitude"]; | ||
this.longitude = _data["longitude"]; | ||
this.tastinessScore = _data["tastinessScore"]; | ||
} | ||
}; | ||
Memory.fromJS = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
var result = new Memory(); | ||
result.init(data); | ||
return result; | ||
}; | ||
Memory.prototype.toJSON = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
data["ownerId"] = this.ownerId; | ||
data["imageId"] = this.imageId; | ||
data["image"] = this.image ? this.image.toJSON() : undefined; | ||
if (Array.isArray(this.tags)) { | ||
data["tags"] = []; | ||
for (var _i = 0, _a = this.tags; _i < _a.length; _i++) { | ||
var item = _a[_i]; | ||
data["tags"].push(item.toJSON()); | ||
} | ||
} | ||
data["title"] = this.title; | ||
data["note"] = this.note; | ||
data["latitude"] = this.latitude; | ||
data["longitude"] = this.longitude; | ||
data["tastinessScore"] = this.tastinessScore; | ||
_super.prototype.toJSON.call(this, data); | ||
return data; | ||
}; | ||
return Memory; | ||
}(BaseAuditableEntity)); | ||
exports.Memory = Memory; | ||
var Image = /** @class */ (function (_super) { | ||
__extends(Image, _super); | ||
function Image(data) { | ||
return _super.call(this, data) || this; | ||
} | ||
Image.prototype.init = function (_data) { | ||
_super.prototype.init.call(this, _data); | ||
if (_data) { | ||
this.ownerId = _data["ownerId"]; | ||
this.url = _data["url"]; | ||
this.type = _data["type"]; | ||
if (Array.isArray(_data["suggestedTags"])) { | ||
this.suggestedTags = []; | ||
for (var _i = 0, _a = _data["suggestedTags"]; _i < _a.length; _i++) { | ||
var item = _a[_i]; | ||
this.suggestedTags.push(item); | ||
} | ||
} | ||
} | ||
}; | ||
Image.fromJS = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
var result = new Image(); | ||
result.init(data); | ||
return result; | ||
}; | ||
Image.prototype.toJSON = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
data["ownerId"] = this.ownerId; | ||
data["url"] = this.url; | ||
data["type"] = this.type; | ||
if (Array.isArray(this.suggestedTags)) { | ||
data["suggestedTags"] = []; | ||
for (var _i = 0, _a = this.suggestedTags; _i < _a.length; _i++) { | ||
var item = _a[_i]; | ||
data["suggestedTags"].push(item); | ||
} | ||
} | ||
_super.prototype.toJSON.call(this, data); | ||
return data; | ||
}; | ||
return Image; | ||
}(BaseAuditableEntity)); | ||
exports.Image = Image; | ||
var BaseEvent = /** @class */ (function () { | ||
function BaseEvent(data) { | ||
if (data) { | ||
for (var property in data) { | ||
if (data.hasOwnProperty(property)) | ||
this[property] = data[property]; | ||
} | ||
} | ||
} | ||
BaseEvent.prototype.init = function (_data) { | ||
}; | ||
BaseEvent.fromJS = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
throw new Error("The abstract class 'BaseEvent' cannot be instantiated."); | ||
}; | ||
BaseEvent.prototype.toJSON = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
return data; | ||
}; | ||
return BaseEvent; | ||
return MemoryTagDto; | ||
}()); | ||
exports.BaseEvent = BaseEvent; | ||
exports.MemoryTagDto = MemoryTagDto; | ||
var PaginatedListOfMemoryDto = /** @class */ (function () { | ||
@@ -1379,34 +1179,2 @@ function PaginatedListOfMemoryDto(data) { | ||
exports.PaginatedListOfMemoryTagDto = PaginatedListOfMemoryTagDto; | ||
var MemoryTagDto = /** @class */ (function () { | ||
function MemoryTagDto(data) { | ||
if (data) { | ||
for (var property in data) { | ||
if (data.hasOwnProperty(property)) | ||
this[property] = data[property]; | ||
} | ||
} | ||
} | ||
MemoryTagDto.prototype.init = function (_data) { | ||
if (_data) { | ||
this.id = _data["id"]; | ||
this.created = _data["created"] ? new Date(_data["created"].toString()) : undefined; | ||
this.name = _data["name"]; | ||
} | ||
}; | ||
MemoryTagDto.fromJS = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
var result = new MemoryTagDto(); | ||
result.init(data); | ||
return result; | ||
}; | ||
MemoryTagDto.prototype.toJSON = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
data["id"] = this.id; | ||
data["created"] = this.created ? this.created.toISOString() : undefined; | ||
data["name"] = this.name; | ||
return data; | ||
}; | ||
return MemoryTagDto; | ||
}()); | ||
exports.MemoryTagDto = MemoryTagDto; | ||
var PaginatedListOfTodoItemBriefDto = /** @class */ (function () { | ||
@@ -1413,0 +1181,0 @@ function PaginatedListOfTodoItemBriefDto(data) { |
320
index.ts
@@ -1033,3 +1033,3 @@ //---------------------- | ||
image?: ImageDto; | ||
tags?: MemoryTag[]; | ||
tags?: MemoryTagDto[]; | ||
title?: string; | ||
@@ -1058,3 +1058,3 @@ note?: string | undefined; | ||
for (let item of _data["tags"]) | ||
this.tags!.push(MemoryTag.fromJS(item)); | ||
this.tags!.push(MemoryTagDto.fromJS(item)); | ||
} | ||
@@ -1099,3 +1099,3 @@ this.title = _data["title"]; | ||
image?: ImageDto; | ||
tags?: MemoryTag[]; | ||
tags?: MemoryTagDto[]; | ||
title?: string; | ||
@@ -1108,7 +1108,8 @@ note?: string | undefined; | ||
export abstract class BaseEntity implements IBaseEntity { | ||
export class MemoryTagDto implements IMemoryTagDto { | ||
id?: string; | ||
domainEvents?: BaseEvent[]; | ||
created?: Date; | ||
name?: string; | ||
constructor(data?: IBaseEntity) { | ||
constructor(data?: IMemoryTagDto) { | ||
if (data) { | ||
@@ -1125,100 +1126,10 @@ for (var property in data) { | ||
this.id = _data["id"]; | ||
if (Array.isArray(_data["domainEvents"])) { | ||
this.domainEvents = [] as any; | ||
for (let item of _data["domainEvents"]) | ||
this.domainEvents!.push(BaseEvent.fromJS(item)); | ||
} | ||
} | ||
} | ||
static fromJS(data: any): BaseEntity { | ||
data = typeof data === 'object' ? data : {}; | ||
throw new Error("The abstract class 'BaseEntity' cannot be instantiated."); | ||
} | ||
toJSON(data?: any) { | ||
data = typeof data === 'object' ? data : {}; | ||
data["id"] = this.id; | ||
if (Array.isArray(this.domainEvents)) { | ||
data["domainEvents"] = []; | ||
for (let item of this.domainEvents) | ||
data["domainEvents"].push(item.toJSON()); | ||
} | ||
return data; | ||
} | ||
} | ||
export interface IBaseEntity { | ||
id?: string; | ||
domainEvents?: BaseEvent[]; | ||
} | ||
export abstract class BaseAuditableEntity extends BaseEntity implements IBaseAuditableEntity { | ||
created?: Date; | ||
createdBy?: string | undefined; | ||
lastModified?: Date; | ||
lastModifiedBy?: string | undefined; | ||
constructor(data?: IBaseAuditableEntity) { | ||
super(data); | ||
} | ||
init(_data?: any) { | ||
super.init(_data); | ||
if (_data) { | ||
this.created = _data["created"] ? new Date(_data["created"].toString()) : <any>undefined; | ||
this.createdBy = _data["createdBy"]; | ||
this.lastModified = _data["lastModified"] ? new Date(_data["lastModified"].toString()) : <any>undefined; | ||
this.lastModifiedBy = _data["lastModifiedBy"]; | ||
} | ||
} | ||
static fromJS(data: any): BaseAuditableEntity { | ||
data = typeof data === 'object' ? data : {}; | ||
throw new Error("The abstract class 'BaseAuditableEntity' cannot be instantiated."); | ||
} | ||
toJSON(data?: any) { | ||
data = typeof data === 'object' ? data : {}; | ||
data["created"] = this.created ? this.created.toISOString() : <any>undefined; | ||
data["createdBy"] = this.createdBy; | ||
data["lastModified"] = this.lastModified ? this.lastModified.toISOString() : <any>undefined; | ||
data["lastModifiedBy"] = this.lastModifiedBy; | ||
super.toJSON(data); | ||
return data; | ||
} | ||
} | ||
export interface IBaseAuditableEntity extends IBaseEntity { | ||
created?: Date; | ||
createdBy?: string | undefined; | ||
lastModified?: Date; | ||
lastModifiedBy?: string | undefined; | ||
} | ||
export class MemoryTag extends BaseAuditableEntity implements IMemoryTag { | ||
ownerId?: string; | ||
name?: string; | ||
memories?: Memory[]; | ||
constructor(data?: IMemoryTag) { | ||
super(data); | ||
} | ||
init(_data?: any) { | ||
super.init(_data); | ||
if (_data) { | ||
this.ownerId = _data["ownerId"]; | ||
this.name = _data["name"]; | ||
if (Array.isArray(_data["memories"])) { | ||
this.memories = [] as any; | ||
for (let item of _data["memories"]) | ||
this.memories!.push(Memory.fromJS(item)); | ||
} | ||
} | ||
} | ||
static fromJS(data: any): MemoryTag { | ||
static fromJS(data: any): MemoryTagDto { | ||
data = typeof data === 'object' ? data : {}; | ||
let result = new MemoryTag(); | ||
let result = new MemoryTagDto(); | ||
result.init(data); | ||
@@ -1230,10 +1141,5 @@ return result; | ||
data = typeof data === 'object' ? data : {}; | ||
data["ownerId"] = this.ownerId; | ||
data["id"] = this.id; | ||
data["created"] = this.created ? this.created.toISOString() : <any>undefined; | ||
data["name"] = this.name; | ||
if (Array.isArray(this.memories)) { | ||
data["memories"] = []; | ||
for (let item of this.memories) | ||
data["memories"].push(item.toJSON()); | ||
} | ||
super.toJSON(data); | ||
return data; | ||
@@ -1243,162 +1149,8 @@ } | ||
export interface IMemoryTag extends IBaseAuditableEntity { | ||
ownerId?: string; | ||
export interface IMemoryTagDto { | ||
id?: string; | ||
created?: Date; | ||
name?: string; | ||
memories?: Memory[]; | ||
} | ||
export class Memory extends BaseAuditableEntity implements IMemory { | ||
ownerId?: string; | ||
imageId?: string; | ||
image?: Image; | ||
tags?: MemoryTag[]; | ||
title?: string; | ||
note?: string | undefined; | ||
latitude?: number | undefined; | ||
longitude?: number | undefined; | ||
tastinessScore?: number; | ||
constructor(data?: IMemory) { | ||
super(data); | ||
} | ||
init(_data?: any) { | ||
super.init(_data); | ||
if (_data) { | ||
this.ownerId = _data["ownerId"]; | ||
this.imageId = _data["imageId"]; | ||
this.image = _data["image"] ? Image.fromJS(_data["image"]) : <any>undefined; | ||
if (Array.isArray(_data["tags"])) { | ||
this.tags = [] as any; | ||
for (let item of _data["tags"]) | ||
this.tags!.push(MemoryTag.fromJS(item)); | ||
} | ||
this.title = _data["title"]; | ||
this.note = _data["note"]; | ||
this.latitude = _data["latitude"]; | ||
this.longitude = _data["longitude"]; | ||
this.tastinessScore = _data["tastinessScore"]; | ||
} | ||
} | ||
static fromJS(data: any): Memory { | ||
data = typeof data === 'object' ? data : {}; | ||
let result = new Memory(); | ||
result.init(data); | ||
return result; | ||
} | ||
toJSON(data?: any) { | ||
data = typeof data === 'object' ? data : {}; | ||
data["ownerId"] = this.ownerId; | ||
data["imageId"] = this.imageId; | ||
data["image"] = this.image ? this.image.toJSON() : <any>undefined; | ||
if (Array.isArray(this.tags)) { | ||
data["tags"] = []; | ||
for (let item of this.tags) | ||
data["tags"].push(item.toJSON()); | ||
} | ||
data["title"] = this.title; | ||
data["note"] = this.note; | ||
data["latitude"] = this.latitude; | ||
data["longitude"] = this.longitude; | ||
data["tastinessScore"] = this.tastinessScore; | ||
super.toJSON(data); | ||
return data; | ||
} | ||
} | ||
export interface IMemory extends IBaseAuditableEntity { | ||
ownerId?: string; | ||
imageId?: string; | ||
image?: Image; | ||
tags?: MemoryTag[]; | ||
title?: string; | ||
note?: string | undefined; | ||
latitude?: number | undefined; | ||
longitude?: number | undefined; | ||
tastinessScore?: number; | ||
} | ||
export class Image extends BaseAuditableEntity implements IImage { | ||
ownerId?: string; | ||
url?: string; | ||
type?: ImageTypeEnum; | ||
suggestedTags?: string[] | undefined; | ||
constructor(data?: IImage) { | ||
super(data); | ||
} | ||
init(_data?: any) { | ||
super.init(_data); | ||
if (_data) { | ||
this.ownerId = _data["ownerId"]; | ||
this.url = _data["url"]; | ||
this.type = _data["type"]; | ||
if (Array.isArray(_data["suggestedTags"])) { | ||
this.suggestedTags = [] as any; | ||
for (let item of _data["suggestedTags"]) | ||
this.suggestedTags!.push(item); | ||
} | ||
} | ||
} | ||
static fromJS(data: any): Image { | ||
data = typeof data === 'object' ? data : {}; | ||
let result = new Image(); | ||
result.init(data); | ||
return result; | ||
} | ||
toJSON(data?: any) { | ||
data = typeof data === 'object' ? data : {}; | ||
data["ownerId"] = this.ownerId; | ||
data["url"] = this.url; | ||
data["type"] = this.type; | ||
if (Array.isArray(this.suggestedTags)) { | ||
data["suggestedTags"] = []; | ||
for (let item of this.suggestedTags) | ||
data["suggestedTags"].push(item); | ||
} | ||
super.toJSON(data); | ||
return data; | ||
} | ||
} | ||
export interface IImage extends IBaseAuditableEntity { | ||
ownerId?: string; | ||
url?: string; | ||
type?: ImageTypeEnum; | ||
suggestedTags?: string[] | undefined; | ||
} | ||
export abstract class BaseEvent implements IBaseEvent { | ||
constructor(data?: IBaseEvent) { | ||
if (data) { | ||
for (var property in data) { | ||
if (data.hasOwnProperty(property)) | ||
(<any>this)[property] = (<any>data)[property]; | ||
} | ||
} | ||
} | ||
init(_data?: any) { | ||
} | ||
static fromJS(data: any): BaseEvent { | ||
data = typeof data === 'object' ? data : {}; | ||
throw new Error("The abstract class 'BaseEvent' cannot be instantiated."); | ||
} | ||
toJSON(data?: any) { | ||
data = typeof data === 'object' ? data : {}; | ||
return data; | ||
} | ||
} | ||
export interface IBaseEvent { | ||
} | ||
export class PaginatedListOfMemoryDto implements IPaginatedListOfMemoryDto { | ||
@@ -1532,46 +1284,2 @@ items?: MemoryDto[]; | ||
export class MemoryTagDto implements IMemoryTagDto { | ||
id?: string; | ||
created?: Date; | ||
name?: string; | ||
constructor(data?: IMemoryTagDto) { | ||
if (data) { | ||
for (var property in data) { | ||
if (data.hasOwnProperty(property)) | ||
(<any>this)[property] = (<any>data)[property]; | ||
} | ||
} | ||
} | ||
init(_data?: any) { | ||
if (_data) { | ||
this.id = _data["id"]; | ||
this.created = _data["created"] ? new Date(_data["created"].toString()) : <any>undefined; | ||
this.name = _data["name"]; | ||
} | ||
} | ||
static fromJS(data: any): MemoryTagDto { | ||
data = typeof data === 'object' ? data : {}; | ||
let result = new MemoryTagDto(); | ||
result.init(data); | ||
return result; | ||
} | ||
toJSON(data?: any) { | ||
data = typeof data === 'object' ? data : {}; | ||
data["id"] = this.id; | ||
data["created"] = this.created ? this.created.toISOString() : <any>undefined; | ||
data["name"] = this.name; | ||
return data; | ||
} | ||
} | ||
export interface IMemoryTagDto { | ||
id?: string; | ||
created?: Date; | ||
name?: string; | ||
} | ||
export class PaginatedListOfTodoItemBriefDto implements IPaginatedListOfTodoItemBriefDto { | ||
@@ -1578,0 +1286,0 @@ items?: TodoItemBriefDto[]; |
{ | ||
"name": "gastromemories-api-client", | ||
"version": "1.0.22", | ||
"version": "1.0.23", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
122436
3126