UNPKG

@scaleleap/selling-partner-api-sdk

Version:

📦 A fully typed TypeScript and Node.js SDK library for Amazon Selling Partner API

693 lines • 135 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Selling Partner API for Services * With the Services API, you can build applications that help service providers get and modify their service orders and manage their resources. * * The version of the OpenAPI document: v1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ServiceApi = exports.ServiceApiFactory = exports.ServiceApiFp = exports.ServiceApiAxiosParamCreator = exports.ServiceUploadDocumentContentTypeEnum = exports.ServiceLocationServiceLocationTypeEnum = exports.ServiceJobServiceJobStatusEnum = exports.ReservationTypeEnum = exports.PoaPoaTypeEnum = exports.ModelErrorErrorLevelEnum = exports.EncryptionDetailsStandardEnum = exports.DayOfWeek = exports.CapacityType = exports.AssociatedItemItemStatusEnum = exports.AppointmentSlotReportSchedulingTypeEnum = exports.AppointmentAppointmentStatusEnum = void 0; const axios_1 = __importDefault(require("axios")); // Some imports not used depending on template conditions // @ts-ignore const common_1 = require("./common"); // @ts-ignore const base_1 = require("./base"); /** * @export * @enum {string} */ var AppointmentAppointmentStatusEnum; (function (AppointmentAppointmentStatusEnum) { AppointmentAppointmentStatusEnum["Active"] = "ACTIVE"; AppointmentAppointmentStatusEnum["Cancelled"] = "CANCELLED"; AppointmentAppointmentStatusEnum["Completed"] = "COMPLETED"; })(AppointmentAppointmentStatusEnum || (exports.AppointmentAppointmentStatusEnum = AppointmentAppointmentStatusEnum = {})); /** * @export * @enum {string} */ var AppointmentSlotReportSchedulingTypeEnum; (function (AppointmentSlotReportSchedulingTypeEnum) { AppointmentSlotReportSchedulingTypeEnum["RealTimeScheduling"] = "REAL_TIME_SCHEDULING"; AppointmentSlotReportSchedulingTypeEnum["NonRealTimeScheduling"] = "NON_REAL_TIME_SCHEDULING"; })(AppointmentSlotReportSchedulingTypeEnum || (exports.AppointmentSlotReportSchedulingTypeEnum = AppointmentSlotReportSchedulingTypeEnum = {})); /** * @export * @enum {string} */ var AssociatedItemItemStatusEnum; (function (AssociatedItemItemStatusEnum) { AssociatedItemItemStatusEnum["Active"] = "ACTIVE"; AssociatedItemItemStatusEnum["Cancelled"] = "CANCELLED"; AssociatedItemItemStatusEnum["Shipped"] = "SHIPPED"; AssociatedItemItemStatusEnum["Delivered"] = "DELIVERED"; })(AssociatedItemItemStatusEnum || (exports.AssociatedItemItemStatusEnum = AssociatedItemItemStatusEnum = {})); /** * Type of capacity * @export * @enum {string} */ var CapacityType; (function (CapacityType) { CapacityType["ScheduledCapacity"] = "SCHEDULED_CAPACITY"; CapacityType["AvailableCapacity"] = "AVAILABLE_CAPACITY"; CapacityType["EncumberedCapacity"] = "ENCUMBERED_CAPACITY"; CapacityType["ReservedCapacity"] = "RESERVED_CAPACITY"; })(CapacityType || (exports.CapacityType = CapacityType = {})); /** * The day of the week. * @export * @enum {string} */ var DayOfWeek; (function (DayOfWeek) { DayOfWeek["Monday"] = "MONDAY"; DayOfWeek["Tuesday"] = "TUESDAY"; DayOfWeek["Wednesday"] = "WEDNESDAY"; DayOfWeek["Thursday"] = "THURSDAY"; DayOfWeek["Friday"] = "FRIDAY"; DayOfWeek["Saturday"] = "SATURDAY"; DayOfWeek["Sunday"] = "SUNDAY"; })(DayOfWeek || (exports.DayOfWeek = DayOfWeek = {})); /** * @export * @enum {string} */ var EncryptionDetailsStandardEnum; (function (EncryptionDetailsStandardEnum) { EncryptionDetailsStandardEnum["Aes"] = "AES"; })(EncryptionDetailsStandardEnum || (exports.EncryptionDetailsStandardEnum = EncryptionDetailsStandardEnum = {})); /** * @export * @enum {string} */ var ModelErrorErrorLevelEnum; (function (ModelErrorErrorLevelEnum) { ModelErrorErrorLevelEnum["Error"] = "ERROR"; ModelErrorErrorLevelEnum["Warning"] = "WARNING"; })(ModelErrorErrorLevelEnum || (exports.ModelErrorErrorLevelEnum = ModelErrorErrorLevelEnum = {})); /** * @export * @enum {string} */ var PoaPoaTypeEnum; (function (PoaPoaTypeEnum) { PoaPoaTypeEnum["NoSignatureDummyPos"] = "NO_SIGNATURE_DUMMY_POS"; PoaPoaTypeEnum["CustomerSignature"] = "CUSTOMER_SIGNATURE"; PoaPoaTypeEnum["DummyReceipt"] = "DUMMY_RECEIPT"; PoaPoaTypeEnum["PoaReceipt"] = "POA_RECEIPT"; })(PoaPoaTypeEnum || (exports.PoaPoaTypeEnum = PoaPoaTypeEnum = {})); /** * @export * @enum {string} */ var ReservationTypeEnum; (function (ReservationTypeEnum) { ReservationTypeEnum["Appointment"] = "APPOINTMENT"; ReservationTypeEnum["Travel"] = "TRAVEL"; ReservationTypeEnum["Vacation"] = "VACATION"; ReservationTypeEnum["Break"] = "BREAK"; ReservationTypeEnum["Training"] = "TRAINING"; })(ReservationTypeEnum || (exports.ReservationTypeEnum = ReservationTypeEnum = {})); /** * @export * @enum {string} */ var ServiceJobServiceJobStatusEnum; (function (ServiceJobServiceJobStatusEnum) { ServiceJobServiceJobStatusEnum["NotServiced"] = "NOT_SERVICED"; ServiceJobServiceJobStatusEnum["Cancelled"] = "CANCELLED"; ServiceJobServiceJobStatusEnum["Completed"] = "COMPLETED"; ServiceJobServiceJobStatusEnum["PendingSchedule"] = "PENDING_SCHEDULE"; ServiceJobServiceJobStatusEnum["NotFulfillable"] = "NOT_FULFILLABLE"; ServiceJobServiceJobStatusEnum["Hold"] = "HOLD"; ServiceJobServiceJobStatusEnum["PaymentDeclined"] = "PAYMENT_DECLINED"; })(ServiceJobServiceJobStatusEnum || (exports.ServiceJobServiceJobStatusEnum = ServiceJobServiceJobStatusEnum = {})); /** * @export * @enum {string} */ var ServiceLocationServiceLocationTypeEnum; (function (ServiceLocationServiceLocationTypeEnum) { ServiceLocationServiceLocationTypeEnum["InHome"] = "IN_HOME"; ServiceLocationServiceLocationTypeEnum["InStore"] = "IN_STORE"; ServiceLocationServiceLocationTypeEnum["Online"] = "ONLINE"; })(ServiceLocationServiceLocationTypeEnum || (exports.ServiceLocationServiceLocationTypeEnum = ServiceLocationServiceLocationTypeEnum = {})); /** * @export * @enum {string} */ var ServiceUploadDocumentContentTypeEnum; (function (ServiceUploadDocumentContentTypeEnum) { ServiceUploadDocumentContentTypeEnum["Tiff"] = "TIFF"; ServiceUploadDocumentContentTypeEnum["Jpg"] = "JPG"; ServiceUploadDocumentContentTypeEnum["Png"] = "PNG"; ServiceUploadDocumentContentTypeEnum["Jpeg"] = "JPEG"; ServiceUploadDocumentContentTypeEnum["Gif"] = "GIF"; ServiceUploadDocumentContentTypeEnum["Pdf"] = "PDF"; })(ServiceUploadDocumentContentTypeEnum || (exports.ServiceUploadDocumentContentTypeEnum = ServiceUploadDocumentContentTypeEnum = {})); /** * ServiceApi - axios parameter creator * @export */ const ServiceApiAxiosParamCreator = function (configuration) { return { /** * Adds an appointment to the service job indicated by the service job identifier specified. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} serviceJobId An Amazon defined service job identifier. * @param {AddAppointmentRequest} body Add appointment operation input details. * @param {*} [options] Override http request option. * @throws {RequiredError} */ addAppointmentForServiceJobByServiceJobId: async (serviceJobId, body, options = {}) => { // verify required parameter 'serviceJobId' is not null or undefined (0, common_1.assertParamExists)('addAppointmentForServiceJobByServiceJobId', 'serviceJobId', serviceJobId); // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('addAppointmentForServiceJobByServiceJobId', 'body', body); const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/appointments` .replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Assigns new resource(s) or overwrite/update the existing one(s) to a service job appointment. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 2 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} serviceJobId An Amazon-defined service job identifier. Get this value by calling the &#x60;getServiceJobs&#x60; operation of the Services API. * @param {string} appointmentId An Amazon-defined identifier of active service job appointment. * @param {AssignAppointmentResourcesRequest} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ assignAppointmentResources: async (serviceJobId, appointmentId, body, options = {}) => { // verify required parameter 'serviceJobId' is not null or undefined (0, common_1.assertParamExists)('assignAppointmentResources', 'serviceJobId', serviceJobId); // verify required parameter 'appointmentId' is not null or undefined (0, common_1.assertParamExists)('assignAppointmentResources', 'appointmentId', appointmentId); // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('assignAppointmentResources', 'body', body); const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/appointments/{appointmentId}/resources` .replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId))) .replace(`{${"appointmentId"}}`, encodeURIComponent(String(appointmentId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Cancel a reservation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} reservationId Reservation Identifier * @param {Array<string>} marketplaceIds An identifier for the marketplace in which the resource operates. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelReservation: async (reservationId, marketplaceIds, options = {}) => { // verify required parameter 'reservationId' is not null or undefined (0, common_1.assertParamExists)('cancelReservation', 'reservationId', reservationId); // verify required parameter 'marketplaceIds' is not null or undefined (0, common_1.assertParamExists)('cancelReservation', 'marketplaceIds', marketplaceIds); const localVarPath = `/service/v1/reservation/{reservationId}` .replace(`{${"reservationId"}}`, encodeURIComponent(String(reservationId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (marketplaceIds) { localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(base_1.COLLECTION_FORMATS.csv); } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Cancels the service job indicated by the service job identifier specified. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} serviceJobId An Amazon defined service job identifier. * @param {string} cancellationReasonCode A cancel reason code that specifies the reason for cancelling a service job. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelServiceJobByServiceJobId: async (serviceJobId, cancellationReasonCode, options = {}) => { // verify required parameter 'serviceJobId' is not null or undefined (0, common_1.assertParamExists)('cancelServiceJobByServiceJobId', 'serviceJobId', serviceJobId); // verify required parameter 'cancellationReasonCode' is not null or undefined (0, common_1.assertParamExists)('cancelServiceJobByServiceJobId', 'cancellationReasonCode', cancellationReasonCode); const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/cancellations` .replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (cancellationReasonCode !== undefined) { localVarQueryParameter['cancellationReasonCode'] = cancellationReasonCode; } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Completes the service job indicated by the service job identifier specified. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} serviceJobId An Amazon defined service job identifier. * @param {*} [options] Override http request option. * @throws {RequiredError} */ completeServiceJobByServiceJobId: async (serviceJobId, options = {}) => { // verify required parameter 'serviceJobId' is not null or undefined (0, common_1.assertParamExists)('completeServiceJobByServiceJobId', 'serviceJobId', serviceJobId); const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/completions` .replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Create a reservation. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {Array<string>} marketplaceIds An identifier for the marketplace in which the resource operates. * @param {CreateReservationRequest} body Reservation details * @param {*} [options] Override http request option. * @throws {RequiredError} */ createReservation: async (marketplaceIds, body, options = {}) => { // verify required parameter 'marketplaceIds' is not null or undefined (0, common_1.assertParamExists)('createReservation', 'marketplaceIds', marketplaceIds); // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('createReservation', 'body', body); const localVarPath = `/service/v1/reservation`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (marketplaceIds) { localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(base_1.COLLECTION_FORMATS.csv); } localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Creates an upload destination. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {ServiceUploadDocument} body Upload document operation input details. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createServiceDocumentUploadDestination: async (body, options = {}) => { // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('createServiceDocumentUploadDestination', 'body', body); const localVarPath = `/service/v1/documents`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Gets appointment slots as per the service context specified. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 20 | 40 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} asin ASIN associated with the service. * @param {string} storeId Store identifier defining the region scope to retrive appointment slots. * @param {Array<string>} marketplaceIds An identifier for the marketplace for which appointment slots are queried * @param {string} [startTime] A time from which the appointment slots will be retrieved. The specified time must be in ISO 8601 format. If &#x60;startTime&#x60; is provided, &#x60;endTime&#x60; should also be provided. Default value is as per business configuration. * @param {string} [endTime] A time up to which the appointment slots will be retrieved. The specified time must be in ISO 8601 format. If &#x60;endTime&#x60; is provided, &#x60;startTime&#x60; should also be provided. Default value is as per business configuration. Maximum range of appointment slots can be 90 days. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAppointmentSlots: async (asin, storeId, marketplaceIds, startTime, endTime, options = {}) => { // verify required parameter 'asin' is not null or undefined (0, common_1.assertParamExists)('getAppointmentSlots', 'asin', asin); // verify required parameter 'storeId' is not null or undefined (0, common_1.assertParamExists)('getAppointmentSlots', 'storeId', storeId); // verify required parameter 'marketplaceIds' is not null or undefined (0, common_1.assertParamExists)('getAppointmentSlots', 'marketplaceIds', marketplaceIds); const localVarPath = `/service/v1/appointmentSlots`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (asin !== undefined) { localVarQueryParameter['asin'] = asin; } if (storeId !== undefined) { localVarQueryParameter['storeId'] = storeId; } if (marketplaceIds) { localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(base_1.COLLECTION_FORMATS.csv); } if (startTime !== undefined) { localVarQueryParameter['startTime'] = startTime; } if (endTime !== undefined) { localVarQueryParameter['endTime'] = endTime; } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Gets appointment slots for the service associated with the service job id specified. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} serviceJobId A service job identifier to retrive appointment slots for associated service. * @param {Array<string>} marketplaceIds An identifier for the marketplace in which the resource operates. * @param {string} [startTime] A time from which the appointment slots will be retrieved. The specified time must be in ISO 8601 format. If &#x60;startTime&#x60; is provided, &#x60;endTime&#x60; should also be provided. Default value is as per business configuration. * @param {string} [endTime] A time up to which the appointment slots will be retrieved. The specified time must be in ISO 8601 format. If &#x60;endTime&#x60; is provided, &#x60;startTime&#x60; should also be provided. Default value is as per business configuration. Maximum range of appointment slots can be 90 days. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAppointmmentSlotsByJobId: async (serviceJobId, marketplaceIds, startTime, endTime, options = {}) => { // verify required parameter 'serviceJobId' is not null or undefined (0, common_1.assertParamExists)('getAppointmmentSlotsByJobId', 'serviceJobId', serviceJobId); // verify required parameter 'marketplaceIds' is not null or undefined (0, common_1.assertParamExists)('getAppointmmentSlotsByJobId', 'marketplaceIds', marketplaceIds); const localVarPath = `/service/v1/serviceJobs/{serviceJobId}/appointmentSlots` .replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (marketplaceIds) { localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(base_1.COLLECTION_FORMATS.csv); } if (startTime !== undefined) { localVarQueryParameter['startTime'] = startTime; } if (endTime !== undefined) { localVarQueryParameter['endTime'] = endTime; } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Provides capacity in fixed-size slots. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} resourceId Resource Identifier. * @param {Array<string>} marketplaceIds An identifier for the marketplace in which the resource operates. * @param {FixedSlotCapacityQuery} body Request body. * @param {string} [nextPageToken] Next page token returned in the response of your previous request. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFixedSlotCapacity: async (resourceId, marketplaceIds, body, nextPageToken, options = {}) => { // verify required parameter 'resourceId' is not null or undefined (0, common_1.assertParamExists)('getFixedSlotCapacity', 'resourceId', resourceId); // verify required parameter 'marketplaceIds' is not null or undefined (0, common_1.assertParamExists)('getFixedSlotCapacity', 'marketplaceIds', marketplaceIds); // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('getFixedSlotCapacity', 'body', body); const localVarPath = `/service/v1/serviceResources/{resourceId}/capacity/fixed` .replace(`{${"resourceId"}}`, encodeURIComponent(String(resourceId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (marketplaceIds) { localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(base_1.COLLECTION_FORMATS.csv); } if (nextPageToken !== undefined) { localVarQueryParameter['nextPageToken'] = nextPageToken; } localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Provides capacity slots in a format similar to availability records. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} resourceId Resource Identifier. * @param {Array<string>} marketplaceIds An identifier for the marketplace in which the resource operates. * @param {RangeSlotCapacityQuery} body Request body. * @param {string} [nextPageToken] Next page token returned in the response of your previous request. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRangeSlotCapacity: async (resourceId, marketplaceIds, body, nextPageToken, options = {}) => { // verify required parameter 'resourceId' is not null or undefined (0, common_1.assertParamExists)('getRangeSlotCapacity', 'resourceId', resourceId); // verify required parameter 'marketplaceIds' is not null or undefined (0, common_1.assertParamExists)('getRangeSlotCapacity', 'marketplaceIds', marketplaceIds); // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('getRangeSlotCapacity', 'body', body); const localVarPath = `/service/v1/serviceResources/{resourceId}/capacity/range` .replace(`{${"resourceId"}}`, encodeURIComponent(String(resourceId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (marketplaceIds) { localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(base_1.COLLECTION_FORMATS.csv); } if (nextPageToken !== undefined) { localVarQueryParameter['nextPageToken'] = nextPageToken; } localVarHeaderParameter['Content-Type'] = 'application/json'; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Gets details of service job indicated by the provided `serviceJobID`. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 20 | 40 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {string} serviceJobId A service job identifier. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getServiceJobByServiceJobId: async (serviceJobId, options = {}) => { // verify required parameter 'serviceJobId' is not null or undefined (0, common_1.assertParamExists)('getServiceJobByServiceJobId', 'serviceJobId', serviceJobId); const localVarPath = `/service/v1/serviceJobs/{serviceJobId}` .replace(`{${"serviceJobId"}}`, encodeURIComponent(String(serviceJobId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Gets service job details for the specified filter query. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 40 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api). * @param {Array<string>} marketplaceIds Used to select jobs that were placed in the specified marketplaces. * @param {Array<string>} [serviceOrderIds] List of service order ids for the query you want to perform.Max values supported 20. * @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. * @param {string} [pageToken] String returned in the response of your previous request. * @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. * @param {'JOB_DATE' | 'JOB_STATUS'} [sortField] Sort fields on which you want to sort the output. * @param {'ASC' | 'DESC'} [sortOrder] Sort order for the query you want to perform. * @param {string} [createdAfter] A date used for selecting jobs created at or after a specified time. Must be in ISO 8601 format. Required if &#x60;LastUpdatedAfter&#x60; is not specified. Specifying both &#x60;CreatedAfter&#x60; and &#x60;LastUpdatedAfter&#x60; returns an error. * @param {string} [createdBefore] A date used for selecting jobs created at or before a specified time. Must be in ISO 8601 format. * @param {string} [lastUpdatedAfter] A date used for selecting jobs updated at or after a specified time. Must be in ISO 8601 format. Required if &#x60;createdAfter&#x60; is not specified. Specifying both &#x60;CreatedAfter&#x60; and &#x60;LastUpdatedAfter&#x60; returns an error. * @param {string} [lastUpdatedBefore] A date used for selecting jobs updated at or before a specified time. Must be in ISO 8601 format. * @param {string} [scheduleStartDate] A date used for filtering jobs schedules at or after a specified time. Must be in ISO 8601 format. Schedule end date should not be earlier than schedule start date. * @param {string} [scheduleEndDate] A date used for filtering jobs schedules at or before a specified time. Must be in ISO 8601 format. Schedule end date should not be earlier than schedule start date. * @param {Array<string>} [asins] List of Amazon Standard Identification Numbers (ASIN) of the items. Max values supported is 20. * @param {Array<string>} [requiredSkills] A defined set of related knowledge, skills, experience, tools, materials, and work processes common to service delivery for a set of products and/or service scenarios. Max values supported is 20. * @param {Array<string>} [storeIds] List of Amazon-defined identifiers for the region scope. Max values supported is 50. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getServiceJobs: async (marketplaceIds, serviceOrderIds, serviceJobStatus, pageToken, pageSize, sortField, sortOrder, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, scheduleStartDate, scheduleEndDate, asins, requiredSkills, storeIds, options = {}) => { // verify required parameter 'marketplaceIds' is not null or undefined (0, common_1.assertParamExists)('getServiceJobs', 'marketplaceIds', marketplaceIds); const localVarPath = `/service/v1/serviceJobs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; if (serviceOrderIds) { localVarQueryParameter['serviceOrderIds'] = serviceOrderIds.join(base_1.COLLECTION_FORMATS.csv); } if (serviceJobStatus) { localVarQueryParameter['serviceJobStatus'] = serviceJobStatus.join(base_1.COLLECTION_FORMATS.csv); } if (pageToken !== undefined) { localVarQueryParameter['pageToken'] = pageToken; } if (pageSize !== undefined) { localVarQueryParameter['pageSize'] = pageSize; } if (sortField !== undefined) { localVarQueryParameter['sortField'] = sortField; } if (sortOrder !== undefined) { localVarQueryParameter['sortOrder'] = sortOrder; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = createdBefore; } if (lastUpdatedAfter !== undefined) { localVarQueryParameter['lastUpdatedAfter'] = lastUpdatedAfter; } if (lastUpdatedBefore !== undefined) { localVarQueryParameter['lastUpdatedBefore'] = lastUpdatedBefore; } if (scheduleStartDate !== undefined) { localVarQueryParameter['scheduleStartDate'] = scheduleStartDate; } if (scheduleEndDate !== undefined) { localVarQueryParameter['scheduleEndDate'] = scheduleEndDate; } if (marketplaceIds) { localVarQueryParameter['marketplaceIds'] = marketplaceIds.join(base_1.COLLECTION_FORMATS.csv); } if (asins) { localVarQueryParameter['asins'] = asins.join(base_1.COLLECTION_FORMATS.csv); } if (requiredSkills) { localVarQueryParameter['requiredSkills'] = requiredSkills.join(base_1.COLLECTION_FORMATS.csv); } if (storeIds) { localVarQueryParameter['storeIds'] = storeIds.join(base_1.COLLECTION_FORMATS.csv); } (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Reschedules an appointment for the service job indicated by the service job identifier specified. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 20 | The `x-amzn-RateLimit-Limit` response header return