@vritti/api-sdk 0.3.3 → 0.3.5

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 (133) hide show
  1. package/dist/auth.cjs +942 -0
  2. package/dist/auth.cjs.map +1 -0
  3. package/dist/auth.d.cts +95 -0
  4. package/dist/auth.d.ts +95 -0
  5. package/dist/auth.js +884 -0
  6. package/dist/auth.js.map +1 -0
  7. package/dist/cache.cjs +182 -14
  8. package/dist/cache.cjs.map +1 -1
  9. package/dist/cache.d.cts +48 -4
  10. package/dist/cache.d.ts +48 -4
  11. package/dist/cache.js +177 -12
  12. package/dist/cache.js.map +1 -1
  13. package/dist/catalog-resolver.cjs +226 -51
  14. package/dist/catalog-resolver.cjs.map +1 -1
  15. package/dist/catalog-resolver.d.cts +41 -19
  16. package/dist/catalog-resolver.d.ts +41 -19
  17. package/dist/catalog-resolver.js +212 -46
  18. package/dist/catalog-resolver.js.map +1 -1
  19. package/dist/code-pattern-BP4zkNtT.d.cts +12 -0
  20. package/dist/code-pattern-BP4zkNtT.d.ts +12 -0
  21. package/dist/context.cjs +93 -0
  22. package/dist/context.cjs.map +1 -0
  23. package/dist/context.d.cts +19 -0
  24. package/dist/context.d.ts +19 -0
  25. package/dist/context.js +64 -0
  26. package/dist/context.js.map +1 -0
  27. package/dist/countries.cjs +1559 -0
  28. package/dist/countries.cjs.map +1 -0
  29. package/dist/countries.d.cts +13 -0
  30. package/dist/countries.d.ts +13 -0
  31. package/dist/countries.js +1532 -0
  32. package/dist/countries.js.map +1 -0
  33. package/dist/data-table.cjs +1280 -0
  34. package/dist/data-table.cjs.map +1 -0
  35. package/dist/data-table.d.cts +123 -0
  36. package/dist/data-table.d.ts +123 -0
  37. package/dist/data-table.js +1260 -0
  38. package/dist/data-table.js.map +1 -0
  39. package/dist/database.cjs +1510 -0
  40. package/dist/database.cjs.map +1 -0
  41. package/dist/database.d.cts +287 -0
  42. package/dist/database.d.ts +287 -0
  43. package/dist/database.js +1469 -0
  44. package/dist/database.js.map +1 -0
  45. package/dist/decimal.d.cts +0 -1
  46. package/dist/decimal.d.ts +0 -1
  47. package/dist/decorators.cjs +1817 -0
  48. package/dist/decorators.cjs.map +1 -0
  49. package/dist/decorators.d.cts +24 -0
  50. package/dist/decorators.d.ts +24 -0
  51. package/dist/decorators.js +1780 -0
  52. package/dist/decorators.js.map +1 -0
  53. package/dist/drizzle-pg-core.cjs +25 -0
  54. package/dist/drizzle-pg-core.cjs.map +1 -1
  55. package/dist/drizzle-pg-core.d.cts +7 -0
  56. package/dist/drizzle-pg-core.d.ts +7 -0
  57. package/dist/drizzle-pg-core.js +22 -0
  58. package/dist/drizzle-pg-core.js.map +1 -1
  59. package/dist/exceptions.cjs +301 -0
  60. package/dist/exceptions.cjs.map +1 -0
  61. package/dist/exceptions.d.cts +90 -0
  62. package/dist/exceptions.d.ts +90 -0
  63. package/dist/exceptions.js +257 -0
  64. package/dist/exceptions.js.map +1 -0
  65. package/dist/filter.types-PuARU9XD.d.cts +50 -0
  66. package/dist/filter.types-PuARU9XD.d.ts +50 -0
  67. package/dist/filters.cjs +407 -0
  68. package/dist/filters.cjs.map +1 -0
  69. package/dist/filters.d.cts +55 -0
  70. package/dist/filters.d.ts +55 -0
  71. package/dist/filters.js +377 -0
  72. package/dist/filters.js.map +1 -0
  73. package/dist/index.cjs +0 -5423
  74. package/dist/index.cjs.map +1 -1
  75. package/dist/index.d.cts +93 -854
  76. package/dist/index.d.ts +93 -854
  77. package/dist/index.js +0 -5301
  78. package/dist/index.js.map +1 -1
  79. package/dist/is-country.decorator-CcNwSSr5.d.cts +5 -0
  80. package/dist/is-country.decorator-CcNwSSr5.d.ts +5 -0
  81. package/dist/license.d.cts +1 -1
  82. package/dist/license.d.ts +1 -1
  83. package/dist/lodash.cjs.map +1 -1
  84. package/dist/lodash.js.map +1 -1
  85. package/dist/logger.cjs +862 -0
  86. package/dist/logger.cjs.map +1 -0
  87. package/dist/logger.d.cts +118 -0
  88. package/dist/logger.d.ts +118 -0
  89. package/dist/logger.js +816 -0
  90. package/dist/logger.js.map +1 -0
  91. package/dist/migrate.cjs +2 -2
  92. package/dist/migrate.cjs.map +1 -1
  93. package/dist/migrate.d.cts +2 -0
  94. package/dist/migrate.d.ts +2 -0
  95. package/dist/migrate.js +2 -2
  96. package/dist/migrate.js.map +1 -1
  97. package/dist/money.cjs +18 -3
  98. package/dist/money.cjs.map +1 -1
  99. package/dist/money.d.cts +13 -13
  100. package/dist/money.d.ts +13 -13
  101. package/dist/money.js +18 -3
  102. package/dist/money.js.map +1 -1
  103. package/dist/nats.cjs +34 -35
  104. package/dist/nats.cjs.map +1 -1
  105. package/dist/nats.d.cts +14 -14
  106. package/dist/nats.d.ts +14 -14
  107. package/dist/nats.js +32 -33
  108. package/dist/nats.js.map +1 -1
  109. package/dist/root.cjs +225 -0
  110. package/dist/root.cjs.map +1 -0
  111. package/dist/root.d.cts +4 -0
  112. package/dist/root.d.ts +4 -0
  113. package/dist/root.js +200 -0
  114. package/dist/root.js.map +1 -0
  115. package/dist/{types-DQRwj5rr.d.cts → types-C9jPdQqH.d.cts} +32 -6
  116. package/dist/{types-DQRwj5rr.d.ts → types-C9jPdQqH.d.ts} +32 -6
  117. package/dist/types.cjs +19 -0
  118. package/dist/types.cjs.map +1 -0
  119. package/dist/types.d.cts +17 -0
  120. package/dist/types.d.ts +17 -0
  121. package/dist/types.js +1 -0
  122. package/dist/types.js.map +1 -0
  123. package/dist/utils.cjs +273 -0
  124. package/dist/utils.cjs.map +1 -0
  125. package/dist/utils.d.cts +8 -0
  126. package/dist/utils.d.ts +8 -0
  127. package/dist/utils.js +245 -0
  128. package/dist/utils.js.map +1 -0
  129. package/package.json +122 -1
  130. package/dist/cache.service-_SuJIcNA.d.cts +0 -20
  131. package/dist/cache.service-_SuJIcNA.d.ts +0 -20
  132. package/dist/fastify-augmentation-CQPBNS5a.d.cts +0 -105
  133. package/dist/fastify-augmentation-CQPBNS5a.d.ts +0 -105
