@dapex-tech/elite-online-services 0.0.25 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/createClient.d.ts +1 -0
  2. package/models/CardDataDto.d.ts +2 -2
  3. package/models/ChargeTripByCardDto.d.ts +2 -2
  4. package/models/CustomerDto.d.ts +25 -0
  5. package/models/CustomerLoginResponseDto.d.ts +25 -0
  6. package/models/CustomerRegisterDto.d.ts +25 -0
  7. package/models/CustomerUpdatedDto.d.ts +25 -0
  8. package/models/DriverCreateDto.d.ts +4 -0
  9. package/models/DriverDto.d.ts +4 -0
  10. package/models/DriverEnableListDto.d.ts +7 -0
  11. package/models/DriverEnableListDto.js +2 -0
  12. package/models/DriverEnableListItemDto.d.ts +10 -0
  13. package/models/DriverEnableListItemDto.js +2 -0
  14. package/models/DriverLoginResponseDto.d.ts +4 -0
  15. package/models/DriverUpdateDto.d.ts +12 -0
  16. package/models/LocationTypes.d.ts +1 -1
  17. package/models/LocationTypes.js +1 -1
  18. package/models/ManualCustomerCreateDto.d.ts +25 -0
  19. package/models/ManualCustomerDto.d.ts +25 -0
  20. package/models/ManualCustomerUpdateDto.d.ts +25 -0
  21. package/models/VoucherCreateDto.d.ts +25 -0
  22. package/models/VoucherDriverCreateDto.d.ts +25 -0
  23. package/models/VoucherDto.d.ts +42 -13
  24. package/models/VoucherNicknameImportDetailDto.d.ts +23 -0
  25. package/models/VoucherNicknameImportDetailDto.js +13 -0
  26. package/models/VoucherNicknameImportResponseDto.d.ts +21 -0
  27. package/models/VoucherNicknameImportResponseDto.js +2 -0
  28. package/models/VoucherUpdateDto.d.ts +25 -0
  29. package/models/index.d.ts +4 -0
  30. package/models/index.js +4 -0
  31. package/package.json +1 -1
  32. package/services/AdminDriversService.d.ts +10 -7
  33. package/services/AdminDriversService.js +19 -12
  34. package/services/AdminVouchersService.d.ts +12 -1
  35. package/services/AdminVouchersService.js +16 -1
  36. package/services/DriversService.d.ts +0 -12
  37. package/services/DriversService.js +0 -22
  38. package/services/McpService.d.ts +8 -0
  39. package/services/McpService.js +18 -0
  40. package/services/VoucherService.d.ts +12 -1
  41. package/services/VoucherService.js +16 -1
  42. package/services/index.d.ts +1 -0
  43. package/services/index.js +1 -0
  44. package/socketService.d.ts +1 -0
  45. package/socketService.js +6 -1
  46. package/types/realtime/active-trip.d.ts +4 -0
  47. package/types/realtime/driver-status.d.ts +1 -0
package/createClient.d.ts CHANGED
@@ -31,6 +31,7 @@ export declare function createClient(baseUrl?: string): {
31
31
  HealthService: typeof services.HealthService;
32
32
  MainService: typeof services.MainService;
33
33
  ManualCustomerService: typeof services.ManualCustomerService;
34
+ McpService: typeof services.McpService;
34
35
  PaymentsService: typeof services.PaymentsService;
35
36
  VoucherService: typeof services.VoucherService;
36
37
  };
