@sp-api-sdk/services-api-v1 1.6.15
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/LICENSE +21 -0
- package/README.md +58 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/src/api-model/api/service-api.js +505 -0
- package/dist/cjs/src/api-model/api.js +17 -0
- package/dist/cjs/src/api-model/base.js +62 -0
- package/dist/cjs/src/api-model/common.js +137 -0
- package/dist/cjs/src/api-model/configuration.js +42 -0
- package/dist/cjs/src/api-model/index.js +19 -0
- package/dist/cjs/src/api-model/models/add-appointment-request.js +15 -0
- package/dist/cjs/src/api-model/models/address.js +15 -0
- package/dist/cjs/src/api-model/models/appointment-time-input.js +15 -0
- package/dist/cjs/src/api-model/models/appointment-time.js +15 -0
- package/dist/cjs/src/api-model/models/appointment.js +26 -0
- package/dist/cjs/src/api-model/models/associated-item.js +27 -0
- package/dist/cjs/src/api-model/models/buyer.js +15 -0
- package/dist/cjs/src/api-model/models/cancel-service-job-by-service-job-id-response.js +15 -0
- package/dist/cjs/src/api-model/models/complete-service-job-by-service-job-id-response.js +15 -0
- package/dist/cjs/src/api-model/models/get-service-job-by-service-job-id-response.js +15 -0
- package/dist/cjs/src/api-model/models/get-service-jobs-response.js +15 -0
- package/dist/cjs/src/api-model/models/index.js +28 -0
- package/dist/cjs/src/api-model/models/item-delivery-promise.js +15 -0
- package/dist/cjs/src/api-model/models/item-delivery.js +15 -0
- package/dist/cjs/src/api-model/models/job-listing.js +15 -0
- package/dist/cjs/src/api-model/models/model-error.js +25 -0
- package/dist/cjs/src/api-model/models/poa.js +27 -0
- package/dist/cjs/src/api-model/models/reschedule-appointment-request.js +15 -0
- package/dist/cjs/src/api-model/models/scope-of-work.js +15 -0
- package/dist/cjs/src/api-model/models/seller.js +15 -0
- package/dist/cjs/src/api-model/models/service-job-provider.js +15 -0
- package/dist/cjs/src/api-model/models/service-job.js +30 -0
- package/dist/cjs/src/api-model/models/service-location.js +26 -0
- package/dist/cjs/src/api-model/models/set-appointment-response.js +15 -0
- package/dist/cjs/src/api-model/models/technician.js +15 -0
- package/dist/cjs/src/api-model/models/warning.js +15 -0
- package/dist/cjs/src/client.js +65 -0
- package/dist/cjs/src/error.js +10 -0
- package/dist/es/index.js +3 -0
- package/dist/es/src/api-model/api/service-api.js +497 -0
- package/dist/es/src/api-model/api.js +14 -0
- package/dist/es/src/api-model/base.js +56 -0
- package/dist/es/src/api-model/common.js +125 -0
- package/dist/es/src/api-model/configuration.js +38 -0
- package/dist/es/src/api-model/index.js +16 -0
- package/dist/es/src/api-model/models/add-appointment-request.js +14 -0
- package/dist/es/src/api-model/models/address.js +14 -0
- package/dist/es/src/api-model/models/appointment-time-input.js +14 -0
- package/dist/es/src/api-model/models/appointment-time.js +14 -0
- package/dist/es/src/api-model/models/appointment.js +23 -0
- package/dist/es/src/api-model/models/associated-item.js +24 -0
- package/dist/es/src/api-model/models/buyer.js +14 -0
- package/dist/es/src/api-model/models/cancel-service-job-by-service-job-id-response.js +14 -0
- package/dist/es/src/api-model/models/complete-service-job-by-service-job-id-response.js +14 -0
- package/dist/es/src/api-model/models/get-service-job-by-service-job-id-response.js +14 -0
- package/dist/es/src/api-model/models/get-service-jobs-response.js +14 -0
- package/dist/es/src/api-model/models/index.js +25 -0
- package/dist/es/src/api-model/models/item-delivery-promise.js +14 -0
- package/dist/es/src/api-model/models/item-delivery.js +14 -0
- package/dist/es/src/api-model/models/job-listing.js +14 -0
- package/dist/es/src/api-model/models/model-error.js +22 -0
- package/dist/es/src/api-model/models/poa.js +24 -0
- package/dist/es/src/api-model/models/reschedule-appointment-request.js +14 -0
- package/dist/es/src/api-model/models/scope-of-work.js +14 -0
- package/dist/es/src/api-model/models/seller.js +14 -0
- package/dist/es/src/api-model/models/service-job-provider.js +14 -0
- package/dist/es/src/api-model/models/service-job.js +27 -0
- package/dist/es/src/api-model/models/service-location.js +23 -0
- package/dist/es/src/api-model/models/set-appointment-response.js +14 -0
- package/dist/es/src/api-model/models/technician.js +14 -0
- package/dist/es/src/api-model/models/warning.js +14 -0
- package/dist/es/src/client.js +61 -0
- package/dist/es/src/error.js +6 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/src/api-model/api/service-api.d.ts +443 -0
- package/dist/types/src/api-model/api.d.ts +12 -0
- package/dist/types/src/api-model/base.d.ts +55 -0
- package/dist/types/src/api-model/common.d.ts +65 -0
- package/dist/types/src/api-model/configuration.d.ts +83 -0
- package/dist/types/src/api-model/index.d.ts +14 -0
- package/dist/types/src/api-model/models/add-appointment-request.d.ts +25 -0
- package/dist/types/src/api-model/models/address.d.ts +84 -0
- package/dist/types/src/api-model/models/appointment-time-input.d.ts +30 -0
- package/dist/types/src/api-model/models/appointment-time.d.ts +30 -0
- package/dist/types/src/api-model/models/appointment.d.ts +66 -0
- package/dist/types/src/api-model/models/associated-item.d.ts +71 -0
- package/dist/types/src/api-model/models/buyer.d.ts +42 -0
- package/dist/types/src/api-model/models/cancel-service-job-by-service-job-id-response.d.ts +24 -0
- package/dist/types/src/api-model/models/complete-service-job-by-service-job-id-response.d.ts +24 -0
- package/dist/types/src/api-model/models/get-service-job-by-service-job-id-response.d.ts +31 -0
- package/dist/types/src/api-model/models/get-service-jobs-response.d.ts +31 -0
- package/dist/types/src/api-model/models/index.d.ts +25 -0
- package/dist/types/src/api-model/models/item-delivery-promise.d.ts +30 -0
- package/dist/types/src/api-model/models/item-delivery.d.ts +31 -0
- package/dist/types/src/api-model/models/job-listing.d.ts +43 -0
- package/dist/types/src/api-model/models/model-error.d.ts +50 -0
- package/dist/types/src/api-model/models/poa.d.ts +60 -0
- package/dist/types/src/api-model/models/reschedule-appointment-request.d.ts +31 -0
- package/dist/types/src/api-model/models/scope-of-work.d.ts +42 -0
- package/dist/types/src/api-model/models/seller.d.ts +24 -0
- package/dist/types/src/api-model/models/service-job-provider.d.ts +24 -0
- package/dist/types/src/api-model/models/service-job.d.ts +117 -0
- package/dist/types/src/api-model/models/service-location.d.ts +40 -0
- package/dist/types/src/api-model/models/set-appointment-response.d.ts +37 -0
- package/dist/types/src/api-model/models/technician.d.ts +30 -0
- package/dist/types/src/api-model/models/warning.d.ts +36 -0
- package/dist/types/src/client.d.ts +13 -0
- package/dist/types/src/error.d.ts +3 -0
- package/package.json +53 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Bizon
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# `services-api-v1`
|
|
2
|
+
|
|
3
|
+
With the Services API, you can build applications that help service providers get and modify their service orders.
|
|
4
|
+
|
|
5
|
+
## Installing
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
yarn add @sp-api-sdk/services-api-v1
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install @sp-api-sdk/services-api-v1
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Getting Started
|
|
16
|
+
|
|
17
|
+
```javascript
|
|
18
|
+
import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
|
|
19
|
+
import {ServicesApiClient} from '@sp-api-sdk/services-api-v1'
|
|
20
|
+
|
|
21
|
+
const auth = new SellingPartnerApiAuth({
|
|
22
|
+
clientId: '',
|
|
23
|
+
clientSecret: '',
|
|
24
|
+
refreshToken: '',
|
|
25
|
+
secretAccessKey: '',
|
|
26
|
+
accessKeyId: '',
|
|
27
|
+
region: '',
|
|
28
|
+
role: {
|
|
29
|
+
arn: '',
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
const client = new ServicesApiClient({
|
|
34
|
+
auth,
|
|
35
|
+
region: 'eu' // or 'eu-west-1'
|
|
36
|
+
})
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Handle Rate Limiting
|
|
40
|
+
|
|
41
|
+
If you want to let the SDK retry after each 429 responses, instanciate the client like this:
|
|
42
|
+
|
|
43
|
+
```javascript
|
|
44
|
+
const client = new ServicesApiClient({
|
|
45
|
+
auth,
|
|
46
|
+
region: 'eu',
|
|
47
|
+
rateLimiting: {
|
|
48
|
+
retry: true,
|
|
49
|
+
onRetry: (retryInfo) => console.log(retryInfo) // Optional
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The SDK gets the rate limits for each routes from the API documentation
|
|
55
|
+
|
|
56
|
+
## API documentation
|
|
57
|
+
|
|
58
|
+
See [here](https://github.com/amzn/selling-partner-api-docs/tree/main/references/services-api/services.md)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
(0, tslib_1.__exportStar)(require("./src/client"), exports);
|
|
5
|
+
(0, tslib_1.__exportStar)(require("./src/error"), exports);
|
|
6
|
+
(0, tslib_1.__exportStar)(require("./src/api-model/models"), exports);
|
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Selling Partner API for Services
|
|
6
|
+
* With the Services API, you can build applications that help service providers get and modify their service orders.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ServiceApi = exports.ServiceApiFactory = exports.ServiceApiFp = exports.ServiceApiAxiosParamCreator = void 0;
|
|
17
|
+
const tslib_1 = require("tslib");
|
|
18
|
+
const axios_1 = (0, tslib_1.__importDefault)(require("axios"));
|
|
19
|
+
// Some imports not used depending on template conditions
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
const common_1 = require("../common");
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
const base_1 = require("../base");
|
|
24
|
+
/**
|
|
25
|
+
* ServiceApi - axios parameter creator
|
|
26
|
+
* @export
|
|
27
|
+
*/
|
|
28
|
+
const ServiceApiAxiosParamCreator = function (configuration) {
|
|
29
|
+
return {
|
|
30
|
+
/**
|
|
31
|
+
* Adds an appointment to the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
32
|
+
* @param {string} serviceJobId An Amazon defined service job identifier.
|
|
33
|
+
* @param {AddAppointmentRequest} body Add appointment operation input details.
|
|
34
|
+
* @param {*} [options] Override http request option.
|
|
35
|
+
* @throws {RequiredError}
|
|
36
|
+
*/
|
|
37
|
+
addAppointmentForServiceJobByServiceJobId: async (serviceJobId, body, options = {}) => {
|
|
38
|
+
// verify required parameter 'serviceJobId' is not null or undefined
|
|
39
|
+
(0, common_1.assertParamExists)('addAppointmentForServiceJobByServiceJobId', 'serviceJobId', serviceJobId);
|
|
40
|
+
// verify required parameter 'body' is not null or undefined
|
|
41
|
+
(0, common_1.assertParamExists)('addAppointmentForServiceJobByServiceJobId', 'body', body);
|
|
42
|
+
const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/appointments`
|
|
43
|
+
.replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId)));
|
|
44
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
45
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
46
|
+
let baseOptions;
|
|
47
|
+
if (configuration) {
|
|
48
|
+
baseOptions = configuration.baseOptions;
|
|
49
|
+
}
|
|
50
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
51
|
+
const localVarHeaderParameter = {};
|
|
52
|
+
const localVarQueryParameter = {};
|
|
53
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
54
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
|
|
55
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
56
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
57
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
58
|
+
return {
|
|
59
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
60
|
+
options: localVarRequestOptions,
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* Cancels the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
65
|
+
* @param {string} serviceJobId An Amazon defined service job identifier.
|
|
66
|
+
* @param {string} cancellationReasonCode A cancel reason code that specifies the reason for cancelling a service job.
|
|
67
|
+
* @param {*} [options] Override http request option.
|
|
68
|
+
* @throws {RequiredError}
|
|
69
|
+
*/
|
|
70
|
+
cancelServiceJobByServiceJobId: async (serviceJobId, cancellationReasonCode, options = {}) => {
|
|
71
|
+
// verify required parameter 'serviceJobId' is not null or undefined
|
|
72
|
+
(0, common_1.assertParamExists)('cancelServiceJobByServiceJobId', 'serviceJobId', serviceJobId);
|
|
73
|
+
// verify required parameter 'cancellationReasonCode' is not null or undefined
|
|
74
|
+
(0, common_1.assertParamExists)('cancelServiceJobByServiceJobId', 'cancellationReasonCode', cancellationReasonCode);
|
|
75
|
+
const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/cancellations`
|
|
76
|
+
.replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId)));
|
|
77
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
78
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
79
|
+
let baseOptions;
|
|
80
|
+
if (configuration) {
|
|
81
|
+
baseOptions = configuration.baseOptions;
|
|
82
|
+
}
|
|
83
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
|
|
84
|
+
const localVarHeaderParameter = {};
|
|
85
|
+
const localVarQueryParameter = {};
|
|
86
|
+
if (cancellationReasonCode !== undefined) {
|
|
87
|
+
localVarQueryParameter['cancellationReasonCode'] = cancellationReasonCode;
|
|
88
|
+
}
|
|
89
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
|
|
90
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
91
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
92
|
+
return {
|
|
93
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
94
|
+
options: localVarRequestOptions,
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
/**
|
|
98
|
+
* Completes the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
99
|
+
* @param {string} serviceJobId An Amazon defined service job identifier.
|
|
100
|
+
* @param {*} [options] Override http request option.
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
*/
|
|
103
|
+
completeServiceJobByServiceJobId: async (serviceJobId, options = {}) => {
|
|
104
|
+
// verify required parameter 'serviceJobId' is not null or undefined
|
|
105
|
+
(0, common_1.assertParamExists)('completeServiceJobByServiceJobId', 'serviceJobId', serviceJobId);
|
|
106
|
+
const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/completions`
|
|
107
|
+
.replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId)));
|
|
108
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
109
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
110
|
+
let baseOptions;
|
|
111
|
+
if (configuration) {
|
|
112
|
+
baseOptions = configuration.baseOptions;
|
|
113
|
+
}
|
|
114
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
|
|
115
|
+
const localVarHeaderParameter = {};
|
|
116
|
+
const localVarQueryParameter = {};
|
|
117
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
|
|
118
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
119
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
120
|
+
return {
|
|
121
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
122
|
+
options: localVarRequestOptions,
|
|
123
|
+
};
|
|
124
|
+
},
|
|
125
|
+
/**
|
|
126
|
+
* Gets service job details for the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 20 | 40 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
127
|
+
* @param {string} serviceJobId A service job identifier.
|
|
128
|
+
* @param {*} [options] Override http request option.
|
|
129
|
+
* @throws {RequiredError}
|
|
130
|
+
*/
|
|
131
|
+
getServiceJobByServiceJobId: async (serviceJobId, options = {}) => {
|
|
132
|
+
// verify required parameter 'serviceJobId' is not null or undefined
|
|
133
|
+
(0, common_1.assertParamExists)('getServiceJobByServiceJobId', 'serviceJobId', serviceJobId);
|
|
134
|
+
const localVarPath = `/service/v1/serviceJobs/{serviceJobId}`
|
|
135
|
+
.replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId)));
|
|
136
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
137
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
138
|
+
let baseOptions;
|
|
139
|
+
if (configuration) {
|
|
140
|
+
baseOptions = configuration.baseOptions;
|
|
141
|
+
}
|
|
142
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
143
|
+
const localVarHeaderParameter = {};
|
|
144
|
+
const localVarQueryParameter = {};
|
|
145
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
|
|
146
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
147
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
148
|
+
return {
|
|
149
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
150
|
+
options: localVarRequestOptions,
|
|
151
|
+
};
|
|
152
|
+
},
|
|
153
|
+
/**
|
|
154
|
+
* Gets service job details for the specified filter query. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 40 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
155
|
+
* @param {Array<string>} marketplaceIds Used to select jobs that were placed in the specified marketplaces.
|
|
156
|
+
* @param {Array<string>} [serviceOrderIds] List of service order ids for the query you want to perform.Max values supported 20.
|
|
157
|
+
* @param {Array<'NOT_SERVICED' | 'CANCELLED' | 'COMPLETED' | 'PENDING_SCHEDULE' | 'NOT_FULFILLABLE' | 'HOLD' | 'PAYMENT_DECLINED'>} [serviceJobStatus] A list of one or more job status by which to filter the list of jobs.
|
|
158
|
+
* @param {string} [pageToken] String returned in the response of your previous request.
|
|
159
|
+
* @param {number} [pageSize] A non-negative integer that indicates the maximum number of jobs to return in the list, Value must be 1 - 20. Default 20.
|
|
160
|
+
* @param {'JOB_DATE' | 'JOB_STATUS'} [sortField] Sort fields on which you want to sort the output.
|
|
161
|
+
* @param {'ASC' | 'DESC'} [sortOrder] Sort order for the query you want to perform.
|
|
162
|
+
* @param {string} [createdAfter] A date used for selecting jobs created after (or at) a specified time must be in ISO 8601 format. Required if LastUpdatedAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error.
|
|
163
|
+
* @param {string} [createdBefore] A date used for selecting jobs created before (or at) a specified time must be in ISO 8601 format.
|
|
164
|
+
* @param {string} [lastUpdatedAfter] A date used for selecting jobs updated after (or at) a specified time must be in ISO 8601 format. Required if createdAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error.
|
|
165
|
+
* @param {string} [lastUpdatedBefore] A date used for selecting jobs updated before (or at) a specified time must be in ISO 8601 format.
|
|
166
|
+
* @param {string} [scheduleStartDate] A date used for filtering jobs schedule after (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date.
|
|
167
|
+
* @param {string} [scheduleEndDate] A date used for filtering jobs schedule before (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date.
|
|
168
|
+
* @param {*} [options] Override http request option.
|
|
169
|
+
* @throws {RequiredError}
|
|
170
|
+
*/
|
|
171
|
+
getServiceJobs: async (marketplaceIds, serviceOrderIds, serviceJobStatus, pageToken, pageSize, sortField, sortOrder, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, scheduleStartDate, scheduleEndDate, options = {}) => {
|
|
172
|
+
// verify required parameter 'marketplaceIds' is not null or undefined
|
|
173
|
+
(0, common_1.assertParamExists)('getServiceJobs', 'marketplaceIds', marketplaceIds);
|
|
174
|
+
const localVarPath = `/service/v1/serviceJobs`;
|
|
175
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
176
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
177
|
+
let baseOptions;
|
|
178
|
+
if (configuration) {
|
|
179
|
+
baseOptions = configuration.baseOptions;
|
|
180
|
+
}
|
|
181
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
182
|
+
const localVarHeaderParameter = {};
|
|
183
|
+
const localVarQueryParameter = {};
|
|
184
|
+
if (serviceOrderIds) {
|
|
185
|
+
localVarQueryParameter['serviceOrderIds'] = serviceOrderIds.join(base_1.COLLECTION_FORMATS.csv);
|
|
186
|
+
}
|
|
187
|
+
if (serviceJobStatus) {
|
|
188
|
+
localVarQueryParameter['serviceJobStatus'] = serviceJobStatus.join(base_1.COLLECTION_FORMATS.csv);
|
|
189
|
+
}
|
|
190
|
+
if (pageToken !== undefined) {
|
|
191
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
192
|
+
}
|
|
193
|
+
if (pageSize !== undefined) {
|
|
194
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
195
|
+
}
|
|
196
|
+
if (sortField !== undefined) {
|
|
197
|
+
localVarQueryParameter['sortField'] = sortField;
|
|
198
|
+
}
|
|
199
|
+
if (sortOrder !== undefined) {
|
|
200
|
+
localVarQueryParameter['sortOrder'] = sortOrder;
|
|
201
|
+
}
|
|
202
|
+
if (createdAfter !== undefined) {
|
|
203
|
+
localVarQueryParameter['createdAfter'] = createdAfter;
|
|
204
|
+
}
|
|
205
|
+
if (createdBefore !== undefined) {
|
|
206
|
+
localVarQueryParameter['createdBefore'] = createdBefore;
|
|
207
|
+
}
|
|
208
|
+
if (lastUpdatedAfter !== undefined) {
|
|
209
|
+
localVarQueryParameter['lastUpdatedAfter'] = lastUpdatedAfter;
|
|
210
|
+
}
|
|
211
|
+
if (lastUpdatedBefore !== undefined) {
|
|
212
|
+
localVarQueryParameter['lastUpdatedBefore'] = lastUpdatedBefore;
|
|
213
|
+
}
|
|
214
|
+
if (scheduleStartDate !== undefined) {
|
|
215
|
+
localVarQueryParameter['scheduleStartDate'] = scheduleStartDate;
|
|
216
|
+
}
|
|
217
|
+
if (scheduleEndDate !== undefined) {
|
|
218
|
+
localVarQueryParameter['scheduleEndDate'] = scheduleEndDate;
|
|
219
|
+
}
|
|
220
|
+
if (marketplaceIds) {
|
|
221
|
+
localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(base_1.COLLECTION_FORMATS.csv);
|
|
222
|
+
}
|
|
223
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
|
|
224
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
225
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
226
|
+
return {
|
|
227
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
228
|
+
options: localVarRequestOptions,
|
|
229
|
+
};
|
|
230
|
+
},
|
|
231
|
+
/**
|
|
232
|
+
* Reschedules an appointment for the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
233
|
+
* @param {string} serviceJobId An Amazon defined service job identifier.
|
|
234
|
+
* @param {string} appointmentId An existing appointment identifier for the Service Job.
|
|
235
|
+
* @param {RescheduleAppointmentRequest} body Reschedule appointment operation input details.
|
|
236
|
+
* @param {*} [options] Override http request option.
|
|
237
|
+
* @throws {RequiredError}
|
|
238
|
+
*/
|
|
239
|
+
rescheduleAppointmentForServiceJobByServiceJobId: async (serviceJobId, appointmentId, body, options = {}) => {
|
|
240
|
+
// verify required parameter 'serviceJobId' is not null or undefined
|
|
241
|
+
(0, common_1.assertParamExists)('rescheduleAppointmentForServiceJobByServiceJobId', 'serviceJobId', serviceJobId);
|
|
242
|
+
// verify required parameter 'appointmentId' is not null or undefined
|
|
243
|
+
(0, common_1.assertParamExists)('rescheduleAppointmentForServiceJobByServiceJobId', 'appointmentId', appointmentId);
|
|
244
|
+
// verify required parameter 'body' is not null or undefined
|
|
245
|
+
(0, common_1.assertParamExists)('rescheduleAppointmentForServiceJobByServiceJobId', 'body', body);
|
|
246
|
+
const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/appointments/{appointmentId}`
|
|
247
|
+
.replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId)))
|
|
248
|
+
.replace(`{${"appointmentId"}}`, encodeURIComponent(String(appointmentId)));
|
|
249
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
250
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
251
|
+
let baseOptions;
|
|
252
|
+
if (configuration) {
|
|
253
|
+
baseOptions = configuration.baseOptions;
|
|
254
|
+
}
|
|
255
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
256
|
+
const localVarHeaderParameter = {};
|
|
257
|
+
const localVarQueryParameter = {};
|
|
258
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
259
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
|
|
260
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
261
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
262
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
263
|
+
return {
|
|
264
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
265
|
+
options: localVarRequestOptions,
|
|
266
|
+
};
|
|
267
|
+
},
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
exports.ServiceApiAxiosParamCreator = ServiceApiAxiosParamCreator;
|
|
271
|
+
/**
|
|
272
|
+
* ServiceApi - functional programming interface
|
|
273
|
+
* @export
|
|
274
|
+
*/
|
|
275
|
+
const ServiceApiFp = function (configuration) {
|
|
276
|
+
const localVarAxiosParamCreator = (0, exports.ServiceApiAxiosParamCreator)(configuration);
|
|
277
|
+
return {
|
|
278
|
+
/**
|
|
279
|
+
* Adds an appointment to the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
280
|
+
* @param {string} serviceJobId An Amazon defined service job identifier.
|
|
281
|
+
* @param {AddAppointmentRequest} body Add appointment operation input details.
|
|
282
|
+
* @param {*} [options] Override http request option.
|
|
283
|
+
* @throws {RequiredError}
|
|
284
|
+
*/
|
|
285
|
+
async addAppointmentForServiceJobByServiceJobId(serviceJobId, body, options) {
|
|
286
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.addAppointmentForServiceJobByServiceJobId(serviceJobId, body, options);
|
|
287
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
288
|
+
},
|
|
289
|
+
/**
|
|
290
|
+
* Cancels the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
291
|
+
* @param {string} serviceJobId An Amazon defined service job identifier.
|
|
292
|
+
* @param {string} cancellationReasonCode A cancel reason code that specifies the reason for cancelling a service job.
|
|
293
|
+
* @param {*} [options] Override http request option.
|
|
294
|
+
* @throws {RequiredError}
|
|
295
|
+
*/
|
|
296
|
+
async cancelServiceJobByServiceJobId(serviceJobId, cancellationReasonCode, options) {
|
|
297
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.cancelServiceJobByServiceJobId(serviceJobId, cancellationReasonCode, options);
|
|
298
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
299
|
+
},
|
|
300
|
+
/**
|
|
301
|
+
* Completes the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
302
|
+
* @param {string} serviceJobId An Amazon defined service job identifier.
|
|
303
|
+
* @param {*} [options] Override http request option.
|
|
304
|
+
* @throws {RequiredError}
|
|
305
|
+
*/
|
|
306
|
+
async completeServiceJobByServiceJobId(serviceJobId, options) {
|
|
307
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.completeServiceJobByServiceJobId(serviceJobId, options);
|
|
308
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
309
|
+
},
|
|
310
|
+
/**
|
|
311
|
+
* Gets service job details for the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 20 | 40 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
312
|
+
* @param {string} serviceJobId A service job identifier.
|
|
313
|
+
* @param {*} [options] Override http request option.
|
|
314
|
+
* @throws {RequiredError}
|
|
315
|
+
*/
|
|
316
|
+
async getServiceJobByServiceJobId(serviceJobId, options) {
|
|
317
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getServiceJobByServiceJobId(serviceJobId, options);
|
|
318
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
319
|
+
},
|
|
320
|
+
/**
|
|
321
|
+
* Gets service job details for the specified filter query. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 40 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
322
|
+
* @param {Array<string>} marketplaceIds Used to select jobs that were placed in the specified marketplaces.
|
|
323
|
+
* @param {Array<string>} [serviceOrderIds] List of service order ids for the query you want to perform.Max values supported 20.
|
|
324
|
+
* @param {Array<'NOT_SERVICED' | 'CANCELLED' | 'COMPLETED' | 'PENDING_SCHEDULE' | 'NOT_FULFILLABLE' | 'HOLD' | 'PAYMENT_DECLINED'>} [serviceJobStatus] A list of one or more job status by which to filter the list of jobs.
|
|
325
|
+
* @param {string} [pageToken] String returned in the response of your previous request.
|
|
326
|
+
* @param {number} [pageSize] A non-negative integer that indicates the maximum number of jobs to return in the list, Value must be 1 - 20. Default 20.
|
|
327
|
+
* @param {'JOB_DATE' | 'JOB_STATUS'} [sortField] Sort fields on which you want to sort the output.
|
|
328
|
+
* @param {'ASC' | 'DESC'} [sortOrder] Sort order for the query you want to perform.
|
|
329
|
+
* @param {string} [createdAfter] A date used for selecting jobs created after (or at) a specified time must be in ISO 8601 format. Required if LastUpdatedAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error.
|
|
330
|
+
* @param {string} [createdBefore] A date used for selecting jobs created before (or at) a specified time must be in ISO 8601 format.
|
|
331
|
+
* @param {string} [lastUpdatedAfter] A date used for selecting jobs updated after (or at) a specified time must be in ISO 8601 format. Required if createdAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error.
|
|
332
|
+
* @param {string} [lastUpdatedBefore] A date used for selecting jobs updated before (or at) a specified time must be in ISO 8601 format.
|
|
333
|
+
* @param {string} [scheduleStartDate] A date used for filtering jobs schedule after (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date.
|
|
334
|
+
* @param {string} [scheduleEndDate] A date used for filtering jobs schedule before (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date.
|
|
335
|
+
* @param {*} [options] Override http request option.
|
|
336
|
+
* @throws {RequiredError}
|
|
337
|
+
*/
|
|
338
|
+
async getServiceJobs(marketplaceIds, serviceOrderIds, serviceJobStatus, pageToken, pageSize, sortField, sortOrder, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, scheduleStartDate, scheduleEndDate, options) {
|
|
339
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getServiceJobs(marketplaceIds, serviceOrderIds, serviceJobStatus, pageToken, pageSize, sortField, sortOrder, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, scheduleStartDate, scheduleEndDate, options);
|
|
340
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
341
|
+
},
|
|
342
|
+
/**
|
|
343
|
+
* Reschedules an appointment for the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
344
|
+
* @param {string} serviceJobId An Amazon defined service job identifier.
|
|
345
|
+
* @param {string} appointmentId An existing appointment identifier for the Service Job.
|
|
346
|
+
* @param {RescheduleAppointmentRequest} body Reschedule appointment operation input details.
|
|
347
|
+
* @param {*} [options] Override http request option.
|
|
348
|
+
* @throws {RequiredError}
|
|
349
|
+
*/
|
|
350
|
+
async rescheduleAppointmentForServiceJobByServiceJobId(serviceJobId, appointmentId, body, options) {
|
|
351
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.rescheduleAppointmentForServiceJobByServiceJobId(serviceJobId, appointmentId, body, options);
|
|
352
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
353
|
+
},
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
exports.ServiceApiFp = ServiceApiFp;
|
|
357
|
+
/**
|
|
358
|
+
* ServiceApi - factory interface
|
|
359
|
+
* @export
|
|
360
|
+
*/
|
|
361
|
+
const ServiceApiFactory = function (configuration, basePath, axios) {
|
|
362
|
+
const localVarFp = (0, exports.ServiceApiFp)(configuration);
|
|
363
|
+
return {
|
|
364
|
+
/**
|
|
365
|
+
* Adds an appointment to the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
366
|
+
* @param {string} serviceJobId An Amazon defined service job identifier.
|
|
367
|
+
* @param {AddAppointmentRequest} body Add appointment operation input details.
|
|
368
|
+
* @param {*} [options] Override http request option.
|
|
369
|
+
* @throws {RequiredError}
|
|
370
|
+
*/
|
|
371
|
+
addAppointmentForServiceJobByServiceJobId(serviceJobId, body, options) {
|
|
372
|
+
return localVarFp.addAppointmentForServiceJobByServiceJobId(serviceJobId, body, options).then((request) => request(axios, basePath));
|
|
373
|
+
},
|
|
374
|
+
/**
|
|
375
|
+
* Cancels the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
376
|
+
* @param {string} serviceJobId An Amazon defined service job identifier.
|
|
377
|
+
* @param {string} cancellationReasonCode A cancel reason code that specifies the reason for cancelling a service job.
|
|
378
|
+
* @param {*} [options] Override http request option.
|
|
379
|
+
* @throws {RequiredError}
|
|
380
|
+
*/
|
|
381
|
+
cancelServiceJobByServiceJobId(serviceJobId, cancellationReasonCode, options) {
|
|
382
|
+
return localVarFp.cancelServiceJobByServiceJobId(serviceJobId, cancellationReasonCode, options).then((request) => request(axios, basePath));
|
|
383
|
+
},
|
|
384
|
+
/**
|
|
385
|
+
* Completes the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
386
|
+
* @param {string} serviceJobId An Amazon defined service job identifier.
|
|
387
|
+
* @param {*} [options] Override http request option.
|
|
388
|
+
* @throws {RequiredError}
|
|
389
|
+
*/
|
|
390
|
+
completeServiceJobByServiceJobId(serviceJobId, options) {
|
|
391
|
+
return localVarFp.completeServiceJobByServiceJobId(serviceJobId, options).then((request) => request(axios, basePath));
|
|
392
|
+
},
|
|
393
|
+
/**
|
|
394
|
+
* Gets service job details for the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 20 | 40 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
395
|
+
* @param {string} serviceJobId A service job identifier.
|
|
396
|
+
* @param {*} [options] Override http request option.
|
|
397
|
+
* @throws {RequiredError}
|
|
398
|
+
*/
|
|
399
|
+
getServiceJobByServiceJobId(serviceJobId, options) {
|
|
400
|
+
return localVarFp.getServiceJobByServiceJobId(serviceJobId, options).then((request) => request(axios, basePath));
|
|
401
|
+
},
|
|
402
|
+
/**
|
|
403
|
+
* Gets service job details for the specified filter query. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 40 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
404
|
+
* @param {Array<string>} marketplaceIds Used to select jobs that were placed in the specified marketplaces.
|
|
405
|
+
* @param {Array<string>} [serviceOrderIds] List of service order ids for the query you want to perform.Max values supported 20.
|
|
406
|
+
* @param {Array<'NOT_SERVICED' | 'CANCELLED' | 'COMPLETED' | 'PENDING_SCHEDULE' | 'NOT_FULFILLABLE' | 'HOLD' | 'PAYMENT_DECLINED'>} [serviceJobStatus] A list of one or more job status by which to filter the list of jobs.
|
|
407
|
+
* @param {string} [pageToken] String returned in the response of your previous request.
|
|
408
|
+
* @param {number} [pageSize] A non-negative integer that indicates the maximum number of jobs to return in the list, Value must be 1 - 20. Default 20.
|
|
409
|
+
* @param {'JOB_DATE' | 'JOB_STATUS'} [sortField] Sort fields on which you want to sort the output.
|
|
410
|
+
* @param {'ASC' | 'DESC'} [sortOrder] Sort order for the query you want to perform.
|
|
411
|
+
* @param {string} [createdAfter] A date used for selecting jobs created after (or at) a specified time must be in ISO 8601 format. Required if LastUpdatedAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error.
|
|
412
|
+
* @param {string} [createdBefore] A date used for selecting jobs created before (or at) a specified time must be in ISO 8601 format.
|
|
413
|
+
* @param {string} [lastUpdatedAfter] A date used for selecting jobs updated after (or at) a specified time must be in ISO 8601 format. Required if createdAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error.
|
|
414
|
+
* @param {string} [lastUpdatedBefore] A date used for selecting jobs updated before (or at) a specified time must be in ISO 8601 format.
|
|
415
|
+
* @param {string} [scheduleStartDate] A date used for filtering jobs schedule after (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date.
|
|
416
|
+
* @param {string} [scheduleEndDate] A date used for filtering jobs schedule before (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date.
|
|
417
|
+
* @param {*} [options] Override http request option.
|
|
418
|
+
* @throws {RequiredError}
|
|
419
|
+
*/
|
|
420
|
+
getServiceJobs(marketplaceIds, serviceOrderIds, serviceJobStatus, pageToken, pageSize, sortField, sortOrder, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, scheduleStartDate, scheduleEndDate, options) {
|
|
421
|
+
return localVarFp.getServiceJobs(marketplaceIds, serviceOrderIds, serviceJobStatus, pageToken, pageSize, sortField, sortOrder, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, scheduleStartDate, scheduleEndDate, options).then((request) => request(axios, basePath));
|
|
422
|
+
},
|
|
423
|
+
/**
|
|
424
|
+
* Reschedules an appointment for the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
425
|
+
* @param {string} serviceJobId An Amazon defined service job identifier.
|
|
426
|
+
* @param {string} appointmentId An existing appointment identifier for the Service Job.
|
|
427
|
+
* @param {RescheduleAppointmentRequest} body Reschedule appointment operation input details.
|
|
428
|
+
* @param {*} [options] Override http request option.
|
|
429
|
+
* @throws {RequiredError}
|
|
430
|
+
*/
|
|
431
|
+
rescheduleAppointmentForServiceJobByServiceJobId(serviceJobId, appointmentId, body, options) {
|
|
432
|
+
return localVarFp.rescheduleAppointmentForServiceJobByServiceJobId(serviceJobId, appointmentId, body, options).then((request) => request(axios, basePath));
|
|
433
|
+
},
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
exports.ServiceApiFactory = ServiceApiFactory;
|
|
437
|
+
/**
|
|
438
|
+
* ServiceApi - object-oriented interface
|
|
439
|
+
* @export
|
|
440
|
+
* @class ServiceApi
|
|
441
|
+
* @extends {BaseAPI}
|
|
442
|
+
*/
|
|
443
|
+
class ServiceApi extends base_1.BaseAPI {
|
|
444
|
+
/**
|
|
445
|
+
* Adds an appointment to the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
446
|
+
* @param {ServiceApiAddAppointmentForServiceJobByServiceJobIdRequest} requestParameters Request parameters.
|
|
447
|
+
* @param {*} [options] Override http request option.
|
|
448
|
+
* @throws {RequiredError}
|
|
449
|
+
* @memberof ServiceApi
|
|
450
|
+
*/
|
|
451
|
+
addAppointmentForServiceJobByServiceJobId(requestParameters, options) {
|
|
452
|
+
return (0, exports.ServiceApiFp)(this.configuration).addAppointmentForServiceJobByServiceJobId(requestParameters.serviceJobId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Cancels the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
456
|
+
* @param {ServiceApiCancelServiceJobByServiceJobIdRequest} requestParameters Request parameters.
|
|
457
|
+
* @param {*} [options] Override http request option.
|
|
458
|
+
* @throws {RequiredError}
|
|
459
|
+
* @memberof ServiceApi
|
|
460
|
+
*/
|
|
461
|
+
cancelServiceJobByServiceJobId(requestParameters, options) {
|
|
462
|
+
return (0, exports.ServiceApiFp)(this.configuration).cancelServiceJobByServiceJobId(requestParameters.serviceJobId, requestParameters.cancellationReasonCode, options).then((request) => request(this.axios, this.basePath));
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Completes the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
466
|
+
* @param {ServiceApiCompleteServiceJobByServiceJobIdRequest} requestParameters Request parameters.
|
|
467
|
+
* @param {*} [options] Override http request option.
|
|
468
|
+
* @throws {RequiredError}
|
|
469
|
+
* @memberof ServiceApi
|
|
470
|
+
*/
|
|
471
|
+
completeServiceJobByServiceJobId(requestParameters, options) {
|
|
472
|
+
return (0, exports.ServiceApiFp)(this.configuration).completeServiceJobByServiceJobId(requestParameters.serviceJobId, options).then((request) => request(this.axios, this.basePath));
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Gets service job details for the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 20 | 40 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
476
|
+
* @param {ServiceApiGetServiceJobByServiceJobIdRequest} requestParameters Request parameters.
|
|
477
|
+
* @param {*} [options] Override http request option.
|
|
478
|
+
* @throws {RequiredError}
|
|
479
|
+
* @memberof ServiceApi
|
|
480
|
+
*/
|
|
481
|
+
getServiceJobByServiceJobId(requestParameters, options) {
|
|
482
|
+
return (0, exports.ServiceApiFp)(this.configuration).getServiceJobByServiceJobId(requestParameters.serviceJobId, options).then((request) => request(this.axios, this.basePath));
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* Gets service job details for the specified filter query. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 40 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
486
|
+
* @param {ServiceApiGetServiceJobsRequest} requestParameters Request parameters.
|
|
487
|
+
* @param {*} [options] Override http request option.
|
|
488
|
+
* @throws {RequiredError}
|
|
489
|
+
* @memberof ServiceApi
|
|
490
|
+
*/
|
|
491
|
+
getServiceJobs(requestParameters, options) {
|
|
492
|
+
return (0, exports.ServiceApiFp)(this.configuration).getServiceJobs(requestParameters.marketplaceIds, requestParameters.serviceOrderIds, requestParameters.serviceJobStatus, requestParameters.pageToken, requestParameters.pageSize, requestParameters.sortField, requestParameters.sortOrder, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.lastUpdatedAfter, requestParameters.lastUpdatedBefore, requestParameters.scheduleStartDate, requestParameters.scheduleEndDate, options).then((request) => request(this.axios, this.basePath));
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Reschedules an appointment for the service job indicated by the service job identifier you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
496
|
+
* @param {ServiceApiRescheduleAppointmentForServiceJobByServiceJobIdRequest} requestParameters Request parameters.
|
|
497
|
+
* @param {*} [options] Override http request option.
|
|
498
|
+
* @throws {RequiredError}
|
|
499
|
+
* @memberof ServiceApi
|
|
500
|
+
*/
|
|
501
|
+
rescheduleAppointmentForServiceJobByServiceJobId(requestParameters, options) {
|
|
502
|
+
return (0, exports.ServiceApiFp)(this.configuration).rescheduleAppointmentForServiceJobByServiceJobId(requestParameters.serviceJobId, requestParameters.appointmentId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
exports.ServiceApi = ServiceApi;
|