@@ -0,0 +1,90 @@
1
+ import { HttpException, HttpStatus } from '@nestjs/common';
2
+ import { FieldError } from './types.cjs';
3
+
4
+ interface ProblemOptions {
5
+ type?: string;
6
+ label?: string;
7
+ detail?: string;
8
+ errors?: FieldError[];
9
+ }
10
+ declare abstract class HttpProblemException extends HttpException {
11
+ constructor(detailOrOptions: string | ProblemOptions, httpStatus: HttpStatus);
12
+ }
13
+
14
+ declare class BadGatewayException extends HttpProblemException {
15
+ constructor(detailOrOptions?: string | ProblemOptions);
16
+ }
17
+
18
+ declare class BadRequestException extends HttpProblemException {
19
+ constructor(detailOrOptions?: string | ProblemOptions);
20
+ }
21
+
22
+ declare class ConflictException extends HttpProblemException {
23
+ constructor(detailOrOptions?: string | ProblemOptions);
24
+ }
25
+
26
+ declare class ForbiddenException extends HttpProblemException {
27
+ constructor(detailOrOptions?: string | ProblemOptions);
28
+ }
29
+
30
+ declare class GoneException extends HttpProblemException {
31
+ constructor(detailOrOptions?: string | ProblemOptions);
32
+ }
33
+
34
+ declare class InternalServerErrorException extends HttpProblemException {
35
+ constructor(detailOrOptions?: string | ProblemOptions);
36
+ }
37
+
38
+ declare class InvalidCursorException extends BadRequestException {
39
+ constructor(detail?: string);
40
+ }
41
+
42
+ declare class MethodNotAllowedException extends HttpProblemException {
43
+ constructor(detailOrOptions?: string | ProblemOptions);
44
+ }
45
+
46
+ declare class NotAcceptableException extends HttpProblemException {
47
+ constructor(detailOrOptions?: string | ProblemOptions);
48
+ }
49
+
50
+ declare class NotFoundException extends HttpProblemException {
51
+ constructor(detailOrOptions?: string | ProblemOptions);
52
+ }
53
+
54
+ declare class NotImplementedException extends HttpProblemException {
55
+ constructor(detailOrOptions?: string | ProblemOptions);
56
+ }
57
+
58
+ declare class PayloadTooLargeException extends HttpProblemException {
59
+ constructor(detailOrOptions?: string | ProblemOptions);
60
+ }
61
+
62
+ declare class RequestTimeoutException extends HttpProblemException {
63
+ constructor(detailOrOptions?: string | ProblemOptions);
64
+ }
65
+
66
+ declare class ServiceUnavailableException extends HttpProblemException {
67
+ constructor(detailOrOptions?: string | ProblemOptions);
68
+ }
69
+
70
+ declare class TooManyRequestsException extends HttpProblemException {
71
+ constructor(detailOrOptions?: string | ProblemOptions);
72
+ }
73
+
74
+ declare class UnauthorizedException extends HttpProblemException {
75
+ constructor(detailOrOptions?: string | ProblemOptions);
76
+ }
77
+
78
+ declare class UnprocessableEntityException extends HttpProblemException {
79
+ constructor(detailOrOptions?: string | ProblemOptions);
80
+ }
81
+
82
+ declare class UnsupportedMediaTypeException extends HttpProblemException {
83
+ constructor(detailOrOptions?: string | ProblemOptions);
84
+ }
85
+
86
+ declare class ValidationException extends HttpProblemException {
87
+ constructor(detailOrOptions?: string | ProblemOptions);
88
+ }
89
+
90
+ export { BadGatewayException, BadRequestException, ConflictException, FieldError, ForbiddenException, GoneException, HttpProblemException, InternalServerErrorException, InvalidCursorException, MethodNotAllowedException, NotAcceptableException, NotFoundException, NotImplementedException, PayloadTooLargeException, type ProblemOptions, RequestTimeoutException, ServiceUnavailableException, TooManyRequestsException, UnauthorizedException, UnprocessableEntityException, UnsupportedMediaTypeException, ValidationException };
@@ -0,0 +1,90 @@
1
+ import { HttpException, HttpStatus } from '@nestjs/common';
2
+ import { FieldError } from './types.js';
3
+
4
+ interface ProblemOptions {
5
+ type?: string;
6
+ label?: string;
7
+ detail?: string;
8
+ errors?: FieldError[];
9
+ }
10
+ declare abstract class HttpProblemException extends HttpException {
11
+ constructor(detailOrOptions: string | ProblemOptions, httpStatus: HttpStatus);
12
+ }
13
+
14
+ declare class BadGatewayException extends HttpProblemException {
15
+ constructor(detailOrOptions?: string | ProblemOptions);
16
+ }
17
+
18
+ declare class BadRequestException extends HttpProblemException {
19
+ constructor(detailOrOptions?: string | ProblemOptions);
20
+ }
21
+
22
+ declare class ConflictException extends HttpProblemException {
23
+ constructor(detailOrOptions?: string | ProblemOptions);
24
+ }
25
+
26
+ declare class ForbiddenException extends HttpProblemException {
27
+ constructor(detailOrOptions?: string | ProblemOptions);
28
+ }
29
+
30
+ declare class GoneException extends HttpProblemException {
31
+ constructor(detailOrOptions?: string | ProblemOptions);
32
+ }
33
+
34
+ declare class InternalServerErrorException extends HttpProblemException {
35
+ constructor(detailOrOptions?: string | ProblemOptions);
36
+ }
37
+
38
+ declare class InvalidCursorException extends BadRequestException {
39
+ constructor(detail?: string);
40
+ }
41
+
42
+ declare class MethodNotAllowedException extends HttpProblemException {
43
+ constructor(detailOrOptions?: string | ProblemOptions);
44
+ }
45
+
46
+ declare class NotAcceptableException extends HttpProblemException {
47
+ constructor(detailOrOptions?: string | ProblemOptions);
48
+ }
49
+
50
+ declare class NotFoundException extends HttpProblemException {
51
+ constructor(detailOrOptions?: string | ProblemOptions);
52
+ }
53
+
54
+ declare class NotImplementedException extends HttpProblemException {
55
+ constructor(detailOrOptions?: string | ProblemOptions);
56
+ }
57
+
58
+ declare class PayloadTooLargeException extends HttpProblemException {
59
+ constructor(detailOrOptions?: string | ProblemOptions);
60
+ }
61
+
62
+ declare class RequestTimeoutException extends HttpProblemException {
63
+ constructor(detailOrOptions?: string | ProblemOptions);
64
+ }
65
+
66
+ declare class ServiceUnavailableException extends HttpProblemException {
67
+ constructor(detailOrOptions?: string | ProblemOptions);
68
+ }
69
+
70
+ declare class TooManyRequestsException extends HttpProblemException {
71
+ constructor(detailOrOptions?: string | ProblemOptions);
72
+ }
73
+
74
+ declare class UnauthorizedException extends HttpProblemException {
75
+ constructor(detailOrOptions?: string | ProblemOptions);
76
+ }
77
+
78
+ declare class UnprocessableEntityException extends HttpProblemException {
79
+ constructor(detailOrOptions?: string | ProblemOptions);
80
+ }
81
+
82
+ declare class UnsupportedMediaTypeException extends HttpProblemException {
83
+ constructor(detailOrOptions?: string | ProblemOptions);
84
+ }
85
+
86
+ declare class ValidationException extends HttpProblemException {
87
+ constructor(detailOrOptions?: string | ProblemOptions);
88
+ }
89
+
90
+ export { BadGatewayException, BadRequestException, ConflictException, FieldError, ForbiddenException, GoneException, HttpProblemException, InternalServerErrorException, InvalidCursorException, MethodNotAllowedException, NotAcceptableException, NotFoundException, NotImplementedException, PayloadTooLargeException, type ProblemOptions, RequestTimeoutException, ServiceUnavailableException, TooManyRequestsException, UnauthorizedException, UnprocessableEntityException, UnsupportedMediaTypeException, ValidationException };
@@ -0,0 +1,257 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
4
+ // src/exceptions/bad-gateway.exception.ts
5
+ import { HttpStatus } from "@nestjs/common";
6
+
7
+ // src/exceptions/base-field.exception.ts
8
+ import { HttpException } from "@nestjs/common";
9
+ var HttpProblemException = class extends HttpException {
10
+ static {
11
+ __name(this, "HttpProblemException");
12
+ }
13
+ constructor(detailOrOptions, httpStatus) {
14
+ const options = typeof detailOrOptions === "string" ? {
15
+ detail: detailOrOptions
16
+ } : detailOrOptions;
17
+ super({
18
+ type: options.type ?? "about:blank",
19
+ label: options.label,
20
+ detail: options.detail,
21
+ errors: options.errors ?? []
22
+ }, httpStatus);
23
+ }
24
+ };
25
+
26
+ // src/exceptions/bad-gateway.exception.ts
27
+ var BadGatewayException = class extends HttpProblemException {
28
+ static {
29
+ __name(this, "BadGatewayException");
30
+ }
31
+ constructor(detailOrOptions) {
32
+ super(detailOrOptions ?? "Bad Gateway", HttpStatus.BAD_GATEWAY);
33
+ }
34
+ };
35
+
36
+ // src/exceptions/bad-request.exception.ts
37
+ import { HttpStatus as HttpStatus2 } from "@nestjs/common";
38
+ var BadRequestException = class extends HttpProblemException {
39
+ static {
40
+ __name(this, "BadRequestException");
41
+ }
42
+ constructor(detailOrOptions) {
43
+ super(detailOrOptions ?? "Bad Request", HttpStatus2.BAD_REQUEST);
44
+ }
45
+ };
46
+
47
+ // src/exceptions/conflict.exception.ts
48
+ import { HttpStatus as HttpStatus3 } from "@nestjs/common";
49
+ var ConflictException = class extends HttpProblemException {
50
+ static {
51
+ __name(this, "ConflictException");
52
+ }
53
+ constructor(detailOrOptions) {
54
+ super(detailOrOptions ?? "Conflict", HttpStatus3.CONFLICT);
55
+ }
56
+ };
57
+
58
+ // src/exceptions/forbidden.exception.ts
59
+ import { HttpStatus as HttpStatus4 } from "@nestjs/common";
60
+ var ForbiddenException = class extends HttpProblemException {
61
+ static {
62
+ __name(this, "ForbiddenException");
63
+ }
64
+ constructor(detailOrOptions) {
65
+ super(detailOrOptions ?? "Forbidden", HttpStatus4.FORBIDDEN);
66
+ }
67
+ };
68
+
69
+ // src/exceptions/gone.exception.ts
70
+ import { HttpStatus as HttpStatus5 } from "@nestjs/common";
71
+ var GoneException = class extends HttpProblemException {
72
+ static {
73
+ __name(this, "GoneException");
74
+ }
75
+ constructor(detailOrOptions) {
76
+ super(detailOrOptions ?? "Gone", HttpStatus5.GONE);
77
+ }
78
+ };
79
+
80
+ // src/exceptions/internal-server-error.exception.ts
81
+ import { HttpStatus as HttpStatus6 } from "@nestjs/common";
82
+ var InternalServerErrorException = class extends HttpProblemException {
83
+ static {
84
+ __name(this, "InternalServerErrorException");
85
+ }
86
+ constructor(detailOrOptions) {
87
+ super(detailOrOptions ?? "Internal Server Error", HttpStatus6.INTERNAL_SERVER_ERROR);
88
+ }
89
+ };
90
+
91
+ // src/exceptions/invalid-cursor.exception.ts
92
+ var InvalidCursorException = class extends BadRequestException {
93
+ static {
94
+ __name(this, "InvalidCursorException");
95
+ }
96
+ constructor(detail = "The pagination cursor is invalid.") {
97
+ super({
98
+ label: "Invalid cursor",
99
+ detail
100
+ });
101
+ }
102
+ };
103
+
104
+ // src/exceptions/method-not-allowed.exception.ts
105
+ import { HttpStatus as HttpStatus7 } from "@nestjs/common";
106
+ var MethodNotAllowedException = class extends HttpProblemException {
107
+ static {
108
+ __name(this, "MethodNotAllowedException");
109
+ }
110
+ constructor(detailOrOptions) {
111
+ super(detailOrOptions ?? "Method Not Allowed", HttpStatus7.METHOD_NOT_ALLOWED);
112
+ }
113
+ };
114
+
115
+ // src/exceptions/not-acceptable.exception.ts
116
+ import { HttpStatus as HttpStatus8 } from "@nestjs/common";
117
+ var NotAcceptableException = class extends HttpProblemException {
118
+ static {
119
+ __name(this, "NotAcceptableException");
120
+ }
121
+ constructor(detailOrOptions) {
122
+ super(detailOrOptions ?? "Not Acceptable", HttpStatus8.NOT_ACCEPTABLE);
123
+ }
124
+ };
125
+
126
+ // src/exceptions/not-found.exception.ts
127
+ import { HttpStatus as HttpStatus9 } from "@nestjs/common";
128
+ var NotFoundException = class extends HttpProblemException {
129
+ static {
130
+ __name(this, "NotFoundException");
131
+ }
132
+ constructor(detailOrOptions) {
133
+ super(detailOrOptions ?? "Not Found", HttpStatus9.NOT_FOUND);
134
+ }
135
+ };
136
+
137
+ // src/exceptions/not-implemented.exception.ts
138
+ import { HttpStatus as HttpStatus10 } from "@nestjs/common";
139
+ var NotImplementedException = class extends HttpProblemException {
140
+ static {
141
+ __name(this, "NotImplementedException");
142
+ }
143
+ constructor(detailOrOptions) {
144
+ super(detailOrOptions ?? "Not Implemented", HttpStatus10.NOT_IMPLEMENTED);
145
+ }
146
+ };
147
+
148
+ // src/exceptions/payload-too-large.exception.ts
149
+ import { HttpStatus as HttpStatus11 } from "@nestjs/common";
150
+ var PayloadTooLargeException = class extends HttpProblemException {
151
+ static {
152
+ __name(this, "PayloadTooLargeException");
153
+ }
154
+ constructor(detailOrOptions) {
155
+ super(detailOrOptions ?? "Payload Too Large", HttpStatus11.PAYLOAD_TOO_LARGE);
156
+ }
157
+ };
158
+
159
+ // src/exceptions/request-timeout.exception.ts
160
+ import { HttpStatus as HttpStatus12 } from "@nestjs/common";
161
+ var RequestTimeoutException = class extends HttpProblemException {
162
+ static {
163
+ __name(this, "RequestTimeoutException");
164
+ }
165
+ constructor(detailOrOptions) {
166
+ super(detailOrOptions ?? "Request Timeout", HttpStatus12.REQUEST_TIMEOUT);
167
+ }
168
+ };
169
+
170
+ // src/exceptions/service-unavailable.exception.ts
171
+ import { HttpStatus as HttpStatus13 } from "@nestjs/common";
172
+ var ServiceUnavailableException = class extends HttpProblemException {
173
+ static {
174
+ __name(this, "ServiceUnavailableException");
175
+ }
176
+ constructor(detailOrOptions) {
177
+ super(detailOrOptions ?? "Service Unavailable", HttpStatus13.SERVICE_UNAVAILABLE);
178
+ }
179
+ };
180
+
181
+ // src/exceptions/too-many-requests.exception.ts
182
+ import { HttpStatus as HttpStatus14 } from "@nestjs/common";
183
+ var TooManyRequestsException = class extends HttpProblemException {
184
+ static {
185
+ __name(this, "TooManyRequestsException");
186
+ }
187
+ constructor(detailOrOptions) {
188
+ super(detailOrOptions ?? "Too Many Requests", HttpStatus14.TOO_MANY_REQUESTS);
189
+ }
190
+ };
191
+
192
+ // src/exceptions/unauthorized.exception.ts
193
+ import { HttpStatus as HttpStatus15 } from "@nestjs/common";
194
+ var UnauthorizedException = class extends HttpProblemException {
195
+ static {
196
+ __name(this, "UnauthorizedException");
197
+ }
198
+ constructor(detailOrOptions) {
199
+ super(detailOrOptions ?? "Unauthorized", HttpStatus15.UNAUTHORIZED);
200
+ }
201
+ };
202
+
203
+ // src/exceptions/unprocessable-entity.exception.ts
204
+ import { HttpStatus as HttpStatus16 } from "@nestjs/common";
205
+ var UnprocessableEntityException = class extends HttpProblemException {
206
+ static {
207
+ __name(this, "UnprocessableEntityException");
208
+ }
209
+ constructor(detailOrOptions) {
210
+ super(detailOrOptions ?? "Unprocessable Entity", HttpStatus16.UNPROCESSABLE_ENTITY);
211
+ }
212
+ };
213
+
214
+ // src/exceptions/unsupported-media-type.exception.ts
215
+ import { HttpStatus as HttpStatus17 } from "@nestjs/common";
216
+ var UnsupportedMediaTypeException = class extends HttpProblemException {
217
+ static {
218
+ __name(this, "UnsupportedMediaTypeException");
219
+ }
220
+ constructor(detailOrOptions) {
221
+ super(detailOrOptions ?? "Unsupported Media Type", HttpStatus17.UNSUPPORTED_MEDIA_TYPE);
222
+ }
223
+ };
224
+
225
+ // src/exceptions/validation.exception.ts
226
+ import { HttpStatus as HttpStatus18 } from "@nestjs/common";
227
+ var ValidationException = class extends HttpProblemException {
228
+ static {
229
+ __name(this, "ValidationException");
230
+ }
231
+ constructor(detailOrOptions) {
232
+ super(detailOrOptions ?? "Validation Failed", HttpStatus18.UNPROCESSABLE_ENTITY);
233
+ }
234
+ };
235
+ export {
236
+ BadGatewayException,
237
+ BadRequestException,
238
+ ConflictException,
239
+ ForbiddenException,
240
+ GoneException,
241
+ HttpProblemException,
242
+ InternalServerErrorException,
243
+ InvalidCursorException,
244
+ MethodNotAllowedException,
245
+ NotAcceptableException,
246
+ NotFoundException,
247
+ NotImplementedException,
248
+ PayloadTooLargeException,
249
+ RequestTimeoutException,
250
+ ServiceUnavailableException,
251
+ TooManyRequestsException,
252
+ UnauthorizedException,
253
+ UnprocessableEntityException,
254
+ UnsupportedMediaTypeException,
255
+ ValidationException
256
+ };
257
+ //# sourceMappingURL=exceptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/exceptions/bad-gateway.exception.ts","../src/exceptions/base-field.exception.ts","../src/exceptions/bad-request.exception.ts","../src/exceptions/conflict.exception.ts","../src/exceptions/forbidden.exception.ts","../src/exceptions/gone.exception.ts","../src/exceptions/internal-server-error.exception.ts","../src/exceptions/invalid-cursor.exception.ts","../src/exceptions/method-not-allowed.exception.ts","../src/exceptions/not-acceptable.exception.ts","../src/exceptions/not-found.exception.ts","../src/exceptions/not-implemented.exception.ts","../src/exceptions/payload-too-large.exception.ts","../src/exceptions/request-timeout.exception.ts","../src/exceptions/service-unavailable.exception.ts","../src/exceptions/too-many-requests.exception.ts","../src/exceptions/unauthorized.exception.ts","../src/exceptions/unprocessable-entity.exception.ts","../src/exceptions/unsupported-media-type.exception.ts","../src/exceptions/validation.exception.ts"],"sourcesContent":["import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class BadGatewayException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Bad Gateway', HttpStatus.BAD_GATEWAY);\n }\n}\n","import { HttpException, HttpStatus } from '@nestjs/common';\nimport type { FieldError } from '../types/error-response.types';\n\n// Re-export FieldError for backwards compatibility\nexport type { FieldError } from '../types/error-response.types';\n\nexport interface ProblemOptions {\n type?: string;\n label?: string;\n detail?: string;\n errors?: FieldError[];\n}\n\nexport abstract class HttpProblemException extends HttpException {\n constructor(detailOrOptions: string | ProblemOptions, httpStatus: HttpStatus) {\n const options = typeof detailOrOptions === 'string' ? { detail: detailOrOptions } : detailOrOptions;\n\n super(\n {\n type: options.type ?? 'about:blank',\n label: options.label,\n detail: options.detail,\n errors: options.errors ?? [],\n },\n httpStatus,\n );\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class BadRequestException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Bad Request', HttpStatus.BAD_REQUEST);\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class ConflictException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Conflict', HttpStatus.CONFLICT);\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class ForbiddenException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Forbidden', HttpStatus.FORBIDDEN);\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class GoneException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Gone', HttpStatus.GONE);\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class InternalServerErrorException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Internal Server Error', HttpStatus.INTERNAL_SERVER_ERROR);\n }\n}\n","import type { ProblemOptions } from './base-field.exception';\nimport { BadRequestException } from './bad-request.exception';\n\nexport class InvalidCursorException extends BadRequestException {\n constructor(detail = 'The pagination cursor is invalid.') {\n super({ label: 'Invalid cursor', detail } satisfies ProblemOptions);\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class MethodNotAllowedException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Method Not Allowed', HttpStatus.METHOD_NOT_ALLOWED);\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class NotAcceptableException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Not Acceptable', HttpStatus.NOT_ACCEPTABLE);\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class NotFoundException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Not Found', HttpStatus.NOT_FOUND);\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class NotImplementedException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Not Implemented', HttpStatus.NOT_IMPLEMENTED);\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class PayloadTooLargeException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Payload Too Large', HttpStatus.PAYLOAD_TOO_LARGE);\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class RequestTimeoutException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Request Timeout', HttpStatus.REQUEST_TIMEOUT);\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class ServiceUnavailableException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Service Unavailable', HttpStatus.SERVICE_UNAVAILABLE);\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class TooManyRequestsException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Too Many Requests', HttpStatus.TOO_MANY_REQUESTS);\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class UnauthorizedException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Unauthorized', HttpStatus.UNAUTHORIZED);\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class UnprocessableEntityException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Unprocessable Entity', HttpStatus.UNPROCESSABLE_ENTITY);\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class UnsupportedMediaTypeException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Unsupported Media Type', HttpStatus.UNSUPPORTED_MEDIA_TYPE);\n }\n}\n","import { HttpStatus } from '@nestjs/common';\nimport { HttpProblemException, type ProblemOptions } from './base-field.exception';\n\nexport class ValidationException extends HttpProblemException {\n constructor(detailOrOptions?: string | ProblemOptions) {\n super(detailOrOptions ?? 'Validation Failed', HttpStatus.UNPROCESSABLE_ENTITY);\n }\n}\n"],"mappings":";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kB;AAGpB,IAAMC,8BAAN,cAA0CC,qBAAAA;EAHjD,OAGiDA;;;EAC/C,YAAYC,iBAA2C;AACrD,UAAMA,mBAAmB,uBAAuBC,aAAWC,mBAAmB;EAChF;AACF;;;ACPA,SAASC,cAAAA,oBAAkB;AAGpB,IAAMC,2BAAN,cAAuCC,qBAAAA;EAH9C,OAG8CA;;;EAC5C,YAAYC,iBAA2C;AACrD,UAAMA,mBAAmB,qBAAqBC,aAAWC,iBAAiB;EAC5E;AACF;;;ACPA,SAASC,cAAAA,oBAAkB;AAGpB,IAAMC,wBAAN,cAAoCC,qBAAAA;EAH3C,OAG2CA;;;EACzC,YAAYC,iBAA2C;AACrD,UAAMA,mBAAmB,gBAAgBC,aAAWC,YAAY;EAClE;AACF;;;ACPA,SAASC,cAAAA,oBAAkB;AAGpB,IAAMC,+BAAN,cAA2CC,qBAAAA;EAHlD,OAGkDA;;;EAChD,YAAYC,iBAA2C;AACrD,UAAMA,mBAAmB,wBAAwBC,aAAWC,oBAAoB;EAClF;AACF;;;ACPA,SAASC,cAAAA,oBAAkB;AAGpB,IAAMC,gCAAN,cAA4CC,qBAAAA;EAHnD,OAGmDA;;;EACjD,YAAYC,iBAA2C;AACrD,UAAMA,mBAAmB,0BAA0BC,aAAWC,sBAAsB;EACtF;AACF;;;ACPA,SAASC,cAAAA,oBAAkB;AAGpB,IAAMC,sBAAN,cAAkCC,qBAAAA;EAHzC,OAGyCA;;;EACvC,YAAYC,iBAA2C;AACrD,UAAMA,mBAAmB,qBAAqBC,aAAWC,oBAAoB;EAC/E;AACF;","names":["HttpStatus","HttpException","HttpProblemException","HttpException","detailOrOptions","httpStatus","options","detail","type","label","errors","BadGatewayException","HttpProblemException","detailOrOptions","HttpStatus","BAD_GATEWAY","HttpStatus","BadRequestException","HttpProblemException","detailOrOptions","HttpStatus","BAD_REQUEST","HttpStatus","ConflictException","HttpProblemException","detailOrOptions","HttpStatus","CONFLICT","HttpStatus","ForbiddenException","HttpProblemException","detailOrOptions","HttpStatus","FORBIDDEN","HttpStatus","GoneException","HttpProblemException","detailOrOptions","HttpStatus","GONE","HttpStatus","InternalServerErrorException","HttpProblemException","detailOrOptions","HttpStatus","INTERNAL_SERVER_ERROR","InvalidCursorException","BadRequestException","detail","label","HttpStatus","MethodNotAllowedException","HttpProblemException","detailOrOptions","HttpStatus","METHOD_NOT_ALLOWED","HttpStatus","NotAcceptableException","HttpProblemException","detailOrOptions","HttpStatus","NOT_ACCEPTABLE","HttpStatus","NotFoundException","HttpProblemException","detailOrOptions","HttpStatus","NOT_FOUND","HttpStatus","NotImplementedException","HttpProblemException","detailOrOptions","HttpStatus","NOT_IMPLEMENTED","HttpStatus","PayloadTooLargeException","HttpProblemException","detailOrOptions","HttpStatus","PAYLOAD_TOO_LARGE","HttpStatus","RequestTimeoutException","HttpProblemException","detailOrOptions","HttpStatus","REQUEST_TIMEOUT","HttpStatus","ServiceUnavailableException","HttpProblemException","detailOrOptions","HttpStatus","SERVICE_UNAVAILABLE","HttpStatus","TooManyRequestsException","HttpProblemException","detailOrOptions","HttpStatus","TOO_MANY_REQUESTS","HttpStatus","UnauthorizedException","HttpProblemException","detailOrOptions","HttpStatus","UNAUTHORIZED","HttpStatus","UnprocessableEntityException","HttpProblemException","detailOrOptions","HttpStatus","UNPROCESSABLE_ENTITY","HttpStatus","UnsupportedMediaTypeException","HttpProblemException","detailOrOptions","HttpStatus","UNSUPPORTED_MEDIA_TYPE","HttpStatus","ValidationException","HttpProblemException","detailOrOptions","HttpStatus","UNPROCESSABLE_ENTITY"]}
@@ -0,0 +1,50 @@
1
+ type FilterOperator = 'equals' | 'notEquals' | 'contains' | 'notContains' | 'gt' | 'gte' | 'lt' | 'lte' | 'isAnyOf' | 'isNotAnyOf';
2
+ declare const FilterOperators: {
3
+ readonly EQUALS: "equals";
4
+ readonly NOT_EQUALS: "notEquals";
5
+ readonly CONTAINS: "contains";
6
+ readonly NOT_CONTAINS: "notContains";
7
+ readonly GT: "gt";
8
+ readonly GTE: "gte";
9
+ readonly LT: "lt";
10
+ readonly LTE: "lte";
11
+ readonly IS_ANY_OF: "isAnyOf";
12
+ readonly IS_NOT_ANY_OF: "isNotAnyOf";
13
+ };
14
+ interface FilterCondition {
15
+ field: string;
16
+ operator: FilterOperator;
17
+ value: string | number | string[];
18
+ }
19
+ interface SortCondition {
20
+ field: string;
21
+ direction: 'asc' | 'desc';
22
+ }
23
+ type DensityType = 'compact' | 'normal' | 'comfortable';
24
+ interface ColumnPinning {
25
+ left: string[];
26
+ right: string[];
27
+ }
28
+ interface SearchState {
29
+ columnId: string;
30
+ value: string;
31
+ }
32
+ interface TableViewState {
33
+ filters: FilterCondition[];
34
+ sort: SortCondition[];
35
+ columnVisibility: Record<string, boolean>;
36
+ columnOrder: string[];
37
+ columnSizing: Record<string, number>;
38
+ columnPinning: ColumnPinning;
39
+ lockedColumnSizing: boolean;
40
+ density: DensityType;
41
+ filterOrder: string[];
42
+ filterVisibility: Record<string, boolean>;
43
+ search: SearchState | null;
44
+ pagination: {
45
+ limit: number;
46
+ offset: number;
47
+ };
48
+ }
49
+
50
+ export { type ColumnPinning as C, type DensityType as D, type FilterOperator as F, type SearchState as S, type TableViewState as T, type FilterCondition as a, type SortCondition as b, FilterOperators as c };
@@ -0,0 +1,50 @@
1
+ type FilterOperator = 'equals' | 'notEquals' | 'contains' | 'notContains' | 'gt' | 'gte' | 'lt' | 'lte' | 'isAnyOf' | 'isNotAnyOf';
2
+ declare const FilterOperators: {
3
+ readonly EQUALS: "equals";
4
+ readonly NOT_EQUALS: "notEquals";
5
+ readonly CONTAINS: "contains";
6
+ readonly NOT_CONTAINS: "notContains";
7
+ readonly GT: "gt";
8
+ readonly GTE: "gte";
9
+ readonly LT: "lt";
10
+ readonly LTE: "lte";
11
+ readonly IS_ANY_OF: "isAnyOf";
12
+ readonly IS_NOT_ANY_OF: "isNotAnyOf";
13
+ };
14
+ interface FilterCondition {
15
+ field: string;
16
+ operator: FilterOperator;
17
+ value: string | number | string[];
18
+ }
19
+ interface SortCondition {
20
+ field: string;
21
+ direction: 'asc' | 'desc';
22
+ }
23
+ type DensityType = 'compact' | 'normal' | 'comfortable';
24
+ interface ColumnPinning {
25
+ left: string[];
26
+ right: string[];
27
+ }
28
+ interface SearchState {
29
+ columnId: string;
30
+ value: string;
31
+ }
32
+ interface TableViewState {
33
+ filters: FilterCondition[];
34
+ sort: SortCondition[];
35
+ columnVisibility: Record<string, boolean>;
36
+ columnOrder: string[];
37
+ columnSizing: Record<string, number>;
38
+ columnPinning: ColumnPinning;
39
+ lockedColumnSizing: boolean;
40
+ density: DensityType;
41
+ filterOrder: string[];
42
+ filterVisibility: Record<string, boolean>;
43
+ search: SearchState | null;
44
+ pagination: {
45
+ limit: number;
46
+ offset: number;
47
+ };
48
+ }
49
+
50
+ export { type ColumnPinning as C, type DensityType as D, type FilterOperator as F, type SearchState as S, type TableViewState as T, type FilterCondition as a, type SortCondition as b, FilterOperators as c };