@dapex-tech/elite-online-services 0.0.17 → 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.
- package/createClient.d.ts +3 -0
- package/models/AddDriverCreditsByCardDto.d.ts +11 -0
- package/models/AddDriverCreditsByCardDto.js +2 -0
- package/models/AddDriverCreditsByCashDto.d.ts +6 -0
- package/models/AddDriverCreditsByCashDto.js +2 -0
- package/models/AddPaymentMethodDto.d.ts +29 -1
- package/models/AdminSearchCustomersResponseDto.d.ts +8 -0
- package/models/AdminSearchCustomersResponseDto.js +2 -0
- package/models/CardDataDto.d.ts +42 -0
- package/models/CardDataDto.js +2 -0
- package/models/ChargeTripByCardDto.d.ts +28 -0
- package/models/ChargeTripByCardResponseDto.d.ts +26 -0
- package/models/ChargeTripByCardResponseDto.js +2 -0
- package/models/ChargeTripByCashResponseDto.d.ts +6 -0
- package/models/ChargeTripByCashResponseDto.js +2 -0
- package/models/ChargeTripByVoucherDto.d.ts +14 -0
- package/models/ChargeTripByVoucherDto.js +2 -0
- package/models/CustomerLocationCreateDto.d.ts +19 -0
- package/models/CustomerLocationCreateDto.js +18 -0
- package/models/CustomerLocationDto.d.ts +19 -0
- package/models/CustomerLocationDto.js +18 -0
- package/models/CustomerLocationUpdateDto.d.ts +19 -0
- package/models/CustomerLocationUpdateDto.js +18 -0
- package/models/DriverCreditsResponseDto.d.ts +18 -0
- package/models/DriverCreditsResponseDto.js +2 -0
- package/models/DriverDto.d.ts +4 -0
- package/models/DriverLoginResponseDto.d.ts +4 -0
- package/models/DriverPaymentMethodResponseDto.d.ts +38 -0
- package/models/DriverPaymentMethodResponseDto.js +2 -0
- package/models/InquireVoucherBalanceDto.d.ts +6 -0
- package/models/InquireVoucherBalanceDto.js +2 -0
- package/models/InquireVoucherBalanceResponseDto.d.ts +42 -0
- package/models/InquireVoucherBalanceResponseDto.js +2 -0
- package/models/PaymentMethodResponseDto.d.ts +38 -0
- package/models/PaymentMethodResponseDto.js +2 -0
- package/models/PurchaseDriverCreditsDto.d.ts +10 -0
- package/models/PurchaseDriverCreditsDto.js +2 -0
- package/models/SectionContentCreateDto.d.ts +27 -0
- package/models/SectionContentCreateDto.js +14 -0
- package/models/SectionContentDto.d.ts +35 -0
- package/models/SectionContentDto.js +14 -0
- package/models/SectionContentUpdateDto.d.ts +27 -0
- package/models/SectionContentUpdateDto.js +14 -0
- package/models/SeniorCenterDto.d.ts +30 -0
- package/models/SeniorCenterDto.js +2 -0
- package/models/TripDto.d.ts +60 -4
- package/models/TripDto.js +30 -0
- package/models/TripStatuses.d.ts +1 -0
- package/models/TripStatuses.js +1 -0
- package/models/TripUpdateDto.d.ts +6 -1
- package/models/TripUpdateDto.js +1 -0
- package/models/TripUpdateTripsStatusDto.d.ts +1 -0
- package/models/TripUpdateTripsStatusDto.js +1 -0
- package/models/VoucherDriverCreateDto.d.ts +54 -0
- package/models/VoucherDriverCreateDto.js +2 -0
- package/models/index.d.ts +18 -1
- package/models/index.js +18 -1
- package/package.json +1 -1
- package/services/AdminDriversService.d.ts +3 -1
- package/services/AdminDriversService.js +4 -1
- package/services/AdminPaymentsService.d.ts +22 -0
- package/services/AdminPaymentsService.js +52 -0
- package/services/AdminSectionContentService.d.ts +46 -0
- package/services/AdminSectionContentService.js +89 -0
- package/services/AdminService.d.ts +12 -5
- package/services/AdminService.js +14 -3
- package/services/CustomerPaymentsService.d.ts +11 -10
- package/services/CustomerPaymentsService.js +5 -5
- package/services/CustomerSectionContentsService.d.ts +17 -0
- package/services/CustomerSectionContentsService.js +34 -0
- package/services/DriverPaymentsService.d.ts +56 -0
- package/services/DriverPaymentsService.js +118 -0
- package/services/DriverTripsService.d.ts +10 -0
- package/services/DriverTripsService.js +18 -0
- package/services/PaymentsService.d.ts +19 -16
- package/services/PaymentsService.js +8 -8
- package/services/index.d.ts +3 -0
- package/services/index.js +3 -0
- package/types/realtime/driver-status.d.ts +2 -2
- package/models/SearchCustomerDto.d.ts +0 -41
- package/models/SearchCustomerDto.js +0 -11
|
@@ -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,11 +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';
|
|
6
|
-
import type {
|
|
7
|
+
import type { SeniorCenterDto } from '../models/SeniorCenterDto';
|
|
7
8
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
8
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>>;
|
|
9
16
|
/**
|
|
10
17
|
* Create a new admin
|
|
11
18
|
* @param requestBody
|
|
@@ -22,13 +29,13 @@ export declare class AdminService {
|
|
|
22
29
|
*/
|
|
23
30
|
static findAll(q?: string, order?: OrderDto): CancelablePromise<Array<AdminDto>>;
|
|
24
31
|
/**
|
|
25
|
-
* Search customers (manual customers + senior vouchers)
|
|
26
|
-
* @param q Text to search for in customers (manual customers + vouchers)
|
|
32
|
+
* Search customers (registered customers + manual customers + senior vouchers)
|
|
33
|
+
* @param q Text to search for in customers (registered customers + manual customers + vouchers)
|
|
27
34
|
* @param order Sorting options (combined results are ultimately sorted by createdAt)
|
|
28
|
-
* @returns
|
|
35
|
+
* @returns AdminSearchCustomersResponseDto Customers grouped by type: registered customers, manual customers, and senior vouchers
|
|
29
36
|
* @throws ApiError
|
|
30
37
|
*/
|
|
31
|
-
static searchCustomers(q?: string, order?: OrderDto): CancelablePromise<
|
|
38
|
+
static searchCustomers(q?: string, order?: OrderDto): CancelablePromise<AdminSearchCustomersResponseDto>;
|
|
32
39
|
/**
|
|
33
40
|
* Get a single admin by ID
|
|
34
41
|
* @param id
|
package/services/AdminService.js
CHANGED
|
@@ -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
|
|
@@ -36,10 +47,10 @@ class AdminService {
|
|
|
36
47
|
});
|
|
37
48
|
}
|
|
38
49
|
/**
|
|
39
|
-
* Search customers (manual customers + senior vouchers)
|
|
40
|
-
* @param q Text to search for in customers (manual customers + vouchers)
|
|
50
|
+
* Search customers (registered customers + manual customers + senior vouchers)
|
|
51
|
+
* @param q Text to search for in customers (registered customers + manual customers + vouchers)
|
|
41
52
|
* @param order Sorting options (combined results are ultimately sorted by createdAt)
|
|
42
|
-
* @returns
|
|
53
|
+
* @returns AdminSearchCustomersResponseDto Customers grouped by type: registered customers, manual customers, and senior vouchers
|
|
43
54
|
* @throws ApiError
|
|
44
55
|
*/
|
|
45
56
|
static searchCustomers(q, order) {
|
|
@@ -3,43 +3,44 @@ import type { ChargeTripByCardDto } from '../models/ChargeTripByCardDto';
|
|
|
3
3
|
import type { ChargeTripByCashDto } from '../models/ChargeTripByCashDto';
|
|
4
4
|
import type { ChargeTripDto } from '../models/ChargeTripDto';
|
|
5
5
|
import type { MessageResponseDto } from '../models/MessageResponseDto';
|
|
6
|
+
import type { PaymentMethodResponseDto } from '../models/PaymentMethodResponseDto';
|
|
6
7
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
7
8
|
export declare class CustomerPaymentsService {
|
|
8
9
|
/**
|
|
9
10
|
* Add a payment method
|
|
10
11
|
* @param requestBody
|
|
11
|
-
* @returns
|
|
12
|
+
* @returns PaymentMethodResponseDto Payment method added successfully
|
|
12
13
|
* @throws ApiError
|
|
13
14
|
*/
|
|
14
|
-
static addPaymentMethod(requestBody: AddPaymentMethodDto): CancelablePromise<
|
|
15
|
+
static addPaymentMethod(requestBody: AddPaymentMethodDto): CancelablePromise<PaymentMethodResponseDto>;
|
|
15
16
|
/**
|
|
16
17
|
* List payment methods
|
|
17
|
-
* @returns
|
|
18
|
+
* @returns PaymentMethodResponseDto List of payment methods
|
|
18
19
|
* @throws ApiError
|
|
19
20
|
*/
|
|
20
|
-
static listPaymentMethods(): CancelablePromise<
|
|
21
|
+
static listPaymentMethods(): CancelablePromise<Array<PaymentMethodResponseDto>>;
|
|
21
22
|
/**
|
|
22
23
|
* Update a payment method
|
|
23
24
|
* @param id
|
|
24
25
|
* @param requestBody
|
|
25
|
-
* @returns
|
|
26
|
+
* @returns PaymentMethodResponseDto Payment method updated successfully
|
|
26
27
|
* @throws ApiError
|
|
27
28
|
*/
|
|
28
|
-
static updatePaymentMethod(id: number, requestBody: AddPaymentMethodDto): CancelablePromise<
|
|
29
|
+
static updatePaymentMethod(id: number, requestBody: AddPaymentMethodDto): CancelablePromise<PaymentMethodResponseDto>;
|
|
29
30
|
/**
|
|
30
31
|
* Remove payment method
|
|
31
32
|
* @param id
|
|
32
|
-
* @returns
|
|
33
|
+
* @returns PaymentMethodResponseDto Payment method removed
|
|
33
34
|
* @throws ApiError
|
|
34
35
|
*/
|
|
35
|
-
static removePaymentMethod(id: number): CancelablePromise<
|
|
36
|
+
static removePaymentMethod(id: number): CancelablePromise<PaymentMethodResponseDto>;
|
|
36
37
|
/**
|
|
37
38
|
* Set default payment method
|
|
38
39
|
* @param id
|
|
39
|
-
* @returns
|
|
40
|
+
* @returns PaymentMethodResponseDto Default payment method updated
|
|
40
41
|
* @throws ApiError
|
|
41
42
|
*/
|
|
42
|
-
static setDefaultPaymentMethod(id: number): CancelablePromise<
|
|
43
|
+
static setDefaultPaymentMethod(id: number): CancelablePromise<PaymentMethodResponseDto>;
|
|
43
44
|
/**
|
|
44
45
|
* Charge trip by cash
|
|
45
46
|
* @param requestBody
|
|
@@ -7,7 +7,7 @@ class CustomerPaymentsService {
|
|
|
7
7
|
/**
|
|
8
8
|
* Add a payment method
|
|
9
9
|
* @param requestBody
|
|
10
|
-
* @returns
|
|
10
|
+
* @returns PaymentMethodResponseDto Payment method added successfully
|
|
11
11
|
* @throws ApiError
|
|
12
12
|
*/
|
|
13
13
|
static addPaymentMethod(requestBody) {
|
|
@@ -23,7 +23,7 @@ class CustomerPaymentsService {
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* List payment methods
|
|
26
|
-
* @returns
|
|
26
|
+
* @returns PaymentMethodResponseDto List of payment methods
|
|
27
27
|
* @throws ApiError
|
|
28
28
|
*/
|
|
29
29
|
static listPaymentMethods() {
|
|
@@ -36,7 +36,7 @@ class CustomerPaymentsService {
|
|
|
36
36
|
* Update a payment method
|
|
37
37
|
* @param id
|
|
38
38
|
* @param requestBody
|
|
39
|
-
* @returns
|
|
39
|
+
* @returns PaymentMethodResponseDto Payment method updated successfully
|
|
40
40
|
* @throws ApiError
|
|
41
41
|
*/
|
|
42
42
|
static updatePaymentMethod(id, requestBody) {
|
|
@@ -57,7 +57,7 @@ class CustomerPaymentsService {
|
|
|
57
57
|
/**
|
|
58
58
|
* Remove payment method
|
|
59
59
|
* @param id
|
|
60
|
-
* @returns
|
|
60
|
+
* @returns PaymentMethodResponseDto Payment method removed
|
|
61
61
|
* @throws ApiError
|
|
62
62
|
*/
|
|
63
63
|
static removePaymentMethod(id) {
|
|
@@ -75,7 +75,7 @@ class CustomerPaymentsService {
|
|
|
75
75
|
/**
|
|
76
76
|
* Set default payment method
|
|
77
77
|
* @param id
|
|
78
|
-
* @returns
|
|
78
|
+
* @returns PaymentMethodResponseDto Default payment method updated
|
|
79
79
|
* @throws ApiError
|
|
80
80
|
*/
|
|
81
81
|
static setDefaultPaymentMethod(id) {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SectionContentDto } from '../models/SectionContentDto';
|
|
2
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
3
|
+
export declare class CustomerSectionContentsService {
|
|
4
|
+
/**
|
|
5
|
+
* Get section contents by type
|
|
6
|
+
* @returns SectionContentDto List of section contents by type, ordered by position ASC
|
|
7
|
+
* @throws ApiError
|
|
8
|
+
*/
|
|
9
|
+
static findByType(): CancelablePromise<Array<SectionContentDto>>;
|
|
10
|
+
/**
|
|
11
|
+
* Get section content by type and ID
|
|
12
|
+
* @param id
|
|
13
|
+
* @returns SectionContentDto Section content found
|
|
14
|
+
* @throws ApiError
|
|
15
|
+
*/
|
|
16
|
+
static findByTypeAndId(id: number): CancelablePromise<SectionContentDto>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomerSectionContentsService = void 0;
|
|
4
|
+
const OpenAPI_1 = require("../core/OpenAPI");
|
|
5
|
+
const request_1 = require("../core/request");
|
|
6
|
+
class CustomerSectionContentsService {
|
|
7
|
+
/**
|
|
8
|
+
* Get section contents by type
|
|
9
|
+
* @returns SectionContentDto List of section contents by type, ordered by position ASC
|
|
10
|
+
* @throws ApiError
|
|
11
|
+
*/
|
|
12
|
+
static findByType() {
|
|
13
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
14
|
+
method: 'GET',
|
|
15
|
+
url: '/customers/section-contents/{type}',
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Get section content by type and ID
|
|
20
|
+
* @param id
|
|
21
|
+
* @returns SectionContentDto Section content found
|
|
22
|
+
* @throws ApiError
|
|
23
|
+
*/
|
|
24
|
+
static findByTypeAndId(id) {
|
|
25
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
26
|
+
method: 'GET',
|
|
27
|
+
url: '/customers/section-contents/{type}/{id}',
|
|
28
|
+
path: {
|
|
29
|
+
'id': id,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.CustomerSectionContentsService = CustomerSectionContentsService;
|
|
@@ -1,9 +1,51 @@
|
|
|
1
|
+
import type { AddPaymentMethodDto } from '../models/AddPaymentMethodDto';
|
|
1
2
|
import type { ChargeTripByCardDto } from '../models/ChargeTripByCardDto';
|
|
2
3
|
import type { ChargeTripByCashDto } from '../models/ChargeTripByCashDto';
|
|
4
|
+
import type { ChargeTripByVoucherDto } from '../models/ChargeTripByVoucherDto';
|
|
3
5
|
import type { ChargeTripDto } from '../models/ChargeTripDto';
|
|
6
|
+
import type { DriverCreditsResponseDto } from '../models/DriverCreditsResponseDto';
|
|
7
|
+
import type { DriverPaymentMethodResponseDto } from '../models/DriverPaymentMethodResponseDto';
|
|
8
|
+
import type { InquireVoucherBalanceDto } from '../models/InquireVoucherBalanceDto';
|
|
9
|
+
import type { InquireVoucherBalanceResponseDto } from '../models/InquireVoucherBalanceResponseDto';
|
|
4
10
|
import type { MessageResponseDto } from '../models/MessageResponseDto';
|
|
11
|
+
import type { PurchaseDriverCreditsDto } from '../models/PurchaseDriverCreditsDto';
|
|
5
12
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
6
13
|
export declare class DriverPaymentsService {
|
|
14
|
+
/**
|
|
15
|
+
* Add a payment method (external drivers only)
|
|
16
|
+
* @param requestBody
|
|
17
|
+
* @returns DriverPaymentMethodResponseDto Payment method added successfully
|
|
18
|
+
* @throws ApiError
|
|
19
|
+
*/
|
|
20
|
+
static addPaymentMethod(requestBody: AddPaymentMethodDto): CancelablePromise<DriverPaymentMethodResponseDto>;
|
|
21
|
+
/**
|
|
22
|
+
* List payment methods (external drivers only)
|
|
23
|
+
* @returns DriverPaymentMethodResponseDto List of payment methods
|
|
24
|
+
* @throws ApiError
|
|
25
|
+
*/
|
|
26
|
+
static listPaymentMethods(): CancelablePromise<Array<DriverPaymentMethodResponseDto>>;
|
|
27
|
+
/**
|
|
28
|
+
* Set default payment method
|
|
29
|
+
* @param id
|
|
30
|
+
* @returns DriverPaymentMethodResponseDto Default payment method updated
|
|
31
|
+
* @throws ApiError
|
|
32
|
+
*/
|
|
33
|
+
static setDefaultPaymentMethod(id: number): CancelablePromise<DriverPaymentMethodResponseDto>;
|
|
34
|
+
/**
|
|
35
|
+
* Remove payment method
|
|
36
|
+
* @param id
|
|
37
|
+
* @returns DriverPaymentMethodResponseDto Payment method removed
|
|
38
|
+
* @throws ApiError
|
|
39
|
+
*/
|
|
40
|
+
static removePaymentMethod(id: number): CancelablePromise<DriverPaymentMethodResponseDto>;
|
|
41
|
+
/**
|
|
42
|
+
* Purchase credits using a registered payment method
|
|
43
|
+
* Charges the given payment method; amount = credits × EXTERNAL_DRIVER_CREDIT_COST (external drivers only).
|
|
44
|
+
* @param requestBody
|
|
45
|
+
* @returns DriverCreditsResponseDto Credits purchased successfully
|
|
46
|
+
* @throws ApiError
|
|
47
|
+
*/
|
|
48
|
+
static purchaseCredits(requestBody: PurchaseDriverCreditsDto): CancelablePromise<DriverCreditsResponseDto>;
|
|
7
49
|
/**
|
|
8
50
|
* Charge trip by cash
|
|
9
51
|
* @param requestBody
|
|
@@ -26,4 +68,18 @@ export declare class DriverPaymentsService {
|
|
|
26
68
|
* @throws ApiError
|
|
27
69
|
*/
|
|
28
70
|
static chargeTripByCard(requestBody: ChargeTripByCardDto): CancelablePromise<MessageResponseDto>;
|
|
71
|
+
/**
|
|
72
|
+
* Charge trip by voucher
|
|
73
|
+
* @param requestBody
|
|
74
|
+
* @returns MessageResponseDto Voucher charge successful
|
|
75
|
+
* @throws ApiError
|
|
76
|
+
*/
|
|
77
|
+
static chargeTripByVoucher(requestBody: ChargeTripByVoucherDto): CancelablePromise<MessageResponseDto>;
|
|
78
|
+
/**
|
|
79
|
+
* Inquire voucher balance for a trip
|
|
80
|
+
* @param requestBody
|
|
81
|
+
* @returns InquireVoucherBalanceResponseDto Voucher balance inquiry response
|
|
82
|
+
* @throws ApiError
|
|
83
|
+
*/
|
|
84
|
+
static inquireVoucherBalance(requestBody: InquireVoucherBalanceDto): CancelablePromise<InquireVoucherBalanceResponseDto>;
|
|
29
85
|
}
|
|
@@ -4,6 +4,88 @@ exports.DriverPaymentsService = void 0;
|
|
|
4
4
|
const OpenAPI_1 = require("../core/OpenAPI");
|
|
5
5
|
const request_1 = require("../core/request");
|
|
6
6
|
class DriverPaymentsService {
|
|
7
|
+
/**
|
|
8
|
+
* Add a payment method (external drivers only)
|
|
9
|
+
* @param requestBody
|
|
10
|
+
* @returns DriverPaymentMethodResponseDto 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: '/drivers/payments',
|
|
17
|
+
body: requestBody,
|
|
18
|
+
mediaType: 'application/json',
|
|
19
|
+
errors: {
|
|
20
|
+
400: `Invalid card data or driver is not external`,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* List payment methods (external drivers only)
|
|
26
|
+
* @returns DriverPaymentMethodResponseDto 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: '/drivers/payments',
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Set default payment method
|
|
37
|
+
* @param id
|
|
38
|
+
* @returns DriverPaymentMethodResponseDto Default payment method updated
|
|
39
|
+
* @throws ApiError
|
|
40
|
+
*/
|
|
41
|
+
static setDefaultPaymentMethod(id) {
|
|
42
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
43
|
+
method: 'PATCH',
|
|
44
|
+
url: '/drivers/payments/{id}/default',
|
|
45
|
+
path: {
|
|
46
|
+
'id': id,
|
|
47
|
+
},
|
|
48
|
+
errors: {
|
|
49
|
+
404: `Payment method not found`,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Remove payment method
|
|
55
|
+
* @param id
|
|
56
|
+
* @returns DriverPaymentMethodResponseDto Payment method removed
|
|
57
|
+
* @throws ApiError
|
|
58
|
+
*/
|
|
59
|
+
static removePaymentMethod(id) {
|
|
60
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
61
|
+
method: 'DELETE',
|
|
62
|
+
url: '/drivers/payments/{id}',
|
|
63
|
+
path: {
|
|
64
|
+
'id': id,
|
|
65
|
+
},
|
|
66
|
+
errors: {
|
|
67
|
+
404: `Payment method not found`,
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Purchase credits using a registered payment method
|
|
73
|
+
* Charges the given payment method; amount = credits × EXTERNAL_DRIVER_CREDIT_COST (external drivers only).
|
|
74
|
+
* @param requestBody
|
|
75
|
+
* @returns DriverCreditsResponseDto Credits purchased successfully
|
|
76
|
+
* @throws ApiError
|
|
77
|
+
*/
|
|
78
|
+
static purchaseCredits(requestBody) {
|
|
79
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
80
|
+
method: 'POST',
|
|
81
|
+
url: '/drivers/payments/purchase-credits',
|
|
82
|
+
body: requestBody,
|
|
83
|
+
mediaType: 'application/json',
|
|
84
|
+
errors: {
|
|
85
|
+
404: `Driver or payment method not found`,
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
}
|
|
7
89
|
/**
|
|
8
90
|
* Charge trip by cash
|
|
9
91
|
* @param requestBody
|
|
@@ -59,5 +141,41 @@ class DriverPaymentsService {
|
|
|
59
141
|
},
|
|
60
142
|
});
|
|
61
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* Charge trip by voucher
|
|
146
|
+
* @param requestBody
|
|
147
|
+
* @returns MessageResponseDto Voucher charge successful
|
|
148
|
+
* @throws ApiError
|
|
149
|
+
*/
|
|
150
|
+
static chargeTripByVoucher(requestBody) {
|
|
151
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
152
|
+
method: 'POST',
|
|
153
|
+
url: '/drivers/payments/charge-trip/voucher',
|
|
154
|
+
body: requestBody,
|
|
155
|
+
mediaType: 'application/json',
|
|
156
|
+
errors: {
|
|
157
|
+
400: `Trip already charged, invalid amount, trip has no voucher, or voucher declined`,
|
|
158
|
+
404: `Trip not found`,
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Inquire voucher balance for a trip
|
|
164
|
+
* @param requestBody
|
|
165
|
+
* @returns InquireVoucherBalanceResponseDto Voucher balance inquiry response
|
|
166
|
+
* @throws ApiError
|
|
167
|
+
*/
|
|
168
|
+
static inquireVoucherBalance(requestBody) {
|
|
169
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
170
|
+
method: 'POST',
|
|
171
|
+
url: '/drivers/payments/voucher-balance',
|
|
172
|
+
body: requestBody,
|
|
173
|
+
mediaType: 'application/json',
|
|
174
|
+
errors: {
|
|
175
|
+
400: `Invalid voucher inquiry request or trip has no voucher`,
|
|
176
|
+
404: `Trip not found`,
|
|
177
|
+
},
|
|
178
|
+
});
|
|
179
|
+
}
|
|
62
180
|
}
|
|
63
181
|
exports.DriverPaymentsService = DriverPaymentsService;
|
|
@@ -2,6 +2,8 @@ import type { DriverTripActions } from '../models/DriverTripActions';
|
|
|
2
2
|
import type { OrderDto } from '../models/OrderDto';
|
|
3
3
|
import type { TripDto } from '../models/TripDto';
|
|
4
4
|
import type { TripUpdateDto } from '../models/TripUpdateDto';
|
|
5
|
+
import type { VoucherDriverCreateDto } from '../models/VoucherDriverCreateDto';
|
|
6
|
+
import type { VoucherDto } from '../models/VoucherDto';
|
|
5
7
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
6
8
|
export declare class DriverTripsService {
|
|
7
9
|
/**
|
|
@@ -42,6 +44,14 @@ export declare class DriverTripsService {
|
|
|
42
44
|
* @throws ApiError
|
|
43
45
|
*/
|
|
44
46
|
static getActiveTrip(): CancelablePromise<TripDto>;
|
|
47
|
+
/**
|
|
48
|
+
* Create voucher for trip (new senior not yet reported by city)
|
|
49
|
+
* @param id Trip ID
|
|
50
|
+
* @param requestBody
|
|
51
|
+
* @returns VoucherDto Voucher created and assigned to trip.
|
|
52
|
+
* @throws ApiError
|
|
53
|
+
*/
|
|
54
|
+
static createVoucher(id: number, requestBody: VoucherDriverCreateDto): CancelablePromise<VoucherDto>;
|
|
45
55
|
/**
|
|
46
56
|
* Execute an action on a trip
|
|
47
57
|
* @param id Trip ID
|
|
@@ -83,6 +83,24 @@ class DriverTripsService {
|
|
|
83
83
|
url: '/drivers/trips/active',
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Create voucher for trip (new senior not yet reported by city)
|
|
88
|
+
* @param id Trip ID
|
|
89
|
+
* @param requestBody
|
|
90
|
+
* @returns VoucherDto Voucher created and assigned to trip.
|
|
91
|
+
* @throws ApiError
|
|
92
|
+
*/
|
|
93
|
+
static createVoucher(id, requestBody) {
|
|
94
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
95
|
+
method: 'POST',
|
|
96
|
+
url: '/drivers/trips/{id}/voucher',
|
|
97
|
+
path: {
|
|
98
|
+
'id': id,
|
|
99
|
+
},
|
|
100
|
+
body: requestBody,
|
|
101
|
+
mediaType: 'application/json',
|
|
102
|
+
});
|
|
103
|
+
}
|
|
86
104
|
/**
|
|
87
105
|
* Execute an action on a trip
|
|
88
106
|
* @param id Trip ID
|