@dapex-tech/elite-online-services 0.0.18 → 0.0.20

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/createClient.d.ts CHANGED
@@ -11,6 +11,7 @@ export declare function createClient(baseUrl?: string): {
11
11
  AdminService: typeof services.AdminService;
12
12
  AdminSettingsService: typeof services.AdminSettingsService;
13
13
  AdminTripsService: typeof services.AdminTripsService;
14
+ AdminVehicleService: typeof services.AdminVehicleService;
14
15
  AdminVouchersService: typeof services.AdminVouchersService;
15
16
  CustomerLocationsService: typeof services.CustomerLocationsService;
16
17
  CustomerPaymentsService: typeof services.CustomerPaymentsService;
@@ -39,4 +39,8 @@ export type DriverCreateDto = {
39
39
  * Last Heartbeat
40
40
  */
41
41
  lastHeartbeat?: string;
42
+ /**
43
+ * Assigned vehicle ID (admin only)
44
+ */
45
+ vehicleId?: Record<string, any>;
42
46
  };
@@ -51,4 +51,8 @@ export type DriverDto = {
51
51
  * Driver credits balance
52
52
  */
53
53
  credits?: number;
54
+ /**
55
+ * Assigned vehicle ID (admin only)
56
+ */
57
+ vehicleId?: Record<string, any>;
54
58
  };
@@ -51,6 +51,10 @@ export type DriverLoginResponseDto = {
51
51
  * Driver credits balance
52
52
  */
53
53
  credits?: number;
54
+ /**
55
+ * Assigned vehicle ID (admin only)
56
+ */
57
+ vehicleId?: Record<string, any>;
54
58
  /**
55
59
  * Access Token
56
60
  */
@@ -39,4 +39,8 @@ export type DriverUpdateDto = {
39
39
  * Last Heartbeat
40
40
  */
41
41
  lastHeartbeat?: string;
42
+ /**
43
+ * Assigned vehicle ID (admin only)
44
+ */
45
+ vehicleId?: Record<string, any>;
42
46
  };
@@ -15,6 +15,14 @@ export type TripDto = {
15
15
  adminId?: Record<string, any> | null;
16
16
  voucherId?: Record<string, any> | null;
17
17
  manualCustomerId?: Record<string, any> | null;
18
+ /**
19
+ * Vehicle ID (admin assigned)
20
+ */
21
+ vehicleId?: Record<string, any> | null;
22
+ /**
23
+ * Paired round-trip ID (if this trip is part of a round trip)
24
+ */
25
+ roundTripId?: Record<string, any> | null;
18
26
  status?: TripDto.status;
19
27
  tripSource?: Record<string, any>;
20
28
  driverAssignmentMode?: Record<string, any>;
@@ -160,6 +168,10 @@ export type TripDto = {
160
168
  * Scheduled pickup datetime (admin only)
161
169
  */
162
170
  scheduledPickupDateTime?: Record<string, any> | null;
171
+ /**
172
+ * Scheduled pickup datetime for the return leg when creating a round trip (admin only)
173
+ */
174
+ roundTripScheduleTime?: Record<string, any> | null;
163
175
  total?: Record<string, any> | null;
164
176
  /**
165
177
  * Customer information
@@ -189,6 +201,10 @@ export type TripDto = {
189
201
  * Manual customer information
190
202
  */
191
203
  manualCustomer?: ManualCustomerDto | null;
204
+ /**
205
+ * Paired round trip (if this trip is part of a round trip). This nested object does not itself contain a roundTrip to avoid circular references.
206
+ */
207
+ roundTrip?: TripDto | null;
192
208
  };
193
209
  export declare namespace TripDto {
194
210
  enum status {
@@ -49,6 +49,10 @@ export type TripUpdateDto = {
49
49
  * Scheduled pickup datetime (admin only)
50
50
  */
51
51
  scheduledPickupDateTime?: Record<string, any> | null;
52
+ /**
53
+ * Vehicle ID (admin only)
54
+ */
55
+ vehicleId?: Record<string, any> | null;
52
56
  };
53
57
  export declare namespace TripUpdateDto {
54
58
  /**
@@ -0,0 +1,50 @@
1
+ export type VehicleCreateDto = {
2
+ /**
3
+ * Cab number
4
+ */
5
+ cab: number;
6
+ /**
7
+ * Vehicle brand
8
+ */
9
+ brand: string;
10
+ /**
11
+ * Vehicle model
12
+ */
13
+ model?: string;
14
+ /**
15
+ * Insurance information
16
+ */
17
+ insurance?: string;
18
+ /**
19
+ * Emission test information
20
+ */
21
+ emissionTest?: string;
22
+ /**
23
+ * Vehicle registration information
24
+ */
25
+ registration?: string;
26
+ /**
27
+ * Vehicle title
28
+ */
29
+ title?: string;
30
+ /**
31
+ * License plate
32
+ */
33
+ plate?: string;
34
+ /**
35
+ * Plate expiration date
36
+ */
37
+ expirationPlate?: Record<string, any>;
38
+ /**
39
+ * Vehicle type
40
+ */
41
+ type?: string;
42
+ /**
43
+ * Vehicle color
44
+ */
45
+ color?: string;
46
+ /**
47
+ * Vehicle status
48
+ */
49
+ status?: string;
50
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,58 @@
1
+ export type VehicleDto = {
2
+ /**
3
+ * Vehicle ID
4
+ */
5
+ id: number;
6
+ /**
7
+ * Cab number
8
+ */
9
+ cab: number;
10
+ /**
11
+ * Vehicle brand
12
+ */
13
+ brand: string;
14
+ /**
15
+ * Vehicle model
16
+ */
17
+ model?: string;
18
+ /**
19
+ * Insurance information
20
+ */
21
+ insurance?: string;
22
+ /**
23
+ * Emission test information
24
+ */
25
+ emissionTest?: string;
26
+ /**
27
+ * Vehicle registration information
28
+ */
29
+ registration?: string;
30
+ /**
31
+ * Vehicle title
32
+ */
33
+ title?: string;
34
+ /**
35
+ * License plate
36
+ */
37
+ plate?: string;
38
+ /**
39
+ * Plate expiration date
40
+ */
41
+ expirationPlate?: Record<string, any>;
42
+ /**
43
+ * Vehicle type
44
+ */
45
+ type?: string;
46
+ /**
47
+ * Vehicle color
48
+ */
49
+ color?: string;
50
+ /**
51
+ * Vehicle status
52
+ */
53
+ status?: string;
54
+ /**
55
+ * Created at timestamp
56
+ */
57
+ createdAt: string;
58
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,50 @@
1
+ export type VehicleUpdateDto = {
2
+ /**
3
+ * Cab number
4
+ */
5
+ cab?: number;
6
+ /**
7
+ * Vehicle brand
8
+ */
9
+ brand?: string;
10
+ /**
11
+ * Vehicle model
12
+ */
13
+ model?: string;
14
+ /**
15
+ * Insurance information
16
+ */
17
+ insurance?: string;
18
+ /**
19
+ * Emission test information
20
+ */
21
+ emissionTest?: string;
22
+ /**
23
+ * Vehicle registration information
24
+ */
25
+ registration?: string;
26
+ /**
27
+ * Vehicle title
28
+ */
29
+ title?: string;
30
+ /**
31
+ * License plate
32
+ */
33
+ plate?: string;
34
+ /**
35
+ * Plate expiration date
36
+ */
37
+ expirationPlate?: Record<string, any>;
38
+ /**
39
+ * Vehicle type
40
+ */
41
+ type?: string;
42
+ /**
43
+ * Vehicle color
44
+ */
45
+ color?: string;
46
+ /**
47
+ * Vehicle status
48
+ */
49
+ status?: string;
50
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/models/index.d.ts CHANGED
@@ -59,6 +59,9 @@ export * from './TripUpdateDto';
59
59
  export * from './TripUpdateTripsStatusDto';
60
60
  export * from './UpdateFcmTokenDto';
61
61
  export * from './ValidateResetCodeDto';
62
+ export * from './VehicleCreateDto';
63
+ export * from './VehicleDto';
64
+ export * from './VehicleUpdateDto';
62
65
  export * from './VoucherCreateDto';
63
66
  export * from './VoucherDriverCreateDto';
64
67
  export * from './VoucherDto';
package/models/index.js CHANGED
@@ -75,6 +75,9 @@ __exportStar(require("./TripUpdateDto"), exports);
75
75
  __exportStar(require("./TripUpdateTripsStatusDto"), exports);
76
76
  __exportStar(require("./UpdateFcmTokenDto"), exports);
77
77
  __exportStar(require("./ValidateResetCodeDto"), exports);
78
+ __exportStar(require("./VehicleCreateDto"), exports);
79
+ __exportStar(require("./VehicleDto"), exports);
80
+ __exportStar(require("./VehicleUpdateDto"), exports);
78
81
  __exportStar(require("./VoucherCreateDto"), exports);
79
82
  __exportStar(require("./VoucherDriverCreateDto"), exports);
80
83
  __exportStar(require("./VoucherDto"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dapex-tech/elite-online-services",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "private": false,
@@ -0,0 +1,46 @@
1
+ import type { MessageResponseDto } from '../models/MessageResponseDto';
2
+ import type { OrderDto } from '../models/OrderDto';
3
+ import type { VehicleCreateDto } from '../models/VehicleCreateDto';
4
+ import type { VehicleDto } from '../models/VehicleDto';
5
+ import type { VehicleUpdateDto } from '../models/VehicleUpdateDto';
6
+ import type { CancelablePromise } from '../core/CancelablePromise';
7
+ export declare class AdminVehicleService {
8
+ /**
9
+ * Create a new vehicle
10
+ * @param requestBody
11
+ * @returns VehicleDto Vehicle created successfully.
12
+ * @throws ApiError
13
+ */
14
+ static create(requestBody: VehicleCreateDto): CancelablePromise<VehicleDto>;
15
+ /**
16
+ * Get all vehicles
17
+ * @param q Text to search for in brand, model, plate, type, color or status
18
+ * @param status Filter by vehicle status
19
+ * @param order Sorting options
20
+ * @returns VehicleDto List of vehicles
21
+ * @throws ApiError
22
+ */
23
+ static findAll(q?: string, status?: string, order?: OrderDto): CancelablePromise<Array<VehicleDto>>;
24
+ /**
25
+ * Get a single vehicle by ID
26
+ * @param id
27
+ * @returns VehicleDto Vehicle found
28
+ * @throws ApiError
29
+ */
30
+ static findById(id: number): CancelablePromise<VehicleDto>;
31
+ /**
32
+ * Update a vehicle by ID
33
+ * @param id
34
+ * @param requestBody
35
+ * @returns VehicleDto Vehicle updated successfully.
36
+ * @throws ApiError
37
+ */
38
+ static update(id: number, requestBody: VehicleUpdateDto): CancelablePromise<VehicleDto>;
39
+ /**
40
+ * Delete a vehicle by ID
41
+ * @param id
42
+ * @returns MessageResponseDto Vehicle deleted successfully.
43
+ * @throws ApiError
44
+ */
45
+ static remove(id: number): CancelablePromise<MessageResponseDto>;
46
+ }
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminVehicleService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class AdminVehicleService {
7
+ /**
8
+ * Create a new vehicle
9
+ * @param requestBody
10
+ * @returns VehicleDto Vehicle created successfully.
11
+ * @throws ApiError
12
+ */
13
+ static create(requestBody) {
14
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
15
+ method: 'POST',
16
+ url: '/admins/vehicles',
17
+ body: requestBody,
18
+ mediaType: 'application/json',
19
+ });
20
+ }
21
+ /**
22
+ * Get all vehicles
23
+ * @param q Text to search for in brand, model, plate, type, color or status
24
+ * @param status Filter by vehicle status
25
+ * @param order Sorting options
26
+ * @returns VehicleDto List of vehicles
27
+ * @throws ApiError
28
+ */
29
+ static findAll(q, status, order) {
30
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
31
+ method: 'GET',
32
+ url: '/admins/vehicles',
33
+ query: {
34
+ 'q': q,
35
+ 'status': status,
36
+ 'order': order,
37
+ },
38
+ });
39
+ }
40
+ /**
41
+ * Get a single vehicle by ID
42
+ * @param id
43
+ * @returns VehicleDto Vehicle found
44
+ * @throws ApiError
45
+ */
46
+ static findById(id) {
47
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
48
+ method: 'GET',
49
+ url: '/admins/vehicles/{id}',
50
+ path: {
51
+ 'id': id,
52
+ },
53
+ });
54
+ }
55
+ /**
56
+ * Update a vehicle by ID
57
+ * @param id
58
+ * @param requestBody
59
+ * @returns VehicleDto Vehicle updated successfully.
60
+ * @throws ApiError
61
+ */
62
+ static update(id, requestBody) {
63
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
64
+ method: 'PATCH',
65
+ url: '/admins/vehicles/{id}',
66
+ path: {
67
+ 'id': id,
68
+ },
69
+ body: requestBody,
70
+ mediaType: 'application/json',
71
+ });
72
+ }
73
+ /**
74
+ * Delete a vehicle by ID
75
+ * @param id
76
+ * @returns MessageResponseDto Vehicle deleted successfully.
77
+ * @throws ApiError
78
+ */
79
+ static remove(id) {
80
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
81
+ method: 'DELETE',
82
+ url: '/admins/vehicles/{id}',
83
+ path: {
84
+ 'id': id,
85
+ },
86
+ });
87
+ }
88
+ }
89
+ exports.AdminVehicleService = AdminVehicleService;
@@ -3,15 +3,28 @@ import type { CancelablePromise } from '../core/CancelablePromise';
3
3
  export declare class CustomerSectionContentsService {
4
4
  /**
5
5
  * Get section contents by type
6
- * @returns SectionContentDto List of section contents by type, ordered by position ASC
6
+ * @returns SectionContentDto List of legal section contents, ordered by position ASC
7
7
  * @throws ApiError
8
8
  */
9
- static findByType(): CancelablePromise<Array<SectionContentDto>>;
9
+ static findLegal(): CancelablePromise<Array<SectionContentDto>>;
10
10
  /**
11
- * Get section content by type and ID
11
+ * Get Legal section content by ID
12
12
  * @param id
13
13
  * @returns SectionContentDto Section content found
14
14
  * @throws ApiError
15
15
  */
16
- static findByTypeAndId(id: number): CancelablePromise<SectionContentDto>;
16
+ static findLegalById(id: number): CancelablePromise<SectionContentDto>;
17
+ /**
18
+ * Get Help section contents
19
+ * @returns SectionContentDto List of help section contents
20
+ * @throws ApiError
21
+ */
22
+ static findHelp(): CancelablePromise<Array<SectionContentDto>>;
23
+ /**
24
+ * Get Help section content by ID
25
+ * @param id
26
+ * @returns SectionContentDto Section content found
27
+ * @throws ApiError
28
+ */
29
+ static findHelpById(id: number): CancelablePromise<SectionContentDto>;
17
30
  }
