@edifice.io/alloregion-client-rest 0.0.0-stage → 0.1.0-develop.0.20261104180241

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.
Files changed (76) hide show
  1. package/dist/browser/clients/index.d.ts +1 -0
  2. package/dist/browser/clients/index.js +2 -0
  3. package/dist/browser/clients/index.js.map +1 -0
  4. package/dist/browser/dtos/base.dto.d.ts +19 -0
  5. package/dist/browser/dtos/base.dto.js +89 -0
  6. package/dist/browser/dtos/base.dto.js.map +1 -0
  7. package/dist/browser/dtos/index.d.ts +2 -0
  8. package/dist/browser/dtos/index.js +3 -0
  9. package/dist/browser/dtos/index.js.map +1 -0
  10. package/dist/browser/dtos/request.dto.d.ts +26 -0
  11. package/dist/browser/dtos/request.dto.js +157 -0
  12. package/dist/browser/dtos/request.dto.js.map +1 -0
  13. package/dist/browser/index.d.ts +3 -0
  14. package/dist/browser/index.js +4 -0
  15. package/dist/browser/index.js.map +1 -0
  16. package/dist/browser/utils/index.d.ts +2 -0
  17. package/dist/browser/utils/index.js +3 -0
  18. package/dist/browser/utils/index.js.map +1 -0
  19. package/dist/browser/utils/request.utils.d.ts +9 -0
  20. package/dist/browser/utils/request.utils.js +19 -0
  21. package/dist/browser/utils/request.utils.js.map +1 -0
  22. package/dist/browser/utils/rights.utils.d.ts +3 -0
  23. package/dist/browser/utils/rights.utils.js +4 -0
  24. package/dist/browser/utils/rights.utils.js.map +1 -0
  25. package/dist/node/clients/index.d.ts +1 -0
  26. package/dist/node/clients/index.js +3 -0
  27. package/dist/node/clients/index.js.map +1 -0
  28. package/dist/node/dtos/base.dto.d.ts +19 -0
  29. package/dist/node/dtos/base.dto.js +95 -0
  30. package/dist/node/dtos/base.dto.js.map +1 -0
  31. package/dist/node/dtos/index.d.ts +2 -0
  32. package/dist/node/dtos/index.js +19 -0
  33. package/dist/node/dtos/index.js.map +1 -0
  34. package/dist/node/dtos/request.dto.d.ts +26 -0
  35. package/dist/node/dtos/request.dto.js +165 -0
  36. package/dist/node/dtos/request.dto.js.map +1 -0
  37. package/dist/node/index.d.ts +3 -0
  38. package/dist/node/index.js +24 -0
  39. package/dist/node/index.js.map +1 -0
  40. package/dist/node/utils/index.d.ts +2 -0
  41. package/dist/node/utils/index.js +19 -0
  42. package/dist/node/utils/index.js.map +1 -0
  43. package/dist/node/utils/request.utils.d.ts +9 -0
  44. package/dist/node/utils/request.utils.js +22 -0
  45. package/dist/node/utils/request.utils.js.map +1 -0
  46. package/dist/node/utils/rights.utils.d.ts +3 -0
  47. package/dist/node/utils/rights.utils.js +7 -0
  48. package/dist/node/utils/rights.utils.js.map +1 -0
  49. package/dist/react-native/clients/index.d.ts +1 -0
  50. package/dist/react-native/clients/index.js +2 -0
  51. package/dist/react-native/clients/index.js.map +1 -0
  52. package/dist/react-native/dtos/base.dto.d.ts +19 -0
  53. package/dist/react-native/dtos/base.dto.js +89 -0
  54. package/dist/react-native/dtos/base.dto.js.map +1 -0
  55. package/dist/react-native/dtos/index.d.ts +2 -0
  56. package/dist/react-native/dtos/index.js +3 -0
  57. package/dist/react-native/dtos/index.js.map +1 -0
  58. package/dist/react-native/dtos/request.dto.d.ts +26 -0
  59. package/dist/react-native/dtos/request.dto.js +157 -0
  60. package/dist/react-native/dtos/request.dto.js.map +1 -0
  61. package/dist/react-native/index.d.ts +3 -0
  62. package/dist/react-native/index.js +4 -0
  63. package/dist/react-native/index.js.map +1 -0
  64. package/dist/react-native/package.json +15 -0
  65. package/dist/react-native/utils/index.d.ts +2 -0
  66. package/dist/react-native/utils/index.js +3 -0
  67. package/dist/react-native/utils/index.js.map +1 -0
  68. package/dist/react-native/utils/request.utils.d.ts +9 -0
  69. package/dist/react-native/utils/request.utils.js +19 -0
  70. package/dist/react-native/utils/request.utils.js.map +1 -0
  71. package/dist/react-native/utils/rights.utils.d.ts +3 -0
  72. package/dist/react-native/utils/rights.utils.js +4 -0
  73. package/dist/react-native/utils/rights.utils.js.map +1 -0
  74. package/package.json +71 -4
  75. package/package.json.rn +15 -0
  76. package/README.md +0 -3
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
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
+ }
@@ -0,0 +1,89 @@
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/browser";
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.dto.js","sourceRoot":"","sources":["../../../src/d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AAI,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"}
@@ -0,0 +1,2 @@
1
+ export * from "./base.dto";
2
+ export * from "./request.dto";
@@ -0,0 +1,3 @@
1
+ export * from "./base.dto";
2
+ export * from "./request.dto";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dtos/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { type RequestCategory } from "../utils/request.utils";
2
+ export declare class CreateRequestDto {
3
+ category: RequestCategory;
4
+ title: string;
5
+ description?: string;
6
+ }
7
+ export declare class CreateRequestFormDto extends CreateRequestDto {
8
+ photos?: unknown[];
9
+ }
10
+ export declare class RequestCreatedDto {
11
+ id: number;
12
+ }
13
+ export declare class UserRequestDto {
14
+ id: number;
15
+ createdAt: string;
16
+ title: string;
17
+ status: string | null;
18
+ followUp: string | null;
19
+ }
20
+ export declare class UserRequestDetailDto extends UserRequestDto {
21
+ theme: string | null;
22
+ description: string | null;
23
+ processingStartedAt: string | null;
24
+ closedAt: string | null;
25
+ photos: string[];
26
+ }
@@ -0,0 +1,157 @@
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 } from "@edifice.io/rest-client-base/browser";
11
+ import { Transform } from "class-transformer";
12
+ import { IsIn, IsOptional, IsString, Matches, MaxLength, } from "class-validator";
13
+ import { REQUEST_CATEGORIES, REQUEST_CONSTRAINTS, } from "../utils/request.utils";
14
+ const NOT_BLANK = /\S/;
15
+ export class CreateRequestDto {
16
+ category;
17
+ title;
18
+ description;
19
+ }
20
+ __decorate([
21
+ ApiProperty({
22
+ description: "What the request is about (provisional list)",
23
+ enum: REQUEST_CATEGORIES,
24
+ }),
25
+ IsIn(REQUEST_CATEGORIES),
26
+ __metadata("design:type", String)
27
+ ], CreateRequestDto.prototype, "category", void 0);
28
+ __decorate([
29
+ ApiProperty({
30
+ description: "Title of the request",
31
+ maxLength: REQUEST_CONSTRAINTS.titleMaxLength,
32
+ }),
33
+ IsString(),
34
+ Matches(NOT_BLANK),
35
+ MaxLength(REQUEST_CONSTRAINTS.titleMaxLength),
36
+ __metadata("design:type", String)
37
+ ], CreateRequestDto.prototype, "title", void 0);
38
+ __decorate([
39
+ ApiProperty({
40
+ description: "Detail of the request, as plain text",
41
+ maxLength: REQUEST_CONSTRAINTS.descriptionMaxLength,
42
+ required: false,
43
+ }),
44
+ Transform(({ value }) => typeof value === "string" ? value.replace(/\r\n/g, "\n") : value),
45
+ IsOptional(),
46
+ IsString(),
47
+ MaxLength(REQUEST_CONSTRAINTS.descriptionMaxLength),
48
+ __metadata("design:type", String)
49
+ ], CreateRequestDto.prototype, "description", void 0);
50
+ export class CreateRequestFormDto extends CreateRequestDto {
51
+ photos;
52
+ }
53
+ __decorate([
54
+ ApiProperty({
55
+ description: "Photos of the request (JPEG, PNG or WebP)",
56
+ type: "array",
57
+ items: { type: "string", format: "binary" },
58
+ required: false,
59
+ }),
60
+ __metadata("design:type", Array)
61
+ ], CreateRequestFormDto.prototype, "photos", void 0);
62
+ export class RequestCreatedDto {
63
+ id;
64
+ }
65
+ __decorate([
66
+ ApiProperty({ description: "Id of the request in the Region's service" }),
67
+ __metadata("design:type", Number)
68
+ ], RequestCreatedDto.prototype, "id", void 0);
69
+ export class UserRequestDto {
70
+ id;
71
+ createdAt;
72
+ title;
73
+ status;
74
+ followUp;
75
+ }
76
+ __decorate([
77
+ ApiProperty({ description: "Id of the request in the Region's service" }),
78
+ __metadata("design:type", Number)
79
+ ], UserRequestDto.prototype, "id", void 0);
80
+ __decorate([
81
+ ApiProperty({
82
+ description: "Date the request was sent",
83
+ type: String,
84
+ format: "date-time",
85
+ }),
86
+ __metadata("design:type", String)
87
+ ], UserRequestDto.prototype, "createdAt", void 0);
88
+ __decorate([
89
+ ApiProperty({ description: "Title of the request" }),
90
+ __metadata("design:type", String)
91
+ ], UserRequestDto.prototype, "title", void 0);
92
+ __decorate([
93
+ ApiProperty({
94
+ description: "Status given by the Region's service: « Demande déposée », « Demande en cours d'instruction » or « Demande clôturée »",
95
+ type: String,
96
+ nullable: true,
97
+ }),
98
+ __metadata("design:type", Object)
99
+ ], UserRequestDto.prototype, "status", void 0);
100
+ __decorate([
101
+ ApiProperty({
102
+ description: "Follow-up the Region gave to the request: « Acceptée », « Refusée » or « Ne concerne pas la collectivité »",
103
+ type: String,
104
+ nullable: true,
105
+ }),
106
+ __metadata("design:type", Object)
107
+ ], UserRequestDto.prototype, "followUp", void 0);
108
+ export class UserRequestDetailDto extends UserRequestDto {
109
+ theme;
110
+ description;
111
+ processingStartedAt;
112
+ closedAt;
113
+ photos;
114
+ }
115
+ __decorate([
116
+ ApiProperty({
117
+ description: "Theme of the request, as sent to the Region",
118
+ type: String,
119
+ nullable: true,
120
+ }),
121
+ __metadata("design:type", Object)
122
+ ], UserRequestDetailDto.prototype, "theme", void 0);
123
+ __decorate([
124
+ ApiProperty({
125
+ description: "Detail of the request, as plain text",
126
+ type: String,
127
+ nullable: true,
128
+ }),
129
+ __metadata("design:type", Object)
130
+ ], UserRequestDetailDto.prototype, "description", void 0);
131
+ __decorate([
132
+ ApiProperty({
133
+ description: "Date the Region started processing the request",
134
+ type: String,
135
+ format: "date-time",
136
+ nullable: true,
137
+ }),
138
+ __metadata("design:type", Object)
139
+ ], UserRequestDetailDto.prototype, "processingStartedAt", void 0);
140
+ __decorate([
141
+ ApiProperty({
142
+ description: "Date the Region closed the request",
143
+ type: String,
144
+ format: "date-time",
145
+ nullable: true,
146
+ }),
147
+ __metadata("design:type", Object)
148
+ ], UserRequestDetailDto.prototype, "closedAt", void 0);
149
+ __decorate([
150
+ ApiProperty({
151
+ description: "Photos of the request, as data URLs (JPEG, PNG or WebP)",
152
+ type: String,
153
+ isArray: true,
154
+ }),
155
+ __metadata("design:type", Array)
156
+ ], UserRequestDetailDto.prototype, "photos", void 0);
157
+ //# sourceMappingURL=request.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.dto.js","sourceRoot":"","sources":["../../../src/dtos/request.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EACL,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,OAAO,EACP,SAAS,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GAEpB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,SAAS,GAAG,IAAI,CAAC;AAEvB,MAAM,OAAO,gBAAgB;IAM3B,QAAQ,CAAkB;IAS1B,KAAK,CAAS;IAcd,WAAW,CAAU;CACtB;AAxBC;IALC,WAAW,CAAC;QACX,WAAW,EAAE,8CAA8C;QAC3D,IAAI,EAAE,kBAAkB;KACzB,CAAC;IACD,IAAI,CAAC,kBAAkB,CAAC;;kDACC;AAS1B;IAPC,WAAW,CAAC;QACX,WAAW,EAAE,sBAAsB;QACnC,SAAS,EAAE,mBAAmB,CAAC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AAW,CAAC,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;;6CACvC;AAQd;IANC,WAAW,CAAC;QACX,WAAW,EACT,uHAAuH;QACzH,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf,CAAC;;8CACoB;AAQtB;IANC,WAAW,CAAC;QACX,WAAW,EACT,4GAA4G;QAC9G,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf,CAAC;;gDACsB;AAG1B,MAAM,OAAO,oBAAqB,SAAQ,cAAc;IAMtD,KAAK,CAAgB;IAOrB,WAAW,CAAgB;IAQ3B,mBAAmB,CAAgB;IAQnC,QAAQ,CAAgB;IAOxB,MAAM,CAAW;CAClB;AA/BC;IALC,WAAW,CAAC;QACX,WAAW,EAAE,6CAA6C;QAC1D,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf,CAAC;;mDACmB;AAOrB;IALC,WAAW,CAAC;QACX,WAAW,EAAE,sCAAsC;QACnD,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf,CAAC;;yDACyB;AAQ3B;IANC,WAAW,CAAC;QACX,WAAW,EAAE,gDAAgD;QAC7D,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,IAAI;KACf,CAAC;;iEACiC;AAQnC;IANC,WAAW,CAAC;QACX,WAAW,EAAE,oCAAoC;QACjD,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,IAAI;KACf,CAAC;;sDACsB;AAOxB;IALC,WAAW,CAAC;QACX,WAAW,EAAE,yDAAyD;QACtE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,IAAI;KACd,CAAC;;oDACe"}
@@ -0,0 +1,3 @@
1
+ export * from "./clients";
2
+ export * from "./dtos";
3
+ export { REQUEST_CATEGORIES, REQUEST_CONSTRAINTS, WORKFLOW_RIGHTS, type RequestCategory, } from "./utils";
@@ -0,0 +1,4 @@
1
+ export * from "./clients";
2
+ export * from "./dtos";
3
+ export { REQUEST_CATEGORIES, REQUEST_CONSTRAINTS, WORKFLOW_RIGHTS, } from "./utils";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,GAEhB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./request.utils";
2
+ export * from "./rights.utils";
@@ -0,0 +1,3 @@
1
+ export * from "./request.utils";
2
+ export * from "./rights.utils";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const REQUEST_CONSTRAINTS: {
2
+ readonly titleMaxLength: 80;
3
+ readonly descriptionMaxLength: 255;
4
+ readonly maxPhotos: 3;
5
+ readonly maxPhotoBytes: number;
6
+ readonly photoMimeTypes: readonly ["image/jpeg", "image/png", "image/webp"];
7
+ };
8
+ export declare const REQUEST_CATEGORIES: readonly ["catering", "boarding", "heating", "sanitary", "lighting-electricity", "outdoor-areas", "living-environment", "furniture", "digital"];
9
+ export type RequestCategory = (typeof REQUEST_CATEGORIES)[number];
@@ -0,0 +1,19 @@
1
+ export const REQUEST_CONSTRAINTS = {
2
+ titleMaxLength: 80,
3
+ descriptionMaxLength: 255,
4
+ maxPhotos: 3,
5
+ maxPhotoBytes: 5 * 1024 * 1024,
6
+ photoMimeTypes: ["image/jpeg", "image/png", "image/webp"],
7
+ };
8
+ export const REQUEST_CATEGORIES = [
9
+ "catering",
10
+ "boarding",
11
+ "heating",
12
+ "sanitary",
13
+ "lighting-electricity",
14
+ "outdoor-areas",
15
+ "living-environment",
16
+ "furniture",
17
+ "digital",
18
+ ];
19
+ //# sourceMappingURL=request.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.utils.js","sourceRoot":"","sources":["../../../src/utils/request.utils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,cAAc,EAAE,EAAE;IAClB,oBAAoB,EAAE,GAAG;IACzB,SAAS,EAAE,CAAC;IACZ,aAAa,EAAE,CAAC,GAAG,IAAI,GAAG,IAAI;IAC9B,cAAc,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,YAAY,CAAC;CACjD,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,UAAU;IACV,UAAU;IACV,SAAS;IACT,UAAU;IACV,sBAAsB;IACtB,eAAe;IACf,oBAAoB;IACpB,WAAW;IACX,SAAS;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const WORKFLOW_RIGHTS: {
2
+ readonly ALLO_REGION_ACCESS: "alloregion.access";
3
+ };
@@ -0,0 +1,4 @@
1
+ export const WORKFLOW_RIGHTS = {
2
+ ALLO_REGION_ACCESS: "alloregion.access",
3
+ };
4
+ //# sourceMappingURL=rights.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rights.utils.js","sourceRoot":"","sources":["../../../src/utils/rights.utils.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,kBAAkB,EAAE,mBAAmB;CAC/B,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
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
+ }
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ 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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.PaginatedListDto = exports.PageMetadataDto = exports.PaginationQueryDto = exports.SortDirection = void 0;
13
+ const rest_client_base_1 = require("@edifice.io/rest-client-base");
14
+ const class_validator_1 = require("class-validator");
15
+ var SortDirection;
16
+ (function (SortDirection) {
17
+ SortDirection["ASC"] = "ASC";
18
+ SortDirection["DESC"] = "DESC";
19
+ })(SortDirection || (exports.SortDirection = SortDirection = {}));
20
+ class PaginationQueryDto {
21
+ page = 1;
22
+ size = 20;
23
+ }
24
+ exports.PaginationQueryDto = PaginationQueryDto;
25
+ __decorate([
26
+ (0, rest_client_base_1.ApiProperty)({
27
+ description: "Page number (one-indexed)",
28
+ default: 1,
29
+ required: false,
30
+ }),
31
+ (0, class_validator_1.IsOptional)(),
32
+ (0, rest_client_base_1.Type)(() => Number),
33
+ (0, class_validator_1.IsInt)(),
34
+ (0, class_validator_1.Min)(1),
35
+ __metadata("design:type", Number)
36
+ ], PaginationQueryDto.prototype, "page", void 0);
37
+ __decorate([
38
+ (0, rest_client_base_1.ApiProperty)({
39
+ description: "Number of items per page",
40
+ default: 20,
41
+ required: false,
42
+ }),
43
+ (0, class_validator_1.IsOptional)(),
44
+ (0, rest_client_base_1.Type)(() => Number),
45
+ (0, class_validator_1.IsInt)(),
46
+ (0, class_validator_1.Min)(1),
47
+ (0, class_validator_1.Max)(100),
48
+ __metadata("design:type", Number)
49
+ ], PaginationQueryDto.prototype, "size", void 0);
50
+ class PageMetadataDto {
51
+ totalItems;
52
+ itemCount;
53
+ itemsPerPage;
54
+ totalPages;
55
+ currentPage;
56
+ }
57
+ exports.PageMetadataDto = PageMetadataDto;
58
+ __decorate([
59
+ (0, rest_client_base_1.ApiProperty)(),
60
+ __metadata("design:type", Number)
61
+ ], PageMetadataDto.prototype, "totalItems", void 0);
62
+ __decorate([
63
+ (0, rest_client_base_1.ApiProperty)(),
64
+ __metadata("design:type", Number)
65
+ ], PageMetadataDto.prototype, "itemCount", void 0);
66
+ __decorate([
67
+ (0, rest_client_base_1.ApiProperty)(),
68
+ __metadata("design:type", Number)
69
+ ], PageMetadataDto.prototype, "itemsPerPage", void 0);
70
+ __decorate([
71
+ (0, rest_client_base_1.ApiProperty)(),
72
+ __metadata("design:type", Number)
73
+ ], PageMetadataDto.prototype, "totalPages", void 0);
74
+ __decorate([
75
+ (0, rest_client_base_1.ApiProperty)(),
76
+ __metadata("design:type", Number)
77
+ ], PageMetadataDto.prototype, "currentPage", void 0);
78
+ class PaginatedListDto {
79
+ items;
80
+ meta;
81
+ }
82
+ exports.PaginatedListDto = PaginatedListDto;
83
+ __decorate([
84
+ (0, rest_client_base_1.ApiProperty)({
85
+ isArray: true,
86
+ }),
87
+ __metadata("design:type", Array)
88
+ ], PaginatedListDto.prototype, "items", void 0);
89
+ __decorate([
90
+ (0, rest_client_base_1.ApiProperty)({
91
+ description: "Metadata about the pagination",
92
+ }),
93
+ __metadata("design:type", PageMetadataDto)
94
+ ], PaginatedListDto.prototype, "meta", void 0);
95
+ //# sourceMappingURL=base.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.dto.js","sourceRoot":"","sources":["../../../src/dtos/base.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAiE;AACjE,qDAA8D;AAE9D,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,4BAAW,CAAA;IACX,8BAAa,CAAA;AACf,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED,MAAa,kBAAkB;IAU7B,IAAI,GAAY,CAAC,CAAC;IAYlB,IAAI,GAAY,EAAE,CAAC;CACpB;AAvBD,gDAuBC;AAbC;IATC,IAAA,8BAAW,EAAC;QACX,WAAW,EAAE,2BAA2B;QACxC,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAG,EAAC,CAAC,CAAC;;gDACW;AAYlB;IAVC,IAAA,8BAAW,EAAC;QACX,WAAW,EAAE,0BAA0B;QACvC,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAClB,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAG,EAAC,CAAC,CAAC;IACN,IAAA,qBAAG,EAAC,GAAG,CAAC;;gDACU;AAGrB,MAAa,eAAe;IAE1B,UAAU,CAAS;IAGnB,SAAS,CAAS;IAGlB,YAAY,CAAS;IAGrB,UAAU,CAAS;IAGnB,WAAW,CAAS;CACrB;AAfD,0CAeC;AAbC;IADC,IAAA,8BAAW,GAAE;;mDACK;AAGnB;IADC,IAAA,8BAAW,GAAE;;kDACI;AAGlB;IADC,IAAA,8BAAW,GAAE;;qDACO;AAGrB;IADC,IAAA,8BAAW,GAAE;;mDACK;AAGnB;IADC,IAAA,8BAAW,GAAE;;oDACM;AAGtB,MAAa,gBAAgB;IAI3B,KAAK,CAAM;IAKX,IAAI,CAAkB;CACvB;AAVD,4CAUC;AANC;IAHC,IAAA,8BAAW,EAAC;QACX,OAAO,EAAE,IAAI;KACd,CAAC;;+CACS;AAKX;IAHC,IAAA,8BAAW,EAAC;QACX,WAAW,EAAE,+BAA+B;KAC7C,CAAC;8BACI,eAAe;8CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./base.dto";
2
+ export * from "./request.dto";
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./base.dto"), exports);
18
+ __exportStar(require("./request.dto"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,gDAA8B"}
@@ -0,0 +1,26 @@
1
+ import { type RequestCategory } from "../utils/request.utils";
2
+ export declare class CreateRequestDto {
3
+ category: RequestCategory;
4
+ title: string;
5
+ description?: string;
6
+ }
7
+ export declare class CreateRequestFormDto extends CreateRequestDto {
8
+ photos?: unknown[];
9
+ }
10
+ export declare class RequestCreatedDto {
11
+ id: number;
12
+ }
13
+ export declare class UserRequestDto {
14
+ id: number;
15
+ createdAt: string;
16
+ title: string;
17
+ status: string | null;
18
+ followUp: string | null;
19
+ }
20
+ export declare class UserRequestDetailDto extends UserRequestDto {
21
+ theme: string | null;
22
+ description: string | null;
23
+ processingStartedAt: string | null;
24
+ closedAt: string | null;
25
+ photos: string[];
26
+ }