@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.
Files changed (108) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -0
  3. package/dist/cjs/index.js +6 -0
  4. package/dist/cjs/src/api-model/api/service-api.js +505 -0
  5. package/dist/cjs/src/api-model/api.js +17 -0
  6. package/dist/cjs/src/api-model/base.js +62 -0
  7. package/dist/cjs/src/api-model/common.js +137 -0
  8. package/dist/cjs/src/api-model/configuration.js +42 -0
  9. package/dist/cjs/src/api-model/index.js +19 -0
  10. package/dist/cjs/src/api-model/models/add-appointment-request.js +15 -0
  11. package/dist/cjs/src/api-model/models/address.js +15 -0
  12. package/dist/cjs/src/api-model/models/appointment-time-input.js +15 -0
  13. package/dist/cjs/src/api-model/models/appointment-time.js +15 -0
  14. package/dist/cjs/src/api-model/models/appointment.js +26 -0
  15. package/dist/cjs/src/api-model/models/associated-item.js +27 -0
  16. package/dist/cjs/src/api-model/models/buyer.js +15 -0
  17. package/dist/cjs/src/api-model/models/cancel-service-job-by-service-job-id-response.js +15 -0
  18. package/dist/cjs/src/api-model/models/complete-service-job-by-service-job-id-response.js +15 -0
  19. package/dist/cjs/src/api-model/models/get-service-job-by-service-job-id-response.js +15 -0
  20. package/dist/cjs/src/api-model/models/get-service-jobs-response.js +15 -0
  21. package/dist/cjs/src/api-model/models/index.js +28 -0
  22. package/dist/cjs/src/api-model/models/item-delivery-promise.js +15 -0
  23. package/dist/cjs/src/api-model/models/item-delivery.js +15 -0
  24. package/dist/cjs/src/api-model/models/job-listing.js +15 -0
  25. package/dist/cjs/src/api-model/models/model-error.js +25 -0
  26. package/dist/cjs/src/api-model/models/poa.js +27 -0
  27. package/dist/cjs/src/api-model/models/reschedule-appointment-request.js +15 -0
  28. package/dist/cjs/src/api-model/models/scope-of-work.js +15 -0
  29. package/dist/cjs/src/api-model/models/seller.js +15 -0
  30. package/dist/cjs/src/api-model/models/service-job-provider.js +15 -0
  31. package/dist/cjs/src/api-model/models/service-job.js +30 -0
  32. package/dist/cjs/src/api-model/models/service-location.js +26 -0
  33. package/dist/cjs/src/api-model/models/set-appointment-response.js +15 -0
  34. package/dist/cjs/src/api-model/models/technician.js +15 -0
  35. package/dist/cjs/src/api-model/models/warning.js +15 -0
  36. package/dist/cjs/src/client.js +65 -0
  37. package/dist/cjs/src/error.js +10 -0
  38. package/dist/es/index.js +3 -0
  39. package/dist/es/src/api-model/api/service-api.js +497 -0
  40. package/dist/es/src/api-model/api.js +14 -0
  41. package/dist/es/src/api-model/base.js +56 -0
  42. package/dist/es/src/api-model/common.js +125 -0
  43. package/dist/es/src/api-model/configuration.js +38 -0
  44. package/dist/es/src/api-model/index.js +16 -0
  45. package/dist/es/src/api-model/models/add-appointment-request.js +14 -0
  46. package/dist/es/src/api-model/models/address.js +14 -0
  47. package/dist/es/src/api-model/models/appointment-time-input.js +14 -0
  48. package/dist/es/src/api-model/models/appointment-time.js +14 -0
  49. package/dist/es/src/api-model/models/appointment.js +23 -0
  50. package/dist/es/src/api-model/models/associated-item.js +24 -0
  51. package/dist/es/src/api-model/models/buyer.js +14 -0
  52. package/dist/es/src/api-model/models/cancel-service-job-by-service-job-id-response.js +14 -0
  53. package/dist/es/src/api-model/models/complete-service-job-by-service-job-id-response.js +14 -0
  54. package/dist/es/src/api-model/models/get-service-job-by-service-job-id-response.js +14 -0
  55. package/dist/es/src/api-model/models/get-service-jobs-response.js +14 -0
  56. package/dist/es/src/api-model/models/index.js +25 -0
  57. package/dist/es/src/api-model/models/item-delivery-promise.js +14 -0
  58. package/dist/es/src/api-model/models/item-delivery.js +14 -0
  59. package/dist/es/src/api-model/models/job-listing.js +14 -0
  60. package/dist/es/src/api-model/models/model-error.js +22 -0
  61. package/dist/es/src/api-model/models/poa.js +24 -0
  62. package/dist/es/src/api-model/models/reschedule-appointment-request.js +14 -0
  63. package/dist/es/src/api-model/models/scope-of-work.js +14 -0
  64. package/dist/es/src/api-model/models/seller.js +14 -0
  65. package/dist/es/src/api-model/models/service-job-provider.js +14 -0
  66. package/dist/es/src/api-model/models/service-job.js +27 -0
  67. package/dist/es/src/api-model/models/service-location.js +23 -0
  68. package/dist/es/src/api-model/models/set-appointment-response.js +14 -0
  69. package/dist/es/src/api-model/models/technician.js +14 -0
  70. package/dist/es/src/api-model/models/warning.js +14 -0
  71. package/dist/es/src/client.js +61 -0
  72. package/dist/es/src/error.js +6 -0
  73. package/dist/types/index.d.ts +3 -0
  74. package/dist/types/src/api-model/api/service-api.d.ts +443 -0
  75. package/dist/types/src/api-model/api.d.ts +12 -0
  76. package/dist/types/src/api-model/base.d.ts +55 -0
  77. package/dist/types/src/api-model/common.d.ts +65 -0
  78. package/dist/types/src/api-model/configuration.d.ts +83 -0
  79. package/dist/types/src/api-model/index.d.ts +14 -0
  80. package/dist/types/src/api-model/models/add-appointment-request.d.ts +25 -0
  81. package/dist/types/src/api-model/models/address.d.ts +84 -0
  82. package/dist/types/src/api-model/models/appointment-time-input.d.ts +30 -0
  83. package/dist/types/src/api-model/models/appointment-time.d.ts +30 -0
  84. package/dist/types/src/api-model/models/appointment.d.ts +66 -0
  85. package/dist/types/src/api-model/models/associated-item.d.ts +71 -0
  86. package/dist/types/src/api-model/models/buyer.d.ts +42 -0
  87. package/dist/types/src/api-model/models/cancel-service-job-by-service-job-id-response.d.ts +24 -0
  88. package/dist/types/src/api-model/models/complete-service-job-by-service-job-id-response.d.ts +24 -0
  89. package/dist/types/src/api-model/models/get-service-job-by-service-job-id-response.d.ts +31 -0
  90. package/dist/types/src/api-model/models/get-service-jobs-response.d.ts +31 -0
  91. package/dist/types/src/api-model/models/index.d.ts +25 -0
  92. package/dist/types/src/api-model/models/item-delivery-promise.d.ts +30 -0
  93. package/dist/types/src/api-model/models/item-delivery.d.ts +31 -0
  94. package/dist/types/src/api-model/models/job-listing.d.ts +43 -0
  95. package/dist/types/src/api-model/models/model-error.d.ts +50 -0
  96. package/dist/types/src/api-model/models/poa.d.ts +60 -0
  97. package/dist/types/src/api-model/models/reschedule-appointment-request.d.ts +31 -0
  98. package/dist/types/src/api-model/models/scope-of-work.d.ts +42 -0
  99. package/dist/types/src/api-model/models/seller.d.ts +24 -0
  100. package/dist/types/src/api-model/models/service-job-provider.d.ts +24 -0
  101. package/dist/types/src/api-model/models/service-job.d.ts +117 -0
  102. package/dist/types/src/api-model/models/service-location.d.ts +40 -0
  103. package/dist/types/src/api-model/models/set-appointment-response.d.ts +37 -0
  104. package/dist/types/src/api-model/models/technician.d.ts +30 -0
  105. package/dist/types/src/api-model/models/warning.d.ts +36 -0
  106. package/dist/types/src/client.d.ts +13 -0
  107. package/dist/types/src/error.d.ts +3 -0
  108. package/package.json +53 -0
