@dapex-tech/elite-online-services 0.0.16 → 0.0.17

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 (41) hide show
  1. package/createClient.d.ts +7 -0
  2. package/models/AddPaymentMethodDto.d.ts +18 -0
  3. package/models/AddPaymentMethodDto.js +2 -0
  4. package/models/ChargeTripByCardDto.d.ts +22 -0
  5. package/models/ChargeTripByCardDto.js +2 -0
  6. package/models/ChargeTripByCashDto.d.ts +10 -0
  7. package/models/ChargeTripByCashDto.js +2 -0
  8. package/models/ChargeTripDto.d.ts +10 -0
  9. package/models/ChargeTripDto.js +2 -0
  10. package/models/PaymentDto.d.ts +8 -4
  11. package/models/SearchCustomerDto.d.ts +41 -0
  12. package/models/SearchCustomerDto.js +11 -0
  13. package/models/TripDto.d.ts +17 -2
  14. package/models/TripDto.js +8 -0
  15. package/models/TripUpdateDto.d.ts +17 -0
  16. package/models/TripUpdateDto.js +12 -0
  17. package/models/index.d.ts +5 -0
  18. package/models/index.js +5 -0
  19. package/package.json +1 -1
  20. package/services/AdminService.d.ts +9 -0
  21. package/services/AdminService.js +17 -0
  22. package/services/AdminSettingsService.d.ts +9 -0
  23. package/services/AdminSettingsService.js +19 -0
  24. package/services/AdminTripsService.d.ts +9 -0
  25. package/services/AdminTripsService.js +19 -0
  26. package/services/AdminVouchersService.d.ts +61 -0
  27. package/services/AdminVouchersService.js +116 -0
  28. package/services/CustomerPaymentsService.d.ts +65 -0
  29. package/services/CustomerPaymentsService.js +149 -0
  30. package/services/CustomerSettingsService.d.ts +9 -0
  31. package/services/CustomerSettingsService.js +19 -0
  32. package/services/DriverPaymentsService.d.ts +29 -0
  33. package/services/DriverPaymentsService.js +63 -0
  34. package/services/DriverSettingsService.d.ts +9 -0
  35. package/services/DriverSettingsService.js +19 -0
  36. package/services/PaymentsService.d.ts +64 -0
  37. package/services/PaymentsService.js +149 -0
  38. package/services/index.d.ts +7 -0
  39. package/services/index.js +7 -0
  40. package/types/realtime/active-trip.d.ts +2 -0
  41. package/types/realtime/driver-status.d.ts +1 -1
package/createClient.d.ts CHANGED
@@ -7,16 +7,23 @@ export declare function createClient(baseUrl?: string): {
7
7
  AdminCustomerService: typeof services.AdminCustomerService;
8
8
  AdminDriversService: typeof services.AdminDriversService;
9
9
  AdminService: typeof services.AdminService;
10
+ AdminSettingsService: typeof services.AdminSettingsService;
10
11
  AdminTripsService: typeof services.AdminTripsService;
12
+ AdminVouchersService: typeof services.AdminVouchersService;
11
13
  CustomerLocationsService: typeof services.CustomerLocationsService;
14
+ CustomerPaymentsService: typeof services.CustomerPaymentsService;
15
+ CustomerSettingsService: typeof services.CustomerSettingsService;
12
16
  CustomerTripsService: typeof services.CustomerTripsService;
13
17
  CustomersAuthService: typeof services.CustomersAuthService;
14
18
  CustomersService: typeof services.CustomersService;
15
19
  DriverAuthService: typeof services.DriverAuthService;
20
+ DriverPaymentsService: typeof services.DriverPaymentsService;
21
+ DriverSettingsService: typeof services.DriverSettingsService;
16
22
  DriverTripsService: typeof services.DriverTripsService;
17
23
  DriversService: typeof services.DriversService;
18
24
  HealthService: typeof services.HealthService;
19
25
  MainService: typeof services.MainService;
20
26
  ManualCustomerService: typeof services.ManualCustomerService;
27
+ PaymentsService: typeof services.PaymentsService;
21
28
  VoucherService: typeof services.VoucherService;
22
29
  };
