gastromemories-api-client
Advanced tools
Comparing version 1.0.23 to 1.0.24
@@ -26,3 +26,3 @@ export declare class ImagesClient { | ||
protected processCreateMemory(response: Response): Promise<string>; | ||
getMemoriesWithPagination(pageNumber: number, pageSize: number, tags?: string[] | null | undefined, search?: string | null | undefined, year?: string | null | undefined, month?: string | null | undefined, xMin?: number | null | undefined, xMax?: number | null | undefined, yMin?: number | null | undefined, yMax?: number | null | undefined): Promise<PaginatedListOfMemoryDto>; | ||
getMemoriesWithPagination(query: GetMemoriesWithPaginationQuery): Promise<PaginatedListOfMemoryDto>; | ||
protected processGetMemoriesWithPagination(response: Response): Promise<PaginatedListOfMemoryDto>; | ||
@@ -236,2 +236,40 @@ updateMemory(id: string, command: UpdateMemoryCommand): Promise<void>; | ||
} | ||
export declare class GetMemoriesWithPaginationQuery implements IGetMemoriesWithPaginationQuery { | ||
pageNumber?: number; | ||
pageSize?: number; | ||
filters?: GetMemoriesWithPaginationFilters; | ||
constructor(data?: IGetMemoriesWithPaginationQuery); | ||
init(_data?: any): void; | ||
static fromJS(data: any): GetMemoriesWithPaginationQuery; | ||
toJSON(data?: any): any; | ||
} | ||
export interface IGetMemoriesWithPaginationQuery { | ||
pageNumber?: number; | ||
pageSize?: number; | ||
filters?: GetMemoriesWithPaginationFilters; | ||
} | ||
export declare class GetMemoriesWithPaginationFilters implements IGetMemoriesWithPaginationFilters { | ||
tags?: string[] | undefined; | ||
search?: string | undefined; | ||
year?: string | undefined; | ||
month?: string | undefined; | ||
xMin?: number | undefined; | ||
xMax?: number | undefined; | ||
yMin?: number | undefined; | ||
yMax?: number | undefined; | ||
constructor(data?: IGetMemoriesWithPaginationFilters); | ||
init(_data?: any): void; | ||
static fromJS(data: any): GetMemoriesWithPaginationFilters; | ||
toJSON(data?: any): any; | ||
} | ||
export interface IGetMemoriesWithPaginationFilters { | ||
tags?: string[] | undefined; | ||
search?: string | undefined; | ||
year?: string | undefined; | ||
month?: string | undefined; | ||
xMin?: number | undefined; | ||
xMax?: number | undefined; | ||
yMin?: number | undefined; | ||
yMax?: number | undefined; | ||
} | ||
export declare class PaginatedListOfMemoryTagDto implements IPaginatedListOfMemoryTagDto { | ||
@@ -238,0 +276,0 @@ items?: MemoryTagDto[]; |
@@ -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.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; | ||
exports.ApiException = exports.PriorityLevel = exports.UpdateTodoItemDetailCommand = exports.UpdateTodoItemCommand = exports.CreateTodoItemCommand = exports.TodoItemBriefDto = exports.PaginatedListOfTodoItemBriefDto = exports.PaginatedListOfMemoryTagDto = exports.GetMemoriesWithPaginationFilters = exports.GetMemoriesWithPaginationQuery = 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 */ | ||
@@ -237,33 +237,12 @@ /* eslint-disable */ | ||
}; | ||
MemoriesClient.prototype.getMemoriesWithPagination = function (pageNumber, pageSize, tags, search, year, month, xMin, xMax, yMin, yMax) { | ||
MemoriesClient.prototype.getMemoriesWithPagination = function (query) { | ||
var _this = this; | ||
var url_ = this.baseUrl + "/api/Memories?"; | ||
if (pageNumber === undefined || pageNumber === null) | ||
throw new Error("The parameter 'pageNumber' must be defined and cannot be null."); | ||
else | ||
url_ += "PageNumber=" + encodeURIComponent("" + pageNumber) + "&"; | ||
if (pageSize === undefined || pageSize === null) | ||
throw new Error("The parameter 'pageSize' must be defined and cannot be null."); | ||
else | ||
url_ += "PageSize=" + encodeURIComponent("" + pageSize) + "&"; | ||
if (tags !== undefined && tags !== null) | ||
tags && tags.forEach(function (item) { url_ += "Tags=" + encodeURIComponent("" + item) + "&"; }); | ||
if (search !== undefined && search !== null) | ||
url_ += "Search=" + encodeURIComponent("" + search) + "&"; | ||
if (year !== undefined && year !== null) | ||
url_ += "Year=" + encodeURIComponent("" + year) + "&"; | ||
if (month !== undefined && month !== null) | ||
url_ += "Month=" + encodeURIComponent("" + month) + "&"; | ||
if (xMin !== undefined && xMin !== null) | ||
url_ += "XMin=" + encodeURIComponent("" + xMin) + "&"; | ||
if (xMax !== undefined && xMax !== null) | ||
url_ += "XMax=" + encodeURIComponent("" + xMax) + "&"; | ||
if (yMin !== undefined && yMin !== null) | ||
url_ += "YMin=" + encodeURIComponent("" + yMin) + "&"; | ||
if (yMax !== undefined && yMax !== null) | ||
url_ += "YMax=" + encodeURIComponent("" + yMax) + "&"; | ||
var url_ = this.baseUrl + "/api/Memories"; | ||
url_ = url_.replace(/[?&]$/, ""); | ||
var content_ = JSON.stringify(query); | ||
var options_ = { | ||
body: content_, | ||
method: "GET", | ||
headers: { | ||
"Content-Type": "application/json", | ||
"Accept": "application/json" | ||
@@ -1127,2 +1106,88 @@ } | ||
exports.PaginatedListOfMemoryDto = PaginatedListOfMemoryDto; | ||
var GetMemoriesWithPaginationQuery = /** @class */ (function () { | ||
function GetMemoriesWithPaginationQuery(data) { | ||
if (data) { | ||
for (var property in data) { | ||
if (data.hasOwnProperty(property)) | ||
this[property] = data[property]; | ||
} | ||
} | ||
} | ||
GetMemoriesWithPaginationQuery.prototype.init = function (_data) { | ||
if (_data) { | ||
this.pageNumber = _data["pageNumber"]; | ||
this.pageSize = _data["pageSize"]; | ||
this.filters = _data["filters"] ? GetMemoriesWithPaginationFilters.fromJS(_data["filters"]) : undefined; | ||
} | ||
}; | ||
GetMemoriesWithPaginationQuery.fromJS = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
var result = new GetMemoriesWithPaginationQuery(); | ||
result.init(data); | ||
return result; | ||
}; | ||
GetMemoriesWithPaginationQuery.prototype.toJSON = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
data["pageNumber"] = this.pageNumber; | ||
data["pageSize"] = this.pageSize; | ||
data["filters"] = this.filters ? this.filters.toJSON() : undefined; | ||
return data; | ||
}; | ||
return GetMemoriesWithPaginationQuery; | ||
}()); | ||
exports.GetMemoriesWithPaginationQuery = GetMemoriesWithPaginationQuery; | ||
var GetMemoriesWithPaginationFilters = /** @class */ (function () { | ||
function GetMemoriesWithPaginationFilters(data) { | ||
if (data) { | ||
for (var property in data) { | ||
if (data.hasOwnProperty(property)) | ||
this[property] = data[property]; | ||
} | ||
} | ||
} | ||
GetMemoriesWithPaginationFilters.prototype.init = function (_data) { | ||
if (_data) { | ||
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(item); | ||
} | ||
} | ||
this.search = _data["search"]; | ||
this.year = _data["year"]; | ||
this.month = _data["month"]; | ||
this.xMin = _data["xMin"]; | ||
this.xMax = _data["xMax"]; | ||
this.yMin = _data["yMin"]; | ||
this.yMax = _data["yMax"]; | ||
} | ||
}; | ||
GetMemoriesWithPaginationFilters.fromJS = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
var result = new GetMemoriesWithPaginationFilters(); | ||
result.init(data); | ||
return result; | ||
}; | ||
GetMemoriesWithPaginationFilters.prototype.toJSON = function (data) { | ||
data = typeof data === 'object' ? data : {}; | ||
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); | ||
} | ||
} | ||
data["search"] = this.search; | ||
data["year"] = this.year; | ||
data["month"] = this.month; | ||
data["xMin"] = this.xMin; | ||
data["xMax"] = this.xMax; | ||
data["yMin"] = this.yMin; | ||
data["yMax"] = this.yMax; | ||
return data; | ||
}; | ||
return GetMemoriesWithPaginationFilters; | ||
}()); | ||
exports.GetMemoriesWithPaginationFilters = GetMemoriesWithPaginationFilters; | ||
var PaginatedListOfMemoryTagDto = /** @class */ (function () { | ||
@@ -1129,0 +1194,0 @@ function PaginatedListOfMemoryTagDto(data) { |
148
index.ts
@@ -217,33 +217,13 @@ //---------------------- | ||
getMemoriesWithPagination(pageNumber: number, pageSize: number, tags?: string[] | null | undefined, search?: string | null | undefined, year?: string | null | undefined, month?: string | null | undefined, xMin?: number | null | undefined, xMax?: number | null | undefined, yMin?: number | null | undefined, yMax?: number | null | undefined): Promise<PaginatedListOfMemoryDto> { | ||
let url_ = this.baseUrl + "/api/Memories?"; | ||
if (pageNumber === undefined || pageNumber === null) | ||
throw new Error("The parameter 'pageNumber' must be defined and cannot be null."); | ||
else | ||
url_ += "PageNumber=" + encodeURIComponent("" + pageNumber) + "&"; | ||
if (pageSize === undefined || pageSize === null) | ||
throw new Error("The parameter 'pageSize' must be defined and cannot be null."); | ||
else | ||
url_ += "PageSize=" + encodeURIComponent("" + pageSize) + "&"; | ||
if (tags !== undefined && tags !== null) | ||
tags && tags.forEach(item => { url_ += "Tags=" + encodeURIComponent("" + item) + "&"; }); | ||
if (search !== undefined && search !== null) | ||
url_ += "Search=" + encodeURIComponent("" + search) + "&"; | ||
if (year !== undefined && year !== null) | ||
url_ += "Year=" + encodeURIComponent("" + year) + "&"; | ||
if (month !== undefined && month !== null) | ||
url_ += "Month=" + encodeURIComponent("" + month) + "&"; | ||
if (xMin !== undefined && xMin !== null) | ||
url_ += "XMin=" + encodeURIComponent("" + xMin) + "&"; | ||
if (xMax !== undefined && xMax !== null) | ||
url_ += "XMax=" + encodeURIComponent("" + xMax) + "&"; | ||
if (yMin !== undefined && yMin !== null) | ||
url_ += "YMin=" + encodeURIComponent("" + yMin) + "&"; | ||
if (yMax !== undefined && yMax !== null) | ||
url_ += "YMax=" + encodeURIComponent("" + yMax) + "&"; | ||
getMemoriesWithPagination(query: GetMemoriesWithPaginationQuery): Promise<PaginatedListOfMemoryDto> { | ||
let url_ = this.baseUrl + "/api/Memories"; | ||
url_ = url_.replace(/[?&]$/, ""); | ||
const content_ = JSON.stringify(query); | ||
let options_: RequestInit = { | ||
body: content_, | ||
method: "GET", | ||
headers: { | ||
"Content-Type": "application/json", | ||
"Accept": "application/json" | ||
@@ -1214,2 +1194,118 @@ } | ||
export class GetMemoriesWithPaginationQuery implements IGetMemoriesWithPaginationQuery { | ||
pageNumber?: number; | ||
pageSize?: number; | ||
filters?: GetMemoriesWithPaginationFilters; | ||
constructor(data?: IGetMemoriesWithPaginationQuery) { | ||
if (data) { | ||
for (var property in data) { | ||
if (data.hasOwnProperty(property)) | ||
(<any>this)[property] = (<any>data)[property]; | ||
} | ||
} | ||
} | ||
init(_data?: any) { | ||
if (_data) { | ||
this.pageNumber = _data["pageNumber"]; | ||
this.pageSize = _data["pageSize"]; | ||
this.filters = _data["filters"] ? GetMemoriesWithPaginationFilters.fromJS(_data["filters"]) : <any>undefined; | ||
} | ||
} | ||
static fromJS(data: any): GetMemoriesWithPaginationQuery { | ||
data = typeof data === 'object' ? data : {}; | ||
let result = new GetMemoriesWithPaginationQuery(); | ||
result.init(data); | ||
return result; | ||
} | ||
toJSON(data?: any) { | ||
data = typeof data === 'object' ? data : {}; | ||
data["pageNumber"] = this.pageNumber; | ||
data["pageSize"] = this.pageSize; | ||
data["filters"] = this.filters ? this.filters.toJSON() : <any>undefined; | ||
return data; | ||
} | ||
} | ||
export interface IGetMemoriesWithPaginationQuery { | ||
pageNumber?: number; | ||
pageSize?: number; | ||
filters?: GetMemoriesWithPaginationFilters; | ||
} | ||
export class GetMemoriesWithPaginationFilters implements IGetMemoriesWithPaginationFilters { | ||
tags?: string[] | undefined; | ||
search?: string | undefined; | ||
year?: string | undefined; | ||
month?: string | undefined; | ||
xMin?: number | undefined; | ||
xMax?: number | undefined; | ||
yMin?: number | undefined; | ||
yMax?: number | undefined; | ||
constructor(data?: IGetMemoriesWithPaginationFilters) { | ||
if (data) { | ||
for (var property in data) { | ||
if (data.hasOwnProperty(property)) | ||
(<any>this)[property] = (<any>data)[property]; | ||
} | ||
} | ||
} | ||
init(_data?: any) { | ||
if (_data) { | ||
if (Array.isArray(_data["tags"])) { | ||
this.tags = [] as any; | ||
for (let item of _data["tags"]) | ||
this.tags!.push(item); | ||
} | ||
this.search = _data["search"]; | ||
this.year = _data["year"]; | ||
this.month = _data["month"]; | ||
this.xMin = _data["xMin"]; | ||
this.xMax = _data["xMax"]; | ||
this.yMin = _data["yMin"]; | ||
this.yMax = _data["yMax"]; | ||
} | ||
} | ||
static fromJS(data: any): GetMemoriesWithPaginationFilters { | ||
data = typeof data === 'object' ? data : {}; | ||
let result = new GetMemoriesWithPaginationFilters(); | ||
result.init(data); | ||
return result; | ||
} | ||
toJSON(data?: any) { | ||
data = typeof data === 'object' ? data : {}; | ||
if (Array.isArray(this.tags)) { | ||
data["tags"] = []; | ||
for (let item of this.tags) | ||
data["tags"].push(item); | ||
} | ||
data["search"] = this.search; | ||
data["year"] = this.year; | ||
data["month"] = this.month; | ||
data["xMin"] = this.xMin; | ||
data["xMax"] = this.xMax; | ||
data["yMin"] = this.yMin; | ||
data["yMax"] = this.yMax; | ||
return data; | ||
} | ||
} | ||
export interface IGetMemoriesWithPaginationFilters { | ||
tags?: string[] | undefined; | ||
search?: string | undefined; | ||
year?: string | undefined; | ||
month?: string | undefined; | ||
xMin?: number | undefined; | ||
xMax?: number | undefined; | ||
yMin?: number | undefined; | ||
yMax?: number | undefined; | ||
} | ||
export class PaginatedListOfMemoryTagDto implements IPaginatedListOfMemoryTagDto { | ||
@@ -1216,0 +1312,0 @@ items?: MemoryTagDto[]; |
{ | ||
"name": "gastromemories-api-client", | ||
"version": "1.0.23", | ||
"version": "1.0.24", | ||
"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
127481
3310