@@ -6,25 +6,51 @@ const request_1 = require("../core/request");
6
6
  class CustomerSectionContentsService {
7
7
  /**
8
8
  * Get section contents by type
9
- * @returns SectionContentDto List of section contents by type, ordered by position ASC
9
+ * @returns SectionContentDto List of legal section contents, ordered by position ASC
10
10
  * @throws ApiError
11
11
  */
12
- static findByType() {
12
+ static findLegal() {
13
13
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
14
14
  method: 'GET',
15
- url: '/customers/section-contents/{type}',
15
+ url: '/customers/section-contents/legal',
16
16
  });
17
17
  }
18
18
  /**
19
- * Get section content by type and ID
19
+ * Get Legal section content by ID
20
20
  * @param id
21
21
  * @returns SectionContentDto Section content found
22
22
  * @throws ApiError
23
23
  */
24
- static findByTypeAndId(id) {
24
+ static findLegalById(id) {
25
25
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
26
26
  method: 'GET',
27
- url: '/customers/section-contents/{type}/{id}',
27
+ url: '/customers/section-contents/legal/{id}',
28
+ path: {
29
+ 'id': id,
30
+ },
31
+ });
32
+ }
33
+ /**
34
+ * Get Help section contents
35
+ * @returns SectionContentDto List of help section contents
36
+ * @throws ApiError
37
+ */
38
+ static findHelp() {
39
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
40
+ method: 'GET',
41
+ url: '/customers/section-contents/help',
42
+ });
43
+ }
44
+ /**
45
+ * Get Help section content by ID
46
+ * @param id
47
+ * @returns SectionContentDto Section content found
48
+ * @throws ApiError
49
+ */
50
+ static findHelpById(id) {
51
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
52
+ method: 'GET',
53
+ url: '/customers/section-contents/help/{id}',
28
54
  path: {
29
55
  'id': id,
30
56
  },
@@ -6,6 +6,7 @@ export * from './AdminSectionContentService';
6
6
  export * from './AdminService';
7
7
  export * from './AdminSettingsService';
8
8
  export * from './AdminTripsService';
9
+ export * from './AdminVehicleService';
9
10
  export * from './AdminVouchersService';
10
11
  export * from './CustomerLocationsService';
11
12
  export * from './CustomerPaymentsService';
package/services/index.js CHANGED
@@ -22,6 +22,7 @@ __exportStar(require("./AdminSectionContentService"), exports);
22
22
  __exportStar(require("./AdminService"), exports);
23
23
  __exportStar(require("./AdminSettingsService"), exports);
24
24
  __exportStar(require("./AdminTripsService"), exports);
25
+ __exportStar(require("./AdminVehicleService"), exports);
25
26
  __exportStar(require("./AdminVouchersService"), exports);
26
27
  __exportStar(require("./CustomerLocationsService"), exports);
27
28
  __exportStar(require("./CustomerPaymentsService"), exports);