@@ -0,0 +1,18 @@
1
+ export type AddPaymentMethodDto = {
2
+ /**
3
+ * Card number
4
+ */
5
+ cardNumber: string;
6
+ /**
7
+ * Expiration date in MM/YY format
8
+ */
9
+ expirationDate: string;
10
+ /**
11
+ * Card CVV (use 900 for successful CVV match in Authorize.net sandbox)
12
+ */
13
+ cvv: string;
14
+ /**
15
+ * Set as default payment method
16
+ */
17
+ isDefault?: boolean;
18
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,22 @@
1
+ export type ChargeTripByCardDto = {
2
+ /**
3
+ * Trip ID to charge
4
+ */
5
+ tripId: number;
6
+ /**
7
+ * Amount to charge
8
+ */
9
+ amount: number;
10
+ /**
11
+ * Card number
12
+ */
13
+ cardNumber: string;
14
+ /**
15
+ * Expiration date in MM/YY
16
+ */
17
+ expirationDate: string;
18
+ /**
19
+ * Card CVV
20
+ */
21
+ cvv: string;
22
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ export type ChargeTripByCashDto = {
2
+ /**
3
+ * Trip ID to charge
4
+ */
5
+ tripId: number;
6
+ /**
7
+ * Amount to charge
8
+ */
9
+ amount: number;
10
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ export type ChargeTripDto = {
2
+ /**
3
+ * Trip ID to charge
4
+ */
5
+ tripId: number;
6
+ /**
7
+ * Amount to charge
8
+ */
9
+ amount: number;
10
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,11 +8,15 @@ export type PaymentDto = {
8
8
  */
9
9
  tripId?: Record<string, any> | null;
10
10
  /**
11
- * Payment method
11
+ * Payment type
12
12
  */
13
- paymentMethod?: Record<string, any> | null;
13
+ paymentType?: Record<string, any> | null;
14
14
  /**
15
- * Payment status
15
+ * Payment source
16
16
  */
17
- status?: Record<string, any> | null;
17
+ paymentSource?: Record<string, any> | null;
18
+ /**
19
+ * Payment amount
20
+ */
21
+ amount?: Record<string, any> | null;
18
22
  };
@@ -0,0 +1,41 @@
1
+ export type SearchCustomerDto = {
2
+ /**
3
+ * Composed unique id: `${customerType}:${sourceId}`
4
+ */
5
+ id: string;
6
+ customerType: SearchCustomerDto.customerType;
7
+ /**
8
+ * Present only for manual customers
9
+ */
10
+ manualCustomerId?: number;
11
+ /**
12
+ * Present only for senior vouchers
13
+ */
14
+ voucherId?: number;
15
+ firstName?: string;
16
+ lastName?: string;
17
+ /**
18
+ * Phone number. Manual customers use `phone` (digits) and may include `phoneCountryCode`; vouchers use `riderPhone` mapped into `phone`.
19
+ */
20
+ phone?: string;
21
+ /**
22
+ * Manual customer phone country code (if available)
23
+ */
24
+ phoneCountryCode?: string;
25
+ email?: string;
26
+ address?: string;
27
+ /**
28
+ * Created at timestamp
29
+ */
30
+ createdAt?: string;
31
+ cardNumber?: string;
32
+ program?: string;
33
+ seniorCenter?: string;
34
+ status?: string;
35
+ };
36
+ export declare namespace SearchCustomerDto {
37
+ enum customerType {
38
+ MANUAL_CUSTOMER = "MANUAL_CUSTOMER",
39
+ SENIOR_VOUCHER = "SENIOR_VOUCHER"
40
+ }
41
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SearchCustomerDto = void 0;
4
+ var SearchCustomerDto;
5
+ (function (SearchCustomerDto) {
6
+ let customerType;
7
+ (function (customerType) {
8
+ customerType["MANUAL_CUSTOMER"] = "MANUAL_CUSTOMER";
9
+ customerType["SENIOR_VOUCHER"] = "SENIOR_VOUCHER";
10
+ })(customerType = SearchCustomerDto.customerType || (SearchCustomerDto.customerType = {}));
11
+ })(SearchCustomerDto || (exports.SearchCustomerDto = SearchCustomerDto = {}));
@@ -18,6 +18,14 @@ export type TripDto = {
18
18
  status?: TripDto.status;
19
19
  tripSource?: Record<string, any>;
20
20
  driverAssignmentMode?: Record<string, any>;
21
+ /**
22
+ * Payment type (CASH or DEBIT_CREDIT_CARD)
23
+ */
24
+ paymentType?: TripDto.paymentType | null;
25
+ /**
26
+ * Customer payment method ID for card payments
27
+ */
28
+ customerPaymentMethodId?: Record<string, any> | null;
21
29
  /**
22
30
  * Origin location type
23
31
  */
@@ -142,9 +150,9 @@ export type TripDto = {
142
150
  */
143
151
  locationPoints?: Array<TripLocationPointDto> | null;
144
152
  /**
145
- * Payments associated with the trip
153
+ * Payment associated with the trip
146
154
  */
147
- payments?: Array<PaymentDto> | null;
155
+ payment?: PaymentDto | null;
148
156
  /**
149
157
  * Voucher information
150
158
  */
@@ -170,4 +178,11 @@ export declare namespace TripDto {
170
178
  CANCELED_DRIVER = "CANCELED_DRIVER",
171
179
  CANCELED_ADMIN = "CANCELED_ADMIN"
172
180
  }
181
+ /**
182
+ * Payment type (CASH or DEBIT_CREDIT_CARD)
183
+ */
184
+ enum paymentType {
185
+ CASH = "CASH",
186
+ DEBIT_CREDIT_CARD = "DEBIT_CREDIT_CARD"
187
+ }
173
188
  }
package/models/TripDto.js CHANGED
@@ -19,4 +19,12 @@ var TripDto;
19
19
  status["CANCELED_DRIVER"] = "CANCELED_DRIVER";
20
20
  status["CANCELED_ADMIN"] = "CANCELED_ADMIN";
21
21
  })(status = TripDto.status || (TripDto.status = {}));
22
+ /**
23
+ * Payment type (CASH or DEBIT_CREDIT_CARD)
24
+ */
25
+ let paymentType;
26
+ (function (paymentType) {
27
+ paymentType["CASH"] = "CASH";
28
+ paymentType["DEBIT_CREDIT_CARD"] = "DEBIT_CREDIT_CARD";
29
+ })(paymentType = TripDto.paymentType || (TripDto.paymentType = {}));
22
30
  })(TripDto || (exports.TripDto = TripDto = {}));
@@ -3,6 +3,14 @@ export type TripUpdateDto = {
3
3
  customerId?: Record<string, any> | null;
4
4
  voucherId?: Record<string, any> | null;
5
5
  manualCustomerId?: Record<string, any> | null;
6
+ /**
7
+ * Payment type (CASH or DEBIT_CREDIT_CARD)
8
+ */
9
+ paymentType?: TripUpdateDto.paymentType | null;
10
+ /**
11
+ * Customer payment method ID for card payments
12
+ */
13
+ customerPaymentMethodId?: Record<string, any> | null;
6
14
  origin?: Record<string, any> | null;
7
15
  /**
8
16
  * Origin address
@@ -38,3 +46,12 @@ export type TripUpdateDto = {
38
46
  */
39
47
  destinationLongitude?: Record<string, any> | null;
40
48
  };
49
+ export declare namespace TripUpdateDto {
50
+ /**
51
+ * Payment type (CASH or DEBIT_CREDIT_CARD)
52
+ */
53
+ enum paymentType {
54
+ CASH = "CASH",
55
+ DEBIT_CREDIT_CARD = "DEBIT_CREDIT_CARD"
56
+ }
57
+ }
@@ -1,2 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TripUpdateDto = void 0;
4
+ var TripUpdateDto;
5
+ (function (TripUpdateDto) {
6
+ /**
7
+ * Payment type (CASH or DEBIT_CREDIT_CARD)
8
+ */
9
+ let paymentType;
10
+ (function (paymentType) {
11
+ paymentType["CASH"] = "CASH";
12
+ paymentType["DEBIT_CREDIT_CARD"] = "DEBIT_CREDIT_CARD";
13
+ })(paymentType = TripUpdateDto.paymentType || (TripUpdateDto.paymentType = {}));
14
+ })(TripUpdateDto || (exports.TripUpdateDto = TripUpdateDto = {}));
package/models/index.d.ts CHANGED
@@ -1,8 +1,12 @@
1
+ export * from './AddPaymentMethodDto';
1
2
  export * from './AdminCreateDto';
2
3
  export * from './AdminDto';
3
4
  export * from './AdminLoginDto';
4
5
  export * from './AdminLoginResponseDto';
5
6
  export * from './AdminUpdateDto';
7
+ export * from './ChargeTripByCardDto';
8
+ export * from './ChargeTripByCashDto';
9
+ export * from './ChargeTripDto';
6
10
  export * from './CustomerDto';
7
11
  export * from './CustomerLocationCreateDto';
8
12
  export * from './CustomerLocationDto';
@@ -28,6 +32,7 @@ export * from './MessageResponseDto';
28
32
  export * from './OrderDto';
29
33
  export * from './PaymentDto';
30
34
  export * from './ResetPasswordDto';
35
+ export * from './SearchCustomerDto';
31
36
  export * from './TokensDto';
32
37
  export * from './TripAssignDriverDto';
33
38
  export * from './TripDto';
package/models/index.js CHANGED
@@ -14,11 +14,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./AddPaymentMethodDto"), exports);
17
18
  __exportStar(require("./AdminCreateDto"), exports);
18
19
  __exportStar(require("./AdminDto"), exports);
19
20
  __exportStar(require("./AdminLoginDto"), exports);
20
21
  __exportStar(require("./AdminLoginResponseDto"), exports);
21
22
  __exportStar(require("./AdminUpdateDto"), exports);
23
+ __exportStar(require("./ChargeTripByCardDto"), exports);
24
+ __exportStar(require("./ChargeTripByCashDto"), exports);
25
+ __exportStar(require("./ChargeTripDto"), exports);
22
26
  __exportStar(require("./CustomerDto"), exports);
23
27
  __exportStar(require("./CustomerLocationCreateDto"), exports);
24
28
  __exportStar(require("./CustomerLocationDto"), exports);
@@ -44,6 +48,7 @@ __exportStar(require("./MessageResponseDto"), exports);
44
48
  __exportStar(require("./OrderDto"), exports);
45
49
  __exportStar(require("./PaymentDto"), exports);
46
50
  __exportStar(require("./ResetPasswordDto"), exports);
51
+ __exportStar(require("./SearchCustomerDto"), exports);
47
52
  __exportStar(require("./TokensDto"), exports);
48
53
  __exportStar(require("./TripAssignDriverDto"), exports);
49
54
  __exportStar(require("./TripDto"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dapex-tech/elite-online-services",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "private": false,
@@ -3,6 +3,7 @@ import type { AdminDto } from '../models/AdminDto';
3
3
  import type { AdminUpdateDto } from '../models/AdminUpdateDto';
4
4
  import type { MessageResponseDto } from '../models/MessageResponseDto';
5
5
  import type { OrderDto } from '../models/OrderDto';
6
+ import type { SearchCustomerDto } from '../models/SearchCustomerDto';
6
7
  import type { CancelablePromise } from '../core/CancelablePromise';
7
8
  export declare class AdminService {
8
9
  /**
@@ -20,6 +21,14 @@ export declare class AdminService {
20
21
  * @throws ApiError
21
22
  */
22
23
  static findAll(q?: string, order?: OrderDto): CancelablePromise<Array<AdminDto>>;
24
+ /**
25
+ * Search customers (manual customers + senior vouchers)
26
+ * @param q Text to search for in customers (manual customers + vouchers)
27
+ * @param order Sorting options (combined results are ultimately sorted by createdAt)
28
+ * @returns SearchCustomerDto List of customers (manual customers + senior vouchers)
29
+ * @throws ApiError
30
+ */
31
+ static searchCustomers(q?: string, order?: OrderDto): CancelablePromise<Array<SearchCustomerDto>>;
23
32
  /**
24
33
  * Get a single admin by ID
25
34
  * @param id
@@ -35,6 +35,23 @@ class AdminService {
35
35
  },
36
36
  });
37
37
  }
38
+ /**
39
+ * Search customers (manual customers + senior vouchers)
40
+ * @param q Text to search for in customers (manual customers + vouchers)
41
+ * @param order Sorting options (combined results are ultimately sorted by createdAt)
42
+ * @returns SearchCustomerDto List of customers (manual customers + senior vouchers)
43
+ * @throws ApiError
44
+ */
45
+ static searchCustomers(q, order) {
46
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
47
+ method: 'GET',
48
+ url: '/admins/search-customers',
49
+ query: {
50
+ 'q': q,
51
+ 'order': order,
52
+ },
53
+ });
54
+ }
38
55
  /**
39
56
  * Get a single admin by ID
40
57
  * @param id
@@ -0,0 +1,9 @@
1
+ import type { CancelablePromise } from '../core/CancelablePromise';
2
+ export declare class AdminSettingsService {
3
+ /**
4
+ * Get all settings
5
+ * @returns any List of all system settings
6
+ * @throws ApiError
7
+ */
8
+ static findAll(): CancelablePromise<any>;
9
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminSettingsService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class AdminSettingsService {
7
+ /**
8
+ * Get all settings
9
+ * @returns any List of all system settings
10
+ * @throws ApiError
11
+ */
12
+ static findAll() {
13
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
14
+ method: 'GET',
15
+ url: '/admins/settings',
16
+ });
17
+ }
18
+ }
19
+ exports.AdminSettingsService = AdminSettingsService;
@@ -23,6 +23,15 @@ export declare class AdminTripsService {
23
23
  * @throws ApiError
24
24
  */
25
25
  static create(requestBody: TripDto): CancelablePromise<TripDto>;
26
+ /**
27
+ * Get last 5 trips by phone/email/senior card
28
+ * @param phone Phone number
29
+ * @param email Email address
30
+ * @param seniorCardNumber Senior card number
31
+ * @returns TripDto List of up to 5 trips
32
+ * @throws ApiError
33
+ */
34
+ static findLast5Trips(phone?: string, email?: string, seniorCardNumber?: string): CancelablePromise<Array<TripDto>>;
26
35
  /**
27
36
  * Get a single trip by ID
28
37
  * @param id
@@ -39,6 +39,25 @@ class AdminTripsService {
39
39
  mediaType: 'application/json',
40
40
  });
41
41
  }
42
+ /**
43
+ * Get last 5 trips by phone/email/senior card
44
+ * @param phone Phone number
45
+ * @param email Email address
46
+ * @param seniorCardNumber Senior card number
47
+ * @returns TripDto List of up to 5 trips
48
+ * @throws ApiError
49
+ */
50
+ static findLast5Trips(phone, email, seniorCardNumber) {
51
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
52
+ method: 'GET',
53
+ url: '/admins/trips/last5',
54
+ query: {
55
+ 'phone': phone,
56
+ 'email': email,
57
+ 'seniorCardNumber': seniorCardNumber,
58
+ },
59
+ });
60
+ }
42
61
  /**
43
62
  * Get a single trip by ID
44
63
  * @param id
@@ -0,0 +1,61 @@
1
+ import type { MessageResponseDto } from '../models/MessageResponseDto';
2
+ import type { OrderDto } from '../models/OrderDto';
3
+ import type { VoucherCreateDto } from '../models/VoucherCreateDto';
4
+ import type { VoucherDto } from '../models/VoucherDto';
5
+ import type { VoucherUpdateDto } from '../models/VoucherUpdateDto';
6
+ import type { CancelablePromise } from '../core/CancelablePromise';
7
+ export declare class AdminVouchersService {
8
+ /**
9
+ * Create a new voucher
10
+ * @param requestBody
11
+ * @returns VoucherDto Voucher created successfully.
12
+ * @throws ApiError
13
+ */
14
+ static create(requestBody: VoucherCreateDto): CancelablePromise<VoucherDto>;
15
+ /**
16
+ * Get all vouchers
17
+ * @param q Text to search for in card number, name, senior center, program or status
18
+ * @param order Sorting options
19
+ * @returns VoucherDto List of vouchers
20
+ * @throws ApiError
21
+ */
22
+ static findAll(q?: string, order?: OrderDto): CancelablePromise<Array<VoucherDto>>;
23
+ /**
24
+ * Import vouchers from Excel file
25
+ * @param formData
26
+ * @returns any Parsed Excel data (first sheet as array of rows).
27
+ * @throws ApiError
28
+ */
29
+ static importExcel(formData: {
30
+ file?: Blob;
31
+ }): CancelablePromise<any>;
32
+ /**
33
+ * Get a single voucher by card number
34
+ * @param cardNumber
35
+ * @returns VoucherDto Voucher found
36
+ * @throws ApiError
37
+ */
38
+ static findByCardNumber(cardNumber: string): CancelablePromise<VoucherDto>;
39
+ /**
40
+ * Get a single voucher by ID
41
+ * @param id
42
+ * @returns VoucherDto Voucher found
43
+ * @throws ApiError
44
+ */
45
+ static findById(id: number): CancelablePromise<VoucherDto>;
46
+ /**
47
+ * Update a voucher by ID
48
+ * @param id
49
+ * @param requestBody
50
+ * @returns VoucherDto Voucher updated successfully.
51
+ * @throws ApiError
52
+ */
53
+ static update(id: number, requestBody: VoucherUpdateDto): CancelablePromise<VoucherDto>;
54
+ /**
55
+ * Delete a voucher by ID
56
+ * @param id
57
+ * @returns MessageResponseDto Voucher deleted successfully.
58
+ * @throws ApiError
59
+ */
60
+ static remove(id: number): CancelablePromise<MessageResponseDto>;
61
+ }
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminVouchersService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class AdminVouchersService {
7
+ /**
8
+ * Create a new voucher
9
+ * @param requestBody
10
+ * @returns VoucherDto Voucher 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/vouchers',
17
+ body: requestBody,
18
+ mediaType: 'application/json',
19
+ });
20
+ }
21
+ /**
22
+ * Get all vouchers
23
+ * @param q Text to search for in card number, name, senior center, program or status
24
+ * @param order Sorting options
25
+ * @returns VoucherDto List of vouchers
26
+ * @throws ApiError
27
+ */
28
+ static findAll(q, order) {
29
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
30
+ method: 'GET',
31
+ url: '/admins/vouchers',
32
+ query: {
33
+ 'q': q,
34
+ 'order': order,
35
+ },
36
+ });
37
+ }
38
+ /**
39
+ * Import vouchers from Excel file
40
+ * @param formData
41
+ * @returns any Parsed Excel data (first sheet as array of rows).
42
+ * @throws ApiError
43
+ */
44
+ static importExcel(formData) {
45
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
46
+ method: 'POST',
47
+ url: '/admins/vouchers/import',
48
+ formData: formData,
49
+ mediaType: 'multipart/form-data',
50
+ });
51
+ }
52
+ /**
53
+ * Get a single voucher by card number
54
+ * @param cardNumber
55
+ * @returns VoucherDto Voucher found
56
+ * @throws ApiError
57
+ */
58
+ static findByCardNumber(cardNumber) {
59
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
60
+ method: 'GET',
61
+ url: '/admins/vouchers/card-number/{cardNumber}',
62
+ path: {
63
+ 'cardNumber': cardNumber,
64
+ },
65
+ });
66
+ }
67
+ /**
68
+ * Get a single voucher by ID
69
+ * @param id
70
+ * @returns VoucherDto Voucher found
71
+ * @throws ApiError
72
+ */
73
+ static findById(id) {
74
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
75
+ method: 'GET',
76
+ url: '/admins/vouchers/{id}',
77
+ path: {
78
+ 'id': id,
79
+ },
80
+ });
81
+ }
82
+ /**
83
+ * Update a voucher by ID
84
+ * @param id
85
+ * @param requestBody
86
+ * @returns VoucherDto Voucher updated successfully.
87
+ * @throws ApiError
88
+ */
89
+ static update(id, requestBody) {
90
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
91
+ method: 'PATCH',
92
+ url: '/admins/vouchers/{id}',
93
+ path: {
94
+ 'id': id,
95
+ },
96
+ body: requestBody,
97
+ mediaType: 'application/json',
98
+ });
99
+ }
100
+ /**
101
+ * Delete a voucher by ID
102
+ * @param id
103
+ * @returns MessageResponseDto Voucher deleted successfully.
104
+ * @throws ApiError
105
+ */
106
+ static remove(id) {
107
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
108
+ method: 'DELETE',
109
+ url: '/admins/vouchers/{id}',
110
+ path: {
111
+ 'id': id,
112
+ },
113
+ });
114
+ }
115
+ }
116
+ exports.AdminVouchersService = AdminVouchersService;
@@ -0,0 +1,65 @@
1
+ import type { AddPaymentMethodDto } from '../models/AddPaymentMethodDto';
2
+ import type { ChargeTripByCardDto } from '../models/ChargeTripByCardDto';
3
+ import type { ChargeTripByCashDto } from '../models/ChargeTripByCashDto';
4
+ import type { ChargeTripDto } from '../models/ChargeTripDto';
5
+ import type { MessageResponseDto } from '../models/MessageResponseDto';
6
+ import type { CancelablePromise } from '../core/CancelablePromise';
7
+ export declare class CustomerPaymentsService {
8
+ /**
9
+ * Add a payment method
10
+ * @param requestBody
11
+ * @returns any Payment method added successfully
12
+ * @throws ApiError
13
+ */
14
+ static addPaymentMethod(requestBody: AddPaymentMethodDto): CancelablePromise<any>;
15
+ /**
16
+ * List payment methods
17
+ * @returns any List of payment methods
18
+ * @throws ApiError
19
+ */
20
+ static listPaymentMethods(): CancelablePromise<any>;
21
+ /**
22
+ * Update a payment method
23
+ * @param id
24
+ * @param requestBody
25
+ * @returns any Payment method updated successfully
26
+ * @throws ApiError
27
+ */
28
+ static updatePaymentMethod(id: number, requestBody: AddPaymentMethodDto): CancelablePromise<any>;
29
+ /**
30
+ * Remove payment method
31
+ * @param id
32
+ * @returns any Payment method removed
33
+ * @throws ApiError
34
+ */
35
+ static removePaymentMethod(id: number): CancelablePromise<any>;
36
+ /**
37
+ * Set default payment method
38
+ * @param id
39
+ * @returns any Default payment method updated
40
+ * @throws ApiError
41
+ */
42
+ static setDefaultPaymentMethod(id: number): CancelablePromise<any>;
43
+ /**
44
+ * Charge trip by cash
45
+ * @param requestBody
46
+ * @returns MessageResponseDto Payment recorded successfully
47
+ * @throws ApiError
48
+ */
49
+ static chargeTripByCash(requestBody: ChargeTripByCashDto): CancelablePromise<MessageResponseDto>;
50
+ /**
51
+ * Charge trip by saved payment method
52
+ * Charges the trip using the payment method set on the trip. The trip must have paymentType=DEBIT_CREDIT_CARD and customerPaymentMethodId set.
53
+ * @param requestBody
54
+ * @returns MessageResponseDto Charge successful
55
+ * @throws ApiError
56
+ */
57
+ static chargeTripByPaymentMethod(requestBody: ChargeTripDto): CancelablePromise<MessageResponseDto>;
58
+ /**
59
+ * Charge trip by card data
60
+ * @param requestBody
61
+ * @returns MessageResponseDto Charge successful
62
+ * @throws ApiError
63
+ */
64
+ static chargeTripByCard(requestBody: ChargeTripByCardDto): CancelablePromise<MessageResponseDto>;
65
+ }
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CustomerPaymentsService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class CustomerPaymentsService {
7
+ /**
8
+ * Add a payment method
9
+ * @param requestBody
10
+ * @returns any Payment method added successfully
11
+ * @throws ApiError
12
+ */
13
+ static addPaymentMethod(requestBody) {
14
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
15
+ method: 'POST',
16
+ url: '/customers/payments',
17
+ body: requestBody,
18
+ mediaType: 'application/json',
19
+ errors: {
20
+ 400: `Invalid card data`,
21
+ },
22
+ });
23
+ }
24
+ /**
25
+ * List payment methods
26
+ * @returns any List of payment methods
27
+ * @throws ApiError
28
+ */
29
+ static listPaymentMethods() {
30
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
31
+ method: 'GET',
32
+ url: '/customers/payments',
33
+ });
34
+ }
35
+ /**
36
+ * Update a payment method
37
+ * @param id
38
+ * @param requestBody
39
+ * @returns any Payment method updated successfully
40
+ * @throws ApiError
41
+ */
42
+ static updatePaymentMethod(id, requestBody) {
43
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
44
+ method: 'PATCH',
45
+ url: '/customers/payments/{id}',
46
+ path: {
47
+ 'id': id,
48
+ },
49
+ body: requestBody,
50
+ mediaType: 'application/json',
51
+ errors: {
52
+ 400: `Invalid card data`,
53
+ 404: `Payment method not found`,
54
+ },
55
+ });
56
+ }
57
+ /**
58
+ * Remove payment method
59
+ * @param id
60
+ * @returns any Payment method removed
61
+ * @throws ApiError
62
+ */
63
+ static removePaymentMethod(id) {
64
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
65
+ method: 'DELETE',
66
+ url: '/customers/payments/{id}',
67
+ path: {
68
+ 'id': id,
69
+ },
70
+ errors: {
71
+ 404: `Payment method not found`,
72
+ },
73
+ });
74
+ }
75
+ /**
76
+ * Set default payment method
77
+ * @param id
78
+ * @returns any Default payment method updated
79
+ * @throws ApiError
80
+ */
81
+ static setDefaultPaymentMethod(id) {
82
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
83
+ method: 'PATCH',
84
+ url: '/customers/payments/{id}/default',
85
+ path: {
86
+ 'id': id,
87
+ },
88
+ errors: {
89
+ 404: `Payment method not found`,
90
+ },
91
+ });
92
+ }
93
+ /**
94
+ * Charge trip by cash
95
+ * @param requestBody
96
+ * @returns MessageResponseDto Payment recorded successfully
97
+ * @throws ApiError
98
+ */
99
+ static chargeTripByCash(requestBody) {
100
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
101
+ method: 'POST',
102
+ url: '/customers/payments/charge-trip/cash',
103
+ body: requestBody,
104
+ mediaType: 'application/json',
105
+ errors: {
106
+ 400: `Trip already charged or invalid amount`,
107
+ 404: `Trip not found`,
108
+ },
109
+ });
110
+ }
111
+ /**
112
+ * Charge trip by saved payment method
113
+ * Charges the trip using the payment method set on the trip. The trip must have paymentType=DEBIT_CREDIT_CARD and customerPaymentMethodId set.
114
+ * @param requestBody
115
+ * @returns MessageResponseDto Charge successful
116
+ * @throws ApiError
117
+ */
118
+ static chargeTripByPaymentMethod(requestBody) {
119
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
120
+ method: 'POST',
121
+ url: '/customers/payments/charge-trip/payment-method',
122
+ body: requestBody,
123
+ mediaType: 'application/json',
124
+ errors: {
125
+ 400: `Charge failed, trip already charged, trip has no payment method set, or payment method does not belong to customer`,
126
+ 404: `Trip not found`,
127
+ },
128
+ });
129
+ }
130
+ /**
131
+ * Charge trip by card data
132
+ * @param requestBody
133
+ * @returns MessageResponseDto Charge successful
134
+ * @throws ApiError
135
+ */
136
+ static chargeTripByCard(requestBody) {
137
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
138
+ method: 'POST',
139
+ url: '/customers/payments/charge-trip/card',
140
+ body: requestBody,
141
+ mediaType: 'application/json',
142
+ errors: {
143
+ 400: `Charge failed or trip already charged`,
144
+ 404: `Trip not found`,
145
+ },
146
+ });
147
+ }
148
+ }
149
+ exports.CustomerPaymentsService = CustomerPaymentsService;
@@ -0,0 +1,9 @@
1
+ import type { CancelablePromise } from '../core/CancelablePromise';
2
+ export declare class CustomerSettingsService {
3
+ /**
4
+ * Get all settings
5
+ * @returns any List of all system settings
6
+ * @throws ApiError
7
+ */
8
+ static findAll(): CancelablePromise<any>;
9
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CustomerSettingsService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class CustomerSettingsService {
7
+ /**
8
+ * Get all settings
9
+ * @returns any List of all system settings
10
+ * @throws ApiError
11
+ */
12
+ static findAll() {
13
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
14
+ method: 'GET',
15
+ url: '/customers/settings',
16
+ });
17
+ }
18
+ }
19
+ exports.CustomerSettingsService = CustomerSettingsService;
@@ -0,0 +1,29 @@
1
+ import type { ChargeTripByCardDto } from '../models/ChargeTripByCardDto';
2
+ import type { ChargeTripByCashDto } from '../models/ChargeTripByCashDto';
3
+ import type { ChargeTripDto } from '../models/ChargeTripDto';
4
+ import type { MessageResponseDto } from '../models/MessageResponseDto';
5
+ import type { CancelablePromise } from '../core/CancelablePromise';
6
+ export declare class DriverPaymentsService {
7
+ /**
8
+ * Charge trip by cash
9
+ * @param requestBody
10
+ * @returns MessageResponseDto Payment recorded successfully
11
+ * @throws ApiError
12
+ */
13
+ static chargeTripByCash(requestBody: ChargeTripByCashDto): CancelablePromise<MessageResponseDto>;
14
+ /**
15
+ * Charge trip by saved payment method
16
+ * Charges the trip using the payment method set on the trip. The trip must have paymentType=DEBIT_CREDIT_CARD and customerPaymentMethodId set.
17
+ * @param requestBody
18
+ * @returns MessageResponseDto Charge successful
19
+ * @throws ApiError
20
+ */
21
+ static chargeTripByPaymentMethod(requestBody: ChargeTripDto): CancelablePromise<MessageResponseDto>;
22
+ /**
23
+ * Charge trip by card data
24
+ * @param requestBody
25
+ * @returns MessageResponseDto Charge successful
26
+ * @throws ApiError
27
+ */
28
+ static chargeTripByCard(requestBody: ChargeTripByCardDto): CancelablePromise<MessageResponseDto>;
29
+ }
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DriverPaymentsService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class DriverPaymentsService {
7
+ /**
8
+ * Charge trip by cash
9
+ * @param requestBody
10
+ * @returns MessageResponseDto Payment recorded successfully
11
+ * @throws ApiError
12
+ */
13
+ static chargeTripByCash(requestBody) {
14
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
15
+ method: 'POST',
16
+ url: '/drivers/payments/charge-trip/cash',
17
+ body: requestBody,
18
+ mediaType: 'application/json',
19
+ errors: {
20
+ 400: `Trip already charged or invalid amount`,
21
+ 404: `Trip not found`,
22
+ },
23
+ });
24
+ }
25
+ /**
26
+ * Charge trip by saved payment method
27
+ * Charges the trip using the payment method set on the trip. The trip must have paymentType=DEBIT_CREDIT_CARD and customerPaymentMethodId set.
28
+ * @param requestBody
29
+ * @returns MessageResponseDto Charge successful
30
+ * @throws ApiError
31
+ */
32
+ static chargeTripByPaymentMethod(requestBody) {
33
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
34
+ method: 'POST',
35
+ url: '/drivers/payments/charge-trip/payment-method',
36
+ body: requestBody,
37
+ mediaType: 'application/json',
38
+ errors: {
39
+ 400: `Charge failed, trip already charged, trip has no payment method set, or payment method does not belong to customer`,
40
+ 404: `Trip not found`,
41
+ },
42
+ });
43
+ }
44
+ /**
45
+ * Charge trip by card data
46
+ * @param requestBody
47
+ * @returns MessageResponseDto Charge successful
48
+ * @throws ApiError
49
+ */
50
+ static chargeTripByCard(requestBody) {
51
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
52
+ method: 'POST',
53
+ url: '/drivers/payments/charge-trip/card',
54
+ body: requestBody,
55
+ mediaType: 'application/json',
56
+ errors: {
57
+ 400: `Charge failed or trip already charged`,
58
+ 404: `Trip not found`,
59
+ },
60
+ });
61
+ }
62
+ }
63
+ exports.DriverPaymentsService = DriverPaymentsService;
@@ -0,0 +1,9 @@
1
+ import type { CancelablePromise } from '../core/CancelablePromise';
2
+ export declare class DriverSettingsService {
3
+ /**
4
+ * Get all settings
5
+ * @returns any List of all system settings
6
+ * @throws ApiError
7
+ */
8
+ static findAll(): CancelablePromise<any>;
9
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DriverSettingsService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class DriverSettingsService {
7
+ /**
8
+ * Get all settings
9
+ * @returns any List of all system settings
10
+ * @throws ApiError
11
+ */
12
+ static findAll() {
13
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
14
+ method: 'GET',
15
+ url: '/drivers/settings',
16
+ });
17
+ }
18
+ }
19
+ exports.DriverSettingsService = DriverSettingsService;
@@ -0,0 +1,64 @@
1
+ import type { AddPaymentMethodDto } from '../models/AddPaymentMethodDto';
2
+ import type { ChargeTripByCardDto } from '../models/ChargeTripByCardDto';
3
+ import type { ChargeTripByCashDto } from '../models/ChargeTripByCashDto';
4
+ import type { ChargeTripDto } from '../models/ChargeTripDto';
5
+ import type { CancelablePromise } from '../core/CancelablePromise';
6
+ export declare class PaymentsService {
7
+ /**
8
+ * Add a payment method
9
+ * @param requestBody
10
+ * @returns any Payment method added successfully
11
+ * @throws ApiError
12
+ */
13
+ static addPaymentMethod(requestBody: AddPaymentMethodDto): CancelablePromise<any>;
14
+ /**
15
+ * List payment methods
16
+ * @returns any List of payment methods
17
+ * @throws ApiError
18
+ */
19
+ static listPaymentMethods(): CancelablePromise<any>;
20
+ /**
21
+ * Update a payment method
22
+ * @param id
23
+ * @param requestBody
24
+ * @returns any Payment method updated successfully
25
+ * @throws ApiError
26
+ */
27
+ static updatePaymentMethod(id: number, requestBody: AddPaymentMethodDto): CancelablePromise<any>;
28
+ /**
29
+ * Remove payment method
30
+ * @param id
31
+ * @returns any Payment method removed
32
+ * @throws ApiError
33
+ */
34
+ static removePaymentMethod(id: number): CancelablePromise<any>;
35
+ /**
36
+ * Set default payment method
37
+ * @param id
38
+ * @returns any Default payment method updated
39
+ * @throws ApiError
40
+ */
41
+ static setDefaultPaymentMethod(id: number): CancelablePromise<any>;
42
+ /**
43
+ * Charge trip by cash
44
+ * @param requestBody
45
+ * @returns any Payment recorded successfully
46
+ * @throws ApiError
47
+ */
48
+ static chargeTripByCash(requestBody: ChargeTripByCashDto): CancelablePromise<any>;
49
+ /**
50
+ * Charge trip by saved payment method
51
+ * Charges the trip using the payment method set on the trip. The trip must have paymentType=DEBIT_CREDIT_CARD and customerPaymentMethodId set.
52
+ * @param requestBody
53
+ * @returns any Charge successful
54
+ * @throws ApiError
55
+ */
56
+ static chargeTripByPaymentMethod(requestBody: ChargeTripDto): CancelablePromise<any>;
57
+ /**
58
+ * Charge trip by card data
59
+ * @param requestBody
60
+ * @returns any Charge successful
61
+ * @throws ApiError
62
+ */
63
+ static chargeTripByCard(requestBody: ChargeTripByCardDto): CancelablePromise<any>;
64
+ }
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PaymentsService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class PaymentsService {
7
+ /**
8
+ * Add a payment method
9
+ * @param requestBody
10
+ * @returns any Payment method added successfully
11
+ * @throws ApiError
12
+ */
13
+ static addPaymentMethod(requestBody) {
14
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
15
+ method: 'POST',
16
+ url: '/payments/methods',
17
+ body: requestBody,
18
+ mediaType: 'application/json',
19
+ errors: {
20
+ 400: `Invalid card data`,
21
+ },
22
+ });
23
+ }
24
+ /**
25
+ * List payment methods
26
+ * @returns any List of payment methods
27
+ * @throws ApiError
28
+ */
29
+ static listPaymentMethods() {
30
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
31
+ method: 'GET',
32
+ url: '/payments/methods',
33
+ });
34
+ }
35
+ /**
36
+ * Update a payment method
37
+ * @param id
38
+ * @param requestBody
39
+ * @returns any Payment method updated successfully
40
+ * @throws ApiError
41
+ */
42
+ static updatePaymentMethod(id, requestBody) {
43
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
44
+ method: 'PATCH',
45
+ url: '/payments/methods/{id}',
46
+ path: {
47
+ 'id': id,
48
+ },
49
+ body: requestBody,
50
+ mediaType: 'application/json',
51
+ errors: {
52
+ 400: `Invalid card data`,
53
+ 404: `Payment method not found`,
54
+ },
55
+ });
56
+ }
57
+ /**
58
+ * Remove payment method
59
+ * @param id
60
+ * @returns any Payment method removed
61
+ * @throws ApiError
62
+ */
63
+ static removePaymentMethod(id) {
64
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
65
+ method: 'DELETE',
66
+ url: '/payments/methods/{id}',
67
+ path: {
68
+ 'id': id,
69
+ },
70
+ errors: {
71
+ 404: `Payment method not found`,
72
+ },
73
+ });
74
+ }
75
+ /**
76
+ * Set default payment method
77
+ * @param id
78
+ * @returns any Default payment method updated
79
+ * @throws ApiError
80
+ */
81
+ static setDefaultPaymentMethod(id) {
82
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
83
+ method: 'PATCH',
84
+ url: '/payments/methods/{id}/default',
85
+ path: {
86
+ 'id': id,
87
+ },
88
+ errors: {
89
+ 404: `Payment method not found`,
90
+ },
91
+ });
92
+ }
93
+ /**
94
+ * Charge trip by cash
95
+ * @param requestBody
96
+ * @returns any Payment recorded successfully
97
+ * @throws ApiError
98
+ */
99
+ static chargeTripByCash(requestBody) {
100
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
101
+ method: 'POST',
102
+ url: '/payments/trips/charge/cash',
103
+ body: requestBody,
104
+ mediaType: 'application/json',
105
+ errors: {
106
+ 400: `Trip already charged or invalid amount`,
107
+ 404: `Trip not found`,
108
+ },
109
+ });
110
+ }
111
+ /**
112
+ * Charge trip by saved payment method
113
+ * Charges the trip using the payment method set on the trip. The trip must have paymentType=DEBIT_CREDIT_CARD and customerPaymentMethodId set.
114
+ * @param requestBody
115
+ * @returns any Charge successful
116
+ * @throws ApiError
117
+ */
118
+ static chargeTripByPaymentMethod(requestBody) {
119
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
120
+ method: 'POST',
121
+ url: '/payments/trips/charge/payment-method',
122
+ body: requestBody,
123
+ mediaType: 'application/json',
124
+ errors: {
125
+ 400: `Charge failed, trip already charged, trip has no payment method set, or payment method does not belong to customer`,
126
+ 404: `Trip not found`,
127
+ },
128
+ });
129
+ }
130
+ /**
131
+ * Charge trip by card data
132
+ * @param requestBody
133
+ * @returns any Charge successful
134
+ * @throws ApiError
135
+ */
136
+ static chargeTripByCard(requestBody) {
137
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
138
+ method: 'POST',
139
+ url: '/payments/trips/charge/card',
140
+ body: requestBody,
141
+ mediaType: 'application/json',
142
+ errors: {
143
+ 400: `Charge failed or trip already charged`,
144
+ 404: `Trip not found`,
145
+ },
146
+ });
147
+ }
148
+ }
149
+ exports.PaymentsService = PaymentsService;
@@ -2,15 +2,22 @@ export * from './AdminAuthService';
2
2
  export * from './AdminCustomerService';