@@ -0,0 +1,15 @@
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 });
@@ -0,0 +1,15 @@
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 });
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ (0, tslib_1.__exportStar)(require("./add-appointment-request"), exports);
5
+ (0, tslib_1.__exportStar)(require("./address"), exports);
6
+ (0, tslib_1.__exportStar)(require("./appointment"), exports);
7
+ (0, tslib_1.__exportStar)(require("./appointment-time"), exports);
8
+ (0, tslib_1.__exportStar)(require("./appointment-time-input"), exports);
9
+ (0, tslib_1.__exportStar)(require("./associated-item"), exports);
10
+ (0, tslib_1.__exportStar)(require("./buyer"), exports);
11
+ (0, tslib_1.__exportStar)(require("./cancel-service-job-by-service-job-id-response"), exports);
12
+ (0, tslib_1.__exportStar)(require("./complete-service-job-by-service-job-id-response"), exports);
13
+ (0, tslib_1.__exportStar)(require("./get-service-job-by-service-job-id-response"), exports);
14
+ (0, tslib_1.__exportStar)(require("./get-service-jobs-response"), exports);
15
+ (0, tslib_1.__exportStar)(require("./item-delivery"), exports);
16
+ (0, tslib_1.__exportStar)(require("./item-delivery-promise"), exports);
17
+ (0, tslib_1.__exportStar)(require("./job-listing"), exports);
18
+ (0, tslib_1.__exportStar)(require("./model-error"), exports);
19
+ (0, tslib_1.__exportStar)(require("./poa"), exports);
20
+ (0, tslib_1.__exportStar)(require("./reschedule-appointment-request"), exports);
21
+ (0, tslib_1.__exportStar)(require("./scope-of-work"), exports);
22
+ (0, tslib_1.__exportStar)(require("./seller"), exports);
23
+ (0, tslib_1.__exportStar)(require("./service-job"), exports);
24
+ (0, tslib_1.__exportStar)(require("./service-job-provider"), exports);
25
+ (0, tslib_1.__exportStar)(require("./service-location"), exports);
26
+ (0, tslib_1.__exportStar)(require("./set-appointment-response"), exports);
27
+ (0, tslib_1.__exportStar)(require("./technician"), exports);
28
+ (0, tslib_1.__exportStar)(require("./warning"), exports);
@@ -0,0 +1,15 @@
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 });
@@ -0,0 +1,15 @@
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 });
@@ -0,0 +1,15 @@
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 });
@@ -0,0 +1,25 @@
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.ModelErrorErrorLevelEnum = void 0;
17
+ /**
18
+ * @export
19
+ * @enum {string}
20
+ */
21
+ var ModelErrorErrorLevelEnum;
22
+ (function (ModelErrorErrorLevelEnum) {
23
+ ModelErrorErrorLevelEnum["Error"] = "ERROR";
24
+ ModelErrorErrorLevelEnum["Warning"] = "WARNING";
25
+ })(ModelErrorErrorLevelEnum = exports.ModelErrorErrorLevelEnum || (exports.ModelErrorErrorLevelEnum = {}));
@@ -0,0 +1,27 @@
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.PoaPoaTypeEnum = void 0;
17
+ /**
18
+ * @export
19
+ * @enum {string}
20
+ */
21
+ var PoaPoaTypeEnum;
22
+ (function (PoaPoaTypeEnum) {
23
+ PoaPoaTypeEnum["NoSignatureDummyPos"] = "NO_SIGNATURE_DUMMY_POS";
24
+ PoaPoaTypeEnum["CustomerSignature"] = "CUSTOMER_SIGNATURE";
25
+ PoaPoaTypeEnum["DummyReceipt"] = "DUMMY_RECEIPT";
26
+ PoaPoaTypeEnum["PoaReceipt"] = "POA_RECEIPT";
27
+ })(PoaPoaTypeEnum = exports.PoaPoaTypeEnum || (exports.PoaPoaTypeEnum = {}));
@@ -0,0 +1,15 @@
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 });
@@ -0,0 +1,15 @@
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 });
@@ -0,0 +1,15 @@
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 });
@@ -0,0 +1,15 @@
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 });
@@ -0,0 +1,30 @@
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.ServiceJobServiceJobStatusEnum = void 0;
17
+ /**
18
+ * @export
19
+ * @enum {string}
20
+ */
21
+ var ServiceJobServiceJobStatusEnum;
22
+ (function (ServiceJobServiceJobStatusEnum) {
23
+ ServiceJobServiceJobStatusEnum["NotServiced"] = "NOT_SERVICED";
24
+ ServiceJobServiceJobStatusEnum["Cancelled"] = "CANCELLED";
25
+ ServiceJobServiceJobStatusEnum["Completed"] = "COMPLETED";
26
+ ServiceJobServiceJobStatusEnum["PendingSchedule"] = "PENDING_SCHEDULE";
27
+ ServiceJobServiceJobStatusEnum["NotFulfillable"] = "NOT_FULFILLABLE";
28
+ ServiceJobServiceJobStatusEnum["Hold"] = "HOLD";
29
+ ServiceJobServiceJobStatusEnum["PaymentDeclined"] = "PAYMENT_DECLINED";
30
+ })(ServiceJobServiceJobStatusEnum = exports.ServiceJobServiceJobStatusEnum || (exports.ServiceJobServiceJobStatusEnum = {}));
@@ -0,0 +1,26 @@
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.ServiceLocationServiceLocationTypeEnum = void 0;
17
+ /**
18
+ * @export
19
+ * @enum {string}
20
+ */
21
+ var ServiceLocationServiceLocationTypeEnum;
22
+ (function (ServiceLocationServiceLocationTypeEnum) {
23
+ ServiceLocationServiceLocationTypeEnum["InHome"] = "IN_HOME";
24
+ ServiceLocationServiceLocationTypeEnum["InStore"] = "IN_STORE";
25
+ ServiceLocationServiceLocationTypeEnum["Online"] = "ONLINE";
26
+ })(ServiceLocationServiceLocationTypeEnum = exports.ServiceLocationServiceLocationTypeEnum || (exports.ServiceLocationServiceLocationTypeEnum = {}));
@@ -0,0 +1,15 @@
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 });
@@ -0,0 +1,15 @@
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 });
@@ -0,0 +1,15 @@
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 });
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServicesApiClient = exports.RATE_LIMITS = void 0;
4
+ /* eslint-disable prefer-regex-literals */
5
+ const common_1 = require("@sp-api-sdk/common");
6
+ const api_model_1 = require("./api-model");
7
+ const error_1 = require("./error");
8
+ exports.RATE_LIMITS = [
9
+ {
10
+ method: 'get',
11
+ urlRegex: new RegExp('^/service/v1/serviceJobs/[^/]*$'),
12
+ rate: 20,
13
+ burst: 40,
14
+ },
15
+ {
16
+ method: 'put',
17
+ urlRegex: new RegExp('^/service/v1/serviceJobs/[^/]*/cancellations$'),
18
+ rate: 5,
19
+ burst: 20,
20
+ },
21
+ {
22
+ method: 'put',
23
+ urlRegex: new RegExp('^/service/v1/serviceJobs/[^/]*/completions$'),
24
+ rate: 5,
25
+ burst: 20,
26
+ },
27
+ {
28
+ method: 'get',
29
+ urlRegex: new RegExp('^/service/v1/serviceJobs$'),
30
+ rate: 10,
31
+ burst: 40,
32
+ },
33
+ {
34
+ method: 'post',
35
+ urlRegex: new RegExp('^/service/v1/serviceJobs/[^/]*/appointments$'),
36
+ rate: 5,
37
+ burst: 20,
38
+ },
39
+ {
40
+ method: 'post',
41
+ urlRegex: new RegExp('^/service/v1/serviceJobs/[^/]*$'),
42
+ rate: 5,
43
+ burst: 20,
44
+ },
45
+ ];
46
+ class ServicesApiClient extends api_model_1.ServiceApi {
47
+ constructor(parameters) {
48
+ const region = common_1.awsRegionByCode[parameters.region] ?? parameters.region;
49
+ const { rateLimiting, ...clientParameters } = parameters;
50
+ const axiosParameters = { ...clientParameters, region };
51
+ if (rateLimiting?.retry) {
52
+ axiosParameters.rateLimits = exports.RATE_LIMITS;
53
+ axiosParameters.onRetry = rateLimiting.onRetry;
54
+ }
55
+ const axiosInstance = (0, common_1.createAxiosInstance)(axiosParameters);
56
+ const configuration = new api_model_1.Configuration();
57
+ const environment = parameters.sandbox ? 'sandbox' : 'production';
58
+ const endpoint = common_1.endpoints[environment][region];
59
+ if (!endpoint) {
60
+ throw new error_1.ServicesApiError(`Unknown region : ${region}`);
61
+ }
62
+ super(configuration, endpoint, axiosInstance);
63
+ }
64
+ }
65
+ exports.ServicesApiClient = ServicesApiClient;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServicesApiError = void 0;
4
+ class ServicesApiError extends Error {
5
+ constructor(message) {
6
+ super(message);
7
+ this.name = 'ServicesApiError';
8
+ }
9
+ }
10
+ exports.ServicesApiError = ServicesApiError;
@@ -0,0 +1,3 @@
1
+ export * from './src/client';
2
+ export * from './src/error';
3
+ export * from './src/api-model/models';
@@ -0,0 +1,497 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Selling Partner API for Services
5
+ * With the Services API, you can build applications that help service providers get and modify their service orders.
6
+ *
7
+ * The version of the OpenAPI document: v1
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import globalAxios from 'axios';
15
+ // Some imports not used depending on template conditions
16
+ // @ts-ignore
17
+ import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
18
+ // @ts-ignore
19
+ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI } from '../base';
20
+ /**
21
+ * ServiceApi - axios parameter creator
22
+ * @export
23
+ */
24
+ export const ServiceApiAxiosParamCreator = function (configuration) {
25
+ return {
26
+ /**
27
+ * 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.
28
+ * @param {string} serviceJobId An Amazon defined service job identifier.
29
+ * @param {AddAppointmentRequest} body Add appointment operation input details.
30
+ * @param {*} [options] Override http request option.
31
+ * @throws {RequiredError}
32
+ */
33
+ addAppointmentForServiceJobByServiceJobId: async (serviceJobId, body, options = {}) => {
34
+ // verify required parameter 'serviceJobId' is not null or undefined
35
+ assertParamExists('addAppointmentForServiceJobByServiceJobId', 'serviceJobId', serviceJobId);
36
+ // verify required parameter 'body' is not null or undefined
37
+ assertParamExists('addAppointmentForServiceJobByServiceJobId', 'body', body);
38
+ const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/appointments`
39
+ .replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId)));
40
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
41
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
42
+ let baseOptions;
43
+ if (configuration) {
44
+ baseOptions = configuration.baseOptions;
45
+ }
46
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
47
+ const localVarHeaderParameter = {};
48
+ const localVarQueryParameter = {};
49
+ localVarHeaderParameter['Content-Type'] = 'application/json';
50
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
51
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
52
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
53
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
54
+ return {
55
+ url: toPathString(localVarUrlObj),
56
+ options: localVarRequestOptions,
57
+ };
58
+ },
59
+ /**
60
+ * 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.
61
+ * @param {string} serviceJobId An Amazon defined service job identifier.
62
+ * @param {string} cancellationReasonCode A cancel reason code that specifies the reason for cancelling a service job.
63
+ * @param {*} [options] Override http request option.
64
+ * @throws {RequiredError}
65
+ */
66
+ cancelServiceJobByServiceJobId: async (serviceJobId, cancellationReasonCode, options = {}) => {
67
+ // verify required parameter 'serviceJobId' is not null or undefined
68
+ assertParamExists('cancelServiceJobByServiceJobId', 'serviceJobId', serviceJobId);
69
+ // verify required parameter 'cancellationReasonCode' is not null or undefined
70
+ assertParamExists('cancelServiceJobByServiceJobId', 'cancellationReasonCode', cancellationReasonCode);
71
+ const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/cancellations`
72
+ .replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId)));
73
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
74
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
75
+ let baseOptions;
76
+ if (configuration) {
77
+ baseOptions = configuration.baseOptions;
78
+ }
79
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
80
+ const localVarHeaderParameter = {};
81
+ const localVarQueryParameter = {};
82
+ if (cancellationReasonCode !== undefined) {
83
+ localVarQueryParameter['cancellationReasonCode'] = cancellationReasonCode;
84
+ }
85
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
86
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
87
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
88
+ return {
89
+ url: toPathString(localVarUrlObj),
90
+ options: localVarRequestOptions,
91
+ };
92
+ },
93
+ /**
94
+ * 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.
95
+ * @param {string} serviceJobId An Amazon defined service job identifier.
96
+ * @param {*} [options] Override http request option.
97
+ * @throws {RequiredError}
98
+ */
99
+ completeServiceJobByServiceJobId: async (serviceJobId, options = {}) => {
100
+ // verify required parameter 'serviceJobId' is not null or undefined
101
+ assertParamExists('completeServiceJobByServiceJobId', 'serviceJobId', serviceJobId);
102
+ const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/completions`
103
+ .replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId)));
104
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
105
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
106
+ let baseOptions;
107
+ if (configuration) {
108
+ baseOptions = configuration.baseOptions;
109
+ }
110
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
111
+ const localVarHeaderParameter = {};
112
+ const localVarQueryParameter = {};
113
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
114
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
115
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
116
+ return {
117
+ url: toPathString(localVarUrlObj),
118
+ options: localVarRequestOptions,
119
+ };
120
+ },
121
+ /**
122
+ * 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.
123
+ * @param {string} serviceJobId A service job identifier.
124
+ * @param {*} [options] Override http request option.
125
+ * @throws {RequiredError}
126
+ */
127
+ getServiceJobByServiceJobId: async (serviceJobId, options = {}) => {
128
+ // verify required parameter 'serviceJobId' is not null or undefined
129
+ assertParamExists('getServiceJobByServiceJobId', 'serviceJobId', serviceJobId);
130
+ const localVarPath = `/service/v1/serviceJobs/{serviceJobId}`
131
+ .replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId)));
132
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
133
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
134
+ let baseOptions;
135
+ if (configuration) {
136
+ baseOptions = configuration.baseOptions;
137
+ }
138
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
139
+ const localVarHeaderParameter = {};
140
+ const localVarQueryParameter = {};
141
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
142
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
143
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
144
+ return {
145
+ url: toPathString(localVarUrlObj),
146
+ options: localVarRequestOptions,
147
+ };
148
+ },
149
+ /**
150
+ * 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.
151
+ * @param {Array<string>} marketplaceIds Used to select jobs that were placed in the specified marketplaces.
152
+ * @param {Array<string>} [serviceOrderIds] List of service order ids for the query you want to perform.Max values supported 20.
153
+ * @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.
154
+ * @param {string} [pageToken] String returned in the response of your previous request.
155
+ * @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.
156
+ * @param {'JOB_DATE' | 'JOB_STATUS'} [sortField] Sort fields on which you want to sort the output.
157
+ * @param {'ASC' | 'DESC'} [sortOrder] Sort order for the query you want to perform.
158
+ * @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.
159
+ * @param {string} [createdBefore] A date used for selecting jobs created before (or at) a specified time must be in ISO 8601 format.
160
+ * @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.
161
+ * @param {string} [lastUpdatedBefore] A date used for selecting jobs updated before (or at) a specified time must be in ISO 8601 format.
162
+ * @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.
163
+ * @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.
164
+ * @param {*} [options] Override http request option.
165
+ * @throws {RequiredError}
166
+ */
167
+ getServiceJobs: async (marketplaceIds, serviceOrderIds, serviceJobStatus, pageToken, pageSize, sortField, sortOrder, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, scheduleStartDate, scheduleEndDate, options = {}) => {
168
+ // verify required parameter 'marketplaceIds' is not null or undefined
169
+ assertParamExists('getServiceJobs', 'marketplaceIds', marketplaceIds);
170
+ const localVarPath = `/service/v1/serviceJobs`;
171
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
172
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
173
+ let baseOptions;
174
+ if (configuration) {
175
+ baseOptions = configuration.baseOptions;
176
+ }
177
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
178
+ const localVarHeaderParameter = {};
179
+ const localVarQueryParameter = {};
180
+ if (serviceOrderIds) {
181
+ localVarQueryParameter['serviceOrderIds'] = serviceOrderIds.join(COLLECTION_FORMATS.csv);
182
+ }
183
+ if (serviceJobStatus) {
184
+ localVarQueryParameter['serviceJobStatus'] = serviceJobStatus.join(COLLECTION_FORMATS.csv);
185
+ }
186
+ if (pageToken !== undefined) {
187
+ localVarQueryParameter['pageToken'] = pageToken;
188
+ }
189
+ if (pageSize !== undefined) {
190
+ localVarQueryParameter['pageSize'] = pageSize;
191
+ }
192
+ if (sortField !== undefined) {
193
+ localVarQueryParameter['sortField'] = sortField;
194
+ }
195
+ if (sortOrder !== undefined) {
196
+ localVarQueryParameter['sortOrder'] = sortOrder;
197
+ }
198
+ if (createdAfter !== undefined) {
199
+ localVarQueryParameter['createdAfter'] = createdAfter;
200
+ }
201
+ if (createdBefore !== undefined) {
202
+ localVarQueryParameter['createdBefore'] = createdBefore;
203
+ }
204
+ if (lastUpdatedAfter !== undefined) {
205
+ localVarQueryParameter['lastUpdatedAfter'] = lastUpdatedAfter;
206
+ }
207
+ if (lastUpdatedBefore !== undefined) {
208
+ localVarQueryParameter['lastUpdatedBefore'] = lastUpdatedBefore;
209
+ }
210
+ if (scheduleStartDate !== undefined) {
211
+ localVarQueryParameter['scheduleStartDate'] = scheduleStartDate;
212
+ }
213
+ if (scheduleEndDate !== undefined) {
214
+ localVarQueryParameter['scheduleEndDate'] = scheduleEndDate;
215
+ }
216
+ if (marketplaceIds) {
217
+ localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(COLLECTION_FORMATS.csv);
218
+ }
219
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
220
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
221
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
222
+ return {
223
+ url: toPathString(localVarUrlObj),
224
+ options: localVarRequestOptions,
225
+ };
226
+ },
227
+ /**
228
+ * 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.
229
+ * @param {string} serviceJobId An Amazon defined service job identifier.
230
+ * @param {string} appointmentId An existing appointment identifier for the Service Job.
231
+ * @param {RescheduleAppointmentRequest} body Reschedule appointment operation input details.
232
+ * @param {*} [options] Override http request option.
233
+ * @throws {RequiredError}
234
+ */
235
+ rescheduleAppointmentForServiceJobByServiceJobId: async (serviceJobId, appointmentId, body, options = {}) => {
236
+ // verify required parameter 'serviceJobId' is not null or undefined
237
+ assertParamExists('rescheduleAppointmentForServiceJobByServiceJobId', 'serviceJobId', serviceJobId);
238
+ // verify required parameter 'appointmentId' is not null or undefined
239
+ assertParamExists('rescheduleAppointmentForServiceJobByServiceJobId', 'appointmentId', appointmentId);
240
+ // verify required parameter 'body' is not null or undefined
241
+ assertParamExists('rescheduleAppointmentForServiceJobByServiceJobId', 'body', body);
242
+ const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/appointments/{appointmentId}`
243
+ .replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId)))
244
+ .replace(`{${"appointmentId"}}`, encodeURIComponent(String(appointmentId)));
245
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
246
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
247
+ let baseOptions;
248
+ if (configuration) {
249
+ baseOptions = configuration.baseOptions;
250
+ }
251
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
252
+ const localVarHeaderParameter = {};
253
+ const localVarQueryParameter = {};
254
+ localVarHeaderParameter['Content-Type'] = 'application/json';
255
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
256
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
257
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
258
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
259
+ return {
260
+ url: toPathString(localVarUrlObj),
261
+ options: localVarRequestOptions,
262
+ };
263
+ },
264
+ };
265
+ };
266
+ /**
267
+ * ServiceApi - functional programming interface
268
+ * @export
269
+ */
270
+ export const ServiceApiFp = function (configuration) {
271
+ const localVarAxiosParamCreator = ServiceApiAxiosParamCreator(configuration);
272
+ return {
273
+ /**
274
+ * 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.
275
+ * @param {string} serviceJobId An Amazon defined service job identifier.
276
+ * @param {AddAppointmentRequest} body Add appointment operation input details.
277
+ * @param {*} [options] Override http request option.
278
+ * @throws {RequiredError}
279
+ */
280
+ async addAppointmentForServiceJobByServiceJobId(serviceJobId, body, options) {
281
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addAppointmentForServiceJobByServiceJobId(serviceJobId, body, options);
282
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
283
+ },
284
+ /**
285
+ * 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.
286
+ * @param {string} serviceJobId An Amazon defined service job identifier.
287
+ * @param {string} cancellationReasonCode A cancel reason code that specifies the reason for cancelling a service job.
288
+ * @param {*} [options] Override http request option.
289
+ * @throws {RequiredError}
290
+ */
291
+ async cancelServiceJobByServiceJobId(serviceJobId, cancellationReasonCode, options) {
292
+ const localVarAxiosArgs = await localVarAxiosParamCreator.cancelServiceJobByServiceJobId(serviceJobId, cancellationReasonCode, options);
293
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
294
+ },
295
+ /**
296
+ * 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.
297
+ * @param {string} serviceJobId An Amazon defined service job identifier.
298
+ * @param {*} [options] Override http request option.
299
+ * @throws {RequiredError}
300
+ */
301
+ async completeServiceJobByServiceJobId(serviceJobId, options) {
302
+ const localVarAxiosArgs = await localVarAxiosParamCreator.completeServiceJobByServiceJobId(serviceJobId, options);
303
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
304
+ },
305
+ /**
306
+ * 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.
307
+ * @param {string} serviceJobId A service job identifier.
308
+ * @param {*} [options] Override http request option.
309
+ * @throws {RequiredError}
310
+ */
311
+ async getServiceJobByServiceJobId(serviceJobId, options) {
312
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getServiceJobByServiceJobId(serviceJobId, options);
313
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
314
+ },
315
+ /**
316
+ * 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.
317
+ * @param {Array<string>} marketplaceIds Used to select jobs that were placed in the specified marketplaces.
318
+ * @param {Array<string>} [serviceOrderIds] List of service order ids for the query you want to perform.Max values supported 20.
319
+ * @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.
320
+ * @param {string} [pageToken] String returned in the response of your previous request.
321
+ * @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.
322
+ * @param {'JOB_DATE' | 'JOB_STATUS'} [sortField] Sort fields on which you want to sort the output.
323
+ * @param {'ASC' | 'DESC'} [sortOrder] Sort order for the query you want to perform.
324
+ * @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.
325
+ * @param {string} [createdBefore] A date used for selecting jobs created before (or at) a specified time must be in ISO 8601 format.
326
+ * @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.
327
+ * @param {string} [lastUpdatedBefore] A date used for selecting jobs updated before (or at) a specified time must be in ISO 8601 format.
328
+ * @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.
329
+ * @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.
330
+ * @param {*} [options] Override http request option.
331
+ * @throws {RequiredError}
332
+ */
333
+ async getServiceJobs(marketplaceIds, serviceOrderIds, serviceJobStatus, pageToken, pageSize, sortField, sortOrder, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, scheduleStartDate, scheduleEndDate, options) {
334
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getServiceJobs(marketplaceIds, serviceOrderIds, serviceJobStatus, pageToken, pageSize, sortField, sortOrder, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, scheduleStartDate, scheduleEndDate, options);
335
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
336
+ },
337
+ /**
338
+ * 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.
339
+ * @param {string} serviceJobId An Amazon defined service job identifier.
340
+ * @param {string} appointmentId An existing appointment identifier for the Service Job.
341
+ * @param {RescheduleAppointmentRequest} body Reschedule appointment operation input details.
342
+ * @param {*} [options] Override http request option.
343
+ * @throws {RequiredError}
344
+ */
345
+ async rescheduleAppointmentForServiceJobByServiceJobId(serviceJobId, appointmentId, body, options) {
346
+ const localVarAxiosArgs = await localVarAxiosParamCreator.rescheduleAppointmentForServiceJobByServiceJobId(serviceJobId, appointmentId, body, options);
347
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
348
+ },
349
+ };
350
+ };
351
+ /**
352
+ * ServiceApi - factory interface
353
+ * @export
354
+ */
355
+ export const ServiceApiFactory = function (configuration, basePath, axios) {
356
+ const localVarFp = ServiceApiFp(configuration);
357
+ return {
358
+ /**
359
+ * 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.
360
+ * @param {string} serviceJobId An Amazon defined service job identifier.
361
+ * @param {AddAppointmentRequest} body Add appointment operation input details.
362
+ * @param {*} [options] Override http request option.
363
+ * @throws {RequiredError}
364
+ */
365
+ addAppointmentForServiceJobByServiceJobId(serviceJobId, body, options) {
366
+ return localVarFp.addAppointmentForServiceJobByServiceJobId(serviceJobId, body, options).then((request) => request(axios, basePath));
367
+ },
368
+ /**
369
+ * 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.
370
+ * @param {string} serviceJobId An Amazon defined service job identifier.
371
+ * @param {string} cancellationReasonCode A cancel reason code that specifies the reason for cancelling a service job.
372
+ * @param {*} [options] Override http request option.
373
+ * @throws {RequiredError}
374
+ */
375
+ cancelServiceJobByServiceJobId(serviceJobId, cancellationReasonCode, options) {
376
+ return localVarFp.cancelServiceJobByServiceJobId(serviceJobId, cancellationReasonCode, options).then((request) => request(axios, basePath));
377
+ },
378
+ /**
379
+ * 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.
380
+ * @param {string} serviceJobId An Amazon defined service job identifier.
381
+ * @param {*} [options] Override http request option.
382
+ * @throws {RequiredError}
383
+ */
384
+ completeServiceJobByServiceJobId(serviceJobId, options) {
385
+ return localVarFp.completeServiceJobByServiceJobId(serviceJobId, options).then((request) => request(axios, basePath));
386
+ },
387
+ /**
388
+ * 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.
389
+ * @param {string} serviceJobId A service job identifier.
390
+ * @param {*} [options] Override http request option.
391
+ * @throws {RequiredError}
392
+ */
393
+ getServiceJobByServiceJobId(serviceJobId, options) {
394
+ return localVarFp.getServiceJobByServiceJobId(serviceJobId, options).then((request) => request(axios, basePath));
395
+ },
396
+ /**
397
+ * 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.
398
+ * @param {Array<string>} marketplaceIds Used to select jobs that were placed in the specified marketplaces.
399
+ * @param {Array<string>} [serviceOrderIds] List of service order ids for the query you want to perform.Max values supported 20.
400
+ * @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.
401
+ * @param {string} [pageToken] String returned in the response of your previous request.
402
+ * @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.
403
+ * @param {'JOB_DATE' | 'JOB_STATUS'} [sortField] Sort fields on which you want to sort the output.
404
+ * @param {'ASC' | 'DESC'} [sortOrder] Sort order for the query you want to perform.
405
+ * @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.
406
+ * @param {string} [createdBefore] A date used for selecting jobs created before (or at) a specified time must be in ISO 8601 format.
407
+ * @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.
408
+ * @param {string} [lastUpdatedBefore] A date used for selecting jobs updated before (or at) a specified time must be in ISO 8601 format.
409
+ * @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.
410
+ * @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.
411
+ * @param {*} [options] Override http request option.
412
+ * @throws {RequiredError}
413
+ */
414
+ getServiceJobs(marketplaceIds, serviceOrderIds, serviceJobStatus, pageToken, pageSize, sortField, sortOrder, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, scheduleStartDate, scheduleEndDate, options) {
415
+ return localVarFp.getServiceJobs(marketplaceIds, serviceOrderIds, serviceJobStatus, pageToken, pageSize, sortField, sortOrder, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, scheduleStartDate, scheduleEndDate, options).then((request) => request(axios, basePath));
416
+ },
417
+ /**
418
+ * 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.
419
+ * @param {string} serviceJobId An Amazon defined service job identifier.
420
+ * @param {string} appointmentId An existing appointment identifier for the Service Job.
421
+ * @param {RescheduleAppointmentRequest} body Reschedule appointment operation input details.
422
+ * @param {*} [options] Override http request option.
423
+ * @throws {RequiredError}
424
+ */
425
+ rescheduleAppointmentForServiceJobByServiceJobId(serviceJobId, appointmentId, body, options) {
426
+ return localVarFp.rescheduleAppointmentForServiceJobByServiceJobId(serviceJobId, appointmentId, body, options).then((request) => request(axios, basePath));
427
+ },
428
+ };
429
+ };
430
+ /**
431
+ * ServiceApi - object-oriented interface
432
+ * @export
433
+ * @class ServiceApi
434
+ * @extends {BaseAPI}
435
+ */
436
+ export class ServiceApi extends BaseAPI {
437
+ /**
438
+ * 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.
439
+ * @param {ServiceApiAddAppointmentForServiceJobByServiceJobIdRequest} requestParameters Request parameters.
440
+ * @param {*} [options] Override http request option.
441
+ * @throws {RequiredError}
442
+ * @memberof ServiceApi
443
+ */
444
+ addAppointmentForServiceJobByServiceJobId(requestParameters, options) {
445
+ return ServiceApiFp(this.configuration).addAppointmentForServiceJobByServiceJobId(requestParameters.serviceJobId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
446
+ }
447
+ /**
448
+ * 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.
449
+ * @param {ServiceApiCancelServiceJobByServiceJobIdRequest} requestParameters Request parameters.
450
+ * @param {*} [options] Override http request option.
451
+ * @throws {RequiredError}
452
+ * @memberof ServiceApi
453
+ */
454
+ cancelServiceJobByServiceJobId(requestParameters, options) {
455
+ return ServiceApiFp(this.configuration).cancelServiceJobByServiceJobId(requestParameters.serviceJobId, requestParameters.cancellationReasonCode, options).then((request) => request(this.axios, this.basePath));
456
+ }
457
+ /**
458
+ * 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.
459
+ * @param {ServiceApiCompleteServiceJobByServiceJobIdRequest} requestParameters Request parameters.
460
+ * @param {*} [options] Override http request option.
461
+ * @throws {RequiredError}
462
+ * @memberof ServiceApi
463
+ */
464
+ completeServiceJobByServiceJobId(requestParameters, options) {
465
+ return ServiceApiFp(this.configuration).completeServiceJobByServiceJobId(requestParameters.serviceJobId, options).then((request) => request(this.axios, this.basePath));
466
+ }
467
+ /**
468
+ * 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.
469
+ * @param {ServiceApiGetServiceJobByServiceJobIdRequest} requestParameters Request parameters.
470
+ * @param {*} [options] Override http request option.
471
+ * @throws {RequiredError}
472
+ * @memberof ServiceApi
473
+ */
474
+ getServiceJobByServiceJobId(requestParameters, options) {
475
+ return ServiceApiFp(this.configuration).getServiceJobByServiceJobId(requestParameters.serviceJobId, options).then((request) => request(this.axios, this.basePath));
476
+ }
477
+ /**
478
+ * 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.
479
+ * @param {ServiceApiGetServiceJobsRequest} requestParameters Request parameters.
480
+ * @param {*} [options] Override http request option.
481
+ * @throws {RequiredError}
482
+ * @memberof ServiceApi
483
+ */
484
+ getServiceJobs(requestParameters, options) {
485
+ return 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));
486
+ }
487
+ /**
488
+ * 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.
489
+ * @param {ServiceApiRescheduleAppointmentForServiceJobByServiceJobIdRequest} requestParameters Request parameters.
490
+ * @param {*} [options] Override http request option.
491
+ * @throws {RequiredError}
492
+ * @memberof ServiceApi
493
+ */
494
+ rescheduleAppointmentForServiceJobByServiceJobId(requestParameters, options) {
495
+ return ServiceApiFp(this.configuration).rescheduleAppointmentForServiceJobByServiceJobId(requestParameters.serviceJobId, requestParameters.appointmentId, requestParameters.body, options).then((request) => request(this.axios, this.basePath));
496
+ }
497
+ }