@alba-cars/common-modules 2.11.0 → 2.12.0
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/README.md +42 -42
- package/dist/core/enums/Analytics.d.ts +24 -24
- package/dist/core/enums/HttpMethods.d.ts +12 -12
- package/dist/core/enums/HttpStatusCodes.d.ts +18 -18
- package/dist/core/enums/index.d.ts +3 -3
- package/dist/core/error-handling/AppError.d.ts +23 -23
- package/dist/core/error-handling/index.d.ts +1 -1
- package/dist/core/index.d.ts +5 -5
- package/dist/core/models/index.d.ts +3 -3
- package/dist/core/models/media/index.d.ts +1 -1
- package/dist/core/models/media/media_data.d.ts +5 -5
- package/dist/core/models/pagination/index.d.ts +1 -1
- package/dist/core/models/pagination/paginated_data.d.ts +23 -23
- package/dist/core/models/range.d.ts +4 -4
- package/dist/core/network/endpoint-config.d.ts +155 -155
- package/dist/core/network/fetch-api.d.ts +62 -62
- package/dist/core/network/index.d.ts +2 -2
- package/dist/core/utils/formatCurrency.d.ts +11 -11
- package/dist/core/utils/global-constants.d.ts +6 -6
- package/dist/core/utils/global-utils.d.ts +108 -108
- package/dist/core/utils/global_validators.d.ts +2 -2
- package/dist/core/utils/index.d.ts +4 -4
- package/dist/core/utils/query_flatten.d.ts +1 -1
- package/dist/features/auth/data/dto/AuthDTO.d.ts +32 -32
- package/dist/features/auth/data/dto/RoleDTO.d.ts +41 -41
- package/dist/features/auth/data/dto/UserDTO.d.ts +71 -71
- package/dist/features/auth/data/index.d.ts +3 -3
- package/dist/features/auth/index.d.ts +1 -1
- package/dist/features/bank-valuation-request/data/dto/BankValuationRequestDTO.d.ts +55 -55
- package/dist/features/bank-valuation-request/index.d.ts +1 -1
- package/dist/features/blog/data/dto/BlogDTO.d.ts +73 -73
- package/dist/features/blog/index.d.ts +1 -1
- package/dist/features/callback-request/data/dto/CallBackRequestDTO.d.ts +32 -32
- package/dist/features/callback-request/index.d.ts +1 -1
- package/dist/features/deposits/data/dto/DepositDTOs.d.ts +84 -84
- package/dist/features/deposits/data/index.d.ts +1 -1
- package/dist/features/deposits/index.d.ts +1 -1
- package/dist/features/faq/data/dtos/CreateFaqDTO.d.ts +15 -15
- package/dist/features/faq/data/dtos/FaqFetchDTO.d.ts +105 -105
- package/dist/features/faq/data/dtos/UpdateFaqDTO.d.ts +15 -15
- package/dist/features/faq/data/dtos/index.d.ts +3 -3
- package/dist/features/faq/data/enums/index.d.ts +6 -6
- package/dist/features/faq/data/index.d.ts +2 -2
- package/dist/features/faq/index.d.ts +1 -1
- package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.d.ts +144 -144
- package/dist/features/finance-eligibilty-request/data/index.d.ts +1 -1
- package/dist/features/finance-eligibilty-request/index.d.ts +1 -1
- package/dist/features/google-review/data/dto/google_review_dto.d.ts +103 -103
- package/dist/features/google-review/data/dto/index.d.ts +1 -1
- package/dist/features/google-review/data/enums/index.d.ts +4 -4
- package/dist/features/google-review/data/index.d.ts +2 -2
- package/dist/features/google-review/index.d.ts +1 -1
- package/dist/features/index.d.ts +18 -18
- package/dist/features/lead/data/dto/index.d.ts +4 -4
- package/dist/features/lead/data/dto/lead_documents_dto.d.ts +24 -24
- package/dist/features/lead/data/dto/lead_dto.d.ts +104 -104
- package/dist/features/lead/data/dto/lead_preference_history_dto.d.ts +84 -84
- package/dist/features/lead/data/dto/lead_prefernce_dto.d.ts +68 -68
- package/dist/features/lead/data/enum/index.d.ts +2 -2
- package/dist/features/lead/data/enum/lead_source_status_types.d.ts +15 -15
- package/dist/features/lead/data/enum/lead_status_type.d.ts +8 -8
- package/dist/features/lead/index.d.ts +2 -2
- package/dist/features/models/Bank.d.ts +9 -9
- package/dist/features/models/BankValuationRequest.d.ts +63 -63
- package/dist/features/models/BankValuationResult.d.ts +24 -24
- package/dist/features/models/Base.d.ts +12 -12
- package/dist/features/models/Color.d.ts +10 -10
- package/dist/features/models/Deposit.d.ts +18 -18
- package/dist/features/models/Lead.d.ts +25 -25
- package/dist/features/models/Payment.d.ts +46 -46
- package/dist/features/models/Roles.d.ts +7 -7
- package/dist/features/models/Ticket.d.ts +51 -51
- package/dist/features/models/User.d.ts +24 -24
- package/dist/features/models/UserFavoriteVehicle.d.ts +9 -9
- package/dist/features/models/Vehicle.d.ts +76 -76
- package/dist/features/models/VehicleBodyType.d.ts +8 -8
- package/dist/features/models/VehicleCategory.d.ts +6 -6
- package/dist/features/models/VehicleFeature.d.ts +10 -10
- package/dist/features/models/VehicleFeatureCategory.d.ts +7 -7
- package/dist/features/models/VehicleFinance.d.ts +24 -24
- package/dist/features/models/VehicleMake.d.ts +14 -14
- package/dist/features/models/VehicleMedia.d.ts +12 -12
- package/dist/features/models/VehicleMetaData.d.ts +11 -11
- package/dist/features/models/VehicleModel.d.ts +17 -17
- package/dist/features/models/VehicleOrder.d.ts +14 -14
- package/dist/features/models/_index.d.ts +14 -14
- package/dist/features/models/index.d.ts +21 -21
- package/dist/features/newsletter/data/dto/NewsletterDTO.d.ts +17 -17
- package/dist/features/newsletter/index.d.ts +1 -1
- package/dist/features/sales-team/data/dto/LanguageDTO.d.ts +20 -20
- package/dist/features/sales-team/data/dto/SalesAgentDTO.d.ts +191 -191
- package/dist/features/sales-team/data/index.d.ts +2 -2
- package/dist/features/sales-team/index.d.ts +1 -1
- package/dist/features/sell-car-request/data/dto/SellCarRequestDTO.d.ts +203 -203
- package/dist/features/sell-car-request/data/index.d.ts +1 -1
- package/dist/features/sell-car-request/index.d.ts +1 -1
- package/dist/features/showroom-visit/data/dto/ShowroomVisit.d.ts +69 -69
- package/dist/features/showroom-visit/data/enums/index.d.ts +11 -11
- package/dist/features/showroom-visit/data/index.d.ts +2 -2
- package/dist/features/showroom-visit/index.d.ts +1 -1
- package/dist/features/test-drive-request/api/GetTestDriveVehicles.d.ts +3 -3
- package/dist/features/test-drive-request/api/index.d.ts +1 -1
- package/dist/features/test-drive-request/data/dto/TestDriveRequestDTO.d.ts +51 -51
- package/dist/features/test-drive-request/data/enums/index.d.ts +24 -24
- package/dist/features/test-drive-request/data/index.d.ts +4 -4
- package/dist/features/test-drive-request/data/models/TestDriveRequest.d.ts +14 -14
- package/dist/features/test-drive-request/data/models/index.d.ts +2 -2
- package/dist/features/test-drive-request/data/utilities.d.ts +30 -30
- package/dist/features/test-drive-request/index.d.ts +2 -2
- package/dist/features/tickets/data/dto/TicketDto.d.ts +69 -69
- package/dist/features/tickets/data/enums/index.d.ts +18 -18
- package/dist/features/tickets/index.d.ts +2 -2
- package/dist/features/vehicle/data/dto/BaseDTO.d.ts +9 -9
- package/dist/features/vehicle/data/dto/ColorDTO.d.ts +10 -10
- package/dist/features/vehicle/data/dto/MediaDTO.d.ts +5 -5
- package/dist/features/vehicle/data/dto/PaymentDTO.d.ts +52 -52
- package/dist/features/vehicle/data/dto/SimilarVehicleDTO.d.ts +12 -12
- package/dist/features/vehicle/data/dto/VehicleCategoryDTO.d.ts +39 -39
- package/dist/features/vehicle/data/dto/VehicleDTO.d.ts +143 -143
- package/dist/features/vehicle/data/dto/VehicleFavoritesDTO.d.ts +14 -14
- package/dist/features/vehicle/data/dto/VehicleFeatureCategoriesDTO.d.ts +39 -39
- package/dist/features/vehicle/data/dto/VehicleFeatureDTO.d.ts +40 -40
- package/dist/features/vehicle/data/dto/VehicleFilterDTO.d.ts +257 -257
- package/dist/features/vehicle/data/dto/VehicleFinanceDTO.d.ts +63 -63
- package/dist/features/vehicle/data/dto/VehicleInspectionDTO.d.ts +147 -147
- package/dist/features/vehicle/data/dto/VehicleMakeDTO.d.ts +52 -52
- package/dist/features/vehicle/data/dto/VehicleMedia.d.ts +44 -44
- package/dist/features/vehicle/data/dto/VehicleModelDTO.d.ts +50 -50
- package/dist/features/vehicle/data/dto/VehicleOrderDTO.d.ts +34 -34
- package/dist/features/vehicle/data/dto/VehicleTypeDTO.d.ts +35 -35
- package/dist/features/vehicle/data/dto/VehicleWarrantyDTO.d.ts +9 -9
- package/dist/features/vehicle/data/dto/index.d.ts +20 -20
- package/dist/features/vehicle/data/enums/index.d.ts +40 -40
- package/dist/features/vehicle/data/index.d.ts +3 -3
- package/dist/features/vehicle/data/utilities.d.ts +185 -185
- package/dist/features/vehicle/index.d.ts +1 -1
- package/dist/features/vehicle-reservations/data/dto/VehicleReservationDTO.d.ts +106 -106
- package/dist/features/vehicle-reservations/data/dto/index.d.ts +1 -1
- package/dist/features/vehicle-reservations/data/enums/finance-type.d.ts +5 -5
- package/dist/features/vehicle-reservations/data/enums/index.d.ts +3 -3
- package/dist/features/vehicle-reservations/data/enums/reservation-type.d.ts +9 -9
- package/dist/features/vehicle-reservations/data/enums/vehicle-reservation-type.d.ts +4 -4
- package/dist/features/vehicle-reservations/index.d.ts +2 -2
- package/dist/global/dto/BaseGetDTO.d.ts +8 -8
- package/dist/global/dto/index.d.ts +1 -1
- package/dist/global/index.d.ts +2 -2
- package/dist/global/utilities.d.ts +53 -53
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/models.d.ts +1 -1
- package/package.json +62 -62
package/README.md
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
# Alba Cars DTOs
|
|
2
|
-
|
|
3
|
-
A package containing DTOs, validation classes and common modules and interfaces for Alba Cars
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install github:alba-cars/AlbaCarsCommonModules
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## Development
|
|
15
|
-
|
|
16
|
-
To set up the project for development:
|
|
17
|
-
|
|
18
|
-
1. Clone the repository:
|
|
19
|
-
```bash
|
|
20
|
-
git clone https://github.com/alba-cars/AlbaCarsCommonModules.git
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
2. Install dependencies:
|
|
24
|
-
```bash
|
|
25
|
-
npm install
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
3. Build the package:
|
|
29
|
-
```bash
|
|
30
|
-
npm run prepare
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
This command will compile the TypeScript code into JavaScript in the `dist` directory.
|
|
34
|
-
|
|
35
|
-
4. Run tests:
|
|
36
|
-
```bash
|
|
37
|
-
npm test
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## License
|
|
41
|
-
|
|
42
|
-
This project is unlicensed.
|
|
1
|
+
# Alba Cars DTOs
|
|
2
|
+
|
|
3
|
+
A package containing DTOs, validation classes and common modules and interfaces for Alba Cars
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install github:alba-cars/AlbaCarsCommonModules
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## Development
|
|
15
|
+
|
|
16
|
+
To set up the project for development:
|
|
17
|
+
|
|
18
|
+
1. Clone the repository:
|
|
19
|
+
```bash
|
|
20
|
+
git clone https://github.com/alba-cars/AlbaCarsCommonModules.git
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
2. Install dependencies:
|
|
24
|
+
```bash
|
|
25
|
+
npm install
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
3. Build the package:
|
|
29
|
+
```bash
|
|
30
|
+
npm run prepare
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
This command will compile the TypeScript code into JavaScript in the `dist` directory.
|
|
34
|
+
|
|
35
|
+
4. Run tests:
|
|
36
|
+
```bash
|
|
37
|
+
npm test
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
This project is unlicensed.
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export interface MarketingData {
|
|
2
|
-
Meta?: {
|
|
3
|
-
utm_source: string;
|
|
4
|
-
utm_medium: string;
|
|
5
|
-
utm_campaign: string;
|
|
6
|
-
utm_content: string;
|
|
7
|
-
};
|
|
8
|
-
Google?: {
|
|
9
|
-
gclid: string;
|
|
10
|
-
utm_source: string;
|
|
11
|
-
utm_medium: string;
|
|
12
|
-
utm_campaign: string;
|
|
13
|
-
utm_term: string;
|
|
14
|
-
utm_content: string;
|
|
15
|
-
};
|
|
16
|
-
Bing?: {
|
|
17
|
-
msclkid: string;
|
|
18
|
-
utm_source: string;
|
|
19
|
-
utm_medium: string;
|
|
20
|
-
utm_campaign: string;
|
|
21
|
-
utm_term: string;
|
|
22
|
-
utm_content: string;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
1
|
+
export interface MarketingData {
|
|
2
|
+
Meta?: {
|
|
3
|
+
utm_source: string;
|
|
4
|
+
utm_medium: string;
|
|
5
|
+
utm_campaign: string;
|
|
6
|
+
utm_content: string;
|
|
7
|
+
};
|
|
8
|
+
Google?: {
|
|
9
|
+
gclid: string;
|
|
10
|
+
utm_source: string;
|
|
11
|
+
utm_medium: string;
|
|
12
|
+
utm_campaign: string;
|
|
13
|
+
utm_term: string;
|
|
14
|
+
utm_content: string;
|
|
15
|
+
};
|
|
16
|
+
Bing?: {
|
|
17
|
+
msclkid: string;
|
|
18
|
+
utm_source: string;
|
|
19
|
+
utm_medium: string;
|
|
20
|
+
utm_campaign: string;
|
|
21
|
+
utm_term: string;
|
|
22
|
+
utm_content: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export declare const HttpMethods: {
|
|
2
|
-
readonly OPTIONS: "OPTIONS";
|
|
3
|
-
readonly GET: "GET";
|
|
4
|
-
readonly POST: "POST";
|
|
5
|
-
readonly PUT: "PUT";
|
|
6
|
-
readonly PATCH: "PATCH";
|
|
7
|
-
readonly DELETE: "DELETE";
|
|
8
|
-
readonly HEAD: "HEAD";
|
|
9
|
-
readonly CONNECT: "CONNECT";
|
|
10
|
-
readonly TRACE: "TRACE";
|
|
11
|
-
};
|
|
12
|
-
export type HttpMethodKeys = keyof typeof HttpMethods;
|
|
1
|
+
export declare const HttpMethods: {
|
|
2
|
+
readonly OPTIONS: "OPTIONS";
|
|
3
|
+
readonly GET: "GET";
|
|
4
|
+
readonly POST: "POST";
|
|
5
|
+
readonly PUT: "PUT";
|
|
6
|
+
readonly PATCH: "PATCH";
|
|
7
|
+
readonly DELETE: "DELETE";
|
|
8
|
+
readonly HEAD: "HEAD";
|
|
9
|
+
readonly CONNECT: "CONNECT";
|
|
10
|
+
readonly TRACE: "TRACE";
|
|
11
|
+
};
|
|
12
|
+
export type HttpMethodKeys = keyof typeof HttpMethods;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export declare const HttpStatusCodes: {
|
|
2
|
-
readonly OK: 200;
|
|
3
|
-
readonly CREATED: 201;
|
|
4
|
-
readonly ACCEPTED: 202;
|
|
5
|
-
readonly NO_CONTENT: 204;
|
|
6
|
-
readonly BAD_REQUEST: 400;
|
|
7
|
-
readonly UNAUTHORIZED: 401;
|
|
8
|
-
readonly FORBIDDEN: 403;
|
|
9
|
-
readonly NOT_FOUND: 404;
|
|
10
|
-
readonly METHOD_NOT_ALLOWED: 405;
|
|
11
|
-
readonly INTERNAL_SERVER_ERROR: 500;
|
|
12
|
-
readonly NOT_IMPLEMENTED: 501;
|
|
13
|
-
readonly BAD_GATEWAY: 502;
|
|
14
|
-
readonly SERVICE_UNAVAILABLE: 503;
|
|
15
|
-
readonly GATEWAY_TIMEOUT: 504;
|
|
16
|
-
};
|
|
17
|
-
export type HttpStatusKeys = keyof typeof HttpStatusCodes;
|
|
18
|
-
export type HttpStatusCodesValues = (typeof HttpStatusCodes)[HttpStatusKeys];
|
|
1
|
+
export declare const HttpStatusCodes: {
|
|
2
|
+
readonly OK: 200;
|
|
3
|
+
readonly CREATED: 201;
|
|
4
|
+
readonly ACCEPTED: 202;
|
|
5
|
+
readonly NO_CONTENT: 204;
|
|
6
|
+
readonly BAD_REQUEST: 400;
|
|
7
|
+
readonly UNAUTHORIZED: 401;
|
|
8
|
+
readonly FORBIDDEN: 403;
|
|
9
|
+
readonly NOT_FOUND: 404;
|
|
10
|
+
readonly METHOD_NOT_ALLOWED: 405;
|
|
11
|
+
readonly INTERNAL_SERVER_ERROR: 500;
|
|
12
|
+
readonly NOT_IMPLEMENTED: 501;
|
|
13
|
+
readonly BAD_GATEWAY: 502;
|
|
14
|
+
readonly SERVICE_UNAVAILABLE: 503;
|
|
15
|
+
readonly GATEWAY_TIMEOUT: 504;
|
|
16
|
+
};
|
|
17
|
+
export type HttpStatusKeys = keyof typeof HttpStatusCodes;
|
|
18
|
+
export type HttpStatusCodesValues = (typeof HttpStatusCodes)[HttpStatusKeys];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./HttpMethods";
|
|
2
|
-
export * from "./HttpStatusCodes";
|
|
3
|
-
export * from "./Analytics";
|
|
1
|
+
export * from "./HttpMethods";
|
|
2
|
+
export * from "./HttpStatusCodes";
|
|
3
|
+
export * from "./Analytics";
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
export declare enum ErrorType {
|
|
2
|
-
VALIDATION_ERROR = "VALIDATION_ERROR",
|
|
3
|
-
NOT_FOUND = "NOT_FOUND",
|
|
4
|
-
UNAUTHORIZED = "UNAUTHORIZED",
|
|
5
|
-
FORBIDDEN = "FORBIDDEN",
|
|
6
|
-
INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR",
|
|
7
|
-
BAD_REQUEST = "BAD_REQUEST",
|
|
8
|
-
AUTHENTICATION_ERROR = "AUTHENTICATION_ERROR",
|
|
9
|
-
AUTHORIZATION_ERROR = "AUTHORIZATION_ERROR"
|
|
10
|
-
}
|
|
11
|
-
export declare class AppError extends Error {
|
|
12
|
-
message: string;
|
|
13
|
-
statusCode: number;
|
|
14
|
-
type: ErrorType;
|
|
15
|
-
details?: any;
|
|
16
|
-
constructor(message: string, statusCode: number, type: ErrorType, details?: any);
|
|
17
|
-
static badRequest(message: string, details?: any): AppError;
|
|
18
|
-
static notFound(message: string, details?: any): AppError;
|
|
19
|
-
static unauthorized(message: string, details?: any): AppError;
|
|
20
|
-
static forbidden(message: string, details?: any): AppError;
|
|
21
|
-
static internal(message: string, details?: any): AppError;
|
|
22
|
-
static validationError(message: string, details?: any): AppError;
|
|
23
|
-
}
|
|
1
|
+
export declare enum ErrorType {
|
|
2
|
+
VALIDATION_ERROR = "VALIDATION_ERROR",
|
|
3
|
+
NOT_FOUND = "NOT_FOUND",
|
|
4
|
+
UNAUTHORIZED = "UNAUTHORIZED",
|
|
5
|
+
FORBIDDEN = "FORBIDDEN",
|
|
6
|
+
INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR",
|
|
7
|
+
BAD_REQUEST = "BAD_REQUEST",
|
|
8
|
+
AUTHENTICATION_ERROR = "AUTHENTICATION_ERROR",
|
|
9
|
+
AUTHORIZATION_ERROR = "AUTHORIZATION_ERROR"
|
|
10
|
+
}
|
|
11
|
+
export declare class AppError extends Error {
|
|
12
|
+
message: string;
|
|
13
|
+
statusCode: number;
|
|
14
|
+
type: ErrorType;
|
|
15
|
+
details?: any;
|
|
16
|
+
constructor(message: string, statusCode: number, type: ErrorType, details?: any);
|
|
17
|
+
static badRequest(message: string, details?: any): AppError;
|
|
18
|
+
static notFound(message: string, details?: any): AppError;
|
|
19
|
+
static unauthorized(message: string, details?: any): AppError;
|
|
20
|
+
static forbidden(message: string, details?: any): AppError;
|
|
21
|
+
static internal(message: string, details?: any): AppError;
|
|
22
|
+
static validationError(message: string, details?: any): AppError;
|
|
23
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./AppError";
|
|
1
|
+
export * from "./AppError";
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./error-handling";
|
|
2
|
-
export * from "./enums";
|
|
3
|
-
export * from "./models";
|
|
4
|
-
export * from "./network";
|
|
5
|
-
export * from "./utils";
|
|
1
|
+
export * from "./error-handling";
|
|
2
|
+
export * from "./enums";
|
|
3
|
+
export * from "./models";
|
|
4
|
+
export * from "./network";
|
|
5
|
+
export * from "./utils";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./pagination";
|
|
2
|
-
export * from "./media";
|
|
3
|
-
export * from "./range";
|
|
1
|
+
export * from "./pagination";
|
|
2
|
+
export * from "./media";
|
|
3
|
+
export * from "./range";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./media_data";
|
|
1
|
+
export * from "./media_data";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface FileInput {
|
|
2
|
-
fileName: string;
|
|
3
|
-
fileType: string;
|
|
4
|
-
mediaIndex?: number;
|
|
5
|
-
}
|
|
1
|
+
export interface FileInput {
|
|
2
|
+
fileName: string;
|
|
3
|
+
fileType: string;
|
|
4
|
+
mediaIndex?: number;
|
|
5
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./paginated_data";
|
|
1
|
+
export * from "./paginated_data";
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { AppError } from "../../error-handling";
|
|
2
|
-
export declare class DataReturnType<Data = unknown> {
|
|
3
|
-
constructor(success: boolean, message?: string, data?: Data, error?: AppError);
|
|
4
|
-
success: boolean;
|
|
5
|
-
message?: string;
|
|
6
|
-
data?: Data;
|
|
7
|
-
error?: AppError;
|
|
8
|
-
}
|
|
9
|
-
export interface PaginatedData<Data = unknown> {
|
|
10
|
-
result: Data;
|
|
11
|
-
limit: number;
|
|
12
|
-
total: number;
|
|
13
|
-
page: number;
|
|
14
|
-
isCSVExport?: boolean;
|
|
15
|
-
exportFields?: Set<string>;
|
|
16
|
-
}
|
|
17
|
-
export declare class ReturnTypeWithPagination<Data = unknown> {
|
|
18
|
-
success: boolean;
|
|
19
|
-
message?: string | undefined;
|
|
20
|
-
data?: PaginatedData<Data> | undefined;
|
|
21
|
-
error?: AppError | undefined;
|
|
22
|
-
constructor(success: boolean, message?: string | undefined, data?: PaginatedData<Data> | undefined, error?: AppError | undefined);
|
|
23
|
-
}
|
|
1
|
+
import { AppError } from "../../error-handling";
|
|
2
|
+
export declare class DataReturnType<Data = unknown> {
|
|
3
|
+
constructor(success: boolean, message?: string, data?: Data, error?: AppError);
|
|
4
|
+
success: boolean;
|
|
5
|
+
message?: string;
|
|
6
|
+
data?: Data;
|
|
7
|
+
error?: AppError;
|
|
8
|
+
}
|
|
9
|
+
export interface PaginatedData<Data = unknown> {
|
|
10
|
+
result: Data;
|
|
11
|
+
limit: number;
|
|
12
|
+
total: number;
|
|
13
|
+
page: number;
|
|
14
|
+
isCSVExport?: boolean;
|
|
15
|
+
exportFields?: Set<string>;
|
|
16
|
+
}
|
|
17
|
+
export declare class ReturnTypeWithPagination<Data = unknown> {
|
|
18
|
+
success: boolean;
|
|
19
|
+
message?: string | undefined;
|
|
20
|
+
data?: PaginatedData<Data> | undefined;
|
|
21
|
+
error?: AppError | undefined;
|
|
22
|
+
constructor(success: boolean, message?: string | undefined, data?: PaginatedData<Data> | undefined, error?: AppError | undefined);
|
|
23
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare class Range {
|
|
2
|
-
min?: number;
|
|
3
|
-
max?: number;
|
|
4
|
-
}
|
|
1
|
+
export declare class Range {
|
|
2
|
+
min?: number;
|
|
3
|
+
max?: number;
|
|
4
|
+
}
|
|
@@ -1,155 +1,155 @@
|
|
|
1
|
-
type EndpointFunction = (_id: number | string) => string;
|
|
2
|
-
interface BaseEndpoint {
|
|
3
|
-
getAll: string | EndpointFunction;
|
|
4
|
-
create: string | EndpointFunction;
|
|
5
|
-
getOne: EndpointFunction;
|
|
6
|
-
deleteOne: EndpointFunction;
|
|
7
|
-
updateOne: EndpointFunction;
|
|
8
|
-
}
|
|
9
|
-
interface VehicleEndpoints extends BaseEndpoint {
|
|
10
|
-
getSimilar: EndpointFunction;
|
|
11
|
-
getOneBySlug: EndpointFunction;
|
|
12
|
-
getOneByRef: EndpointFunction;
|
|
13
|
-
publishVehicle: EndpointFunction;
|
|
14
|
-
unpublishVehicle: EndpointFunction;
|
|
15
|
-
reserveVehicle: EndpointFunction;
|
|
16
|
-
selfReserveVehicle: EndpointFunction;
|
|
17
|
-
markVehicleSold: EndpointFunction;
|
|
18
|
-
markVehicleDraft: EndpointFunction;
|
|
19
|
-
}
|
|
20
|
-
interface BlogEndpoints extends BaseEndpoint {
|
|
21
|
-
getOneBySlug: EndpointFunction;
|
|
22
|
-
}
|
|
23
|
-
type MetaEndpoints = BaseEndpoint & {
|
|
24
|
-
aiGenerateTitle: EndpointFunction;
|
|
25
|
-
aiGenerateDescription: EndpointFunction;
|
|
26
|
-
aiGenerateKeyword: EndpointFunction;
|
|
27
|
-
aiGenerateVehicleDescription: EndpointFunction;
|
|
28
|
-
};
|
|
29
|
-
type DepositEndpoints = BaseEndpoint & {
|
|
30
|
-
initiateRefund: string | EndpointFunction;
|
|
31
|
-
getOrCreateUserInformation: string;
|
|
32
|
-
};
|
|
33
|
-
type UserEndpoints = BaseEndpoint & {
|
|
34
|
-
changeProfilePicture: EndpointFunction;
|
|
35
|
-
deleteProfilePicture: EndpointFunction;
|
|
36
|
-
};
|
|
37
|
-
type TicketEndpoints = BaseEndpoint & {
|
|
38
|
-
getMyTickets: string;
|
|
39
|
-
getUserTickets: EndpointFunction;
|
|
40
|
-
getAgentTickets: EndpointFunction;
|
|
41
|
-
addMessage: EndpointFunction;
|
|
42
|
-
addDocument: EndpointFunction;
|
|
43
|
-
getDocuments: EndpointFunction;
|
|
44
|
-
reopenTicket: EndpointFunction;
|
|
45
|
-
sendToKissFlow: string;
|
|
46
|
-
};
|
|
47
|
-
type ReviewEndpoints = BaseEndpoint & {
|
|
48
|
-
changeReviewShowPublic: EndpointFunction;
|
|
49
|
-
};
|
|
50
|
-
type VehicleFeatureEndpoints = BaseEndpoint & {
|
|
51
|
-
changeIcon: EndpointFunction;
|
|
52
|
-
};
|
|
53
|
-
type DealDriveEndpoints = BaseEndpoint & {
|
|
54
|
-
getAllMakes: EndpointFunction;
|
|
55
|
-
getAllModels: EndpointFunction;
|
|
56
|
-
};
|
|
57
|
-
type FinanceEligibilityRequestEndpoints = BaseEndpoint & {
|
|
58
|
-
updateStatus: EndpointFunction;
|
|
59
|
-
};
|
|
60
|
-
type BankValuationRequestEndpoints = BaseEndpoint & {
|
|
61
|
-
approveValuation: EndpointFunction;
|
|
62
|
-
rejectValuation: EndpointFunction;
|
|
63
|
-
overridePayment: EndpointFunction;
|
|
64
|
-
updateStatus: EndpointFunction;
|
|
65
|
-
previewCertificatePdf: EndpointFunction;
|
|
66
|
-
reissueCertificate: EndpointFunction;
|
|
67
|
-
getCertificateEditableData: EndpointFunction;
|
|
68
|
-
estimate: string;
|
|
69
|
-
rangeEstimate: string;
|
|
70
|
-
getStats: string;
|
|
71
|
-
notifyAboutExistingLead: string;
|
|
72
|
-
getRequestStatus: EndpointFunction;
|
|
73
|
-
checkRequestIsIncomplete: EndpointFunction;
|
|
74
|
-
sendContinuationReminder: EndpointFunction;
|
|
75
|
-
};
|
|
76
|
-
type ColorEndpoints = BaseEndpoint & {
|
|
77
|
-
list: string;
|
|
78
|
-
getBySlug: (slug: string) => string;
|
|
79
|
-
};
|
|
80
|
-
type ExchangeCarRequestEndpoints = {
|
|
81
|
-
getAll: string;
|
|
82
|
-
create: string;
|
|
83
|
-
getOne: EndpointFunction;
|
|
84
|
-
updateOne: EndpointFunction;
|
|
85
|
-
deleteOne: EndpointFunction;
|
|
86
|
-
};
|
|
87
|
-
type DubiCarsEndpoints = {
|
|
88
|
-
getAdByDubiCarsId: EndpointFunction;
|
|
89
|
-
checkVehicleAdStatus: EndpointFunction;
|
|
90
|
-
getAvailableModelsForMake: (make: string) => string;
|
|
91
|
-
postAd: string;
|
|
92
|
-
doAction: (action: "pause" | "activate" | "refresh" | "sold" | "premium" | "remove-premium") => string;
|
|
93
|
-
deleteAd: EndpointFunction;
|
|
94
|
-
deleteAdByVehicleId: EndpointFunction;
|
|
95
|
-
};
|
|
96
|
-
type APIEndpointType = {
|
|
97
|
-
vehicle: VehicleEndpoints;
|
|
98
|
-
blogs: BlogEndpoints;
|
|
99
|
-
vehicleFinance: BaseEndpoint;
|
|
100
|
-
TestDrive: BaseEndpoint;
|
|
101
|
-
vehicleMake: BaseEndpoint & {
|
|
102
|
-
getOneBySlug: (slug: string) => string;
|
|
103
|
-
};
|
|
104
|
-
vehicleModel: BaseEndpoint;
|
|
105
|
-
vehicleMeta: MetaEndpoints;
|
|
106
|
-
vehicleInspection: BaseEndpoint;
|
|
107
|
-
vehicleOrder: BaseEndpoint;
|
|
108
|
-
vehicleFeatures: VehicleFeatureEndpoints;
|
|
109
|
-
vehicleFeatureCategories: BaseEndpoint;
|
|
110
|
-
vehicleType: BaseEndpoint;
|
|
111
|
-
payment: BaseEndpoint;
|
|
112
|
-
deposit: DepositEndpoints;
|
|
113
|
-
agents: BaseEndpoint;
|
|
114
|
-
showroomVisit: BaseEndpoint;
|
|
115
|
-
sellCarRequest: BaseEndpoint & {
|
|
116
|
-
notifyAboutExistingLead: string;
|
|
117
|
-
};
|
|
118
|
-
financeEligibilityRequest: FinanceEligibilityRequestEndpoints;
|
|
119
|
-
vehicleReservations: BaseEndpoint;
|
|
120
|
-
languages: BaseEndpoint;
|
|
121
|
-
leads: BaseEndpoint;
|
|
122
|
-
leadPreferences: BaseEndpoint;
|
|
123
|
-
googleReview: ReviewEndpoints;
|
|
124
|
-
tickets: TicketEndpoints;
|
|
125
|
-
user: UserEndpoints;
|
|
126
|
-
faq: BaseEndpoint;
|
|
127
|
-
dealDrive: DealDriveEndpoints;
|
|
128
|
-
bankValuationRequest: BankValuationRequestEndpoints;
|
|
129
|
-
exchangeCarRequest: ExchangeCarRequestEndpoints;
|
|
130
|
-
dubiCars: DubiCarsEndpoints;
|
|
131
|
-
colors: ColorEndpoints;
|
|
132
|
-
bankValuationResult: BaseEndpoint;
|
|
133
|
-
bank: BaseEndpoint;
|
|
134
|
-
};
|
|
135
|
-
export declare const API_ENDPOINTS: APIEndpointType;
|
|
136
|
-
export declare const UTIL_ENDPOINTS: {
|
|
137
|
-
media: {
|
|
138
|
-
createS3Url: string;
|
|
139
|
-
preprocessMediaUrl: string;
|
|
140
|
-
removeS3Media: string;
|
|
141
|
-
removeVehicleMedia: string;
|
|
142
|
-
removeByIdentifier: string;
|
|
143
|
-
compressImage: string;
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
export declare const AUTH_ENDPOINTS: {
|
|
147
|
-
login: string;
|
|
148
|
-
register: string;
|
|
149
|
-
refreshAccessToken: string;
|
|
150
|
-
sendPhoneVerificationCode: string;
|
|
151
|
-
verifyPhoneAndLogin: string;
|
|
152
|
-
verifyAnyPhoneNumber: string;
|
|
153
|
-
checkPhoneNumberExists: string;
|
|
154
|
-
};
|
|
155
|
-
export {};
|
|
1
|
+
type EndpointFunction = (_id: number | string) => string;
|
|
2
|
+
interface BaseEndpoint {
|
|
3
|
+
getAll: string | EndpointFunction;
|
|
4
|
+
create: string | EndpointFunction;
|
|
5
|
+
getOne: EndpointFunction;
|
|
6
|
+
deleteOne: EndpointFunction;
|
|
7
|
+
updateOne: EndpointFunction;
|
|
8
|
+
}
|
|
9
|
+
interface VehicleEndpoints extends BaseEndpoint {
|
|
10
|
+
getSimilar: EndpointFunction;
|
|
11
|
+
getOneBySlug: EndpointFunction;
|
|
12
|
+
getOneByRef: EndpointFunction;
|
|
13
|
+
publishVehicle: EndpointFunction;
|
|
14
|
+
unpublishVehicle: EndpointFunction;
|
|
15
|
+
reserveVehicle: EndpointFunction;
|
|
16
|
+
selfReserveVehicle: EndpointFunction;
|
|
17
|
+
markVehicleSold: EndpointFunction;
|
|
18
|
+
markVehicleDraft: EndpointFunction;
|
|
19
|
+
}
|
|
20
|
+
interface BlogEndpoints extends BaseEndpoint {
|
|
21
|
+
getOneBySlug: EndpointFunction;
|
|
22
|
+
}
|
|
23
|
+
type MetaEndpoints = BaseEndpoint & {
|
|
24
|
+
aiGenerateTitle: EndpointFunction;
|
|
25
|
+
aiGenerateDescription: EndpointFunction;
|
|
26
|
+
aiGenerateKeyword: EndpointFunction;
|
|
27
|
+
aiGenerateVehicleDescription: EndpointFunction;
|
|
28
|
+
};
|
|
29
|
+
type DepositEndpoints = BaseEndpoint & {
|
|
30
|
+
initiateRefund: string | EndpointFunction;
|
|
31
|
+
getOrCreateUserInformation: string;
|
|
32
|
+
};
|
|
33
|
+
type UserEndpoints = BaseEndpoint & {
|
|
34
|
+
changeProfilePicture: EndpointFunction;
|
|
35
|
+
deleteProfilePicture: EndpointFunction;
|
|
36
|
+
};
|
|
37
|
+
type TicketEndpoints = BaseEndpoint & {
|
|
38
|
+
getMyTickets: string;
|
|
39
|
+
getUserTickets: EndpointFunction;
|
|
40
|
+
getAgentTickets: EndpointFunction;
|
|
41
|
+
addMessage: EndpointFunction;
|
|
42
|
+
addDocument: EndpointFunction;
|
|
43
|
+
getDocuments: EndpointFunction;
|
|
44
|
+
reopenTicket: EndpointFunction;
|
|
45
|
+
sendToKissFlow: string;
|
|
46
|
+
};
|
|
47
|
+
type ReviewEndpoints = BaseEndpoint & {
|
|
48
|
+
changeReviewShowPublic: EndpointFunction;
|
|
49
|
+
};
|
|
50
|
+
type VehicleFeatureEndpoints = BaseEndpoint & {
|
|
51
|
+
changeIcon: EndpointFunction;
|
|
52
|
+
};
|
|
53
|
+
type DealDriveEndpoints = BaseEndpoint & {
|
|
54
|
+
getAllMakes: EndpointFunction;
|
|
55
|
+
getAllModels: EndpointFunction;
|
|
56
|
+
};
|
|
57
|
+
type FinanceEligibilityRequestEndpoints = BaseEndpoint & {
|
|
58
|
+
updateStatus: EndpointFunction;
|
|
59
|
+
};
|
|
60
|
+
type BankValuationRequestEndpoints = BaseEndpoint & {
|
|
61
|
+
approveValuation: EndpointFunction;
|
|
62
|
+
rejectValuation: EndpointFunction;
|
|
63
|
+
overridePayment: EndpointFunction;
|
|
64
|
+
updateStatus: EndpointFunction;
|
|
65
|
+
previewCertificatePdf: EndpointFunction;
|
|
66
|
+
reissueCertificate: EndpointFunction;
|
|
67
|
+
getCertificateEditableData: EndpointFunction;
|
|
68
|
+
estimate: string;
|
|
69
|
+
rangeEstimate: string;
|
|
70
|
+
getStats: string;
|
|
71
|
+
notifyAboutExistingLead: string;
|
|
72
|
+
getRequestStatus: EndpointFunction;
|
|
73
|
+
checkRequestIsIncomplete: EndpointFunction;
|
|
74
|
+
sendContinuationReminder: EndpointFunction;
|
|
75
|
+
};
|
|
76
|
+
type ColorEndpoints = BaseEndpoint & {
|
|
77
|
+
list: string;
|
|
78
|
+
getBySlug: (slug: string) => string;
|
|
79
|
+
};
|
|
80
|
+
type ExchangeCarRequestEndpoints = {
|
|
81
|
+
getAll: string;
|
|
82
|
+
create: string;
|
|
83
|
+
getOne: EndpointFunction;
|
|
84
|
+
updateOne: EndpointFunction;
|
|
85
|
+
deleteOne: EndpointFunction;
|
|
86
|
+
};
|
|
87
|
+
type DubiCarsEndpoints = {
|
|
88
|
+
getAdByDubiCarsId: EndpointFunction;
|
|
89
|
+
checkVehicleAdStatus: EndpointFunction;
|
|
90
|
+
getAvailableModelsForMake: (make: string) => string;
|
|
91
|
+
postAd: string;
|
|
92
|
+
doAction: (action: "pause" | "activate" | "refresh" | "sold" | "premium" | "remove-premium") => string;
|
|
93
|
+
deleteAd: EndpointFunction;
|
|
94
|
+
deleteAdByVehicleId: EndpointFunction;
|
|
95
|
+
};
|
|
96
|
+
type APIEndpointType = {
|
|
97
|
+
vehicle: VehicleEndpoints;
|
|
98
|
+
blogs: BlogEndpoints;
|
|
99
|
+
vehicleFinance: BaseEndpoint;
|
|
100
|
+
TestDrive: BaseEndpoint;
|
|
101
|
+
vehicleMake: BaseEndpoint & {
|
|
102
|
+
getOneBySlug: (slug: string) => string;
|
|
103
|
+
};
|
|
104
|
+
vehicleModel: BaseEndpoint;
|
|
105
|
+
vehicleMeta: MetaEndpoints;
|
|
106
|
+
vehicleInspection: BaseEndpoint;
|
|
107
|
+
vehicleOrder: BaseEndpoint;
|
|
108
|
+
vehicleFeatures: VehicleFeatureEndpoints;
|
|
109
|
+
vehicleFeatureCategories: BaseEndpoint;
|
|
110
|
+
vehicleType: BaseEndpoint;
|
|
111
|
+
payment: BaseEndpoint;
|
|
112
|
+
deposit: DepositEndpoints;
|
|
113
|
+
agents: BaseEndpoint;
|
|
114
|
+
showroomVisit: BaseEndpoint;
|
|
115
|
+
sellCarRequest: BaseEndpoint & {
|
|
116
|
+
notifyAboutExistingLead: string;
|
|
117
|
+
};
|
|
118
|
+
financeEligibilityRequest: FinanceEligibilityRequestEndpoints;
|
|
119
|
+
vehicleReservations: BaseEndpoint;
|
|
120
|
+
languages: BaseEndpoint;
|
|
121
|
+
leads: BaseEndpoint;
|
|
122
|
+
leadPreferences: BaseEndpoint;
|
|
123
|
+
googleReview: ReviewEndpoints;
|
|
124
|
+
tickets: TicketEndpoints;
|
|
125
|
+
user: UserEndpoints;
|
|
126
|
+
faq: BaseEndpoint;
|
|
127
|
+
dealDrive: DealDriveEndpoints;
|
|
128
|
+
bankValuationRequest: BankValuationRequestEndpoints;
|
|
129
|
+
exchangeCarRequest: ExchangeCarRequestEndpoints;
|
|
130
|
+
dubiCars: DubiCarsEndpoints;
|
|
131
|
+
colors: ColorEndpoints;
|
|
132
|
+
bankValuationResult: BaseEndpoint;
|
|
133
|
+
bank: BaseEndpoint;
|
|
134
|
+
};
|
|
135
|
+
export declare const API_ENDPOINTS: APIEndpointType;
|
|
136
|
+
export declare const UTIL_ENDPOINTS: {
|
|
137
|
+
media: {
|
|
138
|
+
createS3Url: string;
|
|
139
|
+
preprocessMediaUrl: string;
|
|
140
|
+
removeS3Media: string;
|
|
141
|
+
removeVehicleMedia: string;
|
|
142
|
+
removeByIdentifier: string;
|
|
143
|
+
compressImage: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
export declare const AUTH_ENDPOINTS: {
|
|
147
|
+
login: string;
|
|
148
|
+
register: string;
|
|
149
|
+
refreshAccessToken: string;
|
|
150
|
+
sendPhoneVerificationCode: string;
|
|
151
|
+
verifyPhoneAndLogin: string;
|
|
152
|
+
verifyAnyPhoneNumber: string;
|
|
153
|
+
checkPhoneNumberExists: string;
|
|
154
|
+
};
|
|
155
|
+
export {};
|