3
3
  export * from './AdminDriversService';
4
4
  export * from './AdminService';
5
+ export * from './AdminSettingsService';
5
6
  export * from './AdminTripsService';
7
+ export * from './AdminVouchersService';
6
8
  export * from './CustomerLocationsService';
9
+ export * from './CustomerPaymentsService';
10
+ export * from './CustomerSettingsService';
7
11
  export * from './CustomerTripsService';
8
12
  export * from './CustomersAuthService';
9
13
  export * from './CustomersService';
10
14
  export * from './DriverAuthService';
15
+ export * from './DriverPaymentsService';
16
+ export * from './DriverSettingsService';
11
17
  export * from './DriverTripsService';
12
18
  export * from './DriversService';
13
19
  export * from './HealthService';
14
20
  export * from './MainService';
15
21
  export * from './ManualCustomerService';
22
+ export * from './PaymentsService';
16
23
  export * from './VoucherService';
package/services/index.js CHANGED
@@ -18,15 +18,22 @@ __exportStar(require("./AdminAuthService"), exports);
18
18
  __exportStar(require("./AdminCustomerService"), exports);
19
19
  __exportStar(require("./AdminDriversService"), exports);
20
20
  __exportStar(require("./AdminService"), exports);
21
+ __exportStar(require("./AdminSettingsService"), exports);
21
22
  __exportStar(require("./AdminTripsService"), exports);
