From f3613670914325ba83d4f7583d264a58b0be1a30 Mon Sep 17 00:00:00 2001 From: Toan Nguyen Date: Tue, 14 Nov 2023 20:00:06 +0700 Subject: [PATCH] refactor: mark deprecated options --- .../amazon-selling-partner-api-credentials.ts | 5 +++++ .../api-configuration-parameters.ts | 20 +++++++++++++++++++ src/types/api-clients/index.ts | 1 + 3 files changed, 26 insertions(+) create mode 100644 src/types/api-clients/amazon-selling-partner-api-credentials.ts diff --git a/src/types/api-clients/amazon-selling-partner-api-credentials.ts b/src/types/api-clients/amazon-selling-partner-api-credentials.ts new file mode 100644 index 00000000..2ae5de78 --- /dev/null +++ b/src/types/api-clients/amazon-selling-partner-api-credentials.ts @@ -0,0 +1,5 @@ +export interface AmazonSellingPartnerAPICredentials { + accessKeyId: string + secretAccessKey: string + sessionToken?: string +} diff --git a/src/types/api-clients/api-configuration-parameters.ts b/src/types/api-clients/api-configuration-parameters.ts index 77e43596..24f0c800 100644 --- a/src/types/api-clients/api-configuration-parameters.ts +++ b/src/types/api-clients/api-configuration-parameters.ts @@ -1,5 +1,7 @@ import { AxiosInstance, AxiosRequestConfig } from 'axios' +import { AmazonSellingPartnerAPICredentials } from './amazon-selling-partner-api-credentials' + export interface APIConfigurationParameters { /** * Axios Instance @@ -32,6 +34,15 @@ export interface APIConfigurationParameters { */ baseOptions?: AxiosRequestConfig + /** + * Selling partner API credentials + * + * @deprecated Amazon no longer requires the requests to be signed with AWS4 + * @type {AmazonSellingPartnerAPICredentials} + * @memberof APIConfigurationParameters + */ + credentials?: AmazonSellingPartnerAPICredentials + /** * Selling partner API region * @@ -39,4 +50,13 @@ export interface APIConfigurationParameters { * @memberof APIConfigurationParameters */ region?: string + + /** + * ARN of the IAM Role to be assumed to get the credentials from. + * + * @deprecated Amazon no longer requires the requests to be signed with AWS4 + * @type {string} + * @memberof APIConfigurationParameters + */ + roleArn?: string } diff --git a/src/types/api-clients/index.ts b/src/types/api-clients/index.ts index 652d6c5b..748481fd 100644 --- a/src/types/api-clients/index.ts +++ b/src/types/api-clients/index.ts @@ -1,2 +1,3 @@ export * from './amazon-selling-partner-api-base-path' +export * from './amazon-selling-partner-api-credentials' export * from './api-configuration-parameters'