@sp-api-sdk/solicitations-api-v1 1.10.8 → 1.10.10

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.
@@ -139,23 +139,21 @@ const SolicitationsApiFactory = function (configuration, basePath, axios) {
139
139
  return {
140
140
  /**
141
141
  * Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
142
- * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a solicitation is sent.
143
- * @param {Array<string>} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
142
+ * @param {SolicitationsApiCreateProductReviewAndSellerFeedbackSolicitationRequest} requestParameters Request parameters.
144
143
  * @param {*} [options] Override http request option.
145
144
  * @throws {RequiredError}
146
145
  */
147
- createProductReviewAndSellerFeedbackSolicitation(amazonOrderId, marketplaceIds, options) {
148
- return localVarFp.createProductReviewAndSellerFeedbackSolicitation(amazonOrderId, marketplaceIds, options).then((request) => request(axios, basePath));
146
+ createProductReviewAndSellerFeedbackSolicitation(requestParameters, options) {
147
+ return localVarFp.createProductReviewAndSellerFeedbackSolicitation(requestParameters.amazonOrderId, requestParameters.marketplaceIds, options).then((request) => request(axios, basePath));
149
148
  },
150
149
  /**
151
150
  * Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
152
- * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.
153
- * @param {Array<string>} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
151
+ * @param {SolicitationsApiGetSolicitationActionsForOrderRequest} requestParameters Request parameters.
154
152
  * @param {*} [options] Override http request option.
155
153
  * @throws {RequiredError}
156
154
  */
157
- getSolicitationActionsForOrder(amazonOrderId, marketplaceIds, options) {
158
- return localVarFp.getSolicitationActionsForOrder(amazonOrderId, marketplaceIds, options).then((request) => request(axios, basePath));
155
+ getSolicitationActionsForOrder(requestParameters, options) {
156
+ return localVarFp.getSolicitationActionsForOrder(requestParameters.amazonOrderId, requestParameters.marketplaceIds, options).then((request) => request(axios, basePath));
159
157
  },
160
158
  };
161
159
  };
@@ -15,8 +15,6 @@
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
17
17
  const tslib_1 = require("tslib");
18
- // Some imports not used depending on template conditions
19
- // @ts-ignore
20
18
  const axios_1 = tslib_1.__importDefault(require("axios"));
21
19
  exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
22
20
  /**
@@ -57,10 +55,10 @@ exports.BaseAPI = BaseAPI;
57
55
  */
58
56
  class RequiredError extends Error {
59
57
  field;
60
- name = "RequiredError";
61
58
  constructor(field, msg) {
62
59
  super(msg);
63
60
  this.field = field;
61
+ this.name = "RequiredError";
64
62
  }
65
63
  }
66
64
  exports.RequiredError = RequiredError;
@@ -81,6 +81,8 @@ const setOAuthToObject = async function (object, name, scopes, configuration) {
81
81
  };
82
82
  exports.setOAuthToObject = setOAuthToObject;
83
83
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
84
+ if (parameter == null)
85
+ return;
84
86
  if (typeof parameter === "object") {
85
87
  if (Array.isArray(parameter)) {
86
88
  parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
@@ -133,23 +133,21 @@ export const SolicitationsApiFactory = function (configuration, basePath, axios)
133
133
  return {
134
134
  /**
135
135
  * Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
136
- * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a solicitation is sent.
137
- * @param {Array<string>} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
136
+ * @param {SolicitationsApiCreateProductReviewAndSellerFeedbackSolicitationRequest} requestParameters Request parameters.
138
137
  * @param {*} [options] Override http request option.
139
138
  * @throws {RequiredError}
140
139
  */
141
- createProductReviewAndSellerFeedbackSolicitation(amazonOrderId, marketplaceIds, options) {
142
- return localVarFp.createProductReviewAndSellerFeedbackSolicitation(amazonOrderId, marketplaceIds, options).then((request) => request(axios, basePath));
140
+ createProductReviewAndSellerFeedbackSolicitation(requestParameters, options) {
141
+ return localVarFp.createProductReviewAndSellerFeedbackSolicitation(requestParameters.amazonOrderId, requestParameters.marketplaceIds, options).then((request) => request(axios, basePath));
143
142
  },
144
143
  /**
145
144
  * Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
146
- * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.
147
- * @param {Array<string>} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
145
+ * @param {SolicitationsApiGetSolicitationActionsForOrderRequest} requestParameters Request parameters.
148
146
  * @param {*} [options] Override http request option.
149
147
  * @throws {RequiredError}
150
148
  */
151
- getSolicitationActionsForOrder(amazonOrderId, marketplaceIds, options) {
152
- return localVarFp.getSolicitationActionsForOrder(amazonOrderId, marketplaceIds, options).then((request) => request(axios, basePath));
149
+ getSolicitationActionsForOrder(requestParameters, options) {
150
+ return localVarFp.getSolicitationActionsForOrder(requestParameters.amazonOrderId, requestParameters.marketplaceIds, options).then((request) => request(axios, basePath));
153
151
  },
154
152
  };
155
153
  };
@@ -11,8 +11,6 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- // Some imports not used depending on template conditions
15
- // @ts-ignore
16
14
  import globalAxios from 'axios';
17
15
  export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
18
16
  /**
@@ -52,9 +50,9 @@ export class BaseAPI {
52
50
  */
53
51
  export class RequiredError extends Error {
54
52
  field;
55
- name = "RequiredError";
56
53
  constructor(field, msg) {
57
54
  super(msg);
58
55
  this.field = field;
56
+ this.name = "RequiredError";
59
57
  }
60
58
  }
@@ -73,6 +73,8 @@ export const setOAuthToObject = async function (object, name, scopes, configurat
73
73
  }
74
74
  };
75
75
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
76
+ if (parameter == null)
77
+ return;
76
78
  if (typeof parameter === "object") {
77
79
  if (Array.isArray(parameter)) {
78
80
  parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
@@ -9,8 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
- import { Configuration } from '../configuration';
12
+ import type { Configuration } from '../configuration';
13
+ import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
15
  import { CreateProductReviewAndSellerFeedbackSolicitationResponse } from '../models';
16
16
  import { GetSolicitationActionsForOrderResponse } from '../models';
@@ -65,20 +65,18 @@ export declare const SolicitationsApiFp: (configuration?: Configuration) => {
65
65
  export declare const SolicitationsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
66
66
  /**
67
67
  * Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
68
- * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which a solicitation is sent.
69
- * @param {Array<string>} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
68
+ * @param {SolicitationsApiCreateProductReviewAndSellerFeedbackSolicitationRequest} requestParameters Request parameters.
70
69
  * @param {*} [options] Override http request option.
71
70
  * @throws {RequiredError}
72
71
  */
73
- createProductReviewAndSellerFeedbackSolicitation(amazonOrderId: string, marketplaceIds: Array<string>, options?: any): AxiosPromise<CreateProductReviewAndSellerFeedbackSolicitationResponse>;
72
+ createProductReviewAndSellerFeedbackSolicitation(requestParameters: SolicitationsApiCreateProductReviewAndSellerFeedbackSolicitationRequest, options?: AxiosRequestConfig): AxiosPromise<CreateProductReviewAndSellerFeedbackSolicitationResponse>;
74
73
  /**
75
74
  * Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
76
- * @param {string} amazonOrderId An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.
77
- * @param {Array<string>} marketplaceIds A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
75
+ * @param {SolicitationsApiGetSolicitationActionsForOrderRequest} requestParameters Request parameters.
78
76
  * @param {*} [options] Override http request option.
79
77
  * @throws {RequiredError}
80
78
  */
81
- getSolicitationActionsForOrder(amazonOrderId: string, marketplaceIds: Array<string>, options?: any): AxiosPromise<GetSolicitationActionsForOrderResponse>;
79
+ getSolicitationActionsForOrder(requestParameters: SolicitationsApiGetSolicitationActionsForOrderRequest, options?: AxiosRequestConfig): AxiosPromise<GetSolicitationActionsForOrderResponse>;
82
80
  };
83
81
  /**
84
82
  * Request parameters for createProductReviewAndSellerFeedbackSolicitation operation in SolicitationsApi.
@@ -9,8 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { Configuration } from "./configuration";
13
- import { AxiosInstance, AxiosRequestConfig } from 'axios';
12
+ import type { Configuration } from './configuration';
13
+ import type { AxiosInstance, AxiosRequestConfig } from 'axios';
14
14
  export declare const BASE_PATH: string;
15
15
  /**
16
16
  *
@@ -50,6 +50,5 @@ export declare class BaseAPI {
50
50
  */
51
51
  export declare class RequiredError extends Error {
52
52
  field: string;
53
- name: "RequiredError";
54
53
  constructor(field: string, msg?: string);
55
54
  }
@@ -10,9 +10,9 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /// <reference types="node" />
13
- import { Configuration } from "./configuration";
14
- import { RequestArgs } from "./base";
15
- import { AxiosInstance, AxiosResponse } from 'axios';
13
+ import type { Configuration } from "./configuration";
14
+ import type { RequestArgs } from "./base";
15
+ import type { AxiosInstance, AxiosResponse } from 'axios';
16
16
  /**
17
17
  *
18
18
  * @export
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@sp-api-sdk/solicitations-api-v1",
3
3
  "author": "Vincent Mesquita <vincent.mesquita@bizon.solutions>",
4
4
  "description": "With the Solicitations API you can build applications that send non-critical solicitations to buyers. You can get a list of solicitation types that are available for an order that you specify, then call an operation that sends a solicitation to the buyer for that order. Buyers cannot respond to solicitations sent by this API, and these solicitations do not appear in the Messaging section of Seller Central or in the recipient's Message Center. The Solicitations API returns responses that are formed according to the JSON Hypertext Application Language (HAL) standard.",
5
- "version": "1.10.8",
5
+ "version": "1.10.10",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/es/index.js",
8
8
  "types": "dist/types/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "test": "jest"
27
27
  },
28
28
  "dependencies": {
29
- "@sp-api-sdk/common": "^1.9.20",
29
+ "@sp-api-sdk/common": "^1.9.22",
30
30
  "axios": "^0.27.2"
31
31
  },
32
32
  "repository": {
@@ -51,5 +51,5 @@
51
51
  "typedoc": {
52
52
  "entryPoint": "./index.ts"
53
53
  },
54
- "gitHead": "e8ea8ef5b7745f2c4413bd7dd8eefa1b31cee128"
54
+ "gitHead": "19982f06cbbd770bfc7b9f1bc8a42f59b57baead"
55
55
  }