23
+ __exportStar(require("./AdminVouchersService"), exports);
22
24
  __exportStar(require("./CustomerLocationsService"), exports);
25
+ __exportStar(require("./CustomerPaymentsService"), exports);
26
+ __exportStar(require("./CustomerSettingsService"), exports);
23
27
  __exportStar(require("./CustomerTripsService"), exports);
24
28
  __exportStar(require("./CustomersAuthService"), exports);
25
29
  __exportStar(require("./CustomersService"), exports);
26
30
  __exportStar(require("./DriverAuthService"), exports);
31
+ __exportStar(require("./DriverPaymentsService"), exports);
32
+ __exportStar(require("./DriverSettingsService"), exports);
27
33
  __exportStar(require("./DriverTripsService"), exports);
28
34
  __exportStar(require("./DriversService"), exports);
29
35
  __exportStar(require("./HealthService"), exports);
30
36
  __exportStar(require("./MainService"), exports);
31
37
  __exportStar(require("./ManualCustomerService"), exports);
38
+ __exportStar(require("./PaymentsService"), exports);
32
39
  __exportStar(require("./VoucherService"), exports);
@@ -23,4 +23,6 @@ export interface ActiveTrip {
23
23
  deltaWaitingCost?: number;
24
24
  deltaTrafficDelayCost?: number;
25
25
  deltaTotalCost?: number;
26
+ distanceToPickupMeters?: number;
27
+ etaToPickupTimestamp?: number;
26
28
  }
@@ -4,6 +4,6 @@ export interface DriverStatus {
4
4
  lng?: number;
5
5
  heartbeat?: string;
6
6
  isOnline?: boolean;
7
- waitingTripIds: number[] | undefined;
7
+ waitingTripIds?: number[];
8
8
  activeTripId?: number;
9
9
  }