@@ -10,7 +10,7 @@ export type CardDataDto = {
10
10
  /**
11
11
  * Card CVV (use 900 for successful CVV match in Authorize.net sandbox)
12
12
  */
13
- cvv: string;
13
+ cvv?: string;
14
14
  /**
15
15
  * Billing first name
16
16
  */
@@ -34,7 +34,7 @@ export type CardDataDto = {
34
34
  /**
35
35
  * Billing ZIP/postal code (required for AVS)
36
36
  */
37
- zip: string;
37
+ zip?: string;
38
38
  /**
39
39
  * Billing state/province code
40
40
  */
@@ -18,7 +18,7 @@ export type ChargeTripByCardDto = {
18
18
  /**
19
19
  * Card CVV
20
20
  */
21
- cvv: string;
21
+ cvv?: string;
22
22
  /**
23
23
  * Billing first name (Authorize.Net billing/AVS)
24
24
  */
@@ -42,7 +42,7 @@ export type ChargeTripByCardDto = {
42
42
  /**
43
43
  * Billing ZIP/postal code (Authorize.Net billing/AVS; required for US/CA)
44
44
  */
45
- zip: string;
45
+ zip?: string;
46
46
  /**
47
47
  * Billing state/province code (Authorize.Net billing/AVS)
48
48
  */
@@ -1,3 +1,4 @@
1
+ import type { LocationTypes } from './LocationTypes';
1
2
  import type { Role } from './Role';
2
3
  export type CustomerDto = {
3
4
  /**
@@ -32,4 +33,28 @@ export type CustomerDto = {
32
33
  * Customer Verified Status
33
34
  */
34
35
  isVerified?: boolean;
36
+ /**
37
+ * Type of the origin location (e.g., HOME, OFFICE, etc.)
38
+ */
39
+ originLocationType?: LocationTypes | null;
40
+ /**
41
+ * Origin apartment (optional)
42
+ */
43
+ originApartment?: Record<string, any> | null;
44
+ /**
45
+ * Origin building (optional)
46
+ */
47
+ originBuilding?: Record<string, any> | null;
48
+ /**
49
+ * Origin access code (optional)
50
+ */
51
+ originAccessCode?: Record<string, any> | null;
52
+ /**
53
+ * Origin name/label (optional)
54
+ */
55
+ originName?: Record<string, any> | null;
56
+ /**
57
+ * Customer notes (admin only)
58
+ */
59
+ notes?: Record<string, any> | null;
35
60
  };
@@ -1,3 +1,4 @@
1
+ import type { LocationTypes } from './LocationTypes';
1
2
  import type { Role } from './Role';
2
3
  export type CustomerLoginResponseDto = {
3
4
  /**
@@ -32,6 +33,30 @@ export type CustomerLoginResponseDto = {
32
33
  * Customer Verified Status
33
34
  */
34
35
  isVerified?: boolean;
36
+ /**
37
+ * Type of the origin location (e.g., HOME, OFFICE, etc.)
38
+ */
39
+ originLocationType?: LocationTypes | null;
40
+ /**
41
+ * Origin apartment (optional)
42
+ */
43
+ originApartment?: Record<string, any> | null;
44
+ /**
45
+ * Origin building (optional)
46
+ */
47
+ originBuilding?: Record<string, any> | null;
48
+ /**
49
+ * Origin access code (optional)
50
+ */
51
+ originAccessCode?: Record<string, any> | null;
52
+ /**
53
+ * Origin name/label (optional)
54
+ */
55
+ originName?: Record<string, any> | null;
56
+ /**
57
+ * Customer notes (admin only)
58
+ */
59
+ notes?: Record<string, any> | null;
35
60
  /**
36
61
  * Access Token
37
62
  */
@@ -1,3 +1,4 @@
1
+ import type { LocationTypes } from './LocationTypes';
1
2
  export type CustomerRegisterDto = {
2
3
  /**
3
4
  * Customer First Name
@@ -23,4 +24,28 @@ export type CustomerRegisterDto = {
23
24
  * Customer Phone Number
24
25
  */
25
26
  phone: string;
27
+ /**
28
+ * Type of the origin location (e.g., HOME, OFFICE, etc.)
29
+ */
30
+ originLocationType?: LocationTypes | null;
31
+ /**
32
+ * Origin apartment (optional)
33
+ */
34
+ originApartment?: Record<string, any> | null;
35
+ /**
36
+ * Origin building (optional)
37
+ */
38
+ originBuilding?: Record<string, any> | null;
39
+ /**
40
+ * Origin access code (optional)
41
+ */
42
+ originAccessCode?: Record<string, any> | null;
43
+ /**
44
+ * Origin name/label (optional)
45
+ */
46
+ originName?: Record<string, any> | null;
47
+ /**
48
+ * Customer notes (admin only)
49
+ */
50
+ notes?: Record<string, any> | null;
26
51
  };
@@ -1,3 +1,4 @@
1
+ import type { LocationTypes } from './LocationTypes';
1
2
  export type CustomerUpdatedDto = {
2
3
  /**
3
4
  * User First Name
@@ -19,4 +20,28 @@ export type CustomerUpdatedDto = {
19
20
  * User Phone Number
20
21
  */
21
22
  phone?: string;
23
+ /**
24
+ * Type of the origin location (e.g., HOME, OFFICE, etc.)
25
+ */
26
+ originLocationType?: LocationTypes | null;
27
+ /**
28
+ * Origin apartment (optional)
29
+ */
30
+ originApartment?: Record<string, any> | null;
31
+ /**
32
+ * Origin building (optional)
33
+ */
34
+ originBuilding?: Record<string, any> | null;
35
+ /**
36
+ * Origin access code (optional)
37
+ */
38
+ originAccessCode?: Record<string, any> | null;
39
+ /**
40
+ * Origin name/label (optional)
41
+ */
42
+ originName?: Record<string, any> | null;
43
+ /**
44
+ * Customer notes (admin only)
45
+ */
46
+ notes?: Record<string, any> | null;
22
47
  };
@@ -27,6 +27,10 @@ export type DriverCreateDto = {
27
27
  * Driver Type (e.g., internal, external)
28
28
  */
29
29
  type: string;
30
+ /**
31
+ * Driver phone country code (e.g., +1, +52)
32
+ */
33
+ phoneCountryCode?: string;
30
34
  /**
31
35
  * Driver Phone Number
32
36
  */
@@ -41,6 +41,10 @@ export type DriverDto = {
41
41
  * Driver Status (active/inactive)
42
42
  */
43
43
  status?: boolean;
44
+ /**
45
+ * Whether the driver account is enabled (maps to is_active); distinct from status.
46
+ */
47
+ isActive?: boolean;
44
48
  /**
45
49
  * Last Location
46
50
  */
@@ -0,0 +1,7 @@
1
+ import type { DriverEnableListItemDto } from './DriverEnableListItemDto';
2
+ export type DriverEnableListDto = {
3
+ /**
4
+ * Drivers to enable or disable by ID
5
+ */
6
+ items: Array<DriverEnableListItemDto>;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ export type DriverEnableListItemDto = {
2
+ /**
3
+ * Driver ID
4
+ */
5
+ id: number;
6
+ /**
7
+ * Whether the driver account is enabled; persisted as is_active on the driver row.
8
+ */
9
+ isActive: boolean;
10
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -41,6 +41,10 @@ export type DriverLoginResponseDto = {
41
41
  * Driver Status (active/inactive)
42
42
  */
43
43
  status?: boolean;
44
+ /**
45
+ * Whether the driver account is enabled (maps to is_active); distinct from status.
46
+ */
47
+ isActive?: boolean;
44
48
  /**
45
49
  * Last Location
46
50
  */
@@ -11,6 +11,10 @@ export type DriverUpdateDto = {
11
11
  * Driver address
12
12
  */
13
13
  address?: string;
14
+ /**
15
+ * Driver phone country code (e.g., 1, 52)
16
+ */
17
+ phoneCountryCode?: string;
14
18
  /**
15
19
  * Driver Phone Number (10 digits)
16
20
  */
@@ -43,6 +47,14 @@ export type DriverUpdateDto = {
43
47
  * Last Heartbeat
44
48
  */
45
49
  lastHeartbeat?: string;
50
+ /**
51
+ * Whether the driver account is enabled (maps to is_active). Admin only.
52
+ */
53
+ isActive?: boolean;
54
+ /**
55
+ * Whether the driver is currently online (maps to is_online).
56
+ */
57
+ isOnline?: boolean;
46
58
  /**
47
59
  * Assigned vehicle ID (admin only)
48
60
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Origin location type
2
+ * Type of the origin location (e.g., HOME, OFFICE, etc.)
3
3
  */
4
4
  export declare enum LocationTypes {
5
5
  HOME = "HOME",
@@ -6,7 +6,7 @@ exports.LocationTypes = void 0;
6
6
  /* tslint:disable */
7
7
  /* eslint-disable */
8
8
  /**
9
- * Origin location type
9
+ * Type of the origin location (e.g., HOME, OFFICE, etc.)
10
10
  */
11
11
  var LocationTypes;
12
12
  (function (LocationTypes) {
@@ -1,3 +1,4 @@
1
+ import type { LocationTypes } from './LocationTypes';
1
2
  export type ManualCustomerCreateDto = {
2
3
  /**
3
4
  * First name
@@ -27,4 +28,28 @@ export type ManualCustomerCreateDto = {
27
28
  * Admin ID
28
29
  */
29
30
  adminId?: number;
31
+ /**
32
+ * Type of the origin location (e.g., HOME, OFFICE, etc.)
33
+ */
34
+ originLocationType?: LocationTypes | null;
35
+ /**
36
+ * Origin apartment (optional)
37
+ */
38
+ originApartment?: Record<string, any> | null;
39
+ /**
40
+ * Origin building (optional)
41
+ */
42
+ originBuilding?: Record<string, any> | null;
43
+ /**
44
+ * Origin access code (optional)
45
+ */
46
+ originAccessCode?: Record<string, any> | null;
47
+ /**
48
+ * Origin name/label (optional)
49
+ */
50
+ originName?: Record<string, any> | null;
51
+ /**
52
+ * Manual customer notes (admin only)
53
+ */
54
+ notes?: Record<string, any> | null;
30
55
  };
@@ -1,3 +1,4 @@
1
+ import type { LocationTypes } from './LocationTypes';
1
2
  export type ManualCustomerDto = {
2
3
  /**
3
4
  * Manual customer ID
@@ -39,4 +40,28 @@ export type ManualCustomerDto = {
39
40
  * Updated at timestamp
40
41
  */
41
42
  updatedAt?: Record<string, any>;
43
+ /**
44
+ * Type of the origin location (e.g., HOME, OFFICE, etc.)
45
+ */
46
+ originLocationType?: LocationTypes | null;
47
+ /**
48
+ * Origin apartment (optional)
49
+ */
50
+ originApartment?: Record<string, any> | null;
51
+ /**
52
+ * Origin building (optional)
53
+ */
54
+ originBuilding?: Record<string, any> | null;
55
+ /**
56
+ * Origin access code (optional)
57
+ */
58
+ originAccessCode?: Record<string, any> | null;
59
+ /**
60
+ * Origin name/label (optional)
61
+ */
62
+ originName?: Record<string, any> | null;
63
+ /**
64
+ * Manual customer notes (admin only)
65
+ */
66
+ notes?: Record<string, any> | null;
42
67
  };
@@ -1,3 +1,4 @@
1
+ import type { LocationTypes } from './LocationTypes';
1
2
  export type ManualCustomerUpdateDto = {
2
3
  /**
3
4
  * First name
@@ -27,4 +28,28 @@ export type ManualCustomerUpdateDto = {
27
28
  * Admin ID
28
29
  */
29
30
  adminId?: number;
31
+ /**
32
+ * Type of the origin location (e.g., HOME, OFFICE, etc.)
33
+ */
34
+ originLocationType?: LocationTypes | null;
35
+ /**
36
+ * Origin apartment (optional)
37
+ */
38
+ originApartment?: Record<string, any> | null;
39
+ /**
40
+ * Origin building (optional)
41
+ */
42
+ originBuilding?: Record<string, any> | null;
43
+ /**
44
+ * Origin access code (optional)
45
+ */
46
+ originAccessCode?: Record<string, any> | null;
47
+ /**
48
+ * Origin name/label (optional)
49
+ */
50
+ originName?: Record<string, any> | null;
51
+ /**
52
+ * Manual customer notes (admin only)
53
+ */
54
+ notes?: Record<string, any> | null;
30
55
  };
@@ -1,3 +1,4 @@
1
+ import type { LocationTypes } from './LocationTypes';
1
2
  export type VoucherCreateDto = {
2
3
  /**
3
4
  * Card number
@@ -51,4 +52,28 @@ export type VoucherCreateDto = {
51
52
  * Rider phone
52
53
  */
53
54
  riderPhone: string;
55
+ /**
56
+ * Type of the origin location (e.g., HOME, OFFICE, etc.)
57
+ */
58
+ originLocationType?: LocationTypes | null;
59
+ /**
60
+ * Origin apartment (optional)
61
+ */
62
+ originApartment?: Record<string, any> | null;
63
+ /**
64
+ * Origin building (optional)
65
+ */
66
+ originBuilding?: Record<string, any> | null;
67
+ /**
68
+ * Origin access code (optional)
69
+ */
70
+ originAccessCode?: Record<string, any> | null;
71
+ /**
72
+ * Origin name/label (optional)
73
+ */
74
+ originName?: Record<string, any> | null;
75
+ /**
76
+ * Voucher notes (admin only)
77
+ */
78
+ notes?: Record<string, any> | null;
54
79
  };
@@ -1,3 +1,4 @@
1
+ import type { LocationTypes } from './LocationTypes';
1
2
  export type VoucherDriverCreateDto = {
2
3
  /**
3
4
  * Card number
@@ -51,4 +52,28 @@ export type VoucherDriverCreateDto = {
51
52
  * Rider phone
52
53
  */
53
54
  riderPhone: string;
55
+ /**
56
+ * Type of the origin location (e.g., HOME, OFFICE, etc.)
57
+ */
58
+ originLocationType?: LocationTypes | null;
59
+ /**
60
+ * Origin apartment (optional)
61
+ */
62
+ originApartment?: Record<string, any> | null;
63
+ /**
64
+ * Origin building (optional)
65
+ */
66
+ originBuilding?: Record<string, any> | null;
67
+ /**
68
+ * Origin access code (optional)
69
+ */
70
+ originAccessCode?: Record<string, any> | null;
71
+ /**
72
+ * Origin name/label (optional)
73
+ */
74
+ originName?: Record<string, any> | null;
75
+ /**
76
+ * Voucher notes (admin only)
77
+ */
78
+ notes?: Record<string, any> | null;
54
79
  };
@@ -1,32 +1,37 @@
1
+ import type { LocationTypes } from './LocationTypes';
1
2
  export type VoucherDto = {
2
3
  /**
3
4
  * Voucher ID
4
5
  */
5
- id: number;
6
+ id?: number;
6
7
  /**
7
8
  * Card number
8
9
  */
9
- cardNumber: string;
10
+ cardNumber?: string;
10
11
  /**
11
12
  * Voucher status
12
13
  */
13
- status: string;
14
+ status?: string;
14
15
  /**
15
16
  * Program name
16
17
  */
17
- program: string;
18
+ program?: string;
18
19
  /**
19
20
  * Senior center
20
21
  */
21
- seniorCenter: string;
22
+ seniorCenter?: string;
22
23
  /**
23
24
  * First name
24
25
  */
25
- firstName: string;
26
+ firstName?: string;
26
27
  /**
27
28
  * Last name
28
29
  */
29
- lastName: string;
30
+ lastName?: string;
31
+ /**
32
+ * Display nickname when it differs from legal name (e.g. from import)
33
+ */
34
+ nickname?: string;
30
35
  /**
31
36
  * Middle name
32
37
  */
@@ -34,7 +39,7 @@ export type VoucherDto = {
34
39
  /**
35
40
  * Address
36
41
  */
37
- address: string;
42
+ address?: string;
38
43
  /**
39
44
  * Apartment number
40
45
  */
@@ -42,21 +47,45 @@ export type VoucherDto = {
42
47
  /**
43
48
  * City
44
49
  */
45
- city: string;
50
+ city?: string;
46
51
  /**
47
52
  * State
48
53
  */
49
- state: string;
54
+ state?: string;
50
55
  /**
51
56
  * Zip code
52
57
  */
53
- zipCode: string;
58
+ zipCode?: string;
54
59
  /**
55
60
  * Rider phone
56
61
  */
57
- riderPhone: string;
62
+ riderPhone?: string;
58
63
  /**
59
64
  * Created at timestamp
60
65
  */
61
- createdAt: string;
66
+ createdAt?: string;
67
+ /**
68
+ * Type of the origin location (e.g., HOME, OFFICE, etc.)
69
+ */
70
+ originLocationType?: LocationTypes | null;
71
+ /**
72
+ * Origin apartment (optional)
73
+ */
74
+ originApartment?: Record<string, any> | null;
75
+ /**
76
+ * Origin building (optional)
77
+ */
78
+ originBuilding?: Record<string, any> | null;
79
+ /**
80
+ * Origin access code (optional)
81
+ */
82
+ originAccessCode?: Record<string, any> | null;
83
+ /**
84
+ * Origin name/label (optional)
85
+ */
86
+ originName?: Record<string, any> | null;
87
+ /**
88
+ * Voucher notes (admin only)
89
+ */
90
+ notes?: Record<string, any> | null;
62
91
  };
@@ -0,0 +1,23 @@
1
+ export type VoucherNicknameImportDetailDto = {
2
+ /**
3
+ * Normalized card number when valid; raw fragment otherwise
4
+ */
5
+ cardNumber: string;
6
+ status: VoucherNicknameImportDetailDto.status;
7
+ /**
8
+ * Nickname written when status is updated
9
+ */
10
+ nickname?: string;
11
+ /**
12
+ * Reason when status is invalid
13
+ */
14
+ error?: string;
15
+ };
16
+ export declare namespace VoucherNicknameImportDetailDto {
17
+ enum status {
18
+ UPDATED = "updated",
19
+ SKIPPED = "skipped",
20
+ NOT_FOUND = "not_found",
21
+ INVALID = "invalid"
22
+ }
23
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VoucherNicknameImportDetailDto = void 0;
4
+ var VoucherNicknameImportDetailDto;
5
+ (function (VoucherNicknameImportDetailDto) {
6
+ let status;
7
+ (function (status) {
8
+ status["UPDATED"] = "updated";
9
+ status["SKIPPED"] = "skipped";
10
+ status["NOT_FOUND"] = "not_found";
11
+ status["INVALID"] = "invalid";
12
+ })(status = VoucherNicknameImportDetailDto.status || (VoucherNicknameImportDetailDto.status = {}));
13
+ })(VoucherNicknameImportDetailDto || (exports.VoucherNicknameImportDetailDto = VoucherNicknameImportDetailDto = {}));
@@ -0,0 +1,21 @@
1
+ import type { VoucherNicknameImportDetailDto } from './VoucherNicknameImportDetailDto';
2
+ export type VoucherNicknameImportResponseDto = {
3
+ message: string;
4
+ updated: number;
5
+ /**
6
+ * Rows where Excel first/last matched DB first/last (case-insensitive)
7
+ */
8
+ skippedMatching: number;
9
+ /**
10
+ * Card number not found in vouchers table
11
+ */
12
+ notFound: number;
13
+ /**
14
+ * Rows with missing/invalid card or missing first/last
15
+ */
16
+ invalid: number;
17
+ /**
18
+ * Per-row outcomes
19
+ */
20
+ details: Array<VoucherNicknameImportDetailDto>;
21
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
+ import type { LocationTypes } from './LocationTypes';
1
2
  export type VoucherUpdateDto = {
2
3
  /**
3
4
  * Card number
@@ -51,4 +52,28 @@ export type VoucherUpdateDto = {
51
52
  * Rider phone
52
53
  */
53
54
  riderPhone?: string;
55
+ /**
56
+ * Type of the origin location (e.g., HOME, OFFICE, etc.)
57
+ */
58
+ originLocationType?: LocationTypes | null;
59
+ /**
60
+ * Origin apartment (optional)
61
+ */
62
+ originApartment?: Record<string, any> | null;
63
+ /**
64
+ * Origin building (optional)
65
+ */
66
+ originBuilding?: Record<string, any> | null;
67
+ /**
68
+ * Origin access code (optional)
69
+ */
70
+ originAccessCode?: Record<string, any> | null;
71
+ /**
72
+ * Origin name/label (optional)
73
+ */
74
+ originName?: Record<string, any> | null;
75
+ /**
76
+ * Voucher notes (admin only)
77
+ */
78
+ notes?: Record<string, any> | null;
54
79
  };
package/models/index.d.ts CHANGED
@@ -34,6 +34,8 @@ export * from './DriverAssignmentModes';
34
34
  export * from './DriverCreateDto';
35
35
  export * from './DriverCreditsResponseDto';
36
36
  export * from './DriverDto';
37
+ export * from './DriverEnableListDto';
38
+ export * from './DriverEnableListItemDto';
37
39
  export * from './DriverLocationUpdateDto';
38
40
  export * from './DriverLoginDto';
39
41
  export * from './DriverLoginResponseDto';
@@ -91,4 +93,6 @@ export * from './VehicleUpdateDto';
91
93
  export * from './VoucherCreateDto';
92
94
  export * from './VoucherDriverCreateDto';
93
95
  export * from './VoucherDto';
96
+ export * from './VoucherNicknameImportDetailDto';
97
+ export * from './VoucherNicknameImportResponseDto';
94
98
  export * from './VoucherUpdateDto';
package/models/index.js CHANGED
@@ -50,6 +50,8 @@ __exportStar(require("./DriverAssignmentModes"), exports);
50
50
  __exportStar(require("./DriverCreateDto"), exports);
51
51
  __exportStar(require("./DriverCreditsResponseDto"), exports);
52
52
  __exportStar(require("./DriverDto"), exports);
53
+ __exportStar(require("./DriverEnableListDto"), exports);
54
+ __exportStar(require("./DriverEnableListItemDto"), exports);
53
55
  __exportStar(require("./DriverLocationUpdateDto"), exports);
54
56
  __exportStar(require("./DriverLoginDto"), exports);
55
57
  __exportStar(require("./DriverLoginResponseDto"), exports);
@@ -107,4 +109,6 @@ __exportStar(require("./VehicleUpdateDto"), exports);
107
109
  __exportStar(require("./VoucherCreateDto"), exports);
108
110
  __exportStar(require("./VoucherDriverCreateDto"), exports);
109
111
  __exportStar(require("./VoucherDto"), exports);
112
+ __exportStar(require("./VoucherNicknameImportDetailDto"), exports);
113
+ __exportStar(require("./VoucherNicknameImportResponseDto"), exports);
110
114
  __exportStar(require("./VoucherUpdateDto"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dapex-tech/elite-online-services",
3
- "version": "0.0.25",
3
+ "version": "0.0.29",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "private": false,
@@ -1,15 +1,10 @@
1
1
  import type { DriverCreateDto } from '../models/DriverCreateDto';
2
+ import type { DriverDto } from '../models/DriverDto';
3
+ import type { DriverEnableListDto } from '../models/DriverEnableListDto';
2
4
  import type { DriverUpdateDto } from '../models/DriverUpdateDto';
3
5
  import type { OrderDto } from '../models/OrderDto';
4
6
  import type { CancelablePromise } from '../core/CancelablePromise';
5
7
  export declare class AdminDriversService {
6
- /**
7
- * Sync all drivers with location to Redis GEO index
8
- * Reads driver statuses from Redis (EOS:DriversStatus hash), and adds every driver that has latitude/longitude to the EOS:DriversGeo sorted set for dispatch radius queries.
9
- * @returns any Number of drivers added to Redis GEO index.
10
- * @throws ApiError
11
- */
12
- static syncDriversRedisGeo(): CancelablePromise<any>;
13
8
  /**
14
9
  * Create a new driver
15
10
  * @param requestBody
@@ -74,4 +69,12 @@ export declare class AdminDriversService {
74
69
  * @throws ApiError
75
70
  */
76
71
  static remove(id: number): CancelablePromise<any>;
72
+ /**
73
+ * Enable or disable a list of drivers by ID
74
+ * Sets is_active on each driver row to match the supplied isActive flag.
75
+ * @param requestBody
76
+ * @returns DriverDto Drivers enabled or disabled successfully.
77
+ * @throws ApiError
78
+ */
79
+ static enableDrivers(requestBody: DriverEnableListDto): CancelablePromise<Array<DriverDto>>;
77
80
  }
@@ -4,18 +4,6 @@ exports.AdminDriversService = void 0;
4
4
  const OpenAPI_1 = require("../core/OpenAPI");
5
5
  const request_1 = require("../core/request");
6
6
  class AdminDriversService {
7
- /**
8
- * Sync all drivers with location to Redis GEO index
9
- * Reads driver statuses from Redis (EOS:DriversStatus hash), and adds every driver that has latitude/longitude to the EOS:DriversGeo sorted set for dispatch radius queries.
10
- * @returns any Number of drivers added to Redis GEO index.
11
- * @throws ApiError
12
- */
13
- static syncDriversRedisGeo() {
14
- return (0, request_1.request)(OpenAPI_1.OpenAPI, {
15
- method: 'POST',
16
- url: '/admins/drivers/sync-redis-geo',
17
- });
18
- }
19
7
  /**
20
8
  * Create a new driver
21
9
  * @param requestBody
@@ -149,5 +137,24 @@ class AdminDriversService {
149
137
  },
150
138
  });
151
139
  }
140
+ /**
141
+ * Enable or disable a list of drivers by ID
142
+ * Sets is_active on each driver row to match the supplied isActive flag.
143
+ * @param requestBody
144
+ * @returns DriverDto Drivers enabled or disabled successfully.
145
+ * @throws ApiError
146
+ */
147
+ static enableDrivers(requestBody) {
148
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
149
+ method: 'PATCH',
150
+ url: '/admins/drivers/enable/list',
151
+ body: requestBody,
152
+ mediaType: 'application/json',
153
+ errors: {
154
+ 400: `Validation error`,
155
+ 404: `One or more driver IDs were not found.`,
156
+ },
157
+ });
158
+ }
152
159
  }
153
160
  exports.AdminDriversService = AdminDriversService;
@@ -2,6 +2,7 @@ import type { MessageResponseDto } from '../models/MessageResponseDto';
2
2
  import type { OrderDto } from '../models/OrderDto';
3
3
  import type { VoucherCreateDto } from '../models/VoucherCreateDto';
4
4
  import type { VoucherDto } from '../models/VoucherDto';
5
+ import type { VoucherNicknameImportResponseDto } from '../models/VoucherNicknameImportResponseDto';
5
6
  import type { VoucherUpdateDto } from '../models/VoucherUpdateDto';
6
7
  import type { CancelablePromise } from '../core/CancelablePromise';
7
8
  export declare class AdminVouchersService {
@@ -14,7 +15,7 @@ export declare class AdminVouchersService {
14
15
  static create(requestBody: VoucherCreateDto): CancelablePromise<VoucherDto>;
15
16
  /**
16
17
  * Get all vouchers
17
- * @param q Text to search for in card number, name, senior center, program or status
18
+ * @param q Text to search for in card number, nickname, first/middle/last name, senior center, and rider phone.
18
19
  * @param order Sorting options
19
20
  * @returns VoucherDto List of vouchers
20
21
  * @throws ApiError
@@ -29,6 +30,16 @@ export declare class AdminVouchersService {
29
30
  static importExcel(formData: {
30
31
  file?: Blob;
31
32
  }): CancelablePromise<any>;
33
+ /**
34
+ * Import voucher nicknames from Excel
35
+ * For each row, finds the voucher by CARD_NUMBER. If Excel first/last names differ from the database (case-insensitive), sets nickname to "First Last" from the sheet. Does not change firstName/lastName in the database.
36
+ * @param formData
37
+ * @returns VoucherNicknameImportResponseDto Import summary and per-row details
38
+ * @throws ApiError
39
+ */
40
+ static importNicknameExcel(formData: {
41
+ file?: Blob;
42
+ }): CancelablePromise<VoucherNicknameImportResponseDto>;
32
43
  /**
33
44
  * Get a single voucher by card number
34
45
  * @param cardNumber
@@ -20,7 +20,7 @@ class AdminVouchersService {
20
20
  }
21
21
  /**
22
22
  * Get all vouchers
23
- * @param q Text to search for in card number, name, senior center, program or status
23
+ * @param q Text to search for in card number, nickname, first/middle/last name, senior center, and rider phone.
24
24
  * @param order Sorting options
25
25
  * @returns VoucherDto List of vouchers
26
26
  * @throws ApiError
@@ -49,6 +49,21 @@ class AdminVouchersService {
49
49
  mediaType: 'multipart/form-data',
50
50
  });
51
51
  }
52
+ /**
53
+ * Import voucher nicknames from Excel
54
+ * For each row, finds the voucher by CARD_NUMBER. If Excel first/last names differ from the database (case-insensitive), sets nickname to "First Last" from the sheet. Does not change firstName/lastName in the database.
55
+ * @param formData
56
+ * @returns VoucherNicknameImportResponseDto Import summary and per-row details
57
+ * @throws ApiError
58
+ */
59
+ static importNicknameExcel(formData) {
60
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
61
+ method: 'POST',
62
+ url: '/admins/vouchers/import-nicknames',
63
+ formData: formData,
64
+ mediaType: 'multipart/form-data',
65
+ });
66
+ }
52
67
  /**
53
68
  * Get a single voucher by card number
54
69
  * @param cardNumber
@@ -35,18 +35,6 @@ export declare class DriversService {
35
35
  * @throws ApiError
36
36
  */
37
37
  static updateOnlineStatus(): CancelablePromise<DriverDto>;
38
- /**
39
- * Deactivate the current driver account
40
- * @returns DriverDto Driver account deactivated successfully.
41
- * @throws ApiError
42
- */
43
- static deactivateAccount(): CancelablePromise<DriverDto>;
44
- /**
45
- * Update a driver account status by ID
46
- * @returns DriverDto Driver account status updated successfully.
47
- * @throws ApiError
48
- */
49
- static updateAccountStatus(): CancelablePromise<DriverDto>;
50
38
  /**
51
39
  * Update a driver FCM token
52
40
  * @param requestBody
@@ -51,28 +51,6 @@ class DriversService {
51
51
  url: '/drivers/online-status',
52
52
  });
53
53
  }
54
- /**
55
- * Deactivate the current driver account
56
- * @returns DriverDto Driver account deactivated successfully.
57
- * @throws ApiError
58
- */
59
- static deactivateAccount() {
60
- return (0, request_1.request)(OpenAPI_1.OpenAPI, {
61
- method: 'PATCH',
62
- url: '/drivers/deactivate-account',
63
- });
64
- }
65
- /**
66
- * Update a driver account status by ID
67
- * @returns DriverDto Driver account status updated successfully.
68
- * @throws ApiError
69
- */
70
- static updateAccountStatus() {
71
- return (0, request_1.request)(OpenAPI_1.OpenAPI, {
72
- method: 'PATCH',
73
- url: '/drivers/account-status',
74
- });
75
- }
76
54
  /**
77
55
  * Update a driver FCM token
78
56
  * @param requestBody
@@ -0,0 +1,8 @@
1
+ import type { CancelablePromise } from '../core/CancelablePromise';
2
+ export declare class McpService {
3
+ /**
4
+ * @returns any
5
+ * @throws ApiError
6
+ */
7
+ static handle(): CancelablePromise<any>;
8
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.McpService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class McpService {
7
+ /**
8
+ * @returns any
9
+ * @throws ApiError
10
+ */
11
+ static handle() {
12
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
13
+ method: 'POST',
14
+ url: '/mcp',
15
+ });
16
+ }
17
+ }
18
+ exports.McpService = McpService;
@@ -2,6 +2,7 @@ import type { MessageResponseDto } from '../models/MessageResponseDto';
2
2
  import type { OrderDto } from '../models/OrderDto';
3
3
  import type { VoucherCreateDto } from '../models/VoucherCreateDto';
4
4
  import type { VoucherDto } from '../models/VoucherDto';
5
+ import type { VoucherNicknameImportResponseDto } from '../models/VoucherNicknameImportResponseDto';
5
6
  import type { VoucherUpdateDto } from '../models/VoucherUpdateDto';
6
7
  import type { CancelablePromise } from '../core/CancelablePromise';
7
8
  export declare class VoucherService {
@@ -14,7 +15,7 @@ export declare class VoucherService {
14
15
  static create(requestBody: VoucherCreateDto): CancelablePromise<VoucherDto>;
15
16
  /**
16
17
  * Get all vouchers
17
- * @param q Text to search for in card number, name, senior center, program or status
18
+ * @param q Text to search for in card number, nickname, first/middle/last name, senior center, and rider phone.
18
19
  * @param order Sorting options
19
20
  * @returns VoucherDto List of vouchers
20
21
  * @throws ApiError
@@ -29,6 +30,16 @@ export declare class VoucherService {
29
30
  static importExcel(formData: {
30
31
  file?: Blob;
31
32
  }): CancelablePromise<any>;
33
+ /**
34
+ * Import voucher nicknames from Excel
35
+ * For each row, finds the voucher by CARD_NUMBER. If Excel first/last names differ from the database (case-insensitive), sets nickname to "First Last" from the sheet. Does not change firstName/lastName in the database.
36
+ * @param formData
37
+ * @returns VoucherNicknameImportResponseDto Import summary and per-row details
38
+ * @throws ApiError
39
+ */
40
+ static importNicknameExcel(formData: {
41
+ file?: Blob;
42
+ }): CancelablePromise<VoucherNicknameImportResponseDto>;
32
43
  /**
33
44
  * Get a single voucher by ID
34
45
  * @param id
@@ -20,7 +20,7 @@ class VoucherService {
20
20
  }
21
21
  /**
22
22
  * Get all vouchers
23
- * @param q Text to search for in card number, name, senior center, program or status
23
+ * @param q Text to search for in card number, nickname, first/middle/last name, senior center, and rider phone.
24
24
  * @param order Sorting options
25
25
  * @returns VoucherDto List of vouchers
26
26
  * @throws ApiError
@@ -49,6 +49,21 @@ class VoucherService {
49
49
  mediaType: 'multipart/form-data',
50
50
  });
51
51
  }
52
+ /**
53
+ * Import voucher nicknames from Excel
54
+ * For each row, finds the voucher by CARD_NUMBER. If Excel first/last names differ from the database (case-insensitive), sets nickname to "First Last" from the sheet. Does not change firstName/lastName in the database.
55
+ * @param formData
56
+ * @returns VoucherNicknameImportResponseDto Import summary and per-row details
57
+ * @throws ApiError
58
+ */
59
+ static importNicknameExcel(formData) {
60
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
61
+ method: 'POST',
62
+ url: '/vouchers/import-nicknames',
63
+ formData: formData,
64
+ mediaType: 'multipart/form-data',
65
+ });
66
+ }
52
67
  /**
53
68
  * Get a single voucher by ID
54
69
  * @param id
@@ -26,5 +26,6 @@ export * from './DriversService';
26
26
  export * from './HealthService';
27
27
  export * from './MainService';
28
28
  export * from './ManualCustomerService';
29
+ export * from './McpService';
29
30
  export * from './PaymentsService';
30
31
  export * from './VoucherService';
package/services/index.js CHANGED
@@ -42,5 +42,6 @@ __exportStar(require("./DriversService"), exports);
42
42
  __exportStar(require("./HealthService"), exports);
43
43
  __exportStar(require("./MainService"), exports);
44
44
  __exportStar(require("./ManualCustomerService"), exports);
45
+ __exportStar(require("./McpService"), exports);
45
46
  __exportStar(require("./PaymentsService"), exports);
46
47
  __exportStar(require("./VoucherService"), exports);
@@ -13,6 +13,7 @@ export declare class SocketService {
13
13
  connect(): void;
14
14
  disconnect(): void;
15
15
  isConnected(): boolean;
16
+ isActive(): boolean;
16
17
  on<T = any>(event: string, cb: (data: T) => void): void;
17
18
  off(event: string, cb?: (...args: any[]) => void): void;
18
19
  emit<T = any>(event: string, data: T): void;
package/socketService.js CHANGED
@@ -57,8 +57,10 @@ class SocketService {
57
57
  this.token = token;
58
58
  this.socket.auth = { token };
59
59
  if (this.socket.connected) {
60
- this.socket.disconnect().connect();
60
+ this.socket.disconnect();
61
61
  }
62
+ if (!this.isActive())
63
+ this.socket.connect();
62
64
  }
63
65
  clearToken() {
64
66
  this.token = undefined;
@@ -76,6 +78,9 @@ class SocketService {
76
78
  isConnected() {
77
79
  return this.socket.connected;
78
80
  }
81
+ isActive() {
82
+ return this.socket.connected && this.socket.active;
83
+ }
79
84
  on(event, cb) {
80
85
  this.socket.on(event, cb);
81
86
  }
@@ -28,4 +28,8 @@ export interface ActiveTrip {
28
28
  deltaTotalCost?: number;
29
29
  distanceToPickupMeters?: number;
30
30
  etaToPickupTimestamp?: number;
31
+ acceptedAt?: number;
32
+ arrivedAt?: number;
33
+ startedAt?: number;
34
+ completedAt?: number;
31
35
  }
@@ -5,6 +5,7 @@ export interface DriverStatus {
5
5
  heartbeat?: string;
6
6
  lastLocationChange?: string;
7
7
  isOnline?: boolean;
8
+ isActive?: boolean;
8
9
  waitingTripIds?: number[];
9
10
  activeTripId?: number;
10
11
  /** Set by scheduler after first stale-heartbeat warning; cleared on heartbeat. */