@whitebox-co/walmart-marketplace-api
Version:
A fully typed TypeScript, Javascript, and Node.js API library for the Walmart Marketplace API
711 lines (710 loc) • 21.9 kB
TypeScript
/**
* Authentication & Authorization Management
* The Walmart Marketplace APIs use OAuth for token-based authentication and authorization.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Configuration } from './configuration';
import { AxiosPromise, AxiosInstance } from 'axios';
import { RequestArgs, BaseAPI } from './base';
/**
*
* @export
* @interface IAMTokenDTO
*/
export interface IAMTokenDTO {
/**
* The type of access token to be issued
* @type {string}
* @memberof IAMTokenDTO
*/
grant_type: string;
}
/**
*
* @export
* @interface InlineResponse200
*/
export interface InlineResponse200 {
/**
* Unique token string generated by the API call
* @type {string}
* @memberof InlineResponse200
*/
accessToken: string;
/**
* Type of token according to user. (e.g., \'BEARER\')
* @type {string}
* @memberof InlineResponse200
*/
tokenType?: string;
/**
* Seconds until expiration of token
* @type {number}
* @memberof InlineResponse200
*/
expiresIn?: number;
}
/**
*
* @export
* @interface InlineResponse2001
*/
export interface InlineResponse2001 {
/**
* The timestamp when the token expires
* @type {string}
* @memberof InlineResponse2001
*/
expire_at?: string;
/**
* The timestamp when the token is issued
* @type {string}
* @memberof InlineResponse2001
*/
issued_at?: string;
/**
* Whether the token is valid; boolean value of true or false
* @type {boolean}
* @memberof InlineResponse2001
*/
is_valid?: boolean;
/**
* Whether the keys Seller used are correctly associated
* @type {boolean}
* @memberof InlineResponse2001
*/
is_channel_match?: boolean;
/**
*
* @type {InlineResponse2001Scopes}
* @memberof InlineResponse2001
*/
scopes?: InlineResponse2001Scopes;
}
/**
* The API categories with their corresponding access levels
* @export
* @interface InlineResponse2001Scopes
*/
export interface InlineResponse2001Scopes {
/**
*
* @type {string}
* @memberof InlineResponse2001Scopes
*/
reports?: InlineResponse2001ScopesReportsEnum;
/**
*
* @type {string}
* @memberof InlineResponse2001Scopes
*/
item?: InlineResponse2001ScopesItemEnum;
/**
*
* @type {string}
* @memberof InlineResponse2001Scopes
*/
shipping?: InlineResponse2001ScopesShippingEnum;
/**
*
* @type {string}
* @memberof InlineResponse2001Scopes
*/
price?: InlineResponse2001ScopesPriceEnum;
/**
*
* @type {string}
* @memberof InlineResponse2001Scopes
*/
lagtime?: InlineResponse2001ScopesLagtimeEnum;
/**
*
* @type {string}
* @memberof InlineResponse2001Scopes
*/
feeds?: InlineResponse2001ScopesFeedsEnum;
/**
*
* @type {string}
* @memberof InlineResponse2001Scopes
*/
returns?: InlineResponse2001ScopesReturnsEnum;
/**
*
* @type {string}
* @memberof InlineResponse2001Scopes
*/
orders?: InlineResponse2001ScopesOrdersEnum;
/**
*
* @type {string}
* @memberof InlineResponse2001Scopes
*/
rules?: InlineResponse2001ScopesRulesEnum;
/**
*
* @type {string}
* @memberof InlineResponse2001Scopes
*/
inventory?: InlineResponse2001ScopesInventoryEnum;
/**
*
* @type {string}
* @memberof InlineResponse2001Scopes
*/
content?: InlineResponse2001ScopesContentEnum;
}
/**
* @export
* @enum {string}
*/
export declare enum InlineResponse2001ScopesReportsEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum InlineResponse2001ScopesItemEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum InlineResponse2001ScopesShippingEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum InlineResponse2001ScopesPriceEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum InlineResponse2001ScopesLagtimeEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum InlineResponse2001ScopesFeedsEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum InlineResponse2001ScopesReturnsEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum InlineResponse2001ScopesOrdersEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum InlineResponse2001ScopesRulesEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum InlineResponse2001ScopesInventoryEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum InlineResponse2001ScopesContentEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
*
* @export
* @interface OAuthToken
*/
export interface OAuthToken {
/**
* Unique token string generated by the API call
* @type {string}
* @memberof OAuthToken
*/
access_token: string;
/**
* Type of token according to user. (e.g., \'BEARER\')
* @type {string}
* @memberof OAuthToken
*/
token_type?: string;
/**
* Seconds until expiration of token
* @type {number}
* @memberof OAuthToken
*/
expires_in?: number;
}
/**
*
* @export
* @interface OAuthTokenDTO
*/
export interface OAuthTokenDTO {
/**
* Unique token string generated by the API call
* @type {string}
* @memberof OAuthTokenDTO
*/
accessToken: string;
/**
* Type of token according to user. (e.g., \'BEARER\')
* @type {string}
* @memberof OAuthTokenDTO
*/
tokenType?: string;
/**
* Seconds until expiration of token
* @type {number}
* @memberof OAuthTokenDTO
*/
expiresIn?: number;
}
/**
* The API categories with their corresponding access levels
* @export
* @interface Scopes
*/
export interface Scopes {
/**
*
* @type {string}
* @memberof Scopes
*/
reports?: ScopesReportsEnum;
/**
*
* @type {string}
* @memberof Scopes
*/
item?: ScopesItemEnum;
/**
*
* @type {string}
* @memberof Scopes
*/
shipping?: ScopesShippingEnum;
/**
*
* @type {string}
* @memberof Scopes
*/
price?: ScopesPriceEnum;
/**
*
* @type {string}
* @memberof Scopes
*/
lagtime?: ScopesLagtimeEnum;
/**
*
* @type {string}
* @memberof Scopes
*/
feeds?: ScopesFeedsEnum;
/**
*
* @type {string}
* @memberof Scopes
*/
returns?: ScopesReturnsEnum;
/**
*
* @type {string}
* @memberof Scopes
*/
orders?: ScopesOrdersEnum;
/**
*
* @type {string}
* @memberof Scopes
*/
rules?: ScopesRulesEnum;
/**
*
* @type {string}
* @memberof Scopes
*/
inventory?: ScopesInventoryEnum;
/**
*
* @type {string}
* @memberof Scopes
*/
content?: ScopesContentEnum;
}
/**
* @export
* @enum {string}
*/
export declare enum ScopesReportsEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum ScopesItemEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum ScopesShippingEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum ScopesPriceEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum ScopesLagtimeEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum ScopesFeedsEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum ScopesReturnsEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum ScopesOrdersEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum ScopesRulesEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum ScopesInventoryEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
* @export
* @enum {string}
*/
export declare enum ScopesContentEnum {
FullAccess = "full_access",
ViewOnly = "view_only",
NoAccess = "no_access"
}
/**
*
* @export
* @interface TokenDetailResponse
*/
export interface TokenDetailResponse {
/**
* The timestamp when the token expires
* @type {string}
* @memberof TokenDetailResponse
*/
expire_at?: string;
/**
* The timestamp when the token is issued
* @type {string}
* @memberof TokenDetailResponse
*/
issued_at?: string;
/**
* Whether the token is valid; boolean value of true or false
* @type {boolean}
* @memberof TokenDetailResponse
*/
is_valid?: boolean;
/**
* Whether the keys Seller used are correctly associated
* @type {boolean}
* @memberof TokenDetailResponse
*/
is_channel_match?: boolean;
/**
*
* @type {InlineResponse2001Scopes}
* @memberof TokenDetailResponse
*/
scopes?: InlineResponse2001Scopes;
}
/**
* AuthenticationApi - axios parameter creator
* @export
*/
export declare const AuthenticationApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Retrieves information on the access levels delegated by Sellers for their Solution Providers. The scope includes a range of API categories and their corresponding access levels, for example Reports: View Only, Item: Full Access, etc.
* @summary Token Detail
* @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @param {string} wMSVCNAME Walmart Service Name
* @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTokenDetail: (wMSECACCESSTOKEN: string, authorization: string, wMQOSCORRELATIONID: string, wMSVCNAME: string, wMCONSUMERCHANNELTYPE?: string, options?: any) => Promise<RequestArgs>;
/**
* Get access token by providing Client ID and Client Secret.
* @summary Token API
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @param {string} wMSVCNAME Walmart Service Name
* @param {string} grantType The type of access token to be issued
* @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
tokenAPI: (authorization: string, wMQOSCORRELATIONID: string, wMSVCNAME: string, grantType: string, wMCONSUMERCHANNELTYPE?: string, options?: any) => Promise<RequestArgs>;
};
/**
* AuthenticationApi - functional programming interface
* @export
*/
export declare const AuthenticationApiFp: (configuration?: Configuration) => {
/**
* Retrieves information on the access levels delegated by Sellers for their Solution Providers. The scope includes a range of API categories and their corresponding access levels, for example Reports: View Only, Item: Full Access, etc.
* @summary Token Detail
* @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @param {string} wMSVCNAME Walmart Service Name
* @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTokenDetail(wMSECACCESSTOKEN: string, authorization: string, wMQOSCORRELATIONID: string, wMSVCNAME: string, wMCONSUMERCHANNELTYPE?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse2001>>;
/**
* Get access token by providing Client ID and Client Secret.
* @summary Token API
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @param {string} wMSVCNAME Walmart Service Name
* @param {string} grantType The type of access token to be issued
* @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
tokenAPI(authorization: string, wMQOSCORRELATIONID: string, wMSVCNAME: string, grantType: string, wMCONSUMERCHANNELTYPE?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>>;
};
/**
* AuthenticationApi - factory interface
* @export
*/
export declare const AuthenticationApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Retrieves information on the access levels delegated by Sellers for their Solution Providers. The scope includes a range of API categories and their corresponding access levels, for example Reports: View Only, Item: Full Access, etc.
* @summary Token Detail
* @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @param {string} wMSVCNAME Walmart Service Name
* @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTokenDetail(wMSECACCESSTOKEN: string, authorization: string, wMQOSCORRELATIONID: string, wMSVCNAME: string, wMCONSUMERCHANNELTYPE?: string, options?: any): AxiosPromise<InlineResponse2001>;
/**
* Get access token by providing Client ID and Client Secret.
* @summary Token API
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @param {string} wMSVCNAME Walmart Service Name
* @param {string} grantType The type of access token to be issued
* @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
tokenAPI(authorization: string, wMQOSCORRELATIONID: string, wMSVCNAME: string, grantType: string, wMCONSUMERCHANNELTYPE?: string, options?: any): AxiosPromise<InlineResponse200>;
};
/**
* Request parameters for getTokenDetail operation in AuthenticationApi.
* @export
* @interface AuthenticationApiGetTokenDetailRequest
*/
export interface AuthenticationApiGetTokenDetailRequest {
/**
* The access token retrieved in the Token API call
* @type {string}
* @memberof AuthenticationApiGetTokenDetail
*/
readonly wMSECACCESSTOKEN: string;
/**
* Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @type {string}
* @memberof AuthenticationApiGetTokenDetail
*/
readonly authorization: string;
/**
* A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @type {string}
* @memberof AuthenticationApiGetTokenDetail
*/
readonly wMQOSCORRELATIONID: string;
/**
* Walmart Service Name
* @type {string}
* @memberof AuthenticationApiGetTokenDetail
*/
readonly wMSVCNAME: string;
/**
* A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @type {string}
* @memberof AuthenticationApiGetTokenDetail
*/
readonly wMCONSUMERCHANNELTYPE?: string;
}
/**
* Request parameters for tokenAPI operation in AuthenticationApi.
* @export
* @interface AuthenticationApiTokenAPIRequest
*/
export interface AuthenticationApiTokenAPIRequest {
/**
* Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @type {string}
* @memberof AuthenticationApiTokenAPI
*/
readonly authorization: string;
/**
* A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @type {string}
* @memberof AuthenticationApiTokenAPI
*/
readonly wMQOSCORRELATIONID: string;
/**
* Walmart Service Name
* @type {string}
* @memberof AuthenticationApiTokenAPI
*/
readonly wMSVCNAME: string;
/**
* The type of access token to be issued
* @type {string}
* @memberof AuthenticationApiTokenAPI
*/
readonly grantType: string;
/**
* A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @type {string}
* @memberof AuthenticationApiTokenAPI
*/
readonly wMCONSUMERCHANNELTYPE?: string;
}
/**
* AuthenticationApi - object-oriented interface
* @export
* @class AuthenticationApi
* @extends {BaseAPI}
*/
export declare class AuthenticationApi extends BaseAPI {
/**
* Retrieves information on the access levels delegated by Sellers for their Solution Providers. The scope includes a range of API categories and their corresponding access levels, for example Reports: View Only, Item: Full Access, etc.
* @summary Token Detail
* @param {AuthenticationApiGetTokenDetailRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AuthenticationApi
*/
getTokenDetail(requestParameters: AuthenticationApiGetTokenDetailRequest, options?: any): Promise<import("axios").AxiosResponse<InlineResponse2001, any>>;
/**
* Get access token by providing Client ID and Client Secret.
* @summary Token API
* @param {AuthenticationApiTokenAPIRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AuthenticationApi
*/
tokenAPI(requestParameters: AuthenticationApiTokenAPIRequest, options?: any): Promise<import("axios").AxiosResponse<InlineResponse200, any>>;
}