@hichchi/nest-connector 0.0.2 → 0.0.4
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/CHANGELOG.md +67 -0
- package/README.md +3680 -0
- package/auth.cjs.js +13 -1
- package/auth.esm.js +13 -1
- package/crud.cjs.js +0 -23
- package/crud.esm.js +0 -23
- package/package.json +2 -1
- package/readme-top.md +170 -0
- package/src/auth/enums/auth-error-response.enum.d.ts +7 -0
package/README.md
ADDED
|
@@ -0,0 +1,3680 @@
|
|
|
1
|
+
<!--suppress ALL -->
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
# 🔗 @hichchi/nest-connector
|
|
6
|
+
|
|
7
|
+
## Description
|
|
8
|
+
|
|
9
|
+
**Comprehensive NestJS connector library providing standardized HTTP responses, authentication interfaces, CRUD operations, and shared utilities for the Hichchi ecosystem**
|
|
10
|
+
|
|
11
|
+
[](https://www.npmjs.com/package/@hichchi/nest-connector)
|
|
12
|
+
[](https://www.npmjs.com/package/@hichchi/nest-connector)
|
|
13
|
+
[](https://github.com/hichchidev/hichchi/blob/main/LICENSE)
|
|
14
|
+
[](https://nestjs.com/)
|
|
15
|
+
|
|
16
|
+
_Part of the [Hichchi](https://github.com/hichchidev/hichchi) ecosystem - A powerful, scalable application built with Nx workspace_
|
|
17
|
+
|
|
18
|
+
[📚 Jump to Documentation](#-api-documentation)
|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 📋 Table of Contents
|
|
25
|
+
|
|
26
|
+
- [📦 Installation](#-installation)
|
|
27
|
+
- [⚡ Quick Start](#-quick-start)
|
|
28
|
+
- [📋 Prerequisites](#-prerequisites)
|
|
29
|
+
- [🌟 Overview](#-overview)
|
|
30
|
+
- [✨ Features](#-features)
|
|
31
|
+
- [🔧 Development](#-development)
|
|
32
|
+
- [📖 API Documentation](#-api-documentation)
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 📦 Installation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm install @hichchi/nest-connector
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## ⚡ Quick Start
|
|
43
|
+
|
|
44
|
+
Get up and running with standardized API responses in just a few minutes:
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
// 1. Install the package
|
|
48
|
+
npm install @hichchi/nest-connector
|
|
49
|
+
|
|
50
|
+
// 2. Import response interfaces and builders
|
|
51
|
+
import {
|
|
52
|
+
HttpResponse,
|
|
53
|
+
SuccessResponse,
|
|
54
|
+
ErrorResponse,
|
|
55
|
+
SuccessResponseDto
|
|
56
|
+
} from '@hichchi/nest-connector';
|
|
57
|
+
|
|
58
|
+
// 3. Use in your NestJS controllers
|
|
59
|
+
@Controller('users')
|
|
60
|
+
export class UsersController {
|
|
61
|
+
@Get()
|
|
62
|
+
async getUsers(): Promise<SuccessResponse> {
|
|
63
|
+
const users = await this.usersService.findAll();
|
|
64
|
+
return new SuccessResponseDto(users, 'Users retrieved successfully');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## 📋 Prerequisites
|
|
70
|
+
|
|
71
|
+
Before installing @hichchi/nest-connector, ensure you have:
|
|
72
|
+
|
|
73
|
+
### Required Dependencies
|
|
74
|
+
|
|
75
|
+
- **Node.js**: ^20.0.0
|
|
76
|
+
- **NestJS**: ^11.0.0
|
|
77
|
+
- **TypeScript**: ~5.9.3
|
|
78
|
+
|
|
79
|
+
### Peer Dependencies
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npm install @nestjs/common @nestjs/core
|
|
83
|
+
npm install rxjs reflect-metadata
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Internal Dependencies
|
|
87
|
+
|
|
88
|
+
This package depends on:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm install @hichchi/utils
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Optional Dependencies
|
|
95
|
+
|
|
96
|
+
For enhanced features:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# For validation decorators
|
|
100
|
+
npm install class-validator class-transformer
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## 🌟 Overview
|
|
104
|
+
|
|
105
|
+
🎯 **Your standardized response toolkit** for NestJS applications. Ensure consistent API responses across your entire application with pre-defined interfaces, builders, and response structures that follow industry best practices.
|
|
106
|
+
|
|
107
|
+
## ✨ Features
|
|
108
|
+
|
|
109
|
+
### 🏗️ Ready-to-Use Response Structures
|
|
110
|
+
|
|
111
|
+
- 📋 **HttpResponse Interface** - Base interface for all API responses
|
|
112
|
+
- ✅ **SuccessResponse Interface** - Standardized success response structure
|
|
113
|
+
- ❌ **ErrorResponse Interface** - Consistent error response format
|
|
114
|
+
- 🔢 **HTTP Status Enums** - Pre-defined status code enumerations
|
|
115
|
+
|
|
116
|
+
### 🛠️ Response Builders & DTOs
|
|
117
|
+
|
|
118
|
+
- 🏭 **SuccessResponseDto** - Builder for success responses with data
|
|
119
|
+
- 🎯 **Response Code Types** - Application-specific response codes
|
|
120
|
+
- 📊 **Status Code Management** - Organized HTTP status code handling
|
|
121
|
+
- 🔧 **Type-Safe Responses** - Full TypeScript support for response structures
|
|
122
|
+
|
|
123
|
+
### 🎨 Developer Experience
|
|
124
|
+
|
|
125
|
+
- 📝 **Comprehensive Documentation** - Detailed JSDoc comments for all interfaces
|
|
126
|
+
- 🔍 **IntelliSense Support** - Full IDE autocomplete and type checking
|
|
127
|
+
- 🎯 **Consistent API Design** - Standardized response patterns across applications
|
|
128
|
+
- 🚀 **Easy Integration** - Drop-in replacement for custom response handling
|
|
129
|
+
|
|
130
|
+
### 🔧 Advanced Features
|
|
131
|
+
|
|
132
|
+
- 🏷️ **User Info Interfaces** - Standardized user information structures
|
|
133
|
+
- 📦 **Modular Design** - Import only what you need
|
|
134
|
+
- 🔄 **Extensible Architecture** - Easy to extend with custom response types
|
|
135
|
+
- 🎪 **Framework Agnostic Types** - Core interfaces can be used beyond NestJS
|
|
136
|
+
|
|
137
|
+
## 🔧 Development
|
|
138
|
+
|
|
139
|
+
### Building the Library
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
nx build nest-connector
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Running Tests
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
nx test nest-connector
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Linting
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
nx lint nest-connector
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
<div align="center">
|
|
160
|
+
|
|
161
|
+
**Made with ❤️ by [Hichchi Dev](https://github.com/hichchidev)**
|
|
162
|
+
|
|
163
|
+
[](https://github.com/hichchidev/hichchi)
|
|
164
|
+
[](https://github.com/hichchidev/hichchi/issues)
|
|
165
|
+
[](https://github.com/hichchidev/hichchi/issues)
|
|
166
|
+
|
|
167
|
+
_Standardizing API responses and connecting NestJS applications with consistent interfaces and shared utilities_
|
|
168
|
+
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
# 📖 API Documentation
|
|
174
|
+
|
|
175
|
+
Complete technical reference for all classes, interfaces, methods, and types in this library.
|
|
176
|
+
|
|
177
|
+
**Auto-generated by TypeDoc** - Browse through detailed API references, code examples, and implementation guides below.
|
|
178
|
+
|
|
179
|
+
<!-- TypeDoc generated documentation will be appended below this point -->
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## 📋 API Table of Contents
|
|
184
|
+
|
|
185
|
+
- [Classes](#classes)
|
|
186
|
+
- [SuccessResponseDto](#successresponsedto)
|
|
187
|
+
- [Enumerations](#enumerations)
|
|
188
|
+
- [CommonErrorResponseCode](#commonerrorresponsecode)
|
|
189
|
+
- [CommonSuccessResponseCode](#commonsuccessresponsecode)
|
|
190
|
+
- [Endpoint](#endpoint)
|
|
191
|
+
- [Gateway](#gateway)
|
|
192
|
+
- [HttpClientErrorStatus](#httpclienterrorstatus)
|
|
193
|
+
- [HttpInfoStatus](#httpinfostatus)
|
|
194
|
+
- [HttpRedirectionStatus](#httpredirectionstatus)
|
|
195
|
+
- [HttpServerErrorStatus](#httpservererrorstatus)
|
|
196
|
+
- [HttpSuccessStatus](#httpsuccessstatus)
|
|
197
|
+
- [Interfaces](#interfaces)
|
|
198
|
+
- [ErrorResponse](#errorresponse)
|
|
199
|
+
- [HttpResponse](#httpresponse)
|
|
200
|
+
- [SuccessResponse](#successresponse)
|
|
201
|
+
- [UserInfo](#userinfo)
|
|
202
|
+
- [Type Aliases](#type-aliases)
|
|
203
|
+
- [ErrorResponseCode](#errorresponsecode)
|
|
204
|
+
- [FileId](#fileid)
|
|
205
|
+
- [HttpStatus](#httpstatus)
|
|
206
|
+
- [ResponseCode](#responsecode)
|
|
207
|
+
- [SocketId](#socketid)
|
|
208
|
+
- [SuccessResponseCode](#successresponsecode)
|
|
209
|
+
- [WsRefId](#wsrefid)
|
|
210
|
+
- [Variables](#variables)
|
|
211
|
+
- [DAY_IN_HOURS](#day_in_hours)
|
|
212
|
+
- [DAY_IN_SECONDS](#day_in_seconds)
|
|
213
|
+
- [DEFAULT_ITEMS_PER_PAGE](#default_items_per_page)
|
|
214
|
+
- [DEFAULT_MYSQL_PORT](#default_mysql_port)
|
|
215
|
+
- [DEFAULT_REDIS_PORT](#default_redis_port)
|
|
216
|
+
- [DEFAULT_SALT_ROUNDS](#default_salt_rounds)
|
|
217
|
+
- [DEFAULT_UUID_VERSION](#default_uuid_version)
|
|
218
|
+
- [DEFAULT_VERIFY_TOKEN_LENGTH](#default_verify_token_length)
|
|
219
|
+
- [Errors](#errors)
|
|
220
|
+
- [HOUR_IN_MINUTES](#hour_in_minutes)
|
|
221
|
+
- [MINUTE_IN_SECONDS](#minute_in_seconds)
|
|
222
|
+
- [MONTH_IN_DAYS](#month_in_days)
|
|
223
|
+
- [MONTH_IN_SECONDS](#month_in_seconds)
|
|
224
|
+
- [SECOND_IN_MS](#second_in_ms)
|
|
225
|
+
- [SuccessResponses](#successresponses)
|
|
226
|
+
|
|
227
|
+
## Classes
|
|
228
|
+
|
|
229
|
+
### SuccessResponseDto
|
|
230
|
+
|
|
231
|
+
Defined in: [builders/success-response.dto.ts:55](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/builders/success-response.dto.ts#L55)
|
|
232
|
+
|
|
233
|
+
Data Transfer Object for standardized success responses
|
|
234
|
+
|
|
235
|
+
This class provides a standardized way to create success response objects
|
|
236
|
+
for API endpoints. It implements the SuccessResponse interface and ensures
|
|
237
|
+
that all required properties are properly set with appropriate default values.
|
|
238
|
+
|
|
239
|
+
Key features:
|
|
240
|
+
|
|
241
|
+
- Flexible constructor that accepts either individual parameters or a complete response object
|
|
242
|
+
- Default values for all properties if not explicitly provided
|
|
243
|
+
- Type-safe response code handling with autocomplete support
|
|
244
|
+
- Consistent structure for all success responses across the application
|
|
245
|
+
|
|
246
|
+
The class is designed to be used in controllers and services to return
|
|
247
|
+
standardized success responses to API clients.
|
|
248
|
+
|
|
249
|
+
#### Examples
|
|
250
|
+
|
|
251
|
+
```typescript
|
|
252
|
+
// Creating a success response with custom message
|
|
253
|
+
@Post()
|
|
254
|
+
createUser(@Body() createUserDto: CreateUserDto): SuccessResponseDto {
|
|
255
|
+
this.userService.create(createUserDto);
|
|
256
|
+
return new SuccessResponseDto("User created successfully");
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
```typescript
|
|
261
|
+
// Creating a success response from an existing response object
|
|
262
|
+
@Get()
|
|
263
|
+
getUsers(): SuccessResponseDto {
|
|
264
|
+
const users = this.userService.findAll();
|
|
265
|
+
const response = {
|
|
266
|
+
statusCode: HttpSuccessStatus.OK,
|
|
267
|
+
code: "USERS_RETRIEVED",
|
|
268
|
+
message: "Users retrieved successfully",
|
|
269
|
+
data: users
|
|
270
|
+
};
|
|
271
|
+
return new SuccessResponseDto(response);
|
|
272
|
+
}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
#### See
|
|
276
|
+
|
|
277
|
+
- [SuccessResponse](#successresponse) The interface this class implements
|
|
278
|
+
- [HttpSuccessStatus](#httpsuccessstatus) Enum of HTTP success status codes
|
|
279
|
+
- [SuccessResponses](#successresponses) Predefined success response templates
|
|
280
|
+
|
|
281
|
+
#### Implements
|
|
282
|
+
|
|
283
|
+
- [`SuccessResponse`](#successresponse)
|
|
284
|
+
|
|
285
|
+
#### Constructors
|
|
286
|
+
|
|
287
|
+
##### Constructor
|
|
288
|
+
|
|
289
|
+
```ts
|
|
290
|
+
new SuccessResponseDto(
|
|
291
|
+
message?,
|
|
292
|
+
code?,
|
|
293
|
+
status?,
|
|
294
|
+
description?): SuccessResponseDto;
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
Defined in: [builders/success-response.dto.ts:118](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/builders/success-response.dto.ts#L118)
|
|
298
|
+
|
|
299
|
+
Creates a new success response with individual parameters
|
|
300
|
+
|
|
301
|
+
This constructor overload allows creating a success response by specifying
|
|
302
|
+
individual properties. Any properties not provided will use default values
|
|
303
|
+
from SuccessResponses.SUCCESS.
|
|
304
|
+
|
|
305
|
+
###### Parameters
|
|
306
|
+
|
|
307
|
+
<table>
|
|
308
|
+
<thead>
|
|
309
|
+
<tr>
|
|
310
|
+
<th>Parameter</th>
|
|
311
|
+
<th>Type</th>
|
|
312
|
+
<th>Description</th>
|
|
313
|
+
</tr>
|
|
314
|
+
</thead>
|
|
315
|
+
<tbody>
|
|
316
|
+
<tr>
|
|
317
|
+
<td>
|
|
318
|
+
|
|
319
|
+
`message?`
|
|
320
|
+
|
|
321
|
+
</td>
|
|
322
|
+
<td>
|
|
323
|
+
|
|
324
|
+
`string`
|
|
325
|
+
|
|
326
|
+
</td>
|
|
327
|
+
<td>
|
|
328
|
+
|
|
329
|
+
Human-readable success message
|
|
330
|
+
|
|
331
|
+
</td>
|
|
332
|
+
</tr>
|
|
333
|
+
<tr>
|
|
334
|
+
<td>
|
|
335
|
+
|
|
336
|
+
`code?`
|
|
337
|
+
|
|
338
|
+
</td>
|
|
339
|
+
<td>
|
|
340
|
+
|
|
341
|
+
`string`
|
|
342
|
+
|
|
343
|
+
</td>
|
|
344
|
+
<td>
|
|
345
|
+
|
|
346
|
+
Unique code identifying the success type
|
|
347
|
+
|
|
348
|
+
</td>
|
|
349
|
+
</tr>
|
|
350
|
+
<tr>
|
|
351
|
+
<td>
|
|
352
|
+
|
|
353
|
+
`status?`
|
|
354
|
+
|
|
355
|
+
</td>
|
|
356
|
+
<td>
|
|
357
|
+
|
|
358
|
+
[`HttpSuccessStatus`](#httpsuccessstatus)
|
|
359
|
+
|
|
360
|
+
</td>
|
|
361
|
+
<td>
|
|
362
|
+
|
|
363
|
+
HTTP status code for the response
|
|
364
|
+
|
|
365
|
+
</td>
|
|
366
|
+
</tr>
|
|
367
|
+
<tr>
|
|
368
|
+
<td>
|
|
369
|
+
|
|
370
|
+
`description?`
|
|
371
|
+
|
|
372
|
+
</td>
|
|
373
|
+
<td>
|
|
374
|
+
|
|
375
|
+
`string`
|
|
376
|
+
|
|
377
|
+
</td>
|
|
378
|
+
<td>
|
|
379
|
+
|
|
380
|
+
Optional detailed description
|
|
381
|
+
|
|
382
|
+
</td>
|
|
383
|
+
</tr>
|
|
384
|
+
</tbody>
|
|
385
|
+
</table>
|
|
386
|
+
|
|
387
|
+
###### Returns
|
|
388
|
+
|
|
389
|
+
[`SuccessResponseDto`](#successresponsedto)
|
|
390
|
+
|
|
391
|
+
###### Example
|
|
392
|
+
|
|
393
|
+
```typescript
|
|
394
|
+
// Basic success response with just a message
|
|
395
|
+
const response = new SuccessResponseDto("Operation completed successfully");
|
|
396
|
+
|
|
397
|
+
// Success response with custom code and status
|
|
398
|
+
const response = new SuccessResponseDto(
|
|
399
|
+
"User created successfully",
|
|
400
|
+
"USER_CREATED",
|
|
401
|
+
HttpSuccessStatus.CREATED,
|
|
402
|
+
);
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
##### Constructor
|
|
406
|
+
|
|
407
|
+
```ts
|
|
408
|
+
new SuccessResponseDto(response): SuccessResponseDto;
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
Defined in: [builders/success-response.dto.ts:140](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/builders/success-response.dto.ts#L140)
|
|
412
|
+
|
|
413
|
+
Creates a new success response from an existing response object
|
|
414
|
+
|
|
415
|
+
This constructor overload allows creating a success response by providing
|
|
416
|
+
an existing SuccessResponse object. Any properties not provided in the
|
|
417
|
+
input object will use default values from SuccessResponses.SUCCESS.
|
|
418
|
+
|
|
419
|
+
###### Parameters
|
|
420
|
+
|
|
421
|
+
<table>
|
|
422
|
+
<thead>
|
|
423
|
+
<tr>
|
|
424
|
+
<th>Parameter</th>
|
|
425
|
+
<th>Type</th>
|
|
426
|
+
<th>Description</th>
|
|
427
|
+
</tr>
|
|
428
|
+
</thead>
|
|
429
|
+
<tbody>
|
|
430
|
+
<tr>
|
|
431
|
+
<td>
|
|
432
|
+
|
|
433
|
+
`response`
|
|
434
|
+
|
|
435
|
+
</td>
|
|
436
|
+
<td>
|
|
437
|
+
|
|
438
|
+
[`SuccessResponse`](#successresponse)
|
|
439
|
+
|
|
440
|
+
</td>
|
|
441
|
+
<td>
|
|
442
|
+
|
|
443
|
+
Existing success response object
|
|
444
|
+
|
|
445
|
+
</td>
|
|
446
|
+
</tr>
|
|
447
|
+
</tbody>
|
|
448
|
+
</table>
|
|
449
|
+
|
|
450
|
+
###### Returns
|
|
451
|
+
|
|
452
|
+
[`SuccessResponseDto`](#successresponsedto)
|
|
453
|
+
|
|
454
|
+
###### Example
|
|
455
|
+
|
|
456
|
+
```typescript
|
|
457
|
+
// Creating from an existing response object
|
|
458
|
+
const existingResponse = {
|
|
459
|
+
statusCode: HttpSuccessStatus.OK,
|
|
460
|
+
code: "DATA_RETRIEVED",
|
|
461
|
+
message: "Data retrieved successfully",
|
|
462
|
+
};
|
|
463
|
+
const response = new SuccessResponseDto(existingResponse);
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
#### Properties
|
|
467
|
+
|
|
468
|
+
<table>
|
|
469
|
+
<thead>
|
|
470
|
+
<tr>
|
|
471
|
+
<th>Property</th>
|
|
472
|
+
<th>Type</th>
|
|
473
|
+
<th>Description</th>
|
|
474
|
+
<th>Defined in</th>
|
|
475
|
+
</tr>
|
|
476
|
+
</thead>
|
|
477
|
+
<tbody>
|
|
478
|
+
<tr>
|
|
479
|
+
<td>
|
|
480
|
+
|
|
481
|
+
<a id="property-code"></a> `code`
|
|
482
|
+
|
|
483
|
+
</td>
|
|
484
|
+
<td>
|
|
485
|
+
|
|
486
|
+
`LooseAutocomplete`<`AuthSuccessResponseCode`>
|
|
487
|
+
|
|
488
|
+
</td>
|
|
489
|
+
<td>
|
|
490
|
+
|
|
491
|
+
Unique code identifying the success response type
|
|
492
|
+
|
|
493
|
+
This property holds a string code that identifies the specific type of success.
|
|
494
|
+
It uses LooseAutocomplete to provide type suggestions from AuthSuccessResponseCode
|
|
495
|
+
while still allowing custom string values.
|
|
496
|
+
|
|
497
|
+
**See**
|
|
498
|
+
|
|
499
|
+
AuthSuccessResponseCode For predefined success codes
|
|
500
|
+
|
|
501
|
+
</td>
|
|
502
|
+
<td>
|
|
503
|
+
|
|
504
|
+
[builders/success-response.dto.ts:75](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/builders/success-response.dto.ts#L75)
|
|
505
|
+
|
|
506
|
+
</td>
|
|
507
|
+
</tr>
|
|
508
|
+
<tr>
|
|
509
|
+
<td>
|
|
510
|
+
|
|
511
|
+
<a id="property-description"></a> `description?`
|
|
512
|
+
|
|
513
|
+
</td>
|
|
514
|
+
<td>
|
|
515
|
+
|
|
516
|
+
`string`
|
|
517
|
+
|
|
518
|
+
</td>
|
|
519
|
+
<td>
|
|
520
|
+
|
|
521
|
+
Optional detailed description of the success result
|
|
522
|
+
|
|
523
|
+
This property can contain additional information about the success result
|
|
524
|
+
that might be useful for debugging or providing more context to developers.
|
|
525
|
+
|
|
526
|
+
</td>
|
|
527
|
+
<td>
|
|
528
|
+
|
|
529
|
+
[builders/success-response.dto.ts:91](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/builders/success-response.dto.ts#L91)
|
|
530
|
+
|
|
531
|
+
</td>
|
|
532
|
+
</tr>
|
|
533
|
+
<tr>
|
|
534
|
+
<td>
|
|
535
|
+
|
|
536
|
+
<a id="property-message"></a> `message`
|
|
537
|
+
|
|
538
|
+
</td>
|
|
539
|
+
<td>
|
|
540
|
+
|
|
541
|
+
`string`
|
|
542
|
+
|
|
543
|
+
</td>
|
|
544
|
+
<td>
|
|
545
|
+
|
|
546
|
+
Human-readable success message
|
|
547
|
+
|
|
548
|
+
This property contains a user-friendly message describing the success result.
|
|
549
|
+
It should be clear, concise, and suitable for displaying to end users.
|
|
550
|
+
|
|
551
|
+
</td>
|
|
552
|
+
<td>
|
|
553
|
+
|
|
554
|
+
[builders/success-response.dto.ts:83](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/builders/success-response.dto.ts#L83)
|
|
555
|
+
|
|
556
|
+
</td>
|
|
557
|
+
</tr>
|
|
558
|
+
<tr>
|
|
559
|
+
<td>
|
|
560
|
+
|
|
561
|
+
<a id="property-statuscode"></a> `statusCode`
|
|
562
|
+
|
|
563
|
+
</td>
|
|
564
|
+
<td>
|
|
565
|
+
|
|
566
|
+
[`HttpSuccessStatus`](#httpsuccessstatus)
|
|
567
|
+
|
|
568
|
+
</td>
|
|
569
|
+
<td>
|
|
570
|
+
|
|
571
|
+
HTTP status code for the success response
|
|
572
|
+
|
|
573
|
+
This property holds the HTTP status code that should be returned to the client.
|
|
574
|
+
It uses the HttpSuccessStatus enum to ensure only valid success status codes are used.
|
|
575
|
+
|
|
576
|
+
**See**
|
|
577
|
+
|
|
578
|
+
[HttpSuccessStatus](#httpsuccessstatus) For available status codes
|
|
579
|
+
|
|
580
|
+
</td>
|
|
581
|
+
<td>
|
|
582
|
+
|
|
583
|
+
[builders/success-response.dto.ts:64](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/builders/success-response.dto.ts#L64)
|
|
584
|
+
|
|
585
|
+
</td>
|
|
586
|
+
</tr>
|
|
587
|
+
</tbody>
|
|
588
|
+
</table>
|
|
589
|
+
|
|
590
|
+
## Enumerations
|
|
591
|
+
|
|
592
|
+
### CommonErrorResponseCode
|
|
593
|
+
|
|
594
|
+
Defined in: [enums/common-error-response-code.enum.ts:16](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L16)
|
|
595
|
+
|
|
596
|
+
Common Error Response Codes Enum
|
|
597
|
+
|
|
598
|
+
This enum defines general-purpose error response codes that can be used across different
|
|
599
|
+
services and modules in the application. Each code represents a specific error condition
|
|
600
|
+
related to common operations such as data validation, resource access, and file operations.
|
|
601
|
+
|
|
602
|
+
The naming convention includes HTTP status codes (e.g., 400, 404, 500) for clarity, with
|
|
603
|
+
the prefix "ERROR\_" to distinguish them as error codes.
|
|
604
|
+
|
|
605
|
+
Enum Values are organized by HTTP status categories:
|
|
606
|
+
|
|
607
|
+
- `400` series: Client errors (Bad Request, Unauthorized, Forbidden, Not Found)
|
|
608
|
+
- `500` series: Server errors (Internal Server Error)
|
|
609
|
+
- Generic errors without specific status codes
|
|
610
|
+
|
|
611
|
+
#### Enumeration Members
|
|
612
|
+
|
|
613
|
+
<table>
|
|
614
|
+
<thead>
|
|
615
|
+
<tr>
|
|
616
|
+
<th>Enumeration Member</th>
|
|
617
|
+
<th>Value</th>
|
|
618
|
+
<th>Description</th>
|
|
619
|
+
<th>Defined in</th>
|
|
620
|
+
</tr>
|
|
621
|
+
</thead>
|
|
622
|
+
<tbody>
|
|
623
|
+
<tr>
|
|
624
|
+
<td>
|
|
625
|
+
|
|
626
|
+
<a id="enumeration-member-error"></a> `ERROR`
|
|
627
|
+
|
|
628
|
+
</td>
|
|
629
|
+
<td>
|
|
630
|
+
|
|
631
|
+
`"ERROR"`
|
|
632
|
+
|
|
633
|
+
</td>
|
|
634
|
+
<td>
|
|
635
|
+
|
|
636
|
+
Generic unspecified error
|
|
637
|
+
|
|
638
|
+
Most general error code for cases where the specific error type cannot be determined
|
|
639
|
+
or doesn't fit into any other category.
|
|
640
|
+
|
|
641
|
+
</td>
|
|
642
|
+
<td>
|
|
643
|
+
|
|
644
|
+
[enums/common-error-response-code.enum.ts:129](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L129)
|
|
645
|
+
|
|
646
|
+
</td>
|
|
647
|
+
</tr>
|
|
648
|
+
<tr>
|
|
649
|
+
<td>
|
|
650
|
+
|
|
651
|
+
<a id="enumeration-member-error_400"></a> `ERROR_400`
|
|
652
|
+
|
|
653
|
+
</td>
|
|
654
|
+
<td>
|
|
655
|
+
|
|
656
|
+
`"ERROR_400"`
|
|
657
|
+
|
|
658
|
+
</td>
|
|
659
|
+
<td>
|
|
660
|
+
|
|
661
|
+
Generic bad request error (400 Bad Request)
|
|
662
|
+
|
|
663
|
+
Generic error for bad requests when a more specific error code is not applicable.
|
|
664
|
+
|
|
665
|
+
</td>
|
|
666
|
+
<td>
|
|
667
|
+
|
|
668
|
+
[enums/common-error-response-code.enum.ts:93](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L93)
|
|
669
|
+
|
|
670
|
+
</td>
|
|
671
|
+
</tr>
|
|
672
|
+
<tr>
|
|
673
|
+
<td>
|
|
674
|
+
|
|
675
|
+
<a id="enumeration-member-error_400_empty_id"></a> `ERROR_400_EMPTY_ID`
|
|
676
|
+
|
|
677
|
+
</td>
|
|
678
|
+
<td>
|
|
679
|
+
|
|
680
|
+
`"ERROR_400_EMPTY_ID"`
|
|
681
|
+
|
|
682
|
+
</td>
|
|
683
|
+
<td>
|
|
684
|
+
|
|
685
|
+
Empty ID error (400 Bad Request)
|
|
686
|
+
|
|
687
|
+
Occurs when an ID field is required but not provided or is empty.
|
|
688
|
+
|
|
689
|
+
</td>
|
|
690
|
+
<td>
|
|
691
|
+
|
|
692
|
+
[enums/common-error-response-code.enum.ts:22](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L22)
|
|
693
|
+
|
|
694
|
+
</td>
|
|
695
|
+
</tr>
|
|
696
|
+
<tr>
|
|
697
|
+
<td>
|
|
698
|
+
|
|
699
|
+
<a id="enumeration-member-error_400_empty_ids"></a> `ERROR_400_EMPTY_IDS`
|
|
700
|
+
|
|
701
|
+
</td>
|
|
702
|
+
<td>
|
|
703
|
+
|
|
704
|
+
`"ERROR_400_EMPTY_IDS"`
|
|
705
|
+
|
|
706
|
+
</td>
|
|
707
|
+
<td>
|
|
708
|
+
|
|
709
|
+
Empty IDs array error (400 Bad Request)
|
|
710
|
+
|
|
711
|
+
Occurs when an array of IDs is required but not provided or is empty.
|
|
712
|
+
|
|
713
|
+
</td>
|
|
714
|
+
<td>
|
|
715
|
+
|
|
716
|
+
[enums/common-error-response-code.enum.ts:29](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L29)
|
|
717
|
+
|
|
718
|
+
</td>
|
|
719
|
+
</tr>
|
|
720
|
+
<tr>
|
|
721
|
+
<td>
|
|
722
|
+
|
|
723
|
+
<a id="enumeration-member-error_400_invalid_id"></a> `ERROR_400_INVALID_ID`
|
|
724
|
+
|
|
725
|
+
</td>
|
|
726
|
+
<td>
|
|
727
|
+
|
|
728
|
+
`"ERROR_400_INVALID_ID"`
|
|
729
|
+
|
|
730
|
+
</td>
|
|
731
|
+
<td>
|
|
732
|
+
|
|
733
|
+
Invalid ID format or value (400 Bad Request)
|
|
734
|
+
|
|
735
|
+
Occurs when an ID is provided but has an invalid format or value.
|
|
736
|
+
|
|
737
|
+
</td>
|
|
738
|
+
<td>
|
|
739
|
+
|
|
740
|
+
[enums/common-error-response-code.enum.ts:36](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L36)
|
|
741
|
+
|
|
742
|
+
</td>
|
|
743
|
+
</tr>
|
|
744
|
+
<tr>
|
|
745
|
+
<td>
|
|
746
|
+
|
|
747
|
+
<a id="enumeration-member-error_400_invalid_ids"></a> `ERROR_400_INVALID_IDS`
|
|
748
|
+
|
|
749
|
+
</td>
|
|
750
|
+
<td>
|
|
751
|
+
|
|
752
|
+
`"ERROR_400_INVALID_IDS"`
|
|
753
|
+
|
|
754
|
+
</td>
|
|
755
|
+
<td>
|
|
756
|
+
|
|
757
|
+
Invalid IDs array (400 Bad Request)
|
|
758
|
+
|
|
759
|
+
Occurs when an array of IDs contains one or more invalid entries.
|
|
760
|
+
|
|
761
|
+
</td>
|
|
762
|
+
<td>
|
|
763
|
+
|
|
764
|
+
[enums/common-error-response-code.enum.ts:43](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L43)
|
|
765
|
+
|
|
766
|
+
</td>
|
|
767
|
+
</tr>
|
|
768
|
+
<tr>
|
|
769
|
+
<td>
|
|
770
|
+
|
|
771
|
+
<a id="enumeration-member-error_400_invalid_uuid"></a> `ERROR_400_INVALID_UUID`
|
|
772
|
+
|
|
773
|
+
</td>
|
|
774
|
+
<td>
|
|
775
|
+
|
|
776
|
+
`"ERROR_400_INVALID_UUID"`
|
|
777
|
+
|
|
778
|
+
</td>
|
|
779
|
+
<td>
|
|
780
|
+
|
|
781
|
+
Invalid UUID format (400 Bad Request)
|
|
782
|
+
|
|
783
|
+
Occurs when a provided UUID doesn't conform to the required format.
|
|
784
|
+
|
|
785
|
+
</td>
|
|
786
|
+
<td>
|
|
787
|
+
|
|
788
|
+
[enums/common-error-response-code.enum.ts:50](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L50)
|
|
789
|
+
|
|
790
|
+
</td>
|
|
791
|
+
</tr>
|
|
792
|
+
<tr>
|
|
793
|
+
<td>
|
|
794
|
+
|
|
795
|
+
<a id="enumeration-member-error_400_not_id_array"></a> `ERROR_400_NOT_ID_ARRAY`
|
|
796
|
+
|
|
797
|
+
</td>
|
|
798
|
+
<td>
|
|
799
|
+
|
|
800
|
+
`"ERROR_400_NOT_ID_ARRAY"`
|
|
801
|
+
|
|
802
|
+
</td>
|
|
803
|
+
<td>
|
|
804
|
+
|
|
805
|
+
Not an array of IDs (400 Bad Request)
|
|
806
|
+
|
|
807
|
+
Occurs when a parameter expected to be an array of IDs is of the wrong type.
|
|
808
|
+
|
|
809
|
+
</td>
|
|
810
|
+
<td>
|
|
811
|
+
|
|
812
|
+
[enums/common-error-response-code.enum.ts:57](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L57)
|
|
813
|
+
|
|
814
|
+
</td>
|
|
815
|
+
</tr>
|
|
816
|
+
<tr>
|
|
817
|
+
<td>
|
|
818
|
+
|
|
819
|
+
<a id="enumeration-member-error_401"></a> `ERROR_401`
|
|
820
|
+
|
|
821
|
+
</td>
|
|
822
|
+
<td>
|
|
823
|
+
|
|
824
|
+
`"ERROR_401"`
|
|
825
|
+
|
|
826
|
+
</td>
|
|
827
|
+
<td>
|
|
828
|
+
|
|
829
|
+
Generic unauthorized error (401 Unauthorized)
|
|
830
|
+
|
|
831
|
+
Generic error for unauthorized access when a more specific error code is not applicable.
|
|
832
|
+
|
|
833
|
+
</td>
|
|
834
|
+
<td>
|
|
835
|
+
|
|
836
|
+
[enums/common-error-response-code.enum.ts:100](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L100)
|
|
837
|
+
|
|
838
|
+
</td>
|
|
839
|
+
</tr>
|
|
840
|
+
<tr>
|
|
841
|
+
<td>
|
|
842
|
+
|
|
843
|
+
<a id="enumeration-member-error_403"></a> `ERROR_403`
|
|
844
|
+
|
|
845
|
+
</td>
|
|
846
|
+
<td>
|
|
847
|
+
|
|
848
|
+
`"ERROR_403"`
|
|
849
|
+
|
|
850
|
+
</td>
|
|
851
|
+
<td>
|
|
852
|
+
|
|
853
|
+
Generic forbidden error (403 Forbidden)
|
|
854
|
+
|
|
855
|
+
Generic error for forbidden access when a more specific error code is not applicable.
|
|
856
|
+
|
|
857
|
+
</td>
|
|
858
|
+
<td>
|
|
859
|
+
|
|
860
|
+
[enums/common-error-response-code.enum.ts:107](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L107)
|
|
861
|
+
|
|
862
|
+
</td>
|
|
863
|
+
</tr>
|
|
864
|
+
<tr>
|
|
865
|
+
<td>
|
|
866
|
+
|
|
867
|
+
<a id="enumeration-member-error_404"></a> `ERROR_404`
|
|
868
|
+
|
|
869
|
+
</td>
|
|
870
|
+
<td>
|
|
871
|
+
|
|
872
|
+
`"ERROR_404"`
|
|
873
|
+
|
|
874
|
+
</td>
|
|
875
|
+
<td>
|
|
876
|
+
|
|
877
|
+
Generic not found error (404 Not Found)
|
|
878
|
+
|
|
879
|
+
Generic error for resource not found when a more specific error code is not applicable.
|
|
880
|
+
|
|
881
|
+
</td>
|
|
882
|
+
<td>
|
|
883
|
+
|
|
884
|
+
[enums/common-error-response-code.enum.ts:114](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L114)
|
|
885
|
+
|
|
886
|
+
</td>
|
|
887
|
+
</tr>
|
|
888
|
+
<tr>
|
|
889
|
+
<td>
|
|
890
|
+
|
|
891
|
+
<a id="enumeration-member-error_404_file_not_exist"></a> `ERROR_404_FILE_NOT_EXIST`
|
|
892
|
+
|
|
893
|
+
</td>
|
|
894
|
+
<td>
|
|
895
|
+
|
|
896
|
+
`"ERROR_404_FILE_NOT_EXIST"`
|
|
897
|
+
|
|
898
|
+
</td>
|
|
899
|
+
<td>
|
|
900
|
+
|
|
901
|
+
File not found (404 Not Found)
|
|
902
|
+
|
|
903
|
+
Occurs when attempting to access a file that doesn't exist.
|
|
904
|
+
|
|
905
|
+
</td>
|
|
906
|
+
<td>
|
|
907
|
+
|
|
908
|
+
[enums/common-error-response-code.enum.ts:64](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L64)
|
|
909
|
+
|
|
910
|
+
</td>
|
|
911
|
+
</tr>
|
|
912
|
+
<tr>
|
|
913
|
+
<td>
|
|
914
|
+
|
|
915
|
+
<a id="enumeration-member-error_404_not_implemented"></a> `ERROR_404_NOT_IMPLEMENTED`
|
|
916
|
+
|
|
917
|
+
</td>
|
|
918
|
+
<td>
|
|
919
|
+
|
|
920
|
+
`"ERROR_404_NOT_IMPLEMENTED"`
|
|
921
|
+
|
|
922
|
+
</td>
|
|
923
|
+
<td>
|
|
924
|
+
|
|
925
|
+
Feature not implemented (404 Not Found)
|
|
926
|
+
|
|
927
|
+
Occurs when attempting to use a feature or endpoint that is not yet implemented.
|
|
928
|
+
Note: While HTTP 501 is traditionally used for this, this uses 404 for specific cases.
|
|
929
|
+
|
|
930
|
+
</td>
|
|
931
|
+
<td>
|
|
932
|
+
|
|
933
|
+
[enums/common-error-response-code.enum.ts:72](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L72)
|
|
934
|
+
|
|
935
|
+
</td>
|
|
936
|
+
</tr>
|
|
937
|
+
<tr>
|
|
938
|
+
<td>
|
|
939
|
+
|
|
940
|
+
<a id="enumeration-member-error_500"></a> `ERROR_500`
|
|
941
|
+
|
|
942
|
+
</td>
|
|
943
|
+
<td>
|
|
944
|
+
|
|
945
|
+
`"ERROR_500"`
|
|
946
|
+
|
|
947
|
+
</td>
|
|
948
|
+
<td>
|
|
949
|
+
|
|
950
|
+
Generic server error (500 Internal Server Error)
|
|
951
|
+
|
|
952
|
+
Generic error for server-side issues when a more specific error code is not applicable.
|
|
953
|
+
|
|
954
|
+
</td>
|
|
955
|
+
<td>
|
|
956
|
+
|
|
957
|
+
[enums/common-error-response-code.enum.ts:121](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L121)
|
|
958
|
+
|
|
959
|
+
</td>
|
|
960
|
+
</tr>
|
|
961
|
+
<tr>
|
|
962
|
+
<td>
|
|
963
|
+
|
|
964
|
+
<a id="enumeration-member-error_500_file_delete"></a> `ERROR_500_FILE_DELETE`
|
|
965
|
+
|
|
966
|
+
</td>
|
|
967
|
+
<td>
|
|
968
|
+
|
|
969
|
+
`"ERROR_500_FILE_DELETE"`
|
|
970
|
+
|
|
971
|
+
</td>
|
|
972
|
+
<td>
|
|
973
|
+
|
|
974
|
+
File deletion error (500 Internal Server Error)
|
|
975
|
+
|
|
976
|
+
Occurs when there is a server-side error during file deletion.
|
|
977
|
+
|
|
978
|
+
</td>
|
|
979
|
+
<td>
|
|
980
|
+
|
|
981
|
+
[enums/common-error-response-code.enum.ts:86](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L86)
|
|
982
|
+
|
|
983
|
+
</td>
|
|
984
|
+
</tr>
|
|
985
|
+
<tr>
|
|
986
|
+
<td>
|
|
987
|
+
|
|
988
|
+
<a id="enumeration-member-error_500_file_upload"></a> `ERROR_500_FILE_UPLOAD`
|
|
989
|
+
|
|
990
|
+
</td>
|
|
991
|
+
<td>
|
|
992
|
+
|
|
993
|
+
`"ERROR_500_FILE_UPLOAD"`
|
|
994
|
+
|
|
995
|
+
</td>
|
|
996
|
+
<td>
|
|
997
|
+
|
|
998
|
+
File upload error (500 Internal Server Error)
|
|
999
|
+
|
|
1000
|
+
Occurs when there is a server-side error during file upload processing.
|
|
1001
|
+
|
|
1002
|
+
</td>
|
|
1003
|
+
<td>
|
|
1004
|
+
|
|
1005
|
+
[enums/common-error-response-code.enum.ts:79](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-error-response-code.enum.ts#L79)
|
|
1006
|
+
|
|
1007
|
+
</td>
|
|
1008
|
+
</tr>
|
|
1009
|
+
</tbody>
|
|
1010
|
+
</table>
|
|
1011
|
+
|
|
1012
|
+
---
|
|
1013
|
+
|
|
1014
|
+
### CommonSuccessResponseCode
|
|
1015
|
+
|
|
1016
|
+
Defined in: [enums/common-success-response-code.enum.ts:16](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-success-response-code.enum.ts#L16)
|
|
1017
|
+
|
|
1018
|
+
Common Success Response Codes Enum
|
|
1019
|
+
|
|
1020
|
+
This enum defines general-purpose success response codes that can be used across different
|
|
1021
|
+
services and modules in the application. Each code represents a specific success condition
|
|
1022
|
+
for operations and requests.
|
|
1023
|
+
|
|
1024
|
+
While HTTP status codes in the 2xx range (like 200 OK, 201 Created) provide a standardized
|
|
1025
|
+
way to indicate success at the protocol level, these application-specific success codes
|
|
1026
|
+
offer more granular information about the exact nature of the successful operation.
|
|
1027
|
+
|
|
1028
|
+
Currently, this enum contains a single generic success code, but it can be extended
|
|
1029
|
+
with more specific success codes as the application grows and more detailed success
|
|
1030
|
+
states need to be communicated.
|
|
1031
|
+
|
|
1032
|
+
#### Enumeration Members
|
|
1033
|
+
|
|
1034
|
+
<table>
|
|
1035
|
+
<thead>
|
|
1036
|
+
<tr>
|
|
1037
|
+
<th>Enumeration Member</th>
|
|
1038
|
+
<th>Value</th>
|
|
1039
|
+
<th>Description</th>
|
|
1040
|
+
<th>Defined in</th>
|
|
1041
|
+
</tr>
|
|
1042
|
+
</thead>
|
|
1043
|
+
<tbody>
|
|
1044
|
+
<tr>
|
|
1045
|
+
<td>
|
|
1046
|
+
|
|
1047
|
+
<a id="enumeration-member-success"></a> `SUCCESS`
|
|
1048
|
+
|
|
1049
|
+
</td>
|
|
1050
|
+
<td>
|
|
1051
|
+
|
|
1052
|
+
`"SUCCESS"`
|
|
1053
|
+
|
|
1054
|
+
</td>
|
|
1055
|
+
<td>
|
|
1056
|
+
|
|
1057
|
+
Generic success response
|
|
1058
|
+
|
|
1059
|
+
Indicates that the requested operation completed successfully without any issues.
|
|
1060
|
+
This is the most general success code and can be used when a more specific
|
|
1061
|
+
success code is not necessary or has not been defined.
|
|
1062
|
+
|
|
1063
|
+
</td>
|
|
1064
|
+
<td>
|
|
1065
|
+
|
|
1066
|
+
[enums/common-success-response-code.enum.ts:24](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/common-success-response-code.enum.ts#L24)
|
|
1067
|
+
|
|
1068
|
+
</td>
|
|
1069
|
+
</tr>
|
|
1070
|
+
</tbody>
|
|
1071
|
+
</table>
|
|
1072
|
+
|
|
1073
|
+
---
|
|
1074
|
+
|
|
1075
|
+
### Endpoint
|
|
1076
|
+
|
|
1077
|
+
Defined in: [enums/endpoint.enum.ts:16](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/endpoint.enum.ts#L16)
|
|
1078
|
+
|
|
1079
|
+
Base API Endpoints Enum
|
|
1080
|
+
|
|
1081
|
+
This enum defines the root-level API endpoints used throughout the application.
|
|
1082
|
+
Each value represents a top-level API route segment that serves as a namespace
|
|
1083
|
+
for more specific endpoints within that domain.
|
|
1084
|
+
|
|
1085
|
+
These root endpoints are typically combined with more specific sub-endpoints
|
|
1086
|
+
(defined in domain-specific endpoint enums) to form complete API paths. For example,
|
|
1087
|
+
the AUTH endpoint combined with an AuthEndpoint value would create a full authentication
|
|
1088
|
+
API route.
|
|
1089
|
+
|
|
1090
|
+
This approach allows for organized, hierarchical API routing and helps maintain
|
|
1091
|
+
consistency across the application's API structure.
|
|
1092
|
+
|
|
1093
|
+
#### Enumeration Members
|
|
1094
|
+
|
|
1095
|
+
<table>
|
|
1096
|
+
<thead>
|
|
1097
|
+
<tr>
|
|
1098
|
+
<th>Enumeration Member</th>
|
|
1099
|
+
<th>Value</th>
|
|
1100
|
+
<th>Description</th>
|
|
1101
|
+
<th>Defined in</th>
|
|
1102
|
+
</tr>
|
|
1103
|
+
</thead>
|
|
1104
|
+
<tbody>
|
|
1105
|
+
<tr>
|
|
1106
|
+
<td>
|
|
1107
|
+
|
|
1108
|
+
<a id="enumeration-member-auth"></a> `AUTH`
|
|
1109
|
+
|
|
1110
|
+
</td>
|
|
1111
|
+
<td>
|
|
1112
|
+
|
|
1113
|
+
`"auth"`
|
|
1114
|
+
|
|
1115
|
+
</td>
|
|
1116
|
+
<td>
|
|
1117
|
+
|
|
1118
|
+
Authentication API endpoint root
|
|
1119
|
+
|
|
1120
|
+
Base path segment for all authentication-related operations.
|
|
1121
|
+
This serves as the namespace for endpoints defined in AuthEndpoint enum.
|
|
1122
|
+
|
|
1123
|
+
Complete authentication endpoints are formed by combining this root with
|
|
1124
|
+
specific authentication operations, e.g., "/auth/sign-in" or "/auth/verify-email".
|
|
1125
|
+
|
|
1126
|
+
**See**
|
|
1127
|
+
|
|
1128
|
+
AuthEndpoint For specific authentication operation endpoints
|
|
1129
|
+
|
|
1130
|
+
</td>
|
|
1131
|
+
<td>
|
|
1132
|
+
|
|
1133
|
+
[enums/endpoint.enum.ts:28](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/endpoint.enum.ts#L28)
|
|
1134
|
+
|
|
1135
|
+
</td>
|
|
1136
|
+
</tr>
|
|
1137
|
+
</tbody>
|
|
1138
|
+
</table>
|
|
1139
|
+
|
|
1140
|
+
---
|
|
1141
|
+
|
|
1142
|
+
### Gateway
|
|
1143
|
+
|
|
1144
|
+
Defined in: [enums/gateways.enum.ts:17](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/gateways.enum.ts#L17)
|
|
1145
|
+
|
|
1146
|
+
Application Gateways Enum
|
|
1147
|
+
|
|
1148
|
+
This enum defines the different communication gateways used in the application
|
|
1149
|
+
for real-time or streaming data exchange. Each value represents a specific
|
|
1150
|
+
gateway technology or implementation that enables bidirectional communication
|
|
1151
|
+
between clients and the server.
|
|
1152
|
+
|
|
1153
|
+
Gateways provide alternatives to traditional HTTP request/response patterns,
|
|
1154
|
+
allowing for push notifications, live updates, and interactive features.
|
|
1155
|
+
|
|
1156
|
+
The values in this enum can be used to identify and configure the appropriate
|
|
1157
|
+
gateway implementation for different parts of the application.
|
|
1158
|
+
|
|
1159
|
+
#### Enumeration Members
|
|
1160
|
+
|
|
1161
|
+
<table>
|
|
1162
|
+
<thead>
|
|
1163
|
+
<tr>
|
|
1164
|
+
<th>Enumeration Member</th>
|
|
1165
|
+
<th>Value</th>
|
|
1166
|
+
<th>Description</th>
|
|
1167
|
+
<th>Defined in</th>
|
|
1168
|
+
</tr>
|
|
1169
|
+
</thead>
|
|
1170
|
+
<tbody>
|
|
1171
|
+
<tr>
|
|
1172
|
+
<td>
|
|
1173
|
+
|
|
1174
|
+
<a id="enumeration-member-socket"></a> `SOCKET`
|
|
1175
|
+
|
|
1176
|
+
</td>
|
|
1177
|
+
<td>
|
|
1178
|
+
|
|
1179
|
+
`"socket"`
|
|
1180
|
+
|
|
1181
|
+
</td>
|
|
1182
|
+
<td>
|
|
1183
|
+
|
|
1184
|
+
WebSocket gateway
|
|
1185
|
+
|
|
1186
|
+
Represents the WebSocket-based communication gateway, which provides full-duplex
|
|
1187
|
+
communication channels over a single, long-lived TCP connection.
|
|
1188
|
+
|
|
1189
|
+
This gateway enables real-time data exchange between clients and the server
|
|
1190
|
+
without the overhead of repeatedly establishing new connections. It's particularly
|
|
1191
|
+
useful for applications requiring low-latency updates, notifications, or
|
|
1192
|
+
interactive features.
|
|
1193
|
+
|
|
1194
|
+
The implementation may use libraries like Socket.IO or native WebSockets.
|
|
1195
|
+
|
|
1196
|
+
</td>
|
|
1197
|
+
<td>
|
|
1198
|
+
|
|
1199
|
+
[enums/gateways.enum.ts:31](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/gateways.enum.ts#L31)
|
|
1200
|
+
|
|
1201
|
+
</td>
|
|
1202
|
+
</tr>
|
|
1203
|
+
</tbody>
|
|
1204
|
+
</table>
|
|
1205
|
+
|
|
1206
|
+
---
|
|
1207
|
+
|
|
1208
|
+
### HttpClientErrorStatus
|
|
1209
|
+
|
|
1210
|
+
Defined in: [enums/http-status.enums.ts:83](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L83)
|
|
1211
|
+
|
|
1212
|
+
HTTP Client Error Status Codes (4xx)
|
|
1213
|
+
|
|
1214
|
+
This enum defines the standard HTTP status codes in the 4xx range (Client Error).
|
|
1215
|
+
These status codes indicate that the client seems to have made an error in the request.
|
|
1216
|
+
|
|
1217
|
+
The 4xx class of status codes is intended for situations in which the client
|
|
1218
|
+
appears to have erred, such as sending invalid authentication credentials,
|
|
1219
|
+
requesting a resource that doesn't exist, or submitting malformed data.
|
|
1220
|
+
|
|
1221
|
+
#### See
|
|
1222
|
+
|
|
1223
|
+
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client\_error\_responses
|
|
1224
|
+
|
|
1225
|
+
#### Enumeration Members
|
|
1226
|
+
|
|
1227
|
+
<table>
|
|
1228
|
+
<thead>
|
|
1229
|
+
<tr>
|
|
1230
|
+
<th>Enumeration Member</th>
|
|
1231
|
+
<th>Value</th>
|
|
1232
|
+
<th>Defined in</th>
|
|
1233
|
+
</tr>
|
|
1234
|
+
</thead>
|
|
1235
|
+
<tbody>
|
|
1236
|
+
<tr>
|
|
1237
|
+
<td>
|
|
1238
|
+
|
|
1239
|
+
<a id="enumeration-member-bad_request"></a> `BAD_REQUEST`
|
|
1240
|
+
|
|
1241
|
+
</td>
|
|
1242
|
+
<td>
|
|
1243
|
+
|
|
1244
|
+
`400`
|
|
1245
|
+
|
|
1246
|
+
</td>
|
|
1247
|
+
<td>
|
|
1248
|
+
|
|
1249
|
+
[enums/http-status.enums.ts:84](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L84)
|
|
1250
|
+
|
|
1251
|
+
</td>
|
|
1252
|
+
</tr>
|
|
1253
|
+
<tr>
|
|
1254
|
+
<td>
|
|
1255
|
+
|
|
1256
|
+
<a id="enumeration-member-conflict"></a> `CONFLICT`
|
|
1257
|
+
|
|
1258
|
+
</td>
|
|
1259
|
+
<td>
|
|
1260
|
+
|
|
1261
|
+
`409`
|
|
1262
|
+
|
|
1263
|
+
</td>
|
|
1264
|
+
<td>
|
|
1265
|
+
|
|
1266
|
+
[enums/http-status.enums.ts:93](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L93)
|
|
1267
|
+
|
|
1268
|
+
</td>
|
|
1269
|
+
</tr>
|
|
1270
|
+
<tr>
|
|
1271
|
+
<td>
|
|
1272
|
+
|
|
1273
|
+
<a id="enumeration-member-expectation_failed"></a> `EXPECTATION_FAILED`
|
|
1274
|
+
|
|
1275
|
+
</td>
|
|
1276
|
+
<td>
|
|
1277
|
+
|
|
1278
|
+
`417`
|
|
1279
|
+
|
|
1280
|
+
</td>
|
|
1281
|
+
<td>
|
|
1282
|
+
|
|
1283
|
+
[enums/http-status.enums.ts:101](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L101)
|
|
1284
|
+
|
|
1285
|
+
</td>
|
|
1286
|
+
</tr>
|
|
1287
|
+
<tr>
|
|
1288
|
+
<td>
|
|
1289
|
+
|
|
1290
|
+
<a id="enumeration-member-failed_dependency"></a> `FAILED_DEPENDENCY`
|
|
1291
|
+
|
|
1292
|
+
</td>
|
|
1293
|
+
<td>
|
|
1294
|
+
|
|
1295
|
+
`424`
|
|
1296
|
+
|
|
1297
|
+
</td>
|
|
1298
|
+
<td>
|
|
1299
|
+
|
|
1300
|
+
[enums/http-status.enums.ts:106](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L106)
|
|
1301
|
+
|
|
1302
|
+
</td>
|
|
1303
|
+
</tr>
|
|
1304
|
+
<tr>
|
|
1305
|
+
<td>
|
|
1306
|
+
|
|
1307
|
+
<a id="enumeration-member-forbidden"></a> `FORBIDDEN`
|
|
1308
|
+
|
|
1309
|
+
</td>
|
|
1310
|
+
<td>
|
|
1311
|
+
|
|
1312
|
+
`403`
|
|
1313
|
+
|
|
1314
|
+
</td>
|
|
1315
|
+
<td>
|
|
1316
|
+
|
|
1317
|
+
[enums/http-status.enums.ts:87](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L87)
|
|
1318
|
+
|
|
1319
|
+
</td>
|
|
1320
|
+
</tr>
|
|
1321
|
+
<tr>
|
|
1322
|
+
<td>
|
|
1323
|
+
|
|
1324
|
+
<a id="enumeration-member-gone"></a> `GONE`
|
|
1325
|
+
|
|
1326
|
+
</td>
|
|
1327
|
+
<td>
|
|
1328
|
+
|
|
1329
|
+
`410`
|
|
1330
|
+
|
|
1331
|
+
</td>
|
|
1332
|
+
<td>
|
|
1333
|
+
|
|
1334
|
+
[enums/http-status.enums.ts:94](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L94)
|
|
1335
|
+
|
|
1336
|
+
</td>
|
|
1337
|
+
</tr>
|
|
1338
|
+
<tr>
|
|
1339
|
+
<td>
|
|
1340
|
+
|
|
1341
|
+
<a id="enumeration-member-im_a_teapot"></a> `IM_A_TEAPOT`
|
|
1342
|
+
|
|
1343
|
+
</td>
|
|
1344
|
+
<td>
|
|
1345
|
+
|
|
1346
|
+
`418`
|
|
1347
|
+
|
|
1348
|
+
</td>
|
|
1349
|
+
<td>
|
|
1350
|
+
|
|
1351
|
+
[enums/http-status.enums.ts:102](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L102)
|
|
1352
|
+
|
|
1353
|
+
</td>
|
|
1354
|
+
</tr>
|
|
1355
|
+
<tr>
|
|
1356
|
+
<td>
|
|
1357
|
+
|
|
1358
|
+
<a id="enumeration-member-length_required"></a> `LENGTH_REQUIRED`
|
|
1359
|
+
|
|
1360
|
+
</td>
|
|
1361
|
+
<td>
|
|
1362
|
+
|
|
1363
|
+
`411`
|
|
1364
|
+
|
|
1365
|
+
</td>
|
|
1366
|
+
<td>
|
|
1367
|
+
|
|
1368
|
+
[enums/http-status.enums.ts:95](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L95)
|
|
1369
|
+
|
|
1370
|
+
</td>
|
|
1371
|
+
</tr>
|
|
1372
|
+
<tr>
|
|
1373
|
+
<td>
|
|
1374
|
+
|
|
1375
|
+
<a id="enumeration-member-locked"></a> `LOCKED`
|
|
1376
|
+
|
|
1377
|
+
</td>
|
|
1378
|
+
<td>
|
|
1379
|
+
|
|
1380
|
+
`423`
|
|
1381
|
+
|
|
1382
|
+
</td>
|
|
1383
|
+
<td>
|
|
1384
|
+
|
|
1385
|
+
[enums/http-status.enums.ts:105](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L105)
|
|
1386
|
+
|
|
1387
|
+
</td>
|
|
1388
|
+
</tr>
|
|
1389
|
+
<tr>
|
|
1390
|
+
<td>
|
|
1391
|
+
|
|
1392
|
+
<a id="enumeration-member-method_not_allowed"></a> `METHOD_NOT_ALLOWED`
|
|
1393
|
+
|
|
1394
|
+
</td>
|
|
1395
|
+
<td>
|
|
1396
|
+
|
|
1397
|
+
`405`
|
|
1398
|
+
|
|
1399
|
+
</td>
|
|
1400
|
+
<td>
|
|
1401
|
+
|
|
1402
|
+
[enums/http-status.enums.ts:89](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L89)
|
|
1403
|
+
|
|
1404
|
+
</td>
|
|
1405
|
+
</tr>
|
|
1406
|
+
<tr>
|
|
1407
|
+
<td>
|
|
1408
|
+
|
|
1409
|
+
<a id="enumeration-member-misdirected_request"></a> `MISDIRECTED_REQUEST`
|
|
1410
|
+
|
|
1411
|
+
</td>
|
|
1412
|
+
<td>
|
|
1413
|
+
|
|
1414
|
+
`421`
|
|
1415
|
+
|
|
1416
|
+
</td>
|
|
1417
|
+
<td>
|
|
1418
|
+
|
|
1419
|
+
[enums/http-status.enums.ts:103](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L103)
|
|
1420
|
+
|
|
1421
|
+
</td>
|
|
1422
|
+
</tr>
|
|
1423
|
+
<tr>
|
|
1424
|
+
<td>
|
|
1425
|
+
|
|
1426
|
+
<a id="enumeration-member-not_acceptable"></a> `NOT_ACCEPTABLE`
|
|
1427
|
+
|
|
1428
|
+
</td>
|
|
1429
|
+
<td>
|
|
1430
|
+
|
|
1431
|
+
`406`
|
|
1432
|
+
|
|
1433
|
+
</td>
|
|
1434
|
+
<td>
|
|
1435
|
+
|
|
1436
|
+
[enums/http-status.enums.ts:90](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L90)
|
|
1437
|
+
|
|
1438
|
+
</td>
|
|
1439
|
+
</tr>
|
|
1440
|
+
<tr>
|
|
1441
|
+
<td>
|
|
1442
|
+
|
|
1443
|
+
<a id="enumeration-member-not_found"></a> `NOT_FOUND`
|
|
1444
|
+
|
|
1445
|
+
</td>
|
|
1446
|
+
<td>
|
|
1447
|
+
|
|
1448
|
+
`404`
|
|
1449
|
+
|
|
1450
|
+
</td>
|
|
1451
|
+
<td>
|
|
1452
|
+
|
|
1453
|
+
[enums/http-status.enums.ts:88](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L88)
|
|
1454
|
+
|
|
1455
|
+
</td>
|
|
1456
|
+
</tr>
|
|
1457
|
+
<tr>
|
|
1458
|
+
<td>
|
|
1459
|
+
|
|
1460
|
+
<a id="enumeration-member-payload_too_large"></a> `PAYLOAD_TOO_LARGE`
|
|
1461
|
+
|
|
1462
|
+
</td>
|
|
1463
|
+
<td>
|
|
1464
|
+
|
|
1465
|
+
`413`
|
|
1466
|
+
|
|
1467
|
+
</td>
|
|
1468
|
+
<td>
|
|
1469
|
+
|
|
1470
|
+
[enums/http-status.enums.ts:97](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L97)
|
|
1471
|
+
|
|
1472
|
+
</td>
|
|
1473
|
+
</tr>
|
|
1474
|
+
<tr>
|
|
1475
|
+
<td>
|
|
1476
|
+
|
|
1477
|
+
<a id="enumeration-member-payment_required"></a> `PAYMENT_REQUIRED`
|
|
1478
|
+
|
|
1479
|
+
</td>
|
|
1480
|
+
<td>
|
|
1481
|
+
|
|
1482
|
+
`402`
|
|
1483
|
+
|
|
1484
|
+
</td>
|
|
1485
|
+
<td>
|
|
1486
|
+
|
|
1487
|
+
[enums/http-status.enums.ts:86](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L86)
|
|
1488
|
+
|
|
1489
|
+
</td>
|
|
1490
|
+
</tr>
|
|
1491
|
+
<tr>
|
|
1492
|
+
<td>
|
|
1493
|
+
|
|
1494
|
+
<a id="enumeration-member-precondition_failed"></a> `PRECONDITION_FAILED`
|
|
1495
|
+
|
|
1496
|
+
</td>
|
|
1497
|
+
<td>
|
|
1498
|
+
|
|
1499
|
+
`412`
|
|
1500
|
+
|
|
1501
|
+
</td>
|
|
1502
|
+
<td>
|
|
1503
|
+
|
|
1504
|
+
[enums/http-status.enums.ts:96](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L96)
|
|
1505
|
+
|
|
1506
|
+
</td>
|
|
1507
|
+
</tr>
|
|
1508
|
+
<tr>
|
|
1509
|
+
<td>
|
|
1510
|
+
|
|
1511
|
+
<a id="enumeration-member-precondition_required"></a> `PRECONDITION_REQUIRED`
|
|
1512
|
+
|
|
1513
|
+
</td>
|
|
1514
|
+
<td>
|
|
1515
|
+
|
|
1516
|
+
`428`
|
|
1517
|
+
|
|
1518
|
+
</td>
|
|
1519
|
+
<td>
|
|
1520
|
+
|
|
1521
|
+
[enums/http-status.enums.ts:109](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L109)
|
|
1522
|
+
|
|
1523
|
+
</td>
|
|
1524
|
+
</tr>
|
|
1525
|
+
<tr>
|
|
1526
|
+
<td>
|
|
1527
|
+
|
|
1528
|
+
<a id="enumeration-member-proxy_authentication_required"></a> `PROXY_AUTHENTICATION_REQUIRED`
|
|
1529
|
+
|
|
1530
|
+
</td>
|
|
1531
|
+
<td>
|
|
1532
|
+
|
|
1533
|
+
`407`
|
|
1534
|
+
|
|
1535
|
+
</td>
|
|
1536
|
+
<td>
|
|
1537
|
+
|
|
1538
|
+
[enums/http-status.enums.ts:91](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L91)
|
|
1539
|
+
|
|
1540
|
+
</td>
|
|
1541
|
+
</tr>
|
|
1542
|
+
<tr>
|
|
1543
|
+
<td>
|
|
1544
|
+
|
|
1545
|
+
<a id="enumeration-member-range_not_satisfiable"></a> `RANGE_NOT_SATISFIABLE`
|
|
1546
|
+
|
|
1547
|
+
</td>
|
|
1548
|
+
<td>
|
|
1549
|
+
|
|
1550
|
+
`416`
|
|
1551
|
+
|
|
1552
|
+
</td>
|
|
1553
|
+
<td>
|
|
1554
|
+
|
|
1555
|
+
[enums/http-status.enums.ts:100](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L100)
|
|
1556
|
+
|
|
1557
|
+
</td>
|
|
1558
|
+
</tr>
|
|
1559
|
+
<tr>
|
|
1560
|
+
<td>
|
|
1561
|
+
|
|
1562
|
+
<a id="enumeration-member-request_header_fields_too_large"></a> `REQUEST_HEADER_FIELDS_TOO_LARGE`
|
|
1563
|
+
|
|
1564
|
+
</td>
|
|
1565
|
+
<td>
|
|
1566
|
+
|
|
1567
|
+
`431`
|
|
1568
|
+
|
|
1569
|
+
</td>
|
|
1570
|
+
<td>
|
|
1571
|
+
|
|
1572
|
+
[enums/http-status.enums.ts:111](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L111)
|
|
1573
|
+
|
|
1574
|
+
</td>
|
|
1575
|
+
</tr>
|
|
1576
|
+
<tr>
|
|
1577
|
+
<td>
|
|
1578
|
+
|
|
1579
|
+
<a id="enumeration-member-request_timeout"></a> `REQUEST_TIMEOUT`
|
|
1580
|
+
|
|
1581
|
+
</td>
|
|
1582
|
+
<td>
|
|
1583
|
+
|
|
1584
|
+
`408`
|
|
1585
|
+
|
|
1586
|
+
</td>
|
|
1587
|
+
<td>
|
|
1588
|
+
|
|
1589
|
+
[enums/http-status.enums.ts:92](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L92)
|
|
1590
|
+
|
|
1591
|
+
</td>
|
|
1592
|
+
</tr>
|
|
1593
|
+
<tr>
|
|
1594
|
+
<td>
|
|
1595
|
+
|
|
1596
|
+
<a id="enumeration-member-too_early"></a> `TOO_EARLY`
|
|
1597
|
+
|
|
1598
|
+
</td>
|
|
1599
|
+
<td>
|
|
1600
|
+
|
|
1601
|
+
`425`
|
|
1602
|
+
|
|
1603
|
+
</td>
|
|
1604
|
+
<td>
|
|
1605
|
+
|
|
1606
|
+
[enums/http-status.enums.ts:107](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L107)
|
|
1607
|
+
|
|
1608
|
+
</td>
|
|
1609
|
+
</tr>
|
|
1610
|
+
<tr>
|
|
1611
|
+
<td>
|
|
1612
|
+
|
|
1613
|
+
<a id="enumeration-member-too_many_requests"></a> `TOO_MANY_REQUESTS`
|
|
1614
|
+
|
|
1615
|
+
</td>
|
|
1616
|
+
<td>
|
|
1617
|
+
|
|
1618
|
+
`429`
|
|
1619
|
+
|
|
1620
|
+
</td>
|
|
1621
|
+
<td>
|
|
1622
|
+
|
|
1623
|
+
[enums/http-status.enums.ts:110](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L110)
|
|
1624
|
+
|
|
1625
|
+
</td>
|
|
1626
|
+
</tr>
|
|
1627
|
+
<tr>
|
|
1628
|
+
<td>
|
|
1629
|
+
|
|
1630
|
+
<a id="enumeration-member-unauthorized"></a> `UNAUTHORIZED`
|
|
1631
|
+
|
|
1632
|
+
</td>
|
|
1633
|
+
<td>
|
|
1634
|
+
|
|
1635
|
+
`401`
|
|
1636
|
+
|
|
1637
|
+
</td>
|
|
1638
|
+
<td>
|
|
1639
|
+
|
|
1640
|
+
[enums/http-status.enums.ts:85](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L85)
|
|
1641
|
+
|
|
1642
|
+
</td>
|
|
1643
|
+
</tr>
|
|
1644
|
+
<tr>
|
|
1645
|
+
<td>
|
|
1646
|
+
|
|
1647
|
+
<a id="enumeration-member-unavailable_for_legal_reasons"></a> `UNAVAILABLE_FOR_LEGAL_REASONS`
|
|
1648
|
+
|
|
1649
|
+
</td>
|
|
1650
|
+
<td>
|
|
1651
|
+
|
|
1652
|
+
`451`
|
|
1653
|
+
|
|
1654
|
+
</td>
|
|
1655
|
+
<td>
|
|
1656
|
+
|
|
1657
|
+
[enums/http-status.enums.ts:112](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L112)
|
|
1658
|
+
|
|
1659
|
+
</td>
|
|
1660
|
+
</tr>
|
|
1661
|
+
<tr>
|
|
1662
|
+
<td>
|
|
1663
|
+
|
|
1664
|
+
<a id="enumeration-member-unprocessable_entity"></a> `UNPROCESSABLE_ENTITY`
|
|
1665
|
+
|
|
1666
|
+
</td>
|
|
1667
|
+
<td>
|
|
1668
|
+
|
|
1669
|
+
`422`
|
|
1670
|
+
|
|
1671
|
+
</td>
|
|
1672
|
+
<td>
|
|
1673
|
+
|
|
1674
|
+
[enums/http-status.enums.ts:104](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L104)
|
|
1675
|
+
|
|
1676
|
+
</td>
|
|
1677
|
+
</tr>
|
|
1678
|
+
<tr>
|
|
1679
|
+
<td>
|
|
1680
|
+
|
|
1681
|
+
<a id="enumeration-member-unsupported_media_type"></a> `UNSUPPORTED_MEDIA_TYPE`
|
|
1682
|
+
|
|
1683
|
+
</td>
|
|
1684
|
+
<td>
|
|
1685
|
+
|
|
1686
|
+
`415`
|
|
1687
|
+
|
|
1688
|
+
</td>
|
|
1689
|
+
<td>
|
|
1690
|
+
|
|
1691
|
+
[enums/http-status.enums.ts:99](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L99)
|
|
1692
|
+
|
|
1693
|
+
</td>
|
|
1694
|
+
</tr>
|
|
1695
|
+
<tr>
|
|
1696
|
+
<td>
|
|
1697
|
+
|
|
1698
|
+
<a id="enumeration-member-upgrade_required"></a> `UPGRADE_REQUIRED`
|
|
1699
|
+
|
|
1700
|
+
</td>
|
|
1701
|
+
<td>
|
|
1702
|
+
|
|
1703
|
+
`426`
|
|
1704
|
+
|
|
1705
|
+
</td>
|
|
1706
|
+
<td>
|
|
1707
|
+
|
|
1708
|
+
[enums/http-status.enums.ts:108](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L108)
|
|
1709
|
+
|
|
1710
|
+
</td>
|
|
1711
|
+
</tr>
|
|
1712
|
+
<tr>
|
|
1713
|
+
<td>
|
|
1714
|
+
|
|
1715
|
+
<a id="enumeration-member-uri_too_long"></a> `URI_TOO_LONG`
|
|
1716
|
+
|
|
1717
|
+
</td>
|
|
1718
|
+
<td>
|
|
1719
|
+
|
|
1720
|
+
`414`
|
|
1721
|
+
|
|
1722
|
+
</td>
|
|
1723
|
+
<td>
|
|
1724
|
+
|
|
1725
|
+
[enums/http-status.enums.ts:98](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L98)
|
|
1726
|
+
|
|
1727
|
+
</td>
|
|
1728
|
+
</tr>
|
|
1729
|
+
</tbody>
|
|
1730
|
+
</table>
|
|
1731
|
+
|
|
1732
|
+
---
|
|
1733
|
+
|
|
1734
|
+
### HttpInfoStatus
|
|
1735
|
+
|
|
1736
|
+
Defined in: [enums/http-status.enums.ts:15](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L15)
|
|
1737
|
+
|
|
1738
|
+
HTTP Informational Status Codes (1xx)
|
|
1739
|
+
|
|
1740
|
+
This enum defines the standard HTTP status codes in the 1xx range (Informational).
|
|
1741
|
+
These status codes indicate a provisional response and require the client
|
|
1742
|
+
to continue with the request or ignore the response if the request is already finished.
|
|
1743
|
+
|
|
1744
|
+
The 1xx class of status codes represents preliminary information, indicating that
|
|
1745
|
+
the request was received and is continuing to be processed.
|
|
1746
|
+
|
|
1747
|
+
#### See
|
|
1748
|
+
|
|
1749
|
+
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#information\_responses
|
|
1750
|
+
|
|
1751
|
+
#### Enumeration Members
|
|
1752
|
+
|
|
1753
|
+
<table>
|
|
1754
|
+
<thead>
|
|
1755
|
+
<tr>
|
|
1756
|
+
<th>Enumeration Member</th>
|
|
1757
|
+
<th>Value</th>
|
|
1758
|
+
<th>Defined in</th>
|
|
1759
|
+
</tr>
|
|
1760
|
+
</thead>
|
|
1761
|
+
<tbody>
|
|
1762
|
+
<tr>
|
|
1763
|
+
<td>
|
|
1764
|
+
|
|
1765
|
+
<a id="enumeration-member-continue"></a> `CONTINUE`
|
|
1766
|
+
|
|
1767
|
+
</td>
|
|
1768
|
+
<td>
|
|
1769
|
+
|
|
1770
|
+
`100`
|
|
1771
|
+
|
|
1772
|
+
</td>
|
|
1773
|
+
<td>
|
|
1774
|
+
|
|
1775
|
+
[enums/http-status.enums.ts:16](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L16)
|
|
1776
|
+
|
|
1777
|
+
</td>
|
|
1778
|
+
</tr>
|
|
1779
|
+
<tr>
|
|
1780
|
+
<td>
|
|
1781
|
+
|
|
1782
|
+
<a id="enumeration-member-earlyhints"></a> `EARLYHINTS`
|
|
1783
|
+
|
|
1784
|
+
</td>
|
|
1785
|
+
<td>
|
|
1786
|
+
|
|
1787
|
+
`103`
|
|
1788
|
+
|
|
1789
|
+
</td>
|
|
1790
|
+
<td>
|
|
1791
|
+
|
|
1792
|
+
[enums/http-status.enums.ts:19](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L19)
|
|
1793
|
+
|
|
1794
|
+
</td>
|
|
1795
|
+
</tr>
|
|
1796
|
+
<tr>
|
|
1797
|
+
<td>
|
|
1798
|
+
|
|
1799
|
+
<a id="enumeration-member-processing"></a> `PROCESSING`
|
|
1800
|
+
|
|
1801
|
+
</td>
|
|
1802
|
+
<td>
|
|
1803
|
+
|
|
1804
|
+
`102`
|
|
1805
|
+
|
|
1806
|
+
</td>
|
|
1807
|
+
<td>
|
|
1808
|
+
|
|
1809
|
+
[enums/http-status.enums.ts:18](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L18)
|
|
1810
|
+
|
|
1811
|
+
</td>
|
|
1812
|
+
</tr>
|
|
1813
|
+
<tr>
|
|
1814
|
+
<td>
|
|
1815
|
+
|
|
1816
|
+
<a id="enumeration-member-switching_protocols"></a> `SWITCHING_PROTOCOLS`
|
|
1817
|
+
|
|
1818
|
+
</td>
|
|
1819
|
+
<td>
|
|
1820
|
+
|
|
1821
|
+
`101`
|
|
1822
|
+
|
|
1823
|
+
</td>
|
|
1824
|
+
<td>
|
|
1825
|
+
|
|
1826
|
+
[enums/http-status.enums.ts:17](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L17)
|
|
1827
|
+
|
|
1828
|
+
</td>
|
|
1829
|
+
</tr>
|
|
1830
|
+
</tbody>
|
|
1831
|
+
</table>
|
|
1832
|
+
|
|
1833
|
+
---
|
|
1834
|
+
|
|
1835
|
+
### HttpRedirectionStatus
|
|
1836
|
+
|
|
1837
|
+
Defined in: [enums/http-status.enums.ts:60](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L60)
|
|
1838
|
+
|
|
1839
|
+
HTTP Redirection Status Codes (3xx)
|
|
1840
|
+
|
|
1841
|
+
This enum defines the standard HTTP status codes in the 3xx range (Redirection).
|
|
1842
|
+
These status codes indicate that further action needs to be taken by the client
|
|
1843
|
+
in order to complete the request, typically involving following a redirect.
|
|
1844
|
+
|
|
1845
|
+
The 3xx class of status codes indicates the client must take additional action
|
|
1846
|
+
to complete the request, such as following a new URL or using a cached version.
|
|
1847
|
+
|
|
1848
|
+
#### See
|
|
1849
|
+
|
|
1850
|
+
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection\_messages
|
|
1851
|
+
|
|
1852
|
+
#### Enumeration Members
|
|
1853
|
+
|
|
1854
|
+
<table>
|
|
1855
|
+
<thead>
|
|
1856
|
+
<tr>
|
|
1857
|
+
<th>Enumeration Member</th>
|
|
1858
|
+
<th>Value</th>
|
|
1859
|
+
<th>Defined in</th>
|
|
1860
|
+
</tr>
|
|
1861
|
+
</thead>
|
|
1862
|
+
<tbody>
|
|
1863
|
+
<tr>
|
|
1864
|
+
<td>
|
|
1865
|
+
|
|
1866
|
+
<a id="enumeration-member-found"></a> `FOUND`
|
|
1867
|
+
|
|
1868
|
+
</td>
|
|
1869
|
+
<td>
|
|
1870
|
+
|
|
1871
|
+
`302`
|
|
1872
|
+
|
|
1873
|
+
</td>
|
|
1874
|
+
<td>
|
|
1875
|
+
|
|
1876
|
+
[enums/http-status.enums.ts:63](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L63)
|
|
1877
|
+
|
|
1878
|
+
</td>
|
|
1879
|
+
</tr>
|
|
1880
|
+
<tr>
|
|
1881
|
+
<td>
|
|
1882
|
+
|
|
1883
|
+
<a id="enumeration-member-moved_permanently"></a> `MOVED_PERMANENTLY`
|
|
1884
|
+
|
|
1885
|
+
</td>
|
|
1886
|
+
<td>
|
|
1887
|
+
|
|
1888
|
+
`301`
|
|
1889
|
+
|
|
1890
|
+
</td>
|
|
1891
|
+
<td>
|
|
1892
|
+
|
|
1893
|
+
[enums/http-status.enums.ts:62](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L62)
|
|
1894
|
+
|
|
1895
|
+
</td>
|
|
1896
|
+
</tr>
|
|
1897
|
+
<tr>
|
|
1898
|
+
<td>
|
|
1899
|
+
|
|
1900
|
+
<a id="enumeration-member-multiple_choices"></a> `MULTIPLE_CHOICES`
|
|
1901
|
+
|
|
1902
|
+
</td>
|
|
1903
|
+
<td>
|
|
1904
|
+
|
|
1905
|
+
`300`
|
|
1906
|
+
|
|
1907
|
+
</td>
|
|
1908
|
+
<td>
|
|
1909
|
+
|
|
1910
|
+
[enums/http-status.enums.ts:61](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L61)
|
|
1911
|
+
|
|
1912
|
+
</td>
|
|
1913
|
+
</tr>
|
|
1914
|
+
<tr>
|
|
1915
|
+
<td>
|
|
1916
|
+
|
|
1917
|
+
<a id="enumeration-member-not_modified"></a> `NOT_MODIFIED`
|
|
1918
|
+
|
|
1919
|
+
</td>
|
|
1920
|
+
<td>
|
|
1921
|
+
|
|
1922
|
+
`304`
|
|
1923
|
+
|
|
1924
|
+
</td>
|
|
1925
|
+
<td>
|
|
1926
|
+
|
|
1927
|
+
[enums/http-status.enums.ts:65](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L65)
|
|
1928
|
+
|
|
1929
|
+
</td>
|
|
1930
|
+
</tr>
|
|
1931
|
+
<tr>
|
|
1932
|
+
<td>
|
|
1933
|
+
|
|
1934
|
+
<a id="enumeration-member-permanent_redirect"></a> `PERMANENT_REDIRECT`
|
|
1935
|
+
|
|
1936
|
+
</td>
|
|
1937
|
+
<td>
|
|
1938
|
+
|
|
1939
|
+
`308`
|
|
1940
|
+
|
|
1941
|
+
</td>
|
|
1942
|
+
<td>
|
|
1943
|
+
|
|
1944
|
+
[enums/http-status.enums.ts:68](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L68)
|
|
1945
|
+
|
|
1946
|
+
</td>
|
|
1947
|
+
</tr>
|
|
1948
|
+
<tr>
|
|
1949
|
+
<td>
|
|
1950
|
+
|
|
1951
|
+
<a id="enumeration-member-see_other"></a> `SEE_OTHER`
|
|
1952
|
+
|
|
1953
|
+
</td>
|
|
1954
|
+
<td>
|
|
1955
|
+
|
|
1956
|
+
`303`
|
|
1957
|
+
|
|
1958
|
+
</td>
|
|
1959
|
+
<td>
|
|
1960
|
+
|
|
1961
|
+
[enums/http-status.enums.ts:64](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L64)
|
|
1962
|
+
|
|
1963
|
+
</td>
|
|
1964
|
+
</tr>
|
|
1965
|
+
<tr>
|
|
1966
|
+
<td>
|
|
1967
|
+
|
|
1968
|
+
<a id="enumeration-member-temporary_redirect"></a> `TEMPORARY_REDIRECT`
|
|
1969
|
+
|
|
1970
|
+
</td>
|
|
1971
|
+
<td>
|
|
1972
|
+
|
|
1973
|
+
`307`
|
|
1974
|
+
|
|
1975
|
+
</td>
|
|
1976
|
+
<td>
|
|
1977
|
+
|
|
1978
|
+
[enums/http-status.enums.ts:67](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L67)
|
|
1979
|
+
|
|
1980
|
+
</td>
|
|
1981
|
+
</tr>
|
|
1982
|
+
<tr>
|
|
1983
|
+
<td>
|
|
1984
|
+
|
|
1985
|
+
<a id="enumeration-member-use_proxy"></a> `USE_PROXY`
|
|
1986
|
+
|
|
1987
|
+
</td>
|
|
1988
|
+
<td>
|
|
1989
|
+
|
|
1990
|
+
`305`
|
|
1991
|
+
|
|
1992
|
+
</td>
|
|
1993
|
+
<td>
|
|
1994
|
+
|
|
1995
|
+
[enums/http-status.enums.ts:66](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L66)
|
|
1996
|
+
|
|
1997
|
+
</td>
|
|
1998
|
+
</tr>
|
|
1999
|
+
</tbody>
|
|
2000
|
+
</table>
|
|
2001
|
+
|
|
2002
|
+
---
|
|
2003
|
+
|
|
2004
|
+
### HttpServerErrorStatus
|
|
2005
|
+
|
|
2006
|
+
Defined in: [enums/http-status.enums.ts:128](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L128)
|
|
2007
|
+
|
|
2008
|
+
HTTP Server Error Status Codes (5xx)
|
|
2009
|
+
|
|
2010
|
+
This enum defines the standard HTTP status codes in the 5xx range (Server Error).
|
|
2011
|
+
These status codes indicate that the server failed to fulfill a valid request.
|
|
2012
|
+
|
|
2013
|
+
The 5xx class of status codes is intended for cases in which the server is aware
|
|
2014
|
+
that it has encountered an error or is otherwise incapable of performing the
|
|
2015
|
+
request. These errors are typically related to server configuration issues,
|
|
2016
|
+
unexpected conditions, or temporary overloading.
|
|
2017
|
+
|
|
2018
|
+
#### See
|
|
2019
|
+
|
|
2020
|
+
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#server\_error\_responses
|
|
2021
|
+
|
|
2022
|
+
#### Enumeration Members
|
|
2023
|
+
|
|
2024
|
+
<table>
|
|
2025
|
+
<thead>
|
|
2026
|
+
<tr>
|
|
2027
|
+
<th>Enumeration Member</th>
|
|
2028
|
+
<th>Value</th>
|
|
2029
|
+
<th>Defined in</th>
|
|
2030
|
+
</tr>
|
|
2031
|
+
</thead>
|
|
2032
|
+
<tbody>
|
|
2033
|
+
<tr>
|
|
2034
|
+
<td>
|
|
2035
|
+
|
|
2036
|
+
<a id="enumeration-member-bad_gateway"></a> `BAD_GATEWAY`
|
|
2037
|
+
|
|
2038
|
+
</td>
|
|
2039
|
+
<td>
|
|
2040
|
+
|
|
2041
|
+
`502`
|
|
2042
|
+
|
|
2043
|
+
</td>
|
|
2044
|
+
<td>
|
|
2045
|
+
|
|
2046
|
+
[enums/http-status.enums.ts:131](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L131)
|
|
2047
|
+
|
|
2048
|
+
</td>
|
|
2049
|
+
</tr>
|
|
2050
|
+
<tr>
|
|
2051
|
+
<td>
|
|
2052
|
+
|
|
2053
|
+
<a id="enumeration-member-gateway_timeout"></a> `GATEWAY_TIMEOUT`
|
|
2054
|
+
|
|
2055
|
+
</td>
|
|
2056
|
+
<td>
|
|
2057
|
+
|
|
2058
|
+
`504`
|
|
2059
|
+
|
|
2060
|
+
</td>
|
|
2061
|
+
<td>
|
|
2062
|
+
|
|
2063
|
+
[enums/http-status.enums.ts:133](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L133)
|
|
2064
|
+
|
|
2065
|
+
</td>
|
|
2066
|
+
</tr>
|
|
2067
|
+
<tr>
|
|
2068
|
+
<td>
|
|
2069
|
+
|
|
2070
|
+
<a id="enumeration-member-http_version_not_supported"></a> `HTTP_VERSION_NOT_SUPPORTED`
|
|
2071
|
+
|
|
2072
|
+
</td>
|
|
2073
|
+
<td>
|
|
2074
|
+
|
|
2075
|
+
`505`
|
|
2076
|
+
|
|
2077
|
+
</td>
|
|
2078
|
+
<td>
|
|
2079
|
+
|
|
2080
|
+
[enums/http-status.enums.ts:134](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L134)
|
|
2081
|
+
|
|
2082
|
+
</td>
|
|
2083
|
+
</tr>
|
|
2084
|
+
<tr>
|
|
2085
|
+
<td>
|
|
2086
|
+
|
|
2087
|
+
<a id="enumeration-member-insufficient_storage"></a> `INSUFFICIENT_STORAGE`
|
|
2088
|
+
|
|
2089
|
+
</td>
|
|
2090
|
+
<td>
|
|
2091
|
+
|
|
2092
|
+
`507`
|
|
2093
|
+
|
|
2094
|
+
</td>
|
|
2095
|
+
<td>
|
|
2096
|
+
|
|
2097
|
+
[enums/http-status.enums.ts:136](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L136)
|
|
2098
|
+
|
|
2099
|
+
</td>
|
|
2100
|
+
</tr>
|
|
2101
|
+
<tr>
|
|
2102
|
+
<td>
|
|
2103
|
+
|
|
2104
|
+
<a id="enumeration-member-internal_server_error"></a> `INTERNAL_SERVER_ERROR`
|
|
2105
|
+
|
|
2106
|
+
</td>
|
|
2107
|
+
<td>
|
|
2108
|
+
|
|
2109
|
+
`500`
|
|
2110
|
+
|
|
2111
|
+
</td>
|
|
2112
|
+
<td>
|
|
2113
|
+
|
|
2114
|
+
[enums/http-status.enums.ts:129](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L129)
|
|
2115
|
+
|
|
2116
|
+
</td>
|
|
2117
|
+
</tr>
|
|
2118
|
+
<tr>
|
|
2119
|
+
<td>
|
|
2120
|
+
|
|
2121
|
+
<a id="enumeration-member-loop_detected"></a> `LOOP_DETECTED`
|
|
2122
|
+
|
|
2123
|
+
</td>
|
|
2124
|
+
<td>
|
|
2125
|
+
|
|
2126
|
+
`508`
|
|
2127
|
+
|
|
2128
|
+
</td>
|
|
2129
|
+
<td>
|
|
2130
|
+
|
|
2131
|
+
[enums/http-status.enums.ts:137](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L137)
|
|
2132
|
+
|
|
2133
|
+
</td>
|
|
2134
|
+
</tr>
|
|
2135
|
+
<tr>
|
|
2136
|
+
<td>
|
|
2137
|
+
|
|
2138
|
+
<a id="enumeration-member-network_authentication_required"></a> `NETWORK_AUTHENTICATION_REQUIRED`
|
|
2139
|
+
|
|
2140
|
+
</td>
|
|
2141
|
+
<td>
|
|
2142
|
+
|
|
2143
|
+
`511`
|
|
2144
|
+
|
|
2145
|
+
</td>
|
|
2146
|
+
<td>
|
|
2147
|
+
|
|
2148
|
+
[enums/http-status.enums.ts:139](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L139)
|
|
2149
|
+
|
|
2150
|
+
</td>
|
|
2151
|
+
</tr>
|
|
2152
|
+
<tr>
|
|
2153
|
+
<td>
|
|
2154
|
+
|
|
2155
|
+
<a id="enumeration-member-not_extended"></a> `NOT_EXTENDED`
|
|
2156
|
+
|
|
2157
|
+
</td>
|
|
2158
|
+
<td>
|
|
2159
|
+
|
|
2160
|
+
`510`
|
|
2161
|
+
|
|
2162
|
+
</td>
|
|
2163
|
+
<td>
|
|
2164
|
+
|
|
2165
|
+
[enums/http-status.enums.ts:138](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L138)
|
|
2166
|
+
|
|
2167
|
+
</td>
|
|
2168
|
+
</tr>
|
|
2169
|
+
<tr>
|
|
2170
|
+
<td>
|
|
2171
|
+
|
|
2172
|
+
<a id="enumeration-member-not_implemented"></a> `NOT_IMPLEMENTED`
|
|
2173
|
+
|
|
2174
|
+
</td>
|
|
2175
|
+
<td>
|
|
2176
|
+
|
|
2177
|
+
`501`
|
|
2178
|
+
|
|
2179
|
+
</td>
|
|
2180
|
+
<td>
|
|
2181
|
+
|
|
2182
|
+
[enums/http-status.enums.ts:130](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L130)
|
|
2183
|
+
|
|
2184
|
+
</td>
|
|
2185
|
+
</tr>
|
|
2186
|
+
<tr>
|
|
2187
|
+
<td>
|
|
2188
|
+
|
|
2189
|
+
<a id="enumeration-member-service_unavailable"></a> `SERVICE_UNAVAILABLE`
|
|
2190
|
+
|
|
2191
|
+
</td>
|
|
2192
|
+
<td>
|
|
2193
|
+
|
|
2194
|
+
`503`
|
|
2195
|
+
|
|
2196
|
+
</td>
|
|
2197
|
+
<td>
|
|
2198
|
+
|
|
2199
|
+
[enums/http-status.enums.ts:132](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L132)
|
|
2200
|
+
|
|
2201
|
+
</td>
|
|
2202
|
+
</tr>
|
|
2203
|
+
<tr>
|
|
2204
|
+
<td>
|
|
2205
|
+
|
|
2206
|
+
<a id="enumeration-member-variant_also_negotiates"></a> `VARIANT_ALSO_NEGOTIATES`
|
|
2207
|
+
|
|
2208
|
+
</td>
|
|
2209
|
+
<td>
|
|
2210
|
+
|
|
2211
|
+
`506`
|
|
2212
|
+
|
|
2213
|
+
</td>
|
|
2214
|
+
<td>
|
|
2215
|
+
|
|
2216
|
+
[enums/http-status.enums.ts:135](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L135)
|
|
2217
|
+
|
|
2218
|
+
</td>
|
|
2219
|
+
</tr>
|
|
2220
|
+
</tbody>
|
|
2221
|
+
</table>
|
|
2222
|
+
|
|
2223
|
+
---
|
|
2224
|
+
|
|
2225
|
+
### HttpSuccessStatus
|
|
2226
|
+
|
|
2227
|
+
Defined in: [enums/http-status.enums.ts:35](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L35)
|
|
2228
|
+
|
|
2229
|
+
HTTP Success Status Codes (2xx)
|
|
2230
|
+
|
|
2231
|
+
This enum defines the standard HTTP status codes in the 2xx range (Success).
|
|
2232
|
+
These status codes indicate that the client's request was successfully received,
|
|
2233
|
+
understood, and accepted.
|
|
2234
|
+
|
|
2235
|
+
The 2xx class of status codes represents successful completion of the HTTP request,
|
|
2236
|
+
with different codes indicating specific types of success such as resource creation,
|
|
2237
|
+
accepted but not yet processed requests, or successful responses with no content.
|
|
2238
|
+
|
|
2239
|
+
#### See
|
|
2240
|
+
|
|
2241
|
+
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#successful\_responses
|
|
2242
|
+
|
|
2243
|
+
#### Enumeration Members
|
|
2244
|
+
|
|
2245
|
+
<table>
|
|
2246
|
+
<thead>
|
|
2247
|
+
<tr>
|
|
2248
|
+
<th>Enumeration Member</th>
|
|
2249
|
+
<th>Value</th>
|
|
2250
|
+
<th>Defined in</th>
|
|
2251
|
+
</tr>
|
|
2252
|
+
</thead>
|
|
2253
|
+
<tbody>
|
|
2254
|
+
<tr>
|
|
2255
|
+
<td>
|
|
2256
|
+
|
|
2257
|
+
<a id="enumeration-member-accepted"></a> `ACCEPTED`
|
|
2258
|
+
|
|
2259
|
+
</td>
|
|
2260
|
+
<td>
|
|
2261
|
+
|
|
2262
|
+
`202`
|
|
2263
|
+
|
|
2264
|
+
</td>
|
|
2265
|
+
<td>
|
|
2266
|
+
|
|
2267
|
+
[enums/http-status.enums.ts:38](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L38)
|
|
2268
|
+
|
|
2269
|
+
</td>
|
|
2270
|
+
</tr>
|
|
2271
|
+
<tr>
|
|
2272
|
+
<td>
|
|
2273
|
+
|
|
2274
|
+
<a id="enumeration-member-already_reported"></a> `ALREADY_REPORTED`
|
|
2275
|
+
|
|
2276
|
+
</td>
|
|
2277
|
+
<td>
|
|
2278
|
+
|
|
2279
|
+
`208`
|
|
2280
|
+
|
|
2281
|
+
</td>
|
|
2282
|
+
<td>
|
|
2283
|
+
|
|
2284
|
+
[enums/http-status.enums.ts:44](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L44)
|
|
2285
|
+
|
|
2286
|
+
</td>
|
|
2287
|
+
</tr>
|
|
2288
|
+
<tr>
|
|
2289
|
+
<td>
|
|
2290
|
+
|
|
2291
|
+
<a id="enumeration-member-content_different"></a> `CONTENT_DIFFERENT`
|
|
2292
|
+
|
|
2293
|
+
</td>
|
|
2294
|
+
<td>
|
|
2295
|
+
|
|
2296
|
+
`210`
|
|
2297
|
+
|
|
2298
|
+
</td>
|
|
2299
|
+
<td>
|
|
2300
|
+
|
|
2301
|
+
[enums/http-status.enums.ts:45](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L45)
|
|
2302
|
+
|
|
2303
|
+
</td>
|
|
2304
|
+
</tr>
|
|
2305
|
+
<tr>
|
|
2306
|
+
<td>
|
|
2307
|
+
|
|
2308
|
+
<a id="enumeration-member-created"></a> `CREATED`
|
|
2309
|
+
|
|
2310
|
+
</td>
|
|
2311
|
+
<td>
|
|
2312
|
+
|
|
2313
|
+
`201`
|
|
2314
|
+
|
|
2315
|
+
</td>
|
|
2316
|
+
<td>
|
|
2317
|
+
|
|
2318
|
+
[enums/http-status.enums.ts:37](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L37)
|
|
2319
|
+
|
|
2320
|
+
</td>
|
|
2321
|
+
</tr>
|
|
2322
|
+
<tr>
|
|
2323
|
+
<td>
|
|
2324
|
+
|
|
2325
|
+
<a id="enumeration-member-multi_status"></a> `MULTI_STATUS`
|
|
2326
|
+
|
|
2327
|
+
</td>
|
|
2328
|
+
<td>
|
|
2329
|
+
|
|
2330
|
+
`207`
|
|
2331
|
+
|
|
2332
|
+
</td>
|
|
2333
|
+
<td>
|
|
2334
|
+
|
|
2335
|
+
[enums/http-status.enums.ts:43](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L43)
|
|
2336
|
+
|
|
2337
|
+
</td>
|
|
2338
|
+
</tr>
|
|
2339
|
+
<tr>
|
|
2340
|
+
<td>
|
|
2341
|
+
|
|
2342
|
+
<a id="enumeration-member-no_content"></a> `NO_CONTENT`
|
|
2343
|
+
|
|
2344
|
+
</td>
|
|
2345
|
+
<td>
|
|
2346
|
+
|
|
2347
|
+
`204`
|
|
2348
|
+
|
|
2349
|
+
</td>
|
|
2350
|
+
<td>
|
|
2351
|
+
|
|
2352
|
+
[enums/http-status.enums.ts:40](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L40)
|
|
2353
|
+
|
|
2354
|
+
</td>
|
|
2355
|
+
</tr>
|
|
2356
|
+
<tr>
|
|
2357
|
+
<td>
|
|
2358
|
+
|
|
2359
|
+
<a id="enumeration-member-non_authoritative_information"></a> `NON_AUTHORITATIVE_INFORMATION`
|
|
2360
|
+
|
|
2361
|
+
</td>
|
|
2362
|
+
<td>
|
|
2363
|
+
|
|
2364
|
+
`203`
|
|
2365
|
+
|
|
2366
|
+
</td>
|
|
2367
|
+
<td>
|
|
2368
|
+
|
|
2369
|
+
[enums/http-status.enums.ts:39](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L39)
|
|
2370
|
+
|
|
2371
|
+
</td>
|
|
2372
|
+
</tr>
|
|
2373
|
+
<tr>
|
|
2374
|
+
<td>
|
|
2375
|
+
|
|
2376
|
+
<a id="enumeration-member-ok"></a> `OK`
|
|
2377
|
+
|
|
2378
|
+
</td>
|
|
2379
|
+
<td>
|
|
2380
|
+
|
|
2381
|
+
`200`
|
|
2382
|
+
|
|
2383
|
+
</td>
|
|
2384
|
+
<td>
|
|
2385
|
+
|
|
2386
|
+
[enums/http-status.enums.ts:36](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L36)
|
|
2387
|
+
|
|
2388
|
+
</td>
|
|
2389
|
+
</tr>
|
|
2390
|
+
<tr>
|
|
2391
|
+
<td>
|
|
2392
|
+
|
|
2393
|
+
<a id="enumeration-member-partial_content"></a> `PARTIAL_CONTENT`
|
|
2394
|
+
|
|
2395
|
+
</td>
|
|
2396
|
+
<td>
|
|
2397
|
+
|
|
2398
|
+
`206`
|
|
2399
|
+
|
|
2400
|
+
</td>
|
|
2401
|
+
<td>
|
|
2402
|
+
|
|
2403
|
+
[enums/http-status.enums.ts:42](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L42)
|
|
2404
|
+
|
|
2405
|
+
</td>
|
|
2406
|
+
</tr>
|
|
2407
|
+
<tr>
|
|
2408
|
+
<td>
|
|
2409
|
+
|
|
2410
|
+
<a id="enumeration-member-reset_content"></a> `RESET_CONTENT`
|
|
2411
|
+
|
|
2412
|
+
</td>
|
|
2413
|
+
<td>
|
|
2414
|
+
|
|
2415
|
+
`205`
|
|
2416
|
+
|
|
2417
|
+
</td>
|
|
2418
|
+
<td>
|
|
2419
|
+
|
|
2420
|
+
[enums/http-status.enums.ts:41](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/enums/http-status.enums.ts#L41)
|
|
2421
|
+
|
|
2422
|
+
</td>
|
|
2423
|
+
</tr>
|
|
2424
|
+
</tbody>
|
|
2425
|
+
</table>
|
|
2426
|
+
|
|
2427
|
+
## Interfaces
|
|
2428
|
+
|
|
2429
|
+
### ErrorResponse
|
|
2430
|
+
|
|
2431
|
+
Defined in: [interfaces/response.interfaces.ts:126](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/response.interfaces.ts#L126)
|
|
2432
|
+
|
|
2433
|
+
Interface for error API responses that include error details.
|
|
2434
|
+
|
|
2435
|
+
The `ErrorResponse` interface extends the base `HttpResponse` interface to standardize
|
|
2436
|
+
error responses across the application. It includes properties for error identification,
|
|
2437
|
+
detailed error information, and optionally the original error object for debugging.
|
|
2438
|
+
|
|
2439
|
+
This structured approach to error responses makes it easier for clients to handle
|
|
2440
|
+
errors in a consistent way and for developers to debug issues in the system.
|
|
2441
|
+
|
|
2442
|
+
ErrorResponse
|
|
2443
|
+
|
|
2444
|
+
#### See
|
|
2445
|
+
|
|
2446
|
+
- [HttpResponse](#httpresponse) Base interface for all responses
|
|
2447
|
+
- [HttpClientErrorStatus](#httpclienterrorstatus) Client error HTTP status codes
|
|
2448
|
+
- [HttpServerErrorStatus](#httpservererrorstatus) Server error HTTP status codes
|
|
2449
|
+
- [ErrorResponseCode](#errorresponsecode) Application-specific error codes
|
|
2450
|
+
|
|
2451
|
+
#### Extends
|
|
2452
|
+
|
|
2453
|
+
- [`HttpResponse`](#httpresponse)
|
|
2454
|
+
|
|
2455
|
+
#### Properties
|
|
2456
|
+
|
|
2457
|
+
<table>
|
|
2458
|
+
<thead>
|
|
2459
|
+
<tr>
|
|
2460
|
+
<th>Property</th>
|
|
2461
|
+
<th>Type</th>
|
|
2462
|
+
<th>Description</th>
|
|
2463
|
+
<th>Overrides</th>
|
|
2464
|
+
<th>Inherited from</th>
|
|
2465
|
+
<th>Defined in</th>
|
|
2466
|
+
</tr>
|
|
2467
|
+
</thead>
|
|
2468
|
+
<tbody>
|
|
2469
|
+
<tr>
|
|
2470
|
+
<td>
|
|
2471
|
+
|
|
2472
|
+
<a id="property-code-1"></a> `code`
|
|
2473
|
+
|
|
2474
|
+
</td>
|
|
2475
|
+
<td>
|
|
2476
|
+
|
|
2477
|
+
[`ErrorResponseCode`](#errorresponsecode)
|
|
2478
|
+
|
|
2479
|
+
</td>
|
|
2480
|
+
<td>
|
|
2481
|
+
|
|
2482
|
+
Application-specific error code.
|
|
2483
|
+
|
|
2484
|
+
This provides more granular information about the specific error case,
|
|
2485
|
+
allowing clients to handle different error scenarios distinctly.
|
|
2486
|
+
|
|
2487
|
+
**See**
|
|
2488
|
+
|
|
2489
|
+
[ErrorResponseCode](#errorresponsecode) Type for error response codes
|
|
2490
|
+
|
|
2491
|
+
</td>
|
|
2492
|
+
<td>
|
|
2493
|
+
|
|
2494
|
+
[`HttpResponse`](#httpresponse).[`code`](#property-code-2)
|
|
2495
|
+
|
|
2496
|
+
</td>
|
|
2497
|
+
<td>
|
|
2498
|
+
|
|
2499
|
+
‐
|
|
2500
|
+
|
|
2501
|
+
</td>
|
|
2502
|
+
<td>
|
|
2503
|
+
|
|
2504
|
+
[interfaces/response.interfaces.ts:147](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/response.interfaces.ts#L147)
|
|
2505
|
+
|
|
2506
|
+
</td>
|
|
2507
|
+
</tr>
|
|
2508
|
+
<tr>
|
|
2509
|
+
<td>
|
|
2510
|
+
|
|
2511
|
+
<a id="property-description-1"></a> `description?`
|
|
2512
|
+
|
|
2513
|
+
</td>
|
|
2514
|
+
<td>
|
|
2515
|
+
|
|
2516
|
+
`string`
|
|
2517
|
+
|
|
2518
|
+
</td>
|
|
2519
|
+
<td>
|
|
2520
|
+
|
|
2521
|
+
Optional detailed description of the response.
|
|
2522
|
+
|
|
2523
|
+
When provided, this field contains additional information about the response
|
|
2524
|
+
that might be useful for debugging or logging purposes. Unlike the message field,
|
|
2525
|
+
this can contain technical details and is primarily intended for developers
|
|
2526
|
+
rather than end users.
|
|
2527
|
+
|
|
2528
|
+
</td>
|
|
2529
|
+
<td>
|
|
2530
|
+
|
|
2531
|
+
‐
|
|
2532
|
+
|
|
2533
|
+
</td>
|
|
2534
|
+
<td>
|
|
2535
|
+
|
|
2536
|
+
[`HttpResponse`](#httpresponse).[`description`](#property-description-2)
|
|
2537
|
+
|
|
2538
|
+
</td>
|
|
2539
|
+
<td>
|
|
2540
|
+
|
|
2541
|
+
[interfaces/response.interfaces.ts:66](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/response.interfaces.ts#L66)
|
|
2542
|
+
|
|
2543
|
+
</td>
|
|
2544
|
+
</tr>
|
|
2545
|
+
<tr>
|
|
2546
|
+
<td>
|
|
2547
|
+
|
|
2548
|
+
<a id="property-message-1"></a> `message`
|
|
2549
|
+
|
|
2550
|
+
</td>
|
|
2551
|
+
<td>
|
|
2552
|
+
|
|
2553
|
+
`string`
|
|
2554
|
+
|
|
2555
|
+
</td>
|
|
2556
|
+
<td>
|
|
2557
|
+
|
|
2558
|
+
Human-readable message describing the response.
|
|
2559
|
+
|
|
2560
|
+
This short message explains the result of the operation and is suitable
|
|
2561
|
+
for displaying to end users. It should be clear, concise, and avoid
|
|
2562
|
+
technical details that aren't relevant to users.
|
|
2563
|
+
|
|
2564
|
+
</td>
|
|
2565
|
+
<td>
|
|
2566
|
+
|
|
2567
|
+
‐
|
|
2568
|
+
|
|
2569
|
+
</td>
|
|
2570
|
+
<td>
|
|
2571
|
+
|
|
2572
|
+
[`HttpResponse`](#httpresponse).[`message`](#property-message-2)
|
|
2573
|
+
|
|
2574
|
+
</td>
|
|
2575
|
+
<td>
|
|
2576
|
+
|
|
2577
|
+
[interfaces/response.interfaces.ts:56](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/response.interfaces.ts#L56)
|
|
2578
|
+
|
|
2579
|
+
</td>
|
|
2580
|
+
</tr>
|
|
2581
|
+
<tr>
|
|
2582
|
+
<td>
|
|
2583
|
+
|
|
2584
|
+
<a id="property-statuscode-1"></a> `statusCode`
|
|
2585
|
+
|
|
2586
|
+
</td>
|
|
2587
|
+
<td>
|
|
2588
|
+
|
|
2589
|
+
| [`HttpClientErrorStatus`](#httpclienterrorstatus) | [`HttpServerErrorStatus`](#httpservererrorstatus)
|
|
2590
|
+
|
|
2591
|
+
</td>
|
|
2592
|
+
<td>
|
|
2593
|
+
|
|
2594
|
+
The HTTP status code, which will be an error code (4xx or 5xx).
|
|
2595
|
+
|
|
2596
|
+
For error responses, this will typically be:
|
|
2597
|
+
|
|
2598
|
+
- 4xx range for client errors (e.g., 400 Bad Request, 404 Not Found)
|
|
2599
|
+
- 5xx range for server errors (e.g., 500 Internal Server Error)
|
|
2600
|
+
|
|
2601
|
+
**See**
|
|
2602
|
+
|
|
2603
|
+
- [HttpClientErrorStatus](#httpclienterrorstatus) Enum of client error status codes
|
|
2604
|
+
- [HttpServerErrorStatus](#httpservererrorstatus) Enum of server error status codes
|
|
2605
|
+
|
|
2606
|
+
</td>
|
|
2607
|
+
<td>
|
|
2608
|
+
|
|
2609
|
+
[`HttpResponse`](#httpresponse).[`statusCode`](#property-statuscode-2)
|
|
2610
|
+
|
|
2611
|
+
</td>
|
|
2612
|
+
<td>
|
|
2613
|
+
|
|
2614
|
+
‐
|
|
2615
|
+
|
|
2616
|
+
</td>
|
|
2617
|
+
<td>
|
|
2618
|
+
|
|
2619
|
+
[interfaces/response.interfaces.ts:137](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/response.interfaces.ts#L137)
|
|
2620
|
+
|
|
2621
|
+
</td>
|
|
2622
|
+
</tr>
|
|
2623
|
+
</tbody>
|
|
2624
|
+
</table>
|
|
2625
|
+
|
|
2626
|
+
---
|
|
2627
|
+
|
|
2628
|
+
### HttpResponse
|
|
2629
|
+
|
|
2630
|
+
Defined in: [interfaces/response.interfaces.ts:21](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/response.interfaces.ts#L21)
|
|
2631
|
+
|
|
2632
|
+
Base interface for all HTTP responses in the application.
|
|
2633
|
+
|
|
2634
|
+
The `HttpResponse` interface defines the standard structure for API responses
|
|
2635
|
+
throughout the application. It ensures a consistent response format that includes
|
|
2636
|
+
status information, a specific response code, and descriptive messages.
|
|
2637
|
+
|
|
2638
|
+
This standardized format makes it easier for clients to process responses and
|
|
2639
|
+
handle different scenarios (success, error, etc.) in a consistent manner.
|
|
2640
|
+
|
|
2641
|
+
HttpResponse
|
|
2642
|
+
|
|
2643
|
+
#### See
|
|
2644
|
+
|
|
2645
|
+
- [SuccessResponse](#successresponse) For successful operation responses
|
|
2646
|
+
- [ErrorResponse](#errorresponse) For error operation responses
|
|
2647
|
+
- [ResponseCode](#responsecode) Type for response status codes
|
|
2648
|
+
- [HttpStatus](#httpstatus) HTTP status codes enumeration
|
|
2649
|
+
|
|
2650
|
+
#### Extended by
|
|
2651
|
+
|
|
2652
|
+
- [`SuccessResponse`](#successresponse)
|
|
2653
|
+
- [`ErrorResponse`](#errorresponse)
|
|
2654
|
+
|
|
2655
|
+
#### Properties
|
|
2656
|
+
|
|
2657
|
+
<table>
|
|
2658
|
+
<thead>
|
|
2659
|
+
<tr>
|
|
2660
|
+
<th>Property</th>
|
|
2661
|
+
<th>Type</th>
|
|
2662
|
+
<th>Description</th>
|
|
2663
|
+
<th>Defined in</th>
|
|
2664
|
+
</tr>
|
|
2665
|
+
</thead>
|
|
2666
|
+
<tbody>
|
|
2667
|
+
<tr>
|
|
2668
|
+
<td>
|
|
2669
|
+
|
|
2670
|
+
<a id="property-code-2"></a> `code`
|
|
2671
|
+
|
|
2672
|
+
</td>
|
|
2673
|
+
<td>
|
|
2674
|
+
|
|
2675
|
+
[`ResponseCode`](#responsecode)
|
|
2676
|
+
|
|
2677
|
+
</td>
|
|
2678
|
+
<td>
|
|
2679
|
+
|
|
2680
|
+
Application-specific response code.
|
|
2681
|
+
|
|
2682
|
+
This code provides more detailed information about the specific result
|
|
2683
|
+
of the operation beyond what the HTTP status code indicates. It allows
|
|
2684
|
+
for fine-grained categorization of responses within each HTTP status category.
|
|
2685
|
+
|
|
2686
|
+
**See**
|
|
2687
|
+
|
|
2688
|
+
- [ResponseCode](#responsecode) Union type for all response codes
|
|
2689
|
+
- [SuccessResponseCode](#successresponsecode) Type for success response codes
|
|
2690
|
+
- [ErrorResponseCode](#errorresponsecode) Type for error response codes
|
|
2691
|
+
|
|
2692
|
+
</td>
|
|
2693
|
+
<td>
|
|
2694
|
+
|
|
2695
|
+
[interfaces/response.interfaces.ts:47](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/response.interfaces.ts#L47)
|
|
2696
|
+
|
|
2697
|
+
</td>
|
|
2698
|
+
</tr>
|
|
2699
|
+
<tr>
|
|
2700
|
+
<td>
|
|
2701
|
+
|
|
2702
|
+
<a id="property-description-2"></a> `description?`
|
|
2703
|
+
|
|
2704
|
+
</td>
|
|
2705
|
+
<td>
|
|
2706
|
+
|
|
2707
|
+
`string`
|
|
2708
|
+
|
|
2709
|
+
</td>
|
|
2710
|
+
<td>
|
|
2711
|
+
|
|
2712
|
+
Optional detailed description of the response.
|
|
2713
|
+
|
|
2714
|
+
When provided, this field contains additional information about the response
|
|
2715
|
+
that might be useful for debugging or logging purposes. Unlike the message field,
|
|
2716
|
+
this can contain technical details and is primarily intended for developers
|
|
2717
|
+
rather than end users.
|
|
2718
|
+
|
|
2719
|
+
</td>
|
|
2720
|
+
<td>
|
|
2721
|
+
|
|
2722
|
+
[interfaces/response.interfaces.ts:66](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/response.interfaces.ts#L66)
|
|
2723
|
+
|
|
2724
|
+
</td>
|
|
2725
|
+
</tr>
|
|
2726
|
+
<tr>
|
|
2727
|
+
<td>
|
|
2728
|
+
|
|
2729
|
+
<a id="property-message-2"></a> `message`
|
|
2730
|
+
|
|
2731
|
+
</td>
|
|
2732
|
+
<td>
|
|
2733
|
+
|
|
2734
|
+
`string`
|
|
2735
|
+
|
|
2736
|
+
</td>
|
|
2737
|
+
<td>
|
|
2738
|
+
|
|
2739
|
+
Human-readable message describing the response.
|
|
2740
|
+
|
|
2741
|
+
This short message explains the result of the operation and is suitable
|
|
2742
|
+
for displaying to end users. It should be clear, concise, and avoid
|
|
2743
|
+
technical details that aren't relevant to users.
|
|
2744
|
+
|
|
2745
|
+
</td>
|
|
2746
|
+
<td>
|
|
2747
|
+
|
|
2748
|
+
[interfaces/response.interfaces.ts:56](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/response.interfaces.ts#L56)
|
|
2749
|
+
|
|
2750
|
+
</td>
|
|
2751
|
+
</tr>
|
|
2752
|
+
<tr>
|
|
2753
|
+
<td>
|
|
2754
|
+
|
|
2755
|
+
<a id="property-statuscode-2"></a> `statusCode`
|
|
2756
|
+
|
|
2757
|
+
</td>
|
|
2758
|
+
<td>
|
|
2759
|
+
|
|
2760
|
+
[`HttpStatus`](#httpstatus)
|
|
2761
|
+
|
|
2762
|
+
</td>
|
|
2763
|
+
<td>
|
|
2764
|
+
|
|
2765
|
+
The HTTP status code for the response.
|
|
2766
|
+
|
|
2767
|
+
This corresponds to standard HTTP status codes (200, 400, 500, etc.)
|
|
2768
|
+
and provides a quick way for clients to determine the general category
|
|
2769
|
+
of the response (success, client error, server error).
|
|
2770
|
+
|
|
2771
|
+
**See**
|
|
2772
|
+
|
|
2773
|
+
- [HttpStatus](#httpstatus) Type for HTTP status codes
|
|
2774
|
+
- [HttpSuccessStatus](#httpsuccessstatus) Enum for success status codes
|
|
2775
|
+
- [HttpClientErrorStatus](#httpclienterrorstatus) Enum for client error status codes
|
|
2776
|
+
- [HttpServerErrorStatus](#httpservererrorstatus) Enum for server error status codes
|
|
2777
|
+
|
|
2778
|
+
</td>
|
|
2779
|
+
<td>
|
|
2780
|
+
|
|
2781
|
+
[interfaces/response.interfaces.ts:34](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/response.interfaces.ts#L34)
|
|
2782
|
+
|
|
2783
|
+
</td>
|
|
2784
|
+
</tr>
|
|
2785
|
+
</tbody>
|
|
2786
|
+
</table>
|
|
2787
|
+
|
|
2788
|
+
---
|
|
2789
|
+
|
|
2790
|
+
### SuccessResponse
|
|
2791
|
+
|
|
2792
|
+
Defined in: [interfaces/response.interfaces.ts:84](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/response.interfaces.ts#L84)
|
|
2793
|
+
|
|
2794
|
+
Interface for successful API responses that include data payload.
|
|
2795
|
+
|
|
2796
|
+
The `SuccessResponse` interface extends the base `HttpResponse` interface to include
|
|
2797
|
+
a data property containing the operation's result. This interface is used for all
|
|
2798
|
+
successful API responses that need to return data to the client.
|
|
2799
|
+
|
|
2800
|
+
The generic type parameter `T` allows for type-safe specification of the data structure
|
|
2801
|
+
being returned, ensuring consistency between backend definitions and frontend expectations.
|
|
2802
|
+
|
|
2803
|
+
SuccessResponse
|
|
2804
|
+
|
|
2805
|
+
#### See
|
|
2806
|
+
|
|
2807
|
+
[HttpResponse](#httpresponse) Base interface for all responses
|
|
2808
|
+
|
|
2809
|
+
#### Extends
|
|
2810
|
+
|
|
2811
|
+
- [`HttpResponse`](#httpresponse)
|
|
2812
|
+
|
|
2813
|
+
#### Properties
|
|
2814
|
+
|
|
2815
|
+
<table>
|
|
2816
|
+
<thead>
|
|
2817
|
+
<tr>
|
|
2818
|
+
<th>Property</th>
|
|
2819
|
+
<th>Type</th>
|
|
2820
|
+
<th>Description</th>
|
|
2821
|
+
<th>Overrides</th>
|
|
2822
|
+
<th>Inherited from</th>
|
|
2823
|
+
<th>Defined in</th>
|
|
2824
|
+
</tr>
|
|
2825
|
+
</thead>
|
|
2826
|
+
<tbody>
|
|
2827
|
+
<tr>
|
|
2828
|
+
<td>
|
|
2829
|
+
|
|
2830
|
+
<a id="property-code-3"></a> `code`
|
|
2831
|
+
|
|
2832
|
+
</td>
|
|
2833
|
+
<td>
|
|
2834
|
+
|
|
2835
|
+
[`SuccessResponseCode`](#successresponsecode)
|
|
2836
|
+
|
|
2837
|
+
</td>
|
|
2838
|
+
<td>
|
|
2839
|
+
|
|
2840
|
+
Application-specific success code.
|
|
2841
|
+
|
|
2842
|
+
This provides more granular information about the specific success case,
|
|
2843
|
+
allowing clients to handle different success scenarios distinctly if needed.
|
|
2844
|
+
|
|
2845
|
+
**See**
|
|
2846
|
+
|
|
2847
|
+
[SuccessResponseCode](#successresponsecode) Type for success response codes
|
|
2848
|
+
|
|
2849
|
+
</td>
|
|
2850
|
+
<td>
|
|
2851
|
+
|
|
2852
|
+
[`HttpResponse`](#httpresponse).[`code`](#property-code-2)
|
|
2853
|
+
|
|
2854
|
+
</td>
|
|
2855
|
+
<td>
|
|
2856
|
+
|
|
2857
|
+
‐
|
|
2858
|
+
|
|
2859
|
+
</td>
|
|
2860
|
+
<td>
|
|
2861
|
+
|
|
2862
|
+
[interfaces/response.interfaces.ts:105](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/response.interfaces.ts#L105)
|
|
2863
|
+
|
|
2864
|
+
</td>
|
|
2865
|
+
</tr>
|
|
2866
|
+
<tr>
|
|
2867
|
+
<td>
|
|
2868
|
+
|
|
2869
|
+
<a id="property-description-3"></a> `description?`
|
|
2870
|
+
|
|
2871
|
+
</td>
|
|
2872
|
+
<td>
|
|
2873
|
+
|
|
2874
|
+
`string`
|
|
2875
|
+
|
|
2876
|
+
</td>
|
|
2877
|
+
<td>
|
|
2878
|
+
|
|
2879
|
+
Optional detailed description of the response.
|
|
2880
|
+
|
|
2881
|
+
When provided, this field contains additional information about the response
|
|
2882
|
+
that might be useful for debugging or logging purposes. Unlike the message field,
|
|
2883
|
+
this can contain technical details and is primarily intended for developers
|
|
2884
|
+
rather than end users.
|
|
2885
|
+
|
|
2886
|
+
</td>
|
|
2887
|
+
<td>
|
|
2888
|
+
|
|
2889
|
+
‐
|
|
2890
|
+
|
|
2891
|
+
</td>
|
|
2892
|
+
<td>
|
|
2893
|
+
|
|
2894
|
+
[`HttpResponse`](#httpresponse).[`description`](#property-description-2)
|
|
2895
|
+
|
|
2896
|
+
</td>
|
|
2897
|
+
<td>
|
|
2898
|
+
|
|
2899
|
+
[interfaces/response.interfaces.ts:66](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/response.interfaces.ts#L66)
|
|
2900
|
+
|
|
2901
|
+
</td>
|
|
2902
|
+
</tr>
|
|
2903
|
+
<tr>
|
|
2904
|
+
<td>
|
|
2905
|
+
|
|
2906
|
+
<a id="property-message-3"></a> `message`
|
|
2907
|
+
|
|
2908
|
+
</td>
|
|
2909
|
+
<td>
|
|
2910
|
+
|
|
2911
|
+
`string`
|
|
2912
|
+
|
|
2913
|
+
</td>
|
|
2914
|
+
<td>
|
|
2915
|
+
|
|
2916
|
+
Human-readable message describing the response.
|
|
2917
|
+
|
|
2918
|
+
This short message explains the result of the operation and is suitable
|
|
2919
|
+
for displaying to end users. It should be clear, concise, and avoid
|
|
2920
|
+
technical details that aren't relevant to users.
|
|
2921
|
+
|
|
2922
|
+
</td>
|
|
2923
|
+
<td>
|
|
2924
|
+
|
|
2925
|
+
‐
|
|
2926
|
+
|
|
2927
|
+
</td>
|
|
2928
|
+
<td>
|
|
2929
|
+
|
|
2930
|
+
[`HttpResponse`](#httpresponse).[`message`](#property-message-2)
|
|
2931
|
+
|
|
2932
|
+
</td>
|
|
2933
|
+
<td>
|
|
2934
|
+
|
|
2935
|
+
[interfaces/response.interfaces.ts:56](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/response.interfaces.ts#L56)
|
|
2936
|
+
|
|
2937
|
+
</td>
|
|
2938
|
+
</tr>
|
|
2939
|
+
<tr>
|
|
2940
|
+
<td>
|
|
2941
|
+
|
|
2942
|
+
<a id="property-statuscode-3"></a> `statusCode`
|
|
2943
|
+
|
|
2944
|
+
</td>
|
|
2945
|
+
<td>
|
|
2946
|
+
|
|
2947
|
+
[`HttpSuccessStatus`](#httpsuccessstatus)
|
|
2948
|
+
|
|
2949
|
+
</td>
|
|
2950
|
+
<td>
|
|
2951
|
+
|
|
2952
|
+
The HTTP status code, which will be a success code (2xx).
|
|
2953
|
+
|
|
2954
|
+
For successful responses, this will typically be:
|
|
2955
|
+
|
|
2956
|
+
- 200 (OK) for general success
|
|
2957
|
+
- 201 (Created) when a resource was successfully created
|
|
2958
|
+
- 204 (No Content) when an operation succeeded but returns no data
|
|
2959
|
+
|
|
2960
|
+
**See**
|
|
2961
|
+
|
|
2962
|
+
[HttpSuccessStatus](#httpsuccessstatus) Enum of available success status codes
|
|
2963
|
+
|
|
2964
|
+
</td>
|
|
2965
|
+
<td>
|
|
2966
|
+
|
|
2967
|
+
[`HttpResponse`](#httpresponse).[`statusCode`](#property-statuscode-2)
|
|
2968
|
+
|
|
2969
|
+
</td>
|
|
2970
|
+
<td>
|
|
2971
|
+
|
|
2972
|
+
‐
|
|
2973
|
+
|
|
2974
|
+
</td>
|
|
2975
|
+
<td>
|
|
2976
|
+
|
|
2977
|
+
[interfaces/response.interfaces.ts:95](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/response.interfaces.ts#L95)
|
|
2978
|
+
|
|
2979
|
+
</td>
|
|
2980
|
+
</tr>
|
|
2981
|
+
</tbody>
|
|
2982
|
+
</table>
|
|
2983
|
+
|
|
2984
|
+
---
|
|
2985
|
+
|
|
2986
|
+
### UserInfo
|
|
2987
|
+
|
|
2988
|
+
Defined in: [interfaces/user-info.interface.ts:38](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/user-info.interface.ts#L38)
|
|
2989
|
+
|
|
2990
|
+
Interface representing essential user information.
|
|
2991
|
+
|
|
2992
|
+
The `UserInfo` interface defines the core identifying information for a user
|
|
2993
|
+
that is commonly needed throughout the application. It contains only the essential
|
|
2994
|
+
properties needed to identify and display basic user information, without including
|
|
2995
|
+
sensitive or authentication-related data.
|
|
2996
|
+
|
|
2997
|
+
This interface is designed to be embedded within other entities for tracking user
|
|
2998
|
+
associations, such as who created or modified a record. It's a lightweight alternative
|
|
2999
|
+
to embedding or referencing the complete user entity.
|
|
3000
|
+
|
|
3001
|
+
Common use cases:
|
|
3002
|
+
|
|
3003
|
+
- Audit trails for entity creation and modification
|
|
3004
|
+
- Activity logs showing which user performed an action
|
|
3005
|
+
- User attribution in collaborative features
|
|
3006
|
+
- Display of user information in UI components
|
|
3007
|
+
|
|
3008
|
+
#### See
|
|
3009
|
+
|
|
3010
|
+
- Model Uses this interface for tracking entity ownership and changes
|
|
3011
|
+
- EntityId Type used for the user identifier
|
|
3012
|
+
|
|
3013
|
+
#### Example
|
|
3014
|
+
|
|
3015
|
+
```typescript
|
|
3016
|
+
// Example of a blog post entity using UserInfo
|
|
3017
|
+
interface BlogPost {
|
|
3018
|
+
id: EntityId;
|
|
3019
|
+
title: string;
|
|
3020
|
+
content: string;
|
|
3021
|
+
author: UserInfo; // The user who wrote the post
|
|
3022
|
+
lastEditedBy?: UserInfo; // The user who last edited the post
|
|
3023
|
+
}
|
|
3024
|
+
```
|
|
3025
|
+
|
|
3026
|
+
#### Properties
|
|
3027
|
+
|
|
3028
|
+
<table>
|
|
3029
|
+
<thead>
|
|
3030
|
+
<tr>
|
|
3031
|
+
<th>Property</th>
|
|
3032
|
+
<th>Type</th>
|
|
3033
|
+
<th>Description</th>
|
|
3034
|
+
<th>Defined in</th>
|
|
3035
|
+
</tr>
|
|
3036
|
+
</thead>
|
|
3037
|
+
<tbody>
|
|
3038
|
+
<tr>
|
|
3039
|
+
<td>
|
|
3040
|
+
|
|
3041
|
+
<a id="property-firstname"></a> `firstName`
|
|
3042
|
+
|
|
3043
|
+
</td>
|
|
3044
|
+
<td>
|
|
3045
|
+
|
|
3046
|
+
`string`
|
|
3047
|
+
|
|
3048
|
+
</td>
|
|
3049
|
+
<td>
|
|
3050
|
+
|
|
3051
|
+
The user's first name or given name.
|
|
3052
|
+
|
|
3053
|
+
Used for personalization and formal addressing throughout the application.
|
|
3054
|
+
|
|
3055
|
+
</td>
|
|
3056
|
+
<td>
|
|
3057
|
+
|
|
3058
|
+
[interfaces/user-info.interface.ts:52](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/user-info.interface.ts#L52)
|
|
3059
|
+
|
|
3060
|
+
</td>
|
|
3061
|
+
</tr>
|
|
3062
|
+
<tr>
|
|
3063
|
+
<td>
|
|
3064
|
+
|
|
3065
|
+
<a id="property-fullname"></a> `fullName`
|
|
3066
|
+
|
|
3067
|
+
</td>
|
|
3068
|
+
<td>
|
|
3069
|
+
|
|
3070
|
+
`string`
|
|
3071
|
+
|
|
3072
|
+
</td>
|
|
3073
|
+
<td>
|
|
3074
|
+
|
|
3075
|
+
The user's complete name, typically a combination of first and last name.
|
|
3076
|
+
|
|
3077
|
+
This property provides a convenience for displaying the user's full name
|
|
3078
|
+
without having to concatenate the first and last names manually. The exact
|
|
3079
|
+
format may vary based on locale and application requirements.
|
|
3080
|
+
|
|
3081
|
+
</td>
|
|
3082
|
+
<td>
|
|
3083
|
+
|
|
3084
|
+
[interfaces/user-info.interface.ts:68](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/user-info.interface.ts#L68)
|
|
3085
|
+
|
|
3086
|
+
</td>
|
|
3087
|
+
</tr>
|
|
3088
|
+
<tr>
|
|
3089
|
+
<td>
|
|
3090
|
+
|
|
3091
|
+
<a id="property-id"></a> `id`
|
|
3092
|
+
|
|
3093
|
+
</td>
|
|
3094
|
+
<td>
|
|
3095
|
+
|
|
3096
|
+
`EntityId`
|
|
3097
|
+
|
|
3098
|
+
</td>
|
|
3099
|
+
<td>
|
|
3100
|
+
|
|
3101
|
+
The unique identifier for the user.
|
|
3102
|
+
|
|
3103
|
+
This ID corresponds to the primary key in the users table
|
|
3104
|
+
and uniquely identifies the user across the entire system.
|
|
3105
|
+
|
|
3106
|
+
</td>
|
|
3107
|
+
<td>
|
|
3108
|
+
|
|
3109
|
+
[interfaces/user-info.interface.ts:45](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/user-info.interface.ts#L45)
|
|
3110
|
+
|
|
3111
|
+
</td>
|
|
3112
|
+
</tr>
|
|
3113
|
+
<tr>
|
|
3114
|
+
<td>
|
|
3115
|
+
|
|
3116
|
+
<a id="property-lastname"></a> `lastName`
|
|
3117
|
+
|
|
3118
|
+
</td>
|
|
3119
|
+
<td>
|
|
3120
|
+
|
|
3121
|
+
`string`
|
|
3122
|
+
|
|
3123
|
+
</td>
|
|
3124
|
+
<td>
|
|
3125
|
+
|
|
3126
|
+
The user's last name or family name.
|
|
3127
|
+
|
|
3128
|
+
Used alongside the first name for formal addressing and identification.
|
|
3129
|
+
|
|
3130
|
+
</td>
|
|
3131
|
+
<td>
|
|
3132
|
+
|
|
3133
|
+
[interfaces/user-info.interface.ts:59](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/interfaces/user-info.interface.ts#L59)
|
|
3134
|
+
|
|
3135
|
+
</td>
|
|
3136
|
+
</tr>
|
|
3137
|
+
</tbody>
|
|
3138
|
+
</table>
|
|
3139
|
+
|
|
3140
|
+
## Type Aliases
|
|
3141
|
+
|
|
3142
|
+
### ErrorResponseCode
|
|
3143
|
+
|
|
3144
|
+
```ts
|
|
3145
|
+
type ErrorResponseCode = LooseAutocomplete<AuthErrorResponseCode>;
|
|
3146
|
+
```
|
|
3147
|
+
|
|
3148
|
+
Defined in: [types/response-code.ts:62](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/types/response-code.ts#L62)
|
|
3149
|
+
|
|
3150
|
+
Represents all possible error response codes used throughout the application.
|
|
3151
|
+
|
|
3152
|
+
The `ErrorResponseCode` type is a union of error response codes from different
|
|
3153
|
+
modules in the system. It provides a centralized type for all error scenarios,
|
|
3154
|
+
ensuring consistency and type safety when working with error API responses.
|
|
3155
|
+
|
|
3156
|
+
This type is used in the `ErrorResponse` interface to ensure that only valid
|
|
3157
|
+
error codes are used when constructing error responses.
|
|
3158
|
+
|
|
3159
|
+
#### See
|
|
3160
|
+
|
|
3161
|
+
- [ResponseCode](#responsecode) Type for all response codes
|
|
3162
|
+
- AuthErrorResponseCode Authentication-related error codes
|
|
3163
|
+
- [ErrorResponse](#errorresponse) Interface for error HTTP responses
|
|
3164
|
+
|
|
3165
|
+
---
|
|
3166
|
+
|
|
3167
|
+
### FileId
|
|
3168
|
+
|
|
3169
|
+
```ts
|
|
3170
|
+
type FileId = string & object;
|
|
3171
|
+
```
|
|
3172
|
+
|
|
3173
|
+
Defined in: [types/types.ts:38](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/types/types.ts#L38)
|
|
3174
|
+
|
|
3175
|
+
Represents a strongly-typed unique identifier for a file.
|
|
3176
|
+
|
|
3177
|
+
This type is a branded string, ensuring that only valid `FileId`
|
|
3178
|
+
values can be assigned or passed to functions expecting this type.
|
|
3179
|
+
This provides additional type safety by preventing ordinary strings
|
|
3180
|
+
from being used where FileId values are expected.
|
|
3181
|
+
|
|
3182
|
+
The `__brand` property is used for type checking only and does not exist
|
|
3183
|
+
on the runtime value - it's just a TypeScript type system feature.
|
|
3184
|
+
|
|
3185
|
+
#### Type Declaration
|
|
3186
|
+
|
|
3187
|
+
<table>
|
|
3188
|
+
<thead>
|
|
3189
|
+
<tr>
|
|
3190
|
+
<th>Name</th>
|
|
3191
|
+
<th>Type</th>
|
|
3192
|
+
<th>Defined in</th>
|
|
3193
|
+
</tr>
|
|
3194
|
+
</thead>
|
|
3195
|
+
<tbody>
|
|
3196
|
+
<tr>
|
|
3197
|
+
<td>
|
|
3198
|
+
|
|
3199
|
+
`__brand`
|
|
3200
|
+
|
|
3201
|
+
</td>
|
|
3202
|
+
<td>
|
|
3203
|
+
|
|
3204
|
+
unique `symbol`
|
|
3205
|
+
|
|
3206
|
+
</td>
|
|
3207
|
+
<td>
|
|
3208
|
+
|
|
3209
|
+
[types/types.ts:38](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/types/types.ts#L38)
|
|
3210
|
+
|
|
3211
|
+
</td>
|
|
3212
|
+
</tr>
|
|
3213
|
+
</tbody>
|
|
3214
|
+
</table>
|
|
3215
|
+
|
|
3216
|
+
#### Example
|
|
3217
|
+
|
|
3218
|
+
```typescript
|
|
3219
|
+
// Creating a FileId (typically done inside a validated factory function)
|
|
3220
|
+
function validateAndCreateFileId(id: string): FileId {
|
|
3221
|
+
// Validation logic here
|
|
3222
|
+
return id as FileId;
|
|
3223
|
+
}
|
|
3224
|
+
|
|
3225
|
+
// Using the type in a function signature
|
|
3226
|
+
function getFileDetails(fileId: FileId) {
|
|
3227
|
+
// Function can trust that fileId is valid
|
|
3228
|
+
}
|
|
3229
|
+
```
|
|
3230
|
+
|
|
3231
|
+
#### See
|
|
3232
|
+
|
|
3233
|
+
EntityId Generic entity identifier type
|
|
3234
|
+
|
|
3235
|
+
---
|
|
3236
|
+
|
|
3237
|
+
### HttpStatus
|
|
3238
|
+
|
|
3239
|
+
```ts
|
|
3240
|
+
type HttpStatus =
|
|
3241
|
+
| HttpInfoStatus
|
|
3242
|
+
| HttpSuccessStatus
|
|
3243
|
+
| HttpRedirectionStatus
|
|
3244
|
+
| HttpClientErrorStatus
|
|
3245
|
+
| HttpServerErrorStatus;
|
|
3246
|
+
```
|
|
3247
|
+
|
|
3248
|
+
Defined in: [types/types.ts:96](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/types/types.ts#L96)
|
|
3249
|
+
|
|
3250
|
+
Comprehensive HTTP status code type.
|
|
3251
|
+
|
|
3252
|
+
The `HttpStatus` type is a union of all HTTP status code categories defined in the HTTP
|
|
3253
|
+
specification. It provides a complete and type-safe representation of all possible
|
|
3254
|
+
HTTP status codes that can be used in API responses.
|
|
3255
|
+
|
|
3256
|
+
This type is used throughout the application to ensure consistency and type safety
|
|
3257
|
+
when working with HTTP status codes in controllers, interceptors, and response handlers.
|
|
3258
|
+
|
|
3259
|
+
#### See
|
|
3260
|
+
|
|
3261
|
+
- [HttpInfoStatus](#httpinfostatus) Informational status codes (1xx)
|
|
3262
|
+
- [HttpSuccessStatus](#httpsuccessstatus) Success status codes (2xx)
|
|
3263
|
+
- [HttpRedirectionStatus](#httpredirectionstatus) Redirection status codes (3xx)
|
|
3264
|
+
- [HttpClientErrorStatus](#httpclienterrorstatus) Client error status codes (4xx)
|
|
3265
|
+
- [HttpServerErrorStatus](#httpservererrorstatus) Server error status codes (5xx)
|
|
3266
|
+
- [HttpResponse](#httpresponse) Base interface for HTTP responses
|
|
3267
|
+
|
|
3268
|
+
---
|
|
3269
|
+
|
|
3270
|
+
### ResponseCode
|
|
3271
|
+
|
|
3272
|
+
```ts
|
|
3273
|
+
type ResponseCode = LooseAutocomplete<
|
|
3274
|
+
CommonSuccessResponseCode | AuthSuccessResponseCode | AuthErrorResponseCode
|
|
3275
|
+
>;
|
|
3276
|
+
```
|
|
3277
|
+
|
|
3278
|
+
Defined in: [types/response-code.ts:23](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/types/response-code.ts#L23)
|
|
3279
|
+
|
|
3280
|
+
Represents all possible response codes used throughout the application.
|
|
3281
|
+
|
|
3282
|
+
The `ResponseCode` type is a union of all success and error response codes
|
|
3283
|
+
from different modules in the system. It provides a centralized type for
|
|
3284
|
+
all response codes, ensuring consistency and type safety when working with
|
|
3285
|
+
API responses.
|
|
3286
|
+
|
|
3287
|
+
The type uses `LooseAutocomplete` to provide IDE autocompletion while still
|
|
3288
|
+
allowing for extensibility with string literals when needed (e.g., for module-specific
|
|
3289
|
+
codes that may be added in the future).
|
|
3290
|
+
|
|
3291
|
+
#### See
|
|
3292
|
+
|
|
3293
|
+
- [SuccessResponseCode](#successresponsecode) Type for success response codes only
|
|
3294
|
+
- [ErrorResponseCode](#errorresponsecode) Type for error response codes only
|
|
3295
|
+
- [HttpResponse](#httpresponse) Base interface for HTTP responses
|
|
3296
|
+
|
|
3297
|
+
---
|
|
3298
|
+
|
|
3299
|
+
### SocketId
|
|
3300
|
+
|
|
3301
|
+
```ts
|
|
3302
|
+
type SocketId = string & object;
|
|
3303
|
+
```
|
|
3304
|
+
|
|
3305
|
+
Defined in: [types/types.ts:77](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/types/types.ts#L77)
|
|
3306
|
+
|
|
3307
|
+
Represents a strongly-typed socket identifier for WebSocket connections.
|
|
3308
|
+
|
|
3309
|
+
The `SocketId` type is a branded string type that ensures socket identifiers
|
|
3310
|
+
are treated as a distinct type from regular strings. This provides type safety
|
|
3311
|
+
by preventing arbitrary strings from being used where socket IDs are expected.
|
|
3312
|
+
|
|
3313
|
+
This type is typically used in WebSocket services and connection management
|
|
3314
|
+
to uniquely identify and track active socket connections.
|
|
3315
|
+
|
|
3316
|
+
#### Type Declaration
|
|
3317
|
+
|
|
3318
|
+
<table>
|
|
3319
|
+
<thead>
|
|
3320
|
+
<tr>
|
|
3321
|
+
<th>Name</th>
|
|
3322
|
+
<th>Type</th>
|
|
3323
|
+
<th>Defined in</th>
|
|
3324
|
+
</tr>
|
|
3325
|
+
</thead>
|
|
3326
|
+
<tbody>
|
|
3327
|
+
<tr>
|
|
3328
|
+
<td>
|
|
3329
|
+
|
|
3330
|
+
`__brand`
|
|
3331
|
+
|
|
3332
|
+
</td>
|
|
3333
|
+
<td>
|
|
3334
|
+
|
|
3335
|
+
unique `symbol`
|
|
3336
|
+
|
|
3337
|
+
</td>
|
|
3338
|
+
<td>
|
|
3339
|
+
|
|
3340
|
+
[types/types.ts:77](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/types/types.ts#L77)
|
|
3341
|
+
|
|
3342
|
+
</td>
|
|
3343
|
+
</tr>
|
|
3344
|
+
</tbody>
|
|
3345
|
+
</table>
|
|
3346
|
+
|
|
3347
|
+
#### Example
|
|
3348
|
+
|
|
3349
|
+
```typescript
|
|
3350
|
+
// Creating a SocketId (typically done by a socket manager)
|
|
3351
|
+
function createSocketId(rawId: string): SocketId {
|
|
3352
|
+
return rawId as SocketId;
|
|
3353
|
+
}
|
|
3354
|
+
|
|
3355
|
+
// Using in a connection manager
|
|
3356
|
+
class SocketConnectionManager {
|
|
3357
|
+
private connections = new Map<SocketId, WebSocket>();
|
|
3358
|
+
|
|
3359
|
+
addConnection(socketId: SocketId, socket: WebSocket) {
|
|
3360
|
+
this.connections.set(socketId, socket);
|
|
3361
|
+
}
|
|
3362
|
+
}
|
|
3363
|
+
```
|
|
3364
|
+
|
|
3365
|
+
---
|
|
3366
|
+
|
|
3367
|
+
### SuccessResponseCode
|
|
3368
|
+
|
|
3369
|
+
```ts
|
|
3370
|
+
type SuccessResponseCode = LooseAutocomplete<
|
|
3371
|
+
CommonSuccessResponseCode | AuthSuccessResponseCode
|
|
3372
|
+
>;
|
|
3373
|
+
```
|
|
3374
|
+
|
|
3375
|
+
Defined in: [types/response-code.ts:44](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/types/response-code.ts#L44)
|
|
3376
|
+
|
|
3377
|
+
Represents all possible success response codes used throughout the application.
|
|
3378
|
+
|
|
3379
|
+
The `SuccessResponseCode` type is a union of success response codes from different
|
|
3380
|
+
modules in the system. It provides a centralized type for all success scenarios,
|
|
3381
|
+
ensuring consistency and type safety when working with successful API responses.
|
|
3382
|
+
|
|
3383
|
+
This type is used in the `SuccessResponse` interface to ensure that only valid
|
|
3384
|
+
success codes are used when constructing responses.
|
|
3385
|
+
|
|
3386
|
+
#### See
|
|
3387
|
+
|
|
3388
|
+
- [ResponseCode](#responsecode) Type for all response codes
|
|
3389
|
+
- [CommonSuccessResponseCode](#commonsuccessresponsecode) Common success response codes
|
|
3390
|
+
- AuthSuccessResponseCode Authentication-related success codes
|
|
3391
|
+
- [SuccessResponse](#successresponse) Interface for successful HTTP responses
|
|
3392
|
+
|
|
3393
|
+
---
|
|
3394
|
+
|
|
3395
|
+
### WsRefId
|
|
3396
|
+
|
|
3397
|
+
```ts
|
|
3398
|
+
type WsRefId = (string & object) | "system";
|
|
3399
|
+
```
|
|
3400
|
+
|
|
3401
|
+
Defined in: [types/types.ts:48](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/types/types.ts#L48)
|
|
3402
|
+
|
|
3403
|
+
Represents a type alias `WsRefId` which is either a branded string or the literal string "system".
|
|
3404
|
+
|
|
3405
|
+
A branded string is a specific type of string that has been augmented with the `__brand` unique symbol.
|
|
3406
|
+
This branding is used to provide stronger type safety and to differentiate the string from other generic strings.
|
|
3407
|
+
|
|
3408
|
+
The literal string `"system"` is included as an alternative value.
|
|
3409
|
+
|
|
3410
|
+
## Variables
|
|
3411
|
+
|
|
3412
|
+
### DAY_IN_HOURS
|
|
3413
|
+
|
|
3414
|
+
```ts
|
|
3415
|
+
const DAY_IN_HOURS: 24 = 24;
|
|
3416
|
+
```
|
|
3417
|
+
|
|
3418
|
+
Defined in: [constants.ts:4](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/constants.ts#L4)
|
|
3419
|
+
|
|
3420
|
+
---
|
|
3421
|
+
|
|
3422
|
+
### DAY_IN_SECONDS
|
|
3423
|
+
|
|
3424
|
+
```ts
|
|
3425
|
+
const DAY_IN_SECONDS: number;
|
|
3426
|
+
```
|
|
3427
|
+
|
|
3428
|
+
Defined in: [constants.ts:5](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/constants.ts#L5)
|
|
3429
|
+
|
|
3430
|
+
---
|
|
3431
|
+
|
|
3432
|
+
### DEFAULT_ITEMS_PER_PAGE
|
|
3433
|
+
|
|
3434
|
+
```ts
|
|
3435
|
+
const DEFAULT_ITEMS_PER_PAGE: 10 = 10;
|
|
3436
|
+
```
|
|
3437
|
+
|
|
3438
|
+
Defined in: [constants.ts:19](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/constants.ts#L19)
|
|
3439
|
+
|
|
3440
|
+
---
|
|
3441
|
+
|
|
3442
|
+
### DEFAULT_MYSQL_PORT
|
|
3443
|
+
|
|
3444
|
+
```ts
|
|
3445
|
+
const DEFAULT_MYSQL_PORT: 3306 = 3306;
|
|
3446
|
+
```
|
|
3447
|
+
|
|
3448
|
+
Defined in: [constants.ts:17](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/constants.ts#L17)
|
|
3449
|
+
|
|
3450
|
+
---
|
|
3451
|
+
|
|
3452
|
+
### DEFAULT_REDIS_PORT
|
|
3453
|
+
|
|
3454
|
+
```ts
|
|
3455
|
+
const DEFAULT_REDIS_PORT: 6379 = 6379;
|
|
3456
|
+
```
|
|
3457
|
+
|
|
3458
|
+
Defined in: [constants.ts:15](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/constants.ts#L15)
|
|
3459
|
+
|
|
3460
|
+
---
|
|
3461
|
+
|
|
3462
|
+
### DEFAULT_SALT_ROUNDS
|
|
3463
|
+
|
|
3464
|
+
```ts
|
|
3465
|
+
const DEFAULT_SALT_ROUNDS: 10 = 10;
|
|
3466
|
+
```
|
|
3467
|
+
|
|
3468
|
+
Defined in: [constants.ts:11](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/constants.ts#L11)
|
|
3469
|
+
|
|
3470
|
+
---
|
|
3471
|
+
|
|
3472
|
+
### DEFAULT_UUID_VERSION
|
|
3473
|
+
|
|
3474
|
+
```ts
|
|
3475
|
+
const DEFAULT_UUID_VERSION: 4 = 4;
|
|
3476
|
+
```
|
|
3477
|
+
|
|
3478
|
+
Defined in: [constants.ts:13](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/constants.ts#L13)
|
|
3479
|
+
|
|
3480
|
+
---
|
|
3481
|
+
|
|
3482
|
+
### DEFAULT_VERIFY_TOKEN_LENGTH
|
|
3483
|
+
|
|
3484
|
+
```ts
|
|
3485
|
+
const DEFAULT_VERIFY_TOKEN_LENGTH: 16 = 16;
|
|
3486
|
+
```
|
|
3487
|
+
|
|
3488
|
+
Defined in: [constants.ts:9](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/constants.ts#L9)
|
|
3489
|
+
|
|
3490
|
+
---
|
|
3491
|
+
|
|
3492
|
+
### Errors
|
|
3493
|
+
|
|
3494
|
+
```ts
|
|
3495
|
+
const Errors: { [key in CommonErrorResponseCode]: ErrorResponse };
|
|
3496
|
+
```
|
|
3497
|
+
|
|
3498
|
+
Defined in: [responses/error.responses.ts:71](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/responses/error.responses.ts#L71)
|
|
3499
|
+
|
|
3500
|
+
Collection of standardized common error responses
|
|
3501
|
+
|
|
3502
|
+
This constant maps each common error response code to its corresponding
|
|
3503
|
+
standardized error response object. The responses include HTTP status codes,
|
|
3504
|
+
error codes, and human-readable messages.
|
|
3505
|
+
|
|
3506
|
+
Key features:
|
|
3507
|
+
|
|
3508
|
+
- Standardized error response format following the ErrorResponse interface
|
|
3509
|
+
- Comprehensive coverage of common error scenarios
|
|
3510
|
+
- Organized by HTTP status code (400, 401, 403, 404, 500)
|
|
3511
|
+
- Includes specialized errors for ID validation, file operations, and general errors
|
|
3512
|
+
- Human-readable error messages suitable for end-users
|
|
3513
|
+
|
|
3514
|
+
The error responses are organized into categories based on HTTP status codes:
|
|
3515
|
+
|
|
3516
|
+
- 400 Bad Request: Client errors related to invalid input or request format
|
|
3517
|
+
- 401 Unauthorized: Authentication failures
|
|
3518
|
+
- 403 Forbidden: Access denied due to insufficient permissions
|
|
3519
|
+
- 404 Not Found: Resource not found errors
|
|
3520
|
+
- 500 Internal Server Error: Server-side errors
|
|
3521
|
+
|
|
3522
|
+
The object is organized by error code, with each code mapping to an ErrorResponse
|
|
3523
|
+
object that follows the standardized format defined by the ErrorResponse interface.
|
|
3524
|
+
|
|
3525
|
+
#### Examples
|
|
3526
|
+
|
|
3527
|
+
```typescript
|
|
3528
|
+
// Using an error response in an exception
|
|
3529
|
+
import { Errors } from "@hichchi/nest-connector";
|
|
3530
|
+
import { BadRequestException } from "@nestjs/common";
|
|
3531
|
+
|
|
3532
|
+
// In a service method
|
|
3533
|
+
if (!id) {
|
|
3534
|
+
throw new BadRequestException(Errors.ERROR_400_EMPTY_ID);
|
|
3535
|
+
}
|
|
3536
|
+
```
|
|
3537
|
+
|
|
3538
|
+
```typescript
|
|
3539
|
+
// Using an error response in a custom exception filter
|
|
3540
|
+
import { Errors } from "@hichchi/nest-connector";
|
|
3541
|
+
import {
|
|
3542
|
+
ExceptionFilter,
|
|
3543
|
+
Catch,
|
|
3544
|
+
ArgumentsHost,
|
|
3545
|
+
NotFoundException,
|
|
3546
|
+
} from "@nestjs/common";
|
|
3547
|
+
|
|
3548
|
+
@Catch(NotFoundException)
|
|
3549
|
+
export class NotFoundExceptionFilter implements ExceptionFilter {
|
|
3550
|
+
catch(exception: NotFoundException, host: ArgumentsHost) {
|
|
3551
|
+
const response = host.switchToHttp().getResponse();
|
|
3552
|
+
const status = exception.getStatus();
|
|
3553
|
+
|
|
3554
|
+
// Use a standard error response
|
|
3555
|
+
response.status(status).json(Errors.ERROR_404);
|
|
3556
|
+
}
|
|
3557
|
+
}
|
|
3558
|
+
```
|
|
3559
|
+
|
|
3560
|
+
#### See
|
|
3561
|
+
|
|
3562
|
+
- [CommonErrorResponseCode](#commonerrorresponsecode) For all available error codes
|
|
3563
|
+
- [ErrorResponse](#errorresponse) For the structure of error response objects
|
|
3564
|
+
- [HttpClientErrorStatus](#httpclienterrorstatus) For client error HTTP status codes
|
|
3565
|
+
- [HttpServerErrorStatus](#httpservererrorstatus) For server error HTTP status codes
|
|
3566
|
+
|
|
3567
|
+
---
|
|
3568
|
+
|
|
3569
|
+
### HOUR_IN_MINUTES
|
|
3570
|
+
|
|
3571
|
+
```ts
|
|
3572
|
+
const HOUR_IN_MINUTES: 60 = 60;
|
|
3573
|
+
```
|
|
3574
|
+
|
|
3575
|
+
Defined in: [constants.ts:3](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/constants.ts#L3)
|
|
3576
|
+
|
|
3577
|
+
---
|
|
3578
|
+
|
|
3579
|
+
### MINUTE_IN_SECONDS
|
|
3580
|
+
|
|
3581
|
+
```ts
|
|
3582
|
+
const MINUTE_IN_SECONDS: 60 = 60;
|
|
3583
|
+
```
|
|
3584
|
+
|
|
3585
|
+
Defined in: [constants.ts:2](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/constants.ts#L2)
|
|
3586
|
+
|
|
3587
|
+
---
|
|
3588
|
+
|
|
3589
|
+
### MONTH_IN_DAYS
|
|
3590
|
+
|
|
3591
|
+
```ts
|
|
3592
|
+
const MONTH_IN_DAYS: 30 = 30;
|
|
3593
|
+
```
|
|
3594
|
+
|
|
3595
|
+
Defined in: [constants.ts:6](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/constants.ts#L6)
|
|
3596
|
+
|
|
3597
|
+
---
|
|
3598
|
+
|
|
3599
|
+
### MONTH_IN_SECONDS
|
|
3600
|
+
|
|
3601
|
+
```ts
|
|
3602
|
+
const MONTH_IN_SECONDS: number;
|
|
3603
|
+
```
|
|
3604
|
+
|
|
3605
|
+
Defined in: [constants.ts:7](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/constants.ts#L7)
|
|
3606
|
+
|
|
3607
|
+
---
|
|
3608
|
+
|
|
3609
|
+
### SECOND_IN_MS
|
|
3610
|
+
|
|
3611
|
+
```ts
|
|
3612
|
+
const SECOND_IN_MS: 1000 = 1000;
|
|
3613
|
+
```
|
|
3614
|
+
|
|
3615
|
+
Defined in: [constants.ts:1](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/constants.ts#L1)
|
|
3616
|
+
|
|
3617
|
+
---
|
|
3618
|
+
|
|
3619
|
+
### SuccessResponses
|
|
3620
|
+
|
|
3621
|
+
```ts
|
|
3622
|
+
const SuccessResponses: { [key in CommonSuccessResponseCode]: SuccessResponse };
|
|
3623
|
+
```
|
|
3624
|
+
|
|
3625
|
+
Defined in: [responses/success.responses.ts:59](https://github.com/hichchidev/hichchi/blob/4f0350925a950a3a9e81da44097f63463eade88d/libs/nest-connector/src/common/responses/success.responses.ts#L59)
|
|
3626
|
+
|
|
3627
|
+
Collection of standardized common success responses
|
|
3628
|
+
|
|
3629
|
+
This constant maps each common success response code to its corresponding
|
|
3630
|
+
standardized success response object. The responses include HTTP status codes,
|
|
3631
|
+
success codes, and human-readable messages.
|
|
3632
|
+
|
|
3633
|
+
Key features:
|
|
3634
|
+
|
|
3635
|
+
- Standardized success response format following the SuccessResponse interface
|
|
3636
|
+
- Generic success response for common operations
|
|
3637
|
+
- Consistent success message formatting across the application
|
|
3638
|
+
- Extensible structure for adding more specific success responses as needed
|
|
3639
|
+
|
|
3640
|
+
Currently, this collection contains a single generic success response (SUCCESS),
|
|
3641
|
+
but it can be extended with more specific success responses as the application
|
|
3642
|
+
grows and more detailed success states need to be communicated.
|
|
3643
|
+
|
|
3644
|
+
#### Examples
|
|
3645
|
+
|
|
3646
|
+
```typescript
|
|
3647
|
+
// Using a success response in a controller
|
|
3648
|
+
import { SuccessResponses } from "@hichchi/nest-connector";
|
|
3649
|
+
import { Controller, Get } from "@nestjs/common";
|
|
3650
|
+
|
|
3651
|
+
@Controller("items")
|
|
3652
|
+
export class ItemsController {
|
|
3653
|
+
@Get()
|
|
3654
|
+
findAll() {
|
|
3655
|
+
// Return a generic success response
|
|
3656
|
+
return SuccessResponses.SUCCESS;
|
|
3657
|
+
}
|
|
3658
|
+
}
|
|
3659
|
+
```
|
|
3660
|
+
|
|
3661
|
+
```typescript
|
|
3662
|
+
// Using a success response in a service
|
|
3663
|
+
import { SuccessResponses } from "@hichchi/nest-connector";
|
|
3664
|
+
import { Injectable } from "@nestjs/common";
|
|
3665
|
+
|
|
3666
|
+
@Injectable()
|
|
3667
|
+
export class DataService {
|
|
3668
|
+
processData(data: any) {
|
|
3669
|
+
// Process data logic...
|
|
3670
|
+
return SuccessResponses.SUCCESS;
|
|
3671
|
+
}
|
|
3672
|
+
}
|
|
3673
|
+
```
|
|
3674
|
+
|
|
3675
|
+
#### See
|
|
3676
|
+
|
|
3677
|
+
- [CommonSuccessResponseCode](#commonsuccessresponsecode) For all available success codes
|
|
3678
|
+
- [SuccessResponse](#successresponse) For the structure of success response objects
|
|
3679
|
+
- [SuccessResponseDto](#successresponsedto) For a class-based approach to success responses
|
|
3680
|
+
- [Errors](#errors) Complementary error responses for error handling
|