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

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 (97) hide show
  1. package/createClient.d.ts +10 -0
  2. package/models/AddDriverCreditsByCardDto.d.ts +11 -0
  3. package/models/AddDriverCreditsByCardDto.js +2 -0
  4. package/models/AddDriverCreditsByCashDto.d.ts +6 -0
  5. package/models/AddDriverCreditsByCashDto.js +2 -0
  6. package/models/AddPaymentMethodDto.d.ts +46 -0
  7. package/models/AddPaymentMethodDto.js +2 -0
  8. package/models/AdminSearchCustomersResponseDto.d.ts +8 -0
  9. package/models/AdminSearchCustomersResponseDto.js +2 -0
  10. package/models/CardDataDto.d.ts +42 -0
  11. package/models/CardDataDto.js +2 -0
  12. package/models/ChargeTripByCardDto.d.ts +50 -0
  13. package/models/ChargeTripByCardDto.js +2 -0
  14. package/models/ChargeTripByCardResponseDto.d.ts +26 -0
  15. package/models/ChargeTripByCardResponseDto.js +2 -0
  16. package/models/ChargeTripByCashDto.d.ts +10 -0
  17. package/models/ChargeTripByCashDto.js +2 -0
  18. package/models/ChargeTripByCashResponseDto.d.ts +6 -0
  19. package/models/ChargeTripByCashResponseDto.js +2 -0
  20. package/models/ChargeTripByVoucherDto.d.ts +14 -0
  21. package/models/ChargeTripByVoucherDto.js +2 -0
  22. package/models/ChargeTripDto.d.ts +10 -0
  23. package/models/ChargeTripDto.js +2 -0
  24. package/models/CustomerLocationCreateDto.d.ts +19 -0
  25. package/models/CustomerLocationCreateDto.js +18 -0
  26. package/models/CustomerLocationDto.d.ts +19 -0
  27. package/models/CustomerLocationDto.js +18 -0
  28. package/models/CustomerLocationUpdateDto.d.ts +19 -0
  29. package/models/CustomerLocationUpdateDto.js +18 -0
  30. package/models/DriverCreditsResponseDto.d.ts +18 -0
  31. package/models/DriverCreditsResponseDto.js +2 -0
  32. package/models/DriverDto.d.ts +4 -0
  33. package/models/DriverLoginResponseDto.d.ts +4 -0
  34. package/models/DriverPaymentMethodResponseDto.d.ts +38 -0
  35. package/models/DriverPaymentMethodResponseDto.js +2 -0
  36. package/models/InquireVoucherBalanceDto.d.ts +6 -0
  37. package/models/InquireVoucherBalanceDto.js +2 -0
  38. package/models/InquireVoucherBalanceResponseDto.d.ts +42 -0
  39. package/models/InquireVoucherBalanceResponseDto.js +2 -0
  40. package/models/PaymentDto.d.ts +8 -4
  41. package/models/PaymentMethodResponseDto.d.ts +38 -0
  42. package/models/PaymentMethodResponseDto.js +2 -0
  43. package/models/PurchaseDriverCreditsDto.d.ts +10 -0
  44. package/models/PurchaseDriverCreditsDto.js +2 -0
  45. package/models/SectionContentCreateDto.d.ts +27 -0
  46. package/models/SectionContentCreateDto.js +14 -0
  47. package/models/SectionContentDto.d.ts +35 -0
  48. package/models/SectionContentDto.js +14 -0
  49. package/models/SectionContentUpdateDto.d.ts +27 -0
  50. package/models/SectionContentUpdateDto.js +14 -0
  51. package/models/SeniorCenterDto.d.ts +30 -0
  52. package/models/SeniorCenterDto.js +2 -0
  53. package/models/TripDto.d.ts +75 -4
  54. package/models/TripDto.js +38 -0
  55. package/models/TripStatuses.d.ts +1 -0
  56. package/models/TripStatuses.js +1 -0
  57. package/models/TripUpdateDto.d.ts +22 -0
  58. package/models/TripUpdateDto.js +13 -0
  59. package/models/TripUpdateTripsStatusDto.d.ts +1 -0
  60. package/models/TripUpdateTripsStatusDto.js +1 -0
  61. package/models/VoucherDriverCreateDto.d.ts +54 -0
  62. package/models/VoucherDriverCreateDto.js +2 -0
  63. package/models/index.d.ts +22 -0
  64. package/models/index.js +22 -0
  65. package/package.json +1 -1
  66. package/services/AdminDriversService.d.ts +3 -1
  67. package/services/AdminDriversService.js +4 -1
  68. package/services/AdminPaymentsService.d.ts +22 -0
  69. package/services/AdminPaymentsService.js +52 -0
  70. package/services/AdminSectionContentService.d.ts +46 -0
  71. package/services/AdminSectionContentService.js +89 -0
  72. package/services/AdminService.d.ts +16 -0
  73. package/services/AdminService.js +28 -0
  74. package/services/AdminSettingsService.d.ts +9 -0
  75. package/services/AdminSettingsService.js +19 -0
  76. package/services/AdminTripsService.d.ts +9 -0
  77. package/services/AdminTripsService.js +19 -0
  78. package/services/AdminVouchersService.d.ts +61 -0
  79. package/services/AdminVouchersService.js +116 -0
  80. package/services/CustomerPaymentsService.d.ts +66 -0
  81. package/services/CustomerPaymentsService.js +149 -0
  82. package/services/CustomerSectionContentsService.d.ts +17 -0
  83. package/services/CustomerSectionContentsService.js +34 -0
  84. package/services/CustomerSettingsService.d.ts +9 -0
  85. package/services/CustomerSettingsService.js +19 -0
  86. package/services/DriverPaymentsService.d.ts +85 -0
  87. package/services/DriverPaymentsService.js +181 -0
  88. package/services/DriverSettingsService.d.ts +9 -0
  89. package/services/DriverSettingsService.js +19 -0
  90. package/services/DriverTripsService.d.ts +10 -0
  91. package/services/DriverTripsService.js +18 -0
  92. package/services/PaymentsService.d.ts +67 -0
  93. package/services/PaymentsService.js +149 -0
  94. package/services/index.d.ts +10 -0
  95. package/services/index.js +10 -0
  96. package/types/realtime/active-trip.d.ts +2 -0
  97. package/types/realtime/driver-status.d.ts +3 -3
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.18",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "private": false,
@@ -1,4 +1,5 @@
1
1
  import type { DriverCreateDto } from '../models/DriverCreateDto';
