@edifice.io/alloregion-client-rest-rn 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dtos/index.d.ts +0 -1
- package/dtos/index.js +0 -1
- package/dtos/index.js.map +1 -1
- package/dtos/request.dto.d.ts +2 -0
- package/dtos/request.dto.js +18 -0
- package/dtos/request.dto.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.browser.tsbuildinfo +1 -1
- package/utils/request.utils.js +1 -1
- package/dtos/base.dto.d.ts +0 -19
- package/dtos/base.dto.js +0 -89
- package/dtos/base.dto.js.map +0 -1
package/utils/request.utils.js
CHANGED
|
@@ -3,7 +3,7 @@ export const REQUEST_CONSTRAINTS = {
|
|
|
3
3
|
descriptionMaxLength: 255,
|
|
4
4
|
locationMaxLength: 50,
|
|
5
5
|
maxPhotos: 3,
|
|
6
|
-
maxPhotoBytes:
|
|
6
|
+
maxPhotoBytes: 2 * 1024 * 1024,
|
|
7
7
|
photoMimeTypes: ["image/jpeg", "image/png", "image/webp"],
|
|
8
8
|
};
|
|
9
9
|
export const REQUEST_CATEGORIES = [
|
package/dtos/base.dto.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare enum SortDirection {
|
|
2
|
-
ASC = "ASC",
|
|
3
|
-
DESC = "DESC"
|
|
4
|
-
}
|
|
5
|
-
export declare class PaginationQueryDto {
|
|
6
|
-
page?: number;
|
|
7
|
-
size?: number;
|
|
8
|
-
}
|
|
9
|
-
export declare class PageMetadataDto {
|
|
10
|
-
totalItems: number;
|
|
11
|
-
itemCount: number;
|
|
12
|
-
itemsPerPage: number;
|
|
13
|
-
totalPages: number;
|
|
14
|
-
currentPage: number;
|
|
15
|
-
}
|
|
16
|
-
export declare class PaginatedListDto<T> {
|
|
17
|
-
items: T[];
|
|
18
|
-
meta: PageMetadataDto;
|
|
19
|
-
}
|
package/dtos/base.dto.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { ApiProperty, Type } from "@edifice.io/rest-client-base/react-native";
|
|
11
|
-
import { IsInt, IsOptional, Min, Max } from "class-validator";
|
|
12
|
-
export var SortDirection;
|
|
13
|
-
(function (SortDirection) {
|
|
14
|
-
SortDirection["ASC"] = "ASC";
|
|
15
|
-
SortDirection["DESC"] = "DESC";
|
|
16
|
-
})(SortDirection || (SortDirection = {}));
|
|
17
|
-
export class PaginationQueryDto {
|
|
18
|
-
page = 1;
|
|
19
|
-
size = 20;
|
|
20
|
-
}
|
|
21
|
-
__decorate([
|
|
22
|
-
ApiProperty({
|
|
23
|
-
description: "Page number (one-indexed)",
|
|
24
|
-
default: 1,
|
|
25
|
-
required: false,
|
|
26
|
-
}),
|
|
27
|
-
IsOptional(),
|
|
28
|
-
Type(() => Number),
|
|
29
|
-
IsInt(),
|
|
30
|
-
Min(1),
|
|
31
|
-
__metadata("design:type", Number)
|
|
32
|
-
], PaginationQueryDto.prototype, "page", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
ApiProperty({
|
|
35
|
-
description: "Number of items per page",
|
|
36
|
-
default: 20,
|
|
37
|
-
required: false,
|
|
38
|
-
}),
|
|
39
|
-
IsOptional(),
|
|
40
|
-
Type(() => Number),
|
|
41
|
-
IsInt(),
|
|
42
|
-
Min(1),
|
|
43
|
-
Max(100),
|
|
44
|
-
__metadata("design:type", Number)
|
|
45
|
-
], PaginationQueryDto.prototype, "size", void 0);
|
|
46
|
-
export class PageMetadataDto {
|
|
47
|
-
totalItems;
|
|
48
|
-
itemCount;
|
|
49
|
-
itemsPerPage;
|
|
50
|
-
totalPages;
|
|
51
|
-
currentPage;
|
|
52
|
-
}
|
|
53
|
-
__decorate([
|
|
54
|
-
ApiProperty(),
|
|
55
|
-
__metadata("design:type", Number)
|
|
56
|
-
], PageMetadataDto.prototype, "totalItems", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
ApiProperty(),
|
|
59
|
-
__metadata("design:type", Number)
|
|
60
|
-
], PageMetadataDto.prototype, "itemCount", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
ApiProperty(),
|
|
63
|
-
__metadata("design:type", Number)
|
|
64
|
-
], PageMetadataDto.prototype, "itemsPerPage", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
ApiProperty(),
|
|
67
|
-
__metadata("design:type", Number)
|
|
68
|
-
], PageMetadataDto.prototype, "totalPages", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
ApiProperty(),
|
|
71
|
-
__metadata("design:type", Number)
|
|
72
|
-
], PageMetadataDto.prototype, "currentPage", void 0);
|
|
73
|
-
export class PaginatedListDto {
|
|
74
|
-
items;
|
|
75
|
-
meta;
|
|
76
|
-
}
|
|
77
|
-
__decorate([
|
|
78
|
-
ApiProperty({
|
|
79
|
-
isArray: true,
|
|
80
|
-
}),
|
|
81
|
-
__metadata("design:type", Array)
|
|
82
|
-
], PaginatedListDto.prototype, "items", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
ApiProperty({
|
|
85
|
-
description: "Metadata about the pagination",
|
|
86
|
-
}),
|
|
87
|
-
__metadata("design:type", PageMetadataDto)
|
|
88
|
-
], PaginatedListDto.prototype, "meta", void 0);
|
|
89
|
-
//# sourceMappingURL=base.dto.js.map
|
package/dtos/base.dto.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.dto.js","sourceRoot":"","sources":["../../../src/dtos/base.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAE9D,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,4BAAW,CAAA;IACX,8BAAa,CAAA;AACf,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AAED,MAAM,OAAO,kBAAkB;IAU7B,IAAI,GAAY,CAAC,CAAC;IAYlB,IAAI,GAAY,EAAE,CAAC;CACpB;AAbC;IATC,WAAW,CAAC;QACX,WAAW,EAAE,2BAA2B;QACxC,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,UAAU,EAAE;IACZ,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,KAAK,EAAE;IACP,GAAG,CAAC,CAAC,CAAC;;gDACW;AAYlB;IAVC,WAAW,CAAC;QACX,WAAW,EAAE,0BAA0B;QACvC,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,UAAU,EAAE;IACZ,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,KAAK,EAAE;IACP,GAAG,CAAC,CAAC,CAAC;IACN,GAAG,CAAC,GAAG,CAAC;;gDACU;AAGrB,MAAM,OAAO,eAAe;IAE1B,UAAU,CAAS;IAGnB,SAAS,CAAS;IAGlB,YAAY,CAAS;IAGrB,UAAU,CAAS;IAGnB,WAAW,CAAS;CACrB;AAbC;IADC,WAAW,EAAE;;mDACK;AAGnB;IADC,WAAW,EAAE;;kDACI;AAGlB;IADC,WAAW,EAAE;;qDACO;AAGrB;IADC,WAAW,EAAE;;mDACK;AAGnB;IADC,WAAW,EAAE;;oDACM;AAGtB,MAAM,OAAO,gBAAgB;IAI3B,KAAK,CAAM;IAKX,IAAI,CAAkB;CACvB;AANC;IAHC,WAAW,CAAC;QACX,OAAO,EAAE,IAAI;KACd,CAAC;;+CACS;AAKX;IAHC,WAAW,CAAC;QACX,WAAW,EAAE,+BAA+B;KAC7C,CAAC;8BACI,eAAe;8CAAC"}
|