UNPKG

@datenkraft/bb-fulfillment-api-ts-client

Version:

The fulfillment API TS Client enables you to work with the fulfillment API

359 lines (358 loc) 29.2 kB
/** * Fulfillment API * - alpha: Currently developed API version. Subject to major changes. - beta: A semi-stable early access version. New features can be added. Breaking changes are possible. - stable: The API is recommended for use in production. [Changelog](https://fulfillment-api.steve.niceshops.com/v2/docs/changelog.html) All data is transferred in UTF-8 encoding.\\ The API uses stateless HTTP. No cookies have to be kept.\\ Authentication via OAuth2 client credentials flow. [Privacy Policy](https://www.niceshops.com/en/dienstleistungen/data-privacy-policy) [Fulfillment API PHP client @Packagist](https://packagist.org/packages/datenkraft/bb-fulfillment-api-php-client) * * The version of the OpenAPI document: v2.beta * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { RequestArgs, BaseAPI } from '../base'; import { NewProductDraft } from '../models'; import { ProductDraft } from '../models'; import { ProductDraftBulkImport207ResponseInner } from '../models'; import { ProductDraftCollection } from '../models'; /** * ProductDraftApi - axios parameter creator * @export */ export declare const ProductDraftApiAxiosParamCreator: (configuration?: Configuration) => { /** * Delete a product draft.\\ **The product draft may only be deleted while it is still in pending state.** * @summary Delete a product draft. * @param {string} productDraftId ID of the product draft * @param {string} shopCode The shopCode used internally to distinguish between clients. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteProductDraft: (productDraftId: string, shopCode: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Read the product draft specified by the given product draft ID. * @summary Read the product draft specified by the given product draft ID. * @param {string} productDraftId ID of the product draft * @param {string} shopCode The shopCode used internally to distinguish between clients. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProductDraft: (productDraftId: string, shopCode: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Get a spreadsheet template for performing POST queries to the respective endpoint. The file type is controlled by the accept header. The fill-in help in the second line can be removed or remain. * @summary Get a spreadsheet template for performing POST queries to the respective endpoint. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProductDraftBulkImportTemplate: (options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Read a product draft collection. These are read in multiple pages with a defined page size. * @summary Read a product draft collection. * @param {string} filterShopCode The shopCode used internally to distinguish between clients. * @param {number} [page] The page to read. Default is the first page. * @param {number} [pageSize] The maximum size per page is 100. Default is 100. * @param {'default' | 'totalCount'} [paginationMode] The paginationMode to use: - default: The total number of items in the collection will not be calculated. - totalCount: The total number of items in the collection will be calculated. This can mean loss of performance. * @param {string} [filterProductNumber] Filter by a productNumber * @param {'pending' | 'accepted' | 'declined'} [filterProductDraftStatus] Filter by a product draft status * @param {string} [filterSearch] Filter for product draft search. \\ Usage: - Provide one or multiple search terms (min. 2 characters) to filter results. - Multiple search terms are separated by spaces. - The search is not case sensitive. - The search is only enabled for the productNumber. - Each search term filters the response for products where the productNumber contains the search term. - For example, filter[search]&#x3D;\&#39;term1 term2\&#39; will filter the result for products where \&#39;term1\&#39; is found in the productNumber and \&#39;term2\&#39; is also found in the productNumber. If only \&#39;term1\&#39; or \&#39;term2\&#39; is found in the productNumber, the product is not included in the results. * @param {string} [filterProductDraftDateFrom] Filter for productDraftDate Format Y-m-d * @param {string} [filterProductDraftDateTo] Filter for productDraftDate Format Y-m-d * @param {string} [sortBy] Sort the results by one or more comma-separated sort criteria, with the criterion specified first having priority. Available sort orders: - asc: ascending order - desc: descending order Available fields for sorting: - productDraftDate The default sort order is productDraftDate:desc. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProductDraftCollection: (filterShopCode: string, page?: number, pageSize?: number, paginationMode?: 'default' | 'totalCount', filterProductNumber?: string, filterProductDraftStatus?: 'pending' | 'accepted' | 'declined', filterSearch?: string, filterProductDraftDateFrom?: string, filterProductDraftDateTo?: string, sortBy?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Create a new product draft to initiate the creation new products.Product drafts will be put into a queue for manual approval. * @summary Create a new product draft to initiate the creation new products. * @param {string} shopCode The shopCode used internally to distinguish between clients. * @param {NewProductDraft} newProductDraft * @param {*} [options] Override http request option. * @throws {RequiredError} */ postProductDraft: (shopCode: string, newProductDraft: NewProductDraft, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Import one or more new product draft(s). The file type is controlled by the content type attribute of the uploaded file * @summary Import one or more new product drafts. * @param {File} file File to upload * @param {*} [options] Override http request option. * @throws {RequiredError} */ productDraftBulkImport: (file: File, options?: AxiosRequestConfig) => Promise<RequestArgs>; }; /** * ProductDraftApi - functional programming interface * @export */ export declare const ProductDraftApiFp: (configuration?: Configuration) => { /** * Delete a product draft.\\ **The product draft may only be deleted while it is still in pending state.** * @summary Delete a product draft. * @param {string} productDraftId ID of the product draft * @param {string} shopCode The shopCode used internally to distinguish between clients. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteProductDraft(productDraftId: string, shopCode: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>; /** * Read the product draft specified by the given product draft ID. * @summary Read the product draft specified by the given product draft ID. * @param {string} productDraftId ID of the product draft * @param {string} shopCode The shopCode used internally to distinguish between clients. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProductDraft(productDraftId: string, shopCode: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProductDraft>>; /** * Get a spreadsheet template for performing POST queries to the respective endpoint. The file type is controlled by the accept header. The fill-in help in the second line can be removed or remain. * @summary Get a spreadsheet template for performing POST queries to the respective endpoint. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProductDraftBulkImportTemplate(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>; /** * Read a product draft collection. These are read in multiple pages with a defined page size. * @summary Read a product draft collection. * @param {string} filterShopCode The shopCode used internally to distinguish between clients. * @param {number} [page] The page to read. Default is the first page. * @param {number} [pageSize] The maximum size per page is 100. Default is 100. * @param {'default' | 'totalCount'} [paginationMode] The paginationMode to use: - default: The total number of items in the collection will not be calculated. - totalCount: The total number of items in the collection will be calculated. This can mean loss of performance. * @param {string} [filterProductNumber] Filter by a productNumber * @param {'pending' | 'accepted' | 'declined'} [filterProductDraftStatus] Filter by a product draft status * @param {string} [filterSearch] Filter for product draft search. \\ Usage: - Provide one or multiple search terms (min. 2 characters) to filter results. - Multiple search terms are separated by spaces. - The search is not case sensitive. - The search is only enabled for the productNumber. - Each search term filters the response for products where the productNumber contains the search term. - For example, filter[search]&#x3D;\&#39;term1 term2\&#39; will filter the result for products where \&#39;term1\&#39; is found in the productNumber and \&#39;term2\&#39; is also found in the productNumber. If only \&#39;term1\&#39; or \&#39;term2\&#39; is found in the productNumber, the product is not included in the results. * @param {string} [filterProductDraftDateFrom] Filter for productDraftDate Format Y-m-d * @param {string} [filterProductDraftDateTo] Filter for productDraftDate Format Y-m-d * @param {string} [sortBy] Sort the results by one or more comma-separated sort criteria, with the criterion specified first having priority. Available sort orders: - asc: ascending order - desc: descending order Available fields for sorting: - productDraftDate The default sort order is productDraftDate:desc. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProductDraftCollection(filterShopCode: string, page?: number, pageSize?: number, paginationMode?: 'default' | 'totalCount', filterProductNumber?: string, filterProductDraftStatus?: 'pending' | 'accepted' | 'declined', filterSearch?: string, filterProductDraftDateFrom?: string, filterProductDraftDateTo?: string, sortBy?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProductDraftCollection>>; /** * Create a new product draft to initiate the creation new products.Product drafts will be put into a queue for manual approval. * @summary Create a new product draft to initiate the creation new products. * @param {string} shopCode The shopCode used internally to distinguish between clients. * @param {NewProductDraft} newProductDraft * @param {*} [options] Override http request option. * @throws {RequiredError} */ postProductDraft(shopCode: string, newProductDraft: NewProductDraft, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProductDraft>>; /** * Import one or more new product draft(s). The file type is controlled by the content type attribute of the uploaded file * @summary Import one or more new product drafts. * @param {File} file File to upload * @param {*} [options] Override http request option. * @throws {RequiredError} */ productDraftBulkImport(file: File, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ProductDraftBulkImport207ResponseInner>>>; }; /** * ProductDraftApi - factory interface * @export */ export declare const ProductDraftApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Delete a product draft.\\ **The product draft may only be deleted while it is still in pending state.** * @summary Delete a product draft. * @param {string} productDraftId ID of the product draft * @param {string} shopCode The shopCode used internally to distinguish between clients. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteProductDraft(productDraftId: string, shopCode: string, options?: any): AxiosPromise<void>; /** * Read the product draft specified by the given product draft ID. * @summary Read the product draft specified by the given product draft ID. * @param {string} productDraftId ID of the product draft * @param {string} shopCode The shopCode used internally to distinguish between clients. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProductDraft(productDraftId: string, shopCode: string, options?: any): AxiosPromise<ProductDraft>; /** * Get a spreadsheet template for performing POST queries to the respective endpoint. The file type is controlled by the accept header. The fill-in help in the second line can be removed or remain. * @summary Get a spreadsheet template for performing POST queries to the respective endpoint. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProductDraftBulkImportTemplate(options?: any): AxiosPromise<string>; /** * Read a product draft collection. These are read in multiple pages with a defined page size. * @summary Read a product draft collection. * @param {string} filterShopCode The shopCode used internally to distinguish between clients. * @param {number} [page] The page to read. Default is the first page. * @param {number} [pageSize] The maximum size per page is 100. Default is 100. * @param {'default' | 'totalCount'} [paginationMode] The paginationMode to use: - default: The total number of items in the collection will not be calculated. - totalCount: The total number of items in the collection will be calculated. This can mean loss of performance. * @param {string} [filterProductNumber] Filter by a productNumber * @param {'pending' | 'accepted' | 'declined'} [filterProductDraftStatus] Filter by a product draft status * @param {string} [filterSearch] Filter for product draft search. \\ Usage: - Provide one or multiple search terms (min. 2 characters) to filter results. - Multiple search terms are separated by spaces. - The search is not case sensitive. - The search is only enabled for the productNumber. - Each search term filters the response for products where the productNumber contains the search term. - For example, filter[search]&#x3D;\&#39;term1 term2\&#39; will filter the result for products where \&#39;term1\&#39; is found in the productNumber and \&#39;term2\&#39; is also found in the productNumber. If only \&#39;term1\&#39; or \&#39;term2\&#39; is found in the productNumber, the product is not included in the results. * @param {string} [filterProductDraftDateFrom] Filter for productDraftDate Format Y-m-d * @param {string} [filterProductDraftDateTo] Filter for productDraftDate Format Y-m-d * @param {string} [sortBy] Sort the results by one or more comma-separated sort criteria, with the criterion specified first having priority. Available sort orders: - asc: ascending order - desc: descending order Available fields for sorting: - productDraftDate The default sort order is productDraftDate:desc. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProductDraftCollection(filterShopCode: string, page?: number, pageSize?: number, paginationMode?: 'default' | 'totalCount', filterProductNumber?: string, filterProductDraftStatus?: 'pending' | 'accepted' | 'declined', filterSearch?: string, filterProductDraftDateFrom?: string, filterProductDraftDateTo?: string, sortBy?: string, options?: any): AxiosPromise<ProductDraftCollection>; /** * Create a new product draft to initiate the creation new products.Product drafts will be put into a queue for manual approval. * @summary Create a new product draft to initiate the creation new products. * @param {string} shopCode The shopCode used internally to distinguish between clients. * @param {NewProductDraft} newProductDraft * @param {*} [options] Override http request option. * @throws {RequiredError} */ postProductDraft(shopCode: string, newProductDraft: NewProductDraft, options?: any): AxiosPromise<ProductDraft>; /** * Import one or more new product draft(s). The file type is controlled by the content type attribute of the uploaded file * @summary Import one or more new product drafts. * @param {File} file File to upload * @param {*} [options] Override http request option. * @throws {RequiredError} */ productDraftBulkImport(file: File, options?: any): AxiosPromise<Array<ProductDraftBulkImport207ResponseInner>>; }; /** * ProductDraftApi - interface * @export * @interface ProductDraftApi */ export interface ProductDraftApiInterface { /** * Delete a product draft.\\ **The product draft may only be deleted while it is still in pending state.** * @summary Delete a product draft. * @param {string} productDraftId ID of the product draft * @param {string} shopCode The shopCode used internally to distinguish between clients. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProductDraftApiInterface */ deleteProductDraft(productDraftId: string, shopCode: string, options?: AxiosRequestConfig): AxiosPromise<void>; /** * Read the product draft specified by the given product draft ID. * @summary Read the product draft specified by the given product draft ID. * @param {string} productDraftId ID of the product draft * @param {string} shopCode The shopCode used internally to distinguish between clients. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProductDraftApiInterface */ getProductDraft(productDraftId: string, shopCode: string, options?: AxiosRequestConfig): AxiosPromise<ProductDraft>; /** * Get a spreadsheet template for performing POST queries to the respective endpoint. The file type is controlled by the accept header. The fill-in help in the second line can be removed or remain. * @summary Get a spreadsheet template for performing POST queries to the respective endpoint. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProductDraftApiInterface */ getProductDraftBulkImportTemplate(options?: AxiosRequestConfig): AxiosPromise<string>; /** * Read a product draft collection. These are read in multiple pages with a defined page size. * @summary Read a product draft collection. * @param {string} filterShopCode The shopCode used internally to distinguish between clients. * @param {number} [page] The page to read. Default is the first page. * @param {number} [pageSize] The maximum size per page is 100. Default is 100. * @param {'default' | 'totalCount'} [paginationMode] The paginationMode to use: - default: The total number of items in the collection will not be calculated. - totalCount: The total number of items in the collection will be calculated. This can mean loss of performance. * @param {string} [filterProductNumber] Filter by a productNumber * @param {'pending' | 'accepted' | 'declined'} [filterProductDraftStatus] Filter by a product draft status * @param {string} [filterSearch] Filter for product draft search. \\ Usage: - Provide one or multiple search terms (min. 2 characters) to filter results. - Multiple search terms are separated by spaces. - The search is not case sensitive. - The search is only enabled for the productNumber. - Each search term filters the response for products where the productNumber contains the search term. - For example, filter[search]&#x3D;\&#39;term1 term2\&#39; will filter the result for products where \&#39;term1\&#39; is found in the productNumber and \&#39;term2\&#39; is also found in the productNumber. If only \&#39;term1\&#39; or \&#39;term2\&#39; is found in the productNumber, the product is not included in the results. * @param {string} [filterProductDraftDateFrom] Filter for productDraftDate Format Y-m-d * @param {string} [filterProductDraftDateTo] Filter for productDraftDate Format Y-m-d * @param {string} [sortBy] Sort the results by one or more comma-separated sort criteria, with the criterion specified first having priority. Available sort orders: - asc: ascending order - desc: descending order Available fields for sorting: - productDraftDate The default sort order is productDraftDate:desc. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProductDraftApiInterface */ getProductDraftCollection(filterShopCode: string, page?: number, pageSize?: number, paginationMode?: 'default' | 'totalCount', filterProductNumber?: string, filterProductDraftStatus?: 'pending' | 'accepted' | 'declined', filterSearch?: string, filterProductDraftDateFrom?: string, filterProductDraftDateTo?: string, sortBy?: string, options?: AxiosRequestConfig): AxiosPromise<ProductDraftCollection>; /** * Create a new product draft to initiate the creation new products.Product drafts will be put into a queue for manual approval. * @summary Create a new product draft to initiate the creation new products. * @param {string} shopCode The shopCode used internally to distinguish between clients. * @param {NewProductDraft} newProductDraft * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProductDraftApiInterface */ postProductDraft(shopCode: string, newProductDraft: NewProductDraft, options?: AxiosRequestConfig): AxiosPromise<ProductDraft>; /** * Import one or more new product draft(s). The file type is controlled by the content type attribute of the uploaded file * @summary Import one or more new product drafts. * @param {File} file File to upload * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProductDraftApiInterface */ productDraftBulkImport(file: File, options?: AxiosRequestConfig): AxiosPromise<Array<ProductDraftBulkImport207ResponseInner>>; } /** * ProductDraftApi - object-oriented interface * @export * @class ProductDraftApi * @extends {BaseAPI} */ export declare class ProductDraftApi extends BaseAPI implements ProductDraftApiInterface { /** * Delete a product draft.\\ **The product draft may only be deleted while it is still in pending state.** * @summary Delete a product draft. * @param {string} productDraftId ID of the product draft * @param {string} shopCode The shopCode used internally to distinguish between clients. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProductDraftApi */ deleteProductDraft(productDraftId: string, shopCode: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>; /** * Read the product draft specified by the given product draft ID. * @summary Read the product draft specified by the given product draft ID. * @param {string} productDraftId ID of the product draft * @param {string} shopCode The shopCode used internally to distinguish between clients. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProductDraftApi */ getProductDraft(productDraftId: string, shopCode: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ProductDraft, any>>; /** * Get a spreadsheet template for performing POST queries to the respective endpoint. The file type is controlled by the accept header. The fill-in help in the second line can be removed or remain. * @summary Get a spreadsheet template for performing POST queries to the respective endpoint. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProductDraftApi */ getProductDraftBulkImportTemplate(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>; /** * Read a product draft collection. These are read in multiple pages with a defined page size. * @summary Read a product draft collection. * @param {string} filterShopCode The shopCode used internally to distinguish between clients. * @param {number} [page] The page to read. Default is the first page. * @param {number} [pageSize] The maximum size per page is 100. Default is 100. * @param {'default' | 'totalCount'} [paginationMode] The paginationMode to use: - default: The total number of items in the collection will not be calculated. - totalCount: The total number of items in the collection will be calculated. This can mean loss of performance. * @param {string} [filterProductNumber] Filter by a productNumber * @param {'pending' | 'accepted' | 'declined'} [filterProductDraftStatus] Filter by a product draft status * @param {string} [filterSearch] Filter for product draft search. \\ Usage: - Provide one or multiple search terms (min. 2 characters) to filter results. - Multiple search terms are separated by spaces. - The search is not case sensitive. - The search is only enabled for the productNumber. - Each search term filters the response for products where the productNumber contains the search term. - For example, filter[search]&#x3D;\&#39;term1 term2\&#39; will filter the result for products where \&#39;term1\&#39; is found in the productNumber and \&#39;term2\&#39; is also found in the productNumber. If only \&#39;term1\&#39; or \&#39;term2\&#39; is found in the productNumber, the product is not included in the results. * @param {string} [filterProductDraftDateFrom] Filter for productDraftDate Format Y-m-d * @param {string} [filterProductDraftDateTo] Filter for productDraftDate Format Y-m-d * @param {string} [sortBy] Sort the results by one or more comma-separated sort criteria, with the criterion specified first having priority. Available sort orders: - asc: ascending order - desc: descending order Available fields for sorting: - productDraftDate The default sort order is productDraftDate:desc. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProductDraftApi */ getProductDraftCollection(filterShopCode: string, page?: number, pageSize?: number, paginationMode?: 'default' | 'totalCount', filterProductNumber?: string, filterProductDraftStatus?: 'pending' | 'accepted' | 'declined', filterSearch?: string, filterProductDraftDateFrom?: string, filterProductDraftDateTo?: string, sortBy?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ProductDraftCollection, any>>; /** * Create a new product draft to initiate the creation new products.Product drafts will be put into a queue for manual approval. * @summary Create a new product draft to initiate the creation new products. * @param {string} shopCode The shopCode used internally to distinguish between clients. * @param {NewProductDraft} newProductDraft * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProductDraftApi */ postProductDraft(shopCode: string, newProductDraft: NewProductDraft, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ProductDraft, any>>; /** * Import one or more new product draft(s). The file type is controlled by the content type attribute of the uploaded file * @summary Import one or more new product drafts. * @param {File} file File to upload * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProductDraftApi */ productDraftBulkImport(file: File, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ProductDraftBulkImport207ResponseInner[], any>>; }