2
+ import type { DriverUpdateDto } from '../models/DriverUpdateDto';
2
3
  import type { OrderDto } from '../models/OrderDto';
3
4
  import type { CancelablePromise } from '../core/CancelablePromise';
4
5
  export declare class AdminDriversService {
@@ -37,10 +38,11 @@ export declare class AdminDriversService {
37
38
  /**
38
39
  * Update a driver by ID
39
40
  * @param id
41
+ * @param requestBody
40
42
  * @returns any Driver updated successfully.
41
43
  * @throws ApiError
42
44
  */
43
- static update(id: number): CancelablePromise<any>;
45
+ static update(id: number, requestBody: DriverUpdateDto): CancelablePromise<any>;
44
46
  /**
45
47
  * Delete a driver by ID
46
48
  * @param id
@@ -73,16 +73,19 @@ class AdminDriversService {
73
73
  /**
74
74
  * Update a driver by ID
75
75
  * @param id
76
+ * @param requestBody
76
77
  * @returns any Driver updated successfully.
77
78
  * @throws ApiError
78
79
  */
79
- static update(id) {
80
+ static update(id, requestBody) {
80
81
  return (0, request_1.request)(OpenAPI_1.OpenAPI, {
81
82
  method: 'PATCH',
82
83
  url: '/admins/drivers/{id}',
83
84
  path: {
84
85
  'id': id,
85
86
  },
87
+ body: requestBody,
88
+ mediaType: 'application/json',
86
89
  });
87
90
  }
88
91
  /**
@@ -0,0 +1,22 @@
1
+ import type { AddDriverCreditsByCardDto } from '../models/AddDriverCreditsByCardDto';
2
+ import type { AddDriverCreditsByCashDto } from '../models/AddDriverCreditsByCashDto';
3
+ import type { DriverCreditsResponseDto } from '../models/DriverCreditsResponseDto';
4
+ import type { CancelablePromise } from '../core/CancelablePromise';
5
+ export declare class AdminPaymentsService {
6
+ /**
7
+ * Add credits to a driver (cash)
8
+ * @param driverId
9
+ * @param requestBody
10
+ * @returns DriverCreditsResponseDto Credits added successfully
11
+ * @throws ApiError
12
+ */
13
+ static addCreditsByCash(driverId: number, requestBody: AddDriverCreditsByCashDto): CancelablePromise<DriverCreditsResponseDto>;
14
+ /**
15
+ * Add credits to a driver (card)
16
+ * @param driverId
17
+ * @param requestBody
18
+ * @returns DriverCreditsResponseDto Credits added successfully
19
+ * @throws ApiError
20
+ */
21
+ static addCreditsByCard(driverId: number, requestBody: AddDriverCreditsByCardDto): CancelablePromise<DriverCreditsResponseDto>;
22
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminPaymentsService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class AdminPaymentsService {
7
+ /**
8
+ * Add credits to a driver (cash)
9
+ * @param driverId
10
+ * @param requestBody
11
+ * @returns DriverCreditsResponseDto Credits added successfully
12
+ * @throws ApiError
13
+ */
14
+ static addCreditsByCash(driverId, requestBody) {
15
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
16
+ method: 'POST',
17
+ url: '/admins/drivers/{driverId}/credits/cash',
18
+ path: {
19
+ 'driverId': driverId,
20
+ },
21
+ body: requestBody,
22
+ mediaType: 'application/json',
23
+ errors: {
24
+ 400: `Invalid request`,
25
+ 404: `Driver not found`,
26
+ },
27
+ });
28
+ }
29
+ /**
30
+ * Add credits to a driver (card)
31
+ * @param driverId
32
+ * @param requestBody
33
+ * @returns DriverCreditsResponseDto Credits added successfully
34
+ * @throws ApiError
35
+ */
36
+ static addCreditsByCard(driverId, requestBody) {
37
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
38
+ method: 'POST',
39
+ url: '/admins/drivers/{driverId}/credits/card',
40
+ path: {
41
+ 'driverId': driverId,
42
+ },
43
+ body: requestBody,
44
+ mediaType: 'application/json',
45
+ errors: {
46
+ 400: `Invalid request or charge failed`,
47
+ 404: `Driver not found`,
48
+ },
49
+ });
50
+ }
51
+ }
52
+ exports.AdminPaymentsService = AdminPaymentsService;
@@ -0,0 +1,46 @@
1
+ import type { MessageResponseDto } from '../models/MessageResponseDto';
2
+ import type { OrderDto } from '../models/OrderDto';
3
+ import type { SectionContentCreateDto } from '../models/SectionContentCreateDto';
4
+ import type { SectionContentDto } from '../models/SectionContentDto';
5
+ import type { SectionContentUpdateDto } from '../models/SectionContentUpdateDto';
6
+ import type { CancelablePromise } from '../core/CancelablePromise';
7
+ export declare class AdminSectionContentService {
8
+ /**
9
+ * Create a new section content
10
+ * @param requestBody
11
+ * @returns SectionContentDto Section content created successfully.
12
+ * @throws ApiError
13
+ */
14
+ static create(requestBody: SectionContentCreateDto): CancelablePromise<SectionContentDto>;
15
+ /**
16
+ * Get all section contents
17
+ * @param q Text to search for in section name or content
18
+ * @param type Filter by section content type
19
+ * @param order Sorting options
20
+ * @returns SectionContentDto List of section contents
21
+ * @throws ApiError
22
+ */
23
+ static findAll(q?: string, type?: 'legal' | 'help', order?: OrderDto): CancelablePromise<Array<SectionContentDto>>;
24
+ /**
25
+ * Get a single section content by ID
26
+ * @param id
27
+ * @returns SectionContentDto Section content found
28
+ * @throws ApiError
29
+ */
30
+ static findById(id: number): CancelablePromise<SectionContentDto>;
31
+ /**
32
+ * Update a section content by ID
33
+ * @param id
34
+ * @param requestBody
35
+ * @returns SectionContentDto Section content updated successfully.
36
+ * @throws ApiError
37
+ */
38
+ static update(id: number, requestBody: SectionContentUpdateDto): CancelablePromise<SectionContentDto>;
39
+ /**
40
+ * Delete a section content by ID
41
+ * @param id
42
+ * @returns MessageResponseDto Section content 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.AdminSectionContentService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class AdminSectionContentService {
7
+ /**
8
+ * Create a new section content
9
+ * @param requestBody
10
+ * @returns SectionContentDto Section content 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/section-contents',
17
+ body: requestBody,
18
+ mediaType: 'application/json',
19
+ });
20
+ }
21
+ /**
22
+ * Get all section contents
23
+ * @param q Text to search for in section name or content
24
+ * @param type Filter by section content type
25
+ * @param order Sorting options
26
+ * @returns SectionContentDto List of section contents
27
+ * @throws ApiError
28
+ */
29
+ static findAll(q, type, order) {
30
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
31
+ method: 'GET',
32
+ url: '/admins/section-contents',
33
+ query: {
34
+ 'q': q,
35
+ 'type': type,
36
+ 'order': order,
37
+ },
38
+ });
39
+ }
40
+ /**
41
+ * Get a single section content by ID
42
+ * @param id
43
+ * @returns SectionContentDto Section content found
44
+ * @throws ApiError
45
+ */
46
+ static findById(id) {
47
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
48
+ method: 'GET',
49
+ url: '/admins/section-contents/{id}',
50
+ path: {
51
+ 'id': id,
52
+ },
53
+ });
54
+ }
55
+ /**
56
+ * Update a section content by ID
57
+ * @param id
58
+ * @param requestBody
59
+ * @returns SectionContentDto Section content 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/section-contents/{id}',
66
+ path: {
67
+ 'id': id,
68
+ },
69
+ body: requestBody,
70
+ mediaType: 'application/json',
71
+ });
72
+ }
73
+ /**
74
+ * Delete a section content by ID
75
+ * @param id
76
+ * @returns MessageResponseDto Section content 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/section-contents/{id}',
83
+ path: {
84
+ 'id': id,
85
+ },
86
+ });
87
+ }
88
+ }
89
+ exports.AdminSectionContentService = AdminSectionContentService;
@@ -1,10 +1,18 @@
1
1
  import type { AdminCreateDto } from '../models/AdminCreateDto';
2
2
  import type { AdminDto } from '../models/AdminDto';
3
+ import type { AdminSearchCustomersResponseDto } from '../models/AdminSearchCustomersResponseDto';
3
4
  import type { AdminUpdateDto } from '../models/AdminUpdateDto';
4
5
  import type { MessageResponseDto } from '../models/MessageResponseDto';
5
6
  import type { OrderDto } from '../models/OrderDto';
7
+ import type { SeniorCenterDto } from '../models/SeniorCenterDto';
6
8
  import type { CancelablePromise } from '../core/CancelablePromise';
7
9
  export declare class AdminService {
10
+ /**
11
+ * Get all senior centers
12
+ * @returns SeniorCenterDto List of senior centers
13
+ * @throws ApiError
14
+ */
15
+ static findAllSeniorCenters(): CancelablePromise<Array<SeniorCenterDto>>;
8
16
  /**
9
17
  * Create a new admin
10
18
  * @param requestBody
@@ -20,6 +28,14 @@ export declare class AdminService {
20
28
  * @throws ApiError
21
29
  */
22
30
  static findAll(q?: string, order?: OrderDto): CancelablePromise<Array<AdminDto>>;
31
+ /**
32
+ * Search customers (registered customers + manual customers + senior vouchers)
33
+ * @param q Text to search for in customers (registered customers + manual customers + vouchers)
34
+ * @param order Sorting options (combined results are ultimately sorted by createdAt)
35
+ * @returns AdminSearchCustomersResponseDto Customers grouped by type: registered customers, manual customers, and senior vouchers
36
+ * @throws ApiError
37
+ */
38
+ static searchCustomers(q?: string, order?: OrderDto): CancelablePromise<AdminSearchCustomersResponseDto>;
23
39
  /**
24
40
  * Get a single admin by ID
25
41
  * @param id
@@ -4,6 +4,17 @@ exports.AdminService = void 0;
4
4
  const OpenAPI_1 = require("../core/OpenAPI");
5
5
  const request_1 = require("../core/request");
6
6
  class AdminService {
7
+ /**
8
+ * Get all senior centers
9
+ * @returns SeniorCenterDto List of senior centers
10
+ * @throws ApiError
11
+ */
12
+ static findAllSeniorCenters() {
13
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
14
+ method: 'GET',
15
+ url: '/admins/senior-centers',
16
+ });
17
+ }
7
18
  /**
8
19
  * Create a new admin
9
20
  * @param requestBody
@@ -35,6 +46,23 @@ class AdminService {
35
46
  },
36
47
  });
37
48
  }
49
+ /**
50
+ * Search customers (registered customers + manual customers + senior vouchers)
51
+ * @param q Text to search for in customers (registered customers + manual customers + vouchers)
52
+ * @param order Sorting options (combined results are ultimately sorted by createdAt)
53
+ * @returns AdminSearchCustomersResponseDto Customers grouped by type: registered customers, manual customers, and senior vouchers
54
+ * @throws ApiError
55
+ */
56
+ static searchCustomers(q, order) {
57
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
58
+ method: 'GET',
59
+ url: '/admins/search-customers',
60
+ query: {
61
+ 'q': q,
62
+ 'order': order,
63
+ },
64
+ });
65
+ }
38
66
  /**
39
67
  * Get a single admin by ID
40
68
  * @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,66 @@
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 { PaymentMethodResponseDto } from '../models/PaymentMethodResponseDto';
7
+ import type { CancelablePromise } from '../core/CancelablePromise';
8
+ export declare class CustomerPaymentsService {
9
+ /**
10
+ * Add a payment method
11
+ * @param requestBody
12
+ * @returns PaymentMethodResponseDto Payment method added successfully
13
+ * @throws ApiError
14
+ */
15
+ static addPaymentMethod(requestBody: AddPaymentMethodDto): CancelablePromise<PaymentMethodResponseDto>;
16
+ /**
17
+ * List payment methods
18
+ * @returns PaymentMethodResponseDto List of payment methods
19
+ * @throws ApiError
20
+ */
21
+ static listPaymentMethods(): CancelablePromise<Array<PaymentMethodResponseDto>>;
22
+ /**
23
+ * Update a payment method
24
+ * @param id
25
+ * @param requestBody
26
+ * @returns PaymentMethodResponseDto Payment method updated successfully
27
+ * @throws ApiError
28
+ */
29
+ static updatePaymentMethod(id: number, requestBody: AddPaymentMethodDto): CancelablePromise<PaymentMethodResponseDto>;
30
+ /**
31
+ * Remove payment method
32
+ * @param id
33
+ * @returns PaymentMethodResponseDto Payment method removed
34
+ * @throws ApiError
35
+ */
36
+ static removePaymentMethod(id: number): CancelablePromise<PaymentMethodResponseDto>;
37
+ /**
38
+ * Set default payment method
39
+ * @param id
40
+ * @returns PaymentMethodResponseDto Default payment method updated
41
+ * @throws ApiError
42
+ */
43
+ static setDefaultPaymentMethod(id: number): CancelablePromise<PaymentMethodResponseDto>;
44
+ /**
45
+ * Charge trip by cash
46
+ * @param requestBody
47
+ * @returns MessageResponseDto Payment recorded successfully
48
+ * @throws ApiError
49
+ */
50
+ static chargeTripByCash(requestBody: ChargeTripByCashDto): CancelablePromise<MessageResponseDto>;
51
+ /**
52
+ * Charge trip by saved payment method
53
+ * Charges the trip using the payment method set on the trip. The trip must have paymentType=DEBIT_CREDIT_CARD and customerPaymentMethodId set.
54
+ * @param requestBody
55
+ * @returns MessageResponseDto Charge successful
56
+ * @throws ApiError
57
+ */
58
+ static chargeTripByPaymentMethod(requestBody: ChargeTripDto): CancelablePromise<MessageResponseDto>;
59
+ /**
60
+ * Charge trip by card data
61
+ * @param requestBody
62
+ * @returns MessageResponseDto Charge successful
63
+ * @throws ApiError
64
+ */
65
+ static chargeTripByCard(requestBody: ChargeTripByCardDto): CancelablePromise<MessageResponseDto>;
66
+ }