/** * Selling Partner API for Uploads * The Uploads API lets you upload files that you can programmatically access using other Selling Partner APIs, such as the A+ Content API and the Messaging API. * * The version of the OpenAPI document: 2020-11-01 * * * 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'; /** * The response schema for the createUploadDestination operation. * @export * @interface CreateUploadDestinationResponse */ export interface CreateUploadDestinationResponse { /** * * @type {UploadDestination} * @memberof CreateUploadDestinationResponse */ payload?: UploadDestination; /** * A list of error responses returned when a request is unsuccessful. * @type {Array} * @memberof CreateUploadDestinationResponse */ errors?: Array; } /** * Error response returned when the request is unsuccessful. * @export * @interface ModelError */ export interface ModelError { /** * An error code that identifies the type of error that occurred. * @type {string} * @memberof ModelError */ code: string; /** * A message that describes the error condition in a human-readable form. * @type {string} * @memberof ModelError */ message: string; /** * Additional details that can help the caller understand or fix the issue. * @type {string} * @memberof ModelError */ details?: string; } /** * Information about an upload destination. * @export * @interface UploadDestination */ export interface UploadDestination { /** * The unique identifier for the upload destination. * @type {string} * @memberof UploadDestination */ uploadDestinationId?: string; /** * The URL for the upload destination. * @type {string} * @memberof UploadDestination */ url?: string; /** * The headers to include in the upload request. * @type {object} * @memberof UploadDestination */ headers?: object; } /** * UploadsApi - axios parameter creator * @export */ export declare const UploadsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Creates an upload destination, returning the information required to upload a file to the destination and to programmatically access the file. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {Array} marketplaceIds A list of marketplace identifiers. This specifies the marketplaces where the upload will be available. Only one marketplace can be specified. * @param {string} contentMD5 An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit. * @param {string} resource The resource for the upload destination that you are creating. For example, if you are creating an upload destination for the createLegalDisclosure operation of the Messaging API, the `{resource}` would be `/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`, and the entire path would be `/uploads/2020-11-01/uploadDestinations/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`. If you are creating an upload destination for an Aplus content document, the `{resource}` would be `aplus/2020-11-01/contentDocuments` and the path would be `/uploads/v1/uploadDestinations/aplus/2020-11-01/contentDocuments`. * @param {string} [contentType] The content type of the file to be uploaded. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createUploadDestinationForResource: (marketplaceIds: Array, contentMD5: string, resource: string, contentType?: string, options?: any) => Promise; }; /** * UploadsApi - functional programming interface * @export */ export declare const UploadsApiFp: (configuration?: Configuration) => { /** * Creates an upload destination, returning the information required to upload a file to the destination and to programmatically access the file. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {Array} marketplaceIds A list of marketplace identifiers. This specifies the marketplaces where the upload will be available. Only one marketplace can be specified. * @param {string} contentMD5 An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit. * @param {string} resource The resource for the upload destination that you are creating. For example, if you are creating an upload destination for the createLegalDisclosure operation of the Messaging API, the `{resource}` would be `/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`, and the entire path would be `/uploads/2020-11-01/uploadDestinations/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`. If you are creating an upload destination for an Aplus content document, the `{resource}` would be `aplus/2020-11-01/contentDocuments` and the path would be `/uploads/v1/uploadDestinations/aplus/2020-11-01/contentDocuments`. * @param {string} [contentType] The content type of the file to be uploaded. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createUploadDestinationForResource(marketplaceIds: Array, contentMD5: string, resource: string, contentType?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * UploadsApi - factory interface * @export */ export declare const UploadsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Creates an upload destination, returning the information required to upload a file to the destination and to programmatically access the file. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {Array} marketplaceIds A list of marketplace identifiers. This specifies the marketplaces where the upload will be available. Only one marketplace can be specified. * @param {string} contentMD5 An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit. * @param {string} resource The resource for the upload destination that you are creating. For example, if you are creating an upload destination for the createLegalDisclosure operation of the Messaging API, the `{resource}` would be `/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`, and the entire path would be `/uploads/2020-11-01/uploadDestinations/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`. If you are creating an upload destination for an Aplus content document, the `{resource}` would be `aplus/2020-11-01/contentDocuments` and the path would be `/uploads/v1/uploadDestinations/aplus/2020-11-01/contentDocuments`. * @param {string} [contentType] The content type of the file to be uploaded. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createUploadDestinationForResource(marketplaceIds: Array, contentMD5: string, resource: string, contentType?: string, options?: any): AxiosPromise; }; /** * Request parameters for createUploadDestinationForResource operation in UploadsApi. * @export * @interface UploadsApiCreateUploadDestinationForResourceRequest */ export interface UploadsApiCreateUploadDestinationForResourceRequest { /** * A list of marketplace identifiers. This specifies the marketplaces where the upload will be available. Only one marketplace can be specified. * @type {Array} * @memberof UploadsApiCreateUploadDestinationForResource */ readonly marketplaceIds: Array; /** * An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit. * @type {string} * @memberof UploadsApiCreateUploadDestinationForResource */ readonly contentMD5: string; /** * The resource for the upload destination that you are creating. For example, if you are creating an upload destination for the createLegalDisclosure operation of the Messaging API, the `{resource}` would be `/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`, and the entire path would be `/uploads/2020-11-01/uploadDestinations/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`. If you are creating an upload destination for an Aplus content document, the `{resource}` would be `aplus/2020-11-01/contentDocuments` and the path would be `/uploads/v1/uploadDestinations/aplus/2020-11-01/contentDocuments`. * @type {string} * @memberof UploadsApiCreateUploadDestinationForResource */ readonly resource: string; /** * The content type of the file to be uploaded. * @type {string} * @memberof UploadsApiCreateUploadDestinationForResource */ readonly contentType?: string; } /** * UploadsApi - object-oriented interface * @export * @class UploadsApi * @extends {BaseAPI} */ export declare class UploadsApi extends BaseAPI { /** * Creates an upload destination, returning the information required to upload a file to the destination and to programmatically access the file. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api). * @param {UploadsApiCreateUploadDestinationForResourceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UploadsApi */ createUploadDestinationForResource(requestParameters: UploadsApiCreateUploadDestinationForResourceRequest, options?: any